feat(web): show dotfiles in the file explorer and allow changing its root (#33)#34
Merged
Merged
Conversation
…root (#33) The file explorer hid dotfiles and could only ever be rooted at the project workspace, so files like .env / .gitignore / .github/* and anything under the home directory were invisible and un-editable. - Show dotfiles by default, gated by a per-device "Show dotfiles" toggle on the Features settings page (default ON). The web client always sends the flag; the server treats an omitted flag as off, so mobile behavior is unchanged. - Server-side dotfile discovery: a bounded breadth-first walk supplements the native finder results, recursing into discovered dot-directories (e.g. .github/workflows/ci.yml) while skipping .git and node_modules and honoring the existing entry cap. - Add a root bar to the explorer (edit / Apply / Home (~) / Reset to project). The selected root flows through listing, reading and writing; ~ is expanded everywhere the root is consumed without weakening path containment. - Bind each open file to the root it was opened from so re-rooting, panel remounts and project-relative chat links resolve the correct file. Co-Authored-By: Claude Opus 4.8 <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 #33.
What & why
The web file explorer hid dotfiles and was always rooted at the project workspace, so
.env,.gitignore,.github/*, and anything in the user's home directory were invisible and un-editable. This adds dotfile visibility, a changeable explorer root, and a per-device toggle.Changes
.envleak on mobile)..github/workflows/ci.yml), skips.gitandnode_modules, isolates per-directoryreaddirfailures, and honors the existingWORKSPACE_INDEX_MAX_ENTRIEScap (setstruncated).~) / Reset to project). The selected root flows through listing, reading, and writing.~is expanded everywhere the root is consumed (via a single sharedexpandHomePathhelper) without weakening path containment — absolute/..-escaping relative paths are still rejected after expansion.fileSurfaceIdhelper keeps tab state, unsaved indicators, and review-comment paths consistent).How it was built
Implemented by Codex gpt-5.6-sol driven from a workflow, then reviewed by Fable-5. Fable's first pass (FIX-FIRST) caught a blocking
~-expansion bug in read/write, a non-recursive dotfile walk, and an open-file/root desync; a second pass caught two minor re-rooted-flow edge cases. All were fixed and the final review verdict is SHIP.Verification
typecheck(contracts / server / web / client-runtime) — pass~-expansion + dot-directory BFS tests)rightPanelStore/ web tests — pass (incl. new re-rooted surface-id regression test)🤖 Generated with Claude Code