Skip to content

feat: auto-refresh file tree on filesystem changes#226

Merged
BunsDev merged 1 commit into
mainfrom
okcode/auto-update-file-tree
Apr 4, 2026
Merged

feat: auto-refresh file tree on filesystem changes#226
BunsDev merged 1 commit into
mainfrom
okcode/auto-update-file-tree

Conversation

@BunsDev

@BunsDev BunsDev commented Apr 4, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a server-side fs.watch watcher on the workspace directory that detects file creates, deletes, and modifications
  • Pushes debounced (300ms) change events via a new project.fileTreeChanged WebSocket push channel
  • Client subscribes and invalidates all project React Query caches, causing the file tree to re-render automatically
  • Ignores noisy directories (.git, node_modules, dist, etc.) and clears the server-side workspace index cache on changes

Test plan

  • Create a new file in the workspace via terminal — verify it appears in the file tree without manual refresh
  • Delete a file via terminal or external editor — verify it disappears from the tree
  • Run git checkout to a different branch — verify the tree updates to reflect the new branch's files
  • Run npm install — verify the tree doesn't flood with events (debouncing works)
  • Verify changes inside .git and node_modules do not trigger tree refreshes

🤖 Generated with Claude Code

Add a server-side fs.watch watcher that monitors the workspace directory and pushes debounced change events via WebSocket, so the file tree automatically reflects new, deleted, or modified files without manual refresh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Apr 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
okcode-marketing Ready Ready Preview Apr 4, 2026 6:40pm
v0-compute-the-platform-to-build Ready Ready Preview, Open in v0 Apr 4, 2026 6:40pm

@github-actions github-actions Bot added the size:L label Apr 4, 2026
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Apr 4, 2026
@BunsDev BunsDev merged commit ac7c9eb into main Apr 4, 2026
9 of 10 checks passed
@BunsDev BunsDev deleted the okcode/auto-update-file-tree branch April 6, 2026 21:10
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.

1 participant