-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
📁 Feature: Watch for File Changes in /workspaces and Auto-Update Frontend
Summary
Currently, the sandbox file explorer fetches files only on page load or on-click. This is inefficient and non-reactive. We need to add a watcher mechanism to detect file/directory changes inside /workspaces, and automatically emit updated file structure back to the frontend.
Motivation
To mimic a true IDE experience, changes in the file system (new files, renamed, deleted, modified) should be reflected in near real-time in the frontend UI.
Tasks
🧠 Backend (Runner Service)
- Add a file system watcher (e.g., using
fsnotify) in/runner/pkg/ws/ws.goor related socket handler. - Detect directory or file changes inside
/workspaces. - On change, emit an updated file list of the changed directory back to the frontend over the WebSocket.
🧑🎨 Frontend
- Update sandbox UI to listen for this emitted message and update directory tree accordingly.
- Add a loading spinner when a user clicks to expand a folder, until data is returned.
Code Locations
- Runner:
runner/pkg/ws/ws.go - Frontend: Likely in sandbox view, near file tree handler component
Labels
feature, frontend, backend, websockets, file-watcher, devex
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels