Skip to content

feat(web): show dotfiles in the file explorer and allow changing its root (#33)#34

Merged
DanielGGordon merged 1 commit into
mainfrom
t3code/agent-workflow-review-fix
Jul 15, 2026
Merged

feat(web): show dotfiles in the file explorer and allow changing its root (#33)#34
DanielGGordon merged 1 commit into
mainfrom
t3code/agent-workflow-review-fix

Conversation

@DanielGGordon

Copy link
Copy Markdown
Owner

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

  • Show dotfiles by default, gated by a new "Show dotfiles" toggle on the Features settings page (per-device, localStorage, default ON). The web client always sends the flag; the server treats an omitted flag as off, so mobile behavior is unchanged (no .env leak on mobile).
  • Server-side dotfile discovery — the native FileFinder (ripgrep-style) can't include hidden files, so a bounded breadth-first walk supplements its results. It recurses into discovered dot-directories (e.g. .github/workflows/ci.yml), skips .git and node_modules, isolates per-directory readdir failures, and honors the existing WORKSPACE_INDEX_MAX_ENTRIES cap (sets truncated).
  • Changeable root — a root bar in the explorer (edit / Apply / Home (~) / Reset to project). The selected root flows through listing, reading, and writing. ~ is expanded everywhere the root is consumed (via a single shared expandHomePath helper) without weakening path containment — absolute/..-escaping relative paths are still rejected after expansion.
  • Open-file/root binding — each open file remembers the root it was opened from, so re-rooting, right-panel remounts, and project-relative chat/diff links all resolve the correct file (shared fileSurfaceId helper 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
  • server workspace tests — 43 pass (incl. new ~-expansion + dot-directory BFS tests)
  • rightPanelStore / web tests — pass (incl. new re-rooted surface-id regression test)
  • lint (changed files) — clean

🤖 Generated with Claude Code

…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>
@github-actions github-actions Bot added size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 15, 2026
@DanielGGordon DanielGGordon merged commit 552e133 into main Jul 15, 2026
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: File explorer to show dotfiles and be able to change directories

1 participant