Fix/Feat: Bulk AI Tagging & Progress Tracking for Folder Management #725#759
Fix/Feat: Bulk AI Tagging & Progress Tracking for Folder Management #725#759parthraninga wants to merge 4 commits intoAOSSIE-Org:mainfrom
Conversation
WalkthroughFrontend dependencies and folder management UI were enhanced with bulk AI-tagging operations, new selection state handling, and persisted UI preferences. The folder management card was refactored to organize folders by tagging status with aggregated controls. Landing page animations were improved with hover and tap interactions. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
landing-page/src/Pages/Landing page/Home1.tsx (2)
36-46: “Download” CTA has no action; either wire it up or use a semantic link.Right now it’s an interactive-looking button without an
onClick(or form behavior). If this is intended to navigate/download, consider switching to<motion.a href="...">(or add anonClickhandler).
47-60: Stale comment + link animation OK.Line 47 comment implies the GitHub navigation is pending, but Lines 49-51 already link to GitHub—suggest removing/updating that comment to avoid confusion.
🧹 Nitpick comments (3)
landing-page/src/Pages/Landing page/Home1.tsx (1)
8-16: Hero entrance animations look fine; consider honoring reduced-motion.If you support accessibility preferences, consider disabling/softening these
initial/animatetransitions whenprefers-reduced-motionis set (Framer Motion supports this viauseReducedMotion()).Also applies to: 17-25, 26-34
frontend/src/hooks/useFolderOperations.tsx (1)
200-219: PreferuseCallbackdeps onmutation.mutate(not the whole mutation object).Depending on the entire
bulkEnableAITaggingMutation/bulkDisableAITaggingMutationcan cause callback identity churn if the mutation object isn’t referentially stable.- const bulkEnableAITagging = useCallback( + const bulkEnableAITagging = useCallback( (folderIds: string[]) => { if (folderIds.length > 0) { - bulkEnableAITaggingMutation.mutate(folderIds); + bulkEnableAITaggingMutation.mutate(folderIds); } }, - [bulkEnableAITaggingMutation], + [bulkEnableAITaggingMutation.mutate], ); - const bulkDisableAITagging = useCallback( + const bulkDisableAITagging = useCallback( (folderIds: string[]) => { if (folderIds.length > 0) { - bulkDisableAITaggingMutation.mutate(folderIds); + bulkDisableAITaggingMutation.mutate(folderIds); } }, - [bulkDisableAITaggingMutation], + [bulkDisableAITaggingMutation.mutate], );frontend/src/pages/SettingsPage/components/FolderManagementCard.tsx (1)
57-66: Persisting collapse prefs is good; consider debouncing writes (optional).If
saveFolderPreferenceswrites tolocalStorage, you may want a small debounce to avoid frequent sync writes when users rapidly toggle sections.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
frontend/package.json(2 hunks)frontend/src/hooks/useFolderOperations.tsx(3 hunks)frontend/src/pages/SettingsPage/components/FolderManagementCard.tsx(1 hunks)landing-page/src/Pages/Landing page/Home1.tsx(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/src/hooks/useFolderOperations.tsx (3)
frontend/src/hooks/useQueryExtension.ts (1)
usePictoMutation(26-78)frontend/src/api/api-functions/folders.ts (1)
enableAITagging(44-52)frontend/src/hooks/useMutationFeedback.tsx (1)
useMutationFeedback(60-135)
🔇 Additional comments (7)
frontend/package.json (2)
108-108: EOF newline-only change — no action.
28-28: No action needed.@radix-ui/react-checkbox@1.3.3has verified peer dependency support for React ^19.0, and your currentreact@19.1.0is fully compatible.frontend/src/hooks/useFolderOperations.tsx (2)
163-196: Bulk mutations + feedback integration looks consistent with existing single-folder flows.
230-240: Nice: exposing bulk pending flags enables proper UI disabling/spinners.frontend/src/pages/SettingsPage/components/FolderManagementCard.tsx (3)
1-22: Good modularization: utilities + components make the bulk UI easier to reason about.
138-142: Render flow + derivedisTaggingPendingwiring looks solid for bulk UX.Also applies to: 150-229
99-137: BackendenableAITaggingis idempotent—re-triggering is safe.The concern about unintended work is unfounded. Verification shows:
db_enable_ai_tagging_batch()simply setsAI_Tagging = True(idempotent at DB level)image_util_process_untagged_images()queries only untagged images and returns early if none existcluster_util_face_clusters_sync()respects a 24-hour rule and processes faces only if needed (> 100 untagged)The "re-trigger enable" branch (lines 116–119) is safe to keep. Both
handleEnableAllandhandleEnableSelectedwork correctly regardless of prior state. No changes required.
Fixes#725
This pull request significantly enhances the folder management experience in the settings page by introducing bulk operations for AI tagging, improved progress tracking, and a more organized UI. The changes focus on enabling users to manage multiple folders at once, track tagging progress, and persist UI preferences for a smoother workflow.
Bulk AI Tagging and Progress Tracking Enhancements:
useFolderOperationshook.FolderBulkActions,FolderProgressSummary, andFolderSection.UI/UX Improvements:
Dependency Updates:
@radix-ui/react-checkboxdependency to support new UI controls for bulk selection.Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.