fix: improve swappable filesystem architecture#1314
fix: improve swappable filesystem architecture#1314MODSetter merged 14 commits intoMODSetter:devfrom
Conversation
…er addition, improving user feedback on folder limits
…esystemBrowser during data fetching
…ling & preserved incremental UX for local folder mode
…lization, and implement caching for filesystem settings
…port for improved context handling
… bundle size in web
…ocal folder operations
… chokidar for real-time updates on local folder changes
|
@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
…rsor-based pagination and enhancing path normalization methods
… standardize fallback filename to 'notes.md'
…nsions and enhance folder expansion persistence in the UI
…e number display, disabling folding, and modifying whitespace rendering options
…r handling for missing parent directories
Description
Sidebar local-folder UX polish
DocumentsSidebarandLocalFilesystemBrowser.Local filesystem root handling + performance improvements
Search-space aware filesystem operations
searchSpaceIdthrough desktop IPC/preload, web integration, and typings.Desktop/web code-splitting cleanup
DesktopLocalTabContentfromDocumentsSidebar.Backend filesystem capability expansion
moveandlist_treeoperations in filesystem middleware/local backends.Real-time local tree sync
File opening + fallback naming consistency
notes.md(removed extension inference).Source editor defaults refinement
Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR introduces significant architectural improvements to the swappable filesystem feature for local folder mode. The main changes include: adding two new filesystem tools (
move_fileandlist_treewith cursor-based pagination) to the agent middleware, implementing per-search-space filesystem settings isolation in the desktop app, adding a real-time filesystem tree watcher using chokidar with safety polling and debouncing, overhauling the local filesystem browser UI with skeleton loading states, and improving path normalization and mount resolution across the stack. The changes enable better scalability for large directory trees, multi-space support, and a more responsive user experience with live filesystem monitoring.⏱️ Estimated Review Time: 1-3 hours
💡 Review Order Suggestion
surfsense_backend/app/agents/new_chat/middleware/filesystem.pysurfsense_backend/app/agents/new_chat/middleware/local_folder_backend.pysurfsense_backend/app/agents/new_chat/middleware/multi_root_local_folder_backend.pysurfsense_backend/tests/unit/middleware/test_filesystem_backends.pysurfsense_backend/tests/unit/middleware/test_multi_root_local_folder_backend.pysurfsense_desktop/src/modules/agent-filesystem.tssurfsense_desktop/src/modules/agent-filesystem-tree-watcher.tssurfsense_desktop/src/ipc/channels.tssurfsense_desktop/src/ipc/handlers.tssurfsense_desktop/src/preload.tssurfsense_web/types/window.d.tssurfsense_web/lib/agent-filesystem.tssurfsense_web/components/editor-panel/editor-panel.tsxsurfsense_web/components/assistant-ui/markdown-text.tsxsurfsense_web/components/layout/ui/sidebar/LocalFilesystemBrowser.tsxsurfsense_web/components/layout/ui/sidebar/DesktopLocalTabContent.tsxsurfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsxsurfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsxsurfsense_web/components/ui/tooltip.tsxsurfsense_web/components/ui/tooltip.tsx