feat: add Files tab for inline project file browsing#3470
Open
dcieslak19973 wants to merge 1 commit into
Open
Conversation
Adds a feature-gated Files tab to the right sidebar that lets users browse and read project files (markdown, code, HTML) inline without leaving mux. - New FILE_BROWSER experiment flag (disabled by default, user-toggleable) - listProjectFiles + readProjectFile IPC endpoints with path-traversal protection (path.relative guard) and binary file detection (null-byte scan) - Files tab registered in tabConfig/tabRegistry with featureFlag gate, mirroring the existing Agent Browser and Portable Desktop pattern - FilesTab component: collapsible file tree (dirs-first) + content viewer - Markdown rendered via MarkdownRenderer, code via HighlightedCode (Shiki) - HTML shown as syntax-highlighted source, never live-rendered (XSS prevention) - Breadcrumb navigation via pathDirname walk — Windows-safe, no separator assumptions - Stale request cancellation: AbortController for dir listing, load-ID counter for file reads Closes coder#3443 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3443
Summary
FILE_BROWSERexperiment flag (disabled by default, user-toggleable in Settings → Experiments)listProjectFilesandreadProjectFileIPC endpoints on the backend with path-traversal protection and binary file detectionMarkdownRenderer; all other files syntax-highlighted viaHighlightedCode(Shiki) — HTML is shown as highlighted source, never live-rendered (XSS prevention)pathDirnamewalk rather than string splitting — correct on both Windows (backslash) and POSIX pathsAbortControllercleanup inuseEffectfor directory listing; load-ID counter for file readsDesign decisions
MarkdownRendererandHighlightedCoderather than adding new rendererslistProjectFilesendpoint (returns files + dirs) rather than reusing the existinglistDirectory(dirs only) to avoid breakingDirectoryPickerModalTest plan
🤖 Generated with Claude Code