Repository navigation
Closed as not planned
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Feature Description
Currently, when a new file or folder is added to the workspace directly from the file system (or via external tools), the OpenCode Explorer/Folder Tree does not automatically detect and display the newly created items. Users have to manually close and reopen the workspace or restart the application to see the updates, which differs from the seamless real-time syncing behavior found in VS Code.
This feature requests adding a manual Refresh button/action to the Folder Tree, or implementing a file system watcher to automatically trigger a refresh when changes occur.
Expected Behavior
- Manual Trigger: A "Refresh" icon/button should be added to the Explorer/Folder Tree toolbar. Clicking it should force-reload the current directory structure.
- Context Menu: A "Refresh Explorer" option should be available in the right-click context menu of the workspace.
- (Optional but Ideal) Auto-Sync: Ideally, implement a file system watcher (like
chokidaror native FS events) to automatically update the tree view when files are added, deleted, or renamed outside of OpenCode.
Current Behavior / Steps to Reproduce
- Open a workspace folder in OpenCode.
- Open your terminal or OS File Explorer, and create a new file inside that workspace directory (e.g.,
touch new-file.ts). - Look at the OpenCode Folder Tree -> The
new-file.tsdoes not appear in the sidebar. - (Current workaround) There is no way to force a refresh other than reloading the entire workspace window.
Proposed Solution (Tech Stack Context)
- If handling manually: Add a click event to the Explorer toolbar that re-executes the file-tree fetching logic.
- If handling automatically: Leverage a file system watcher within the backend/node layer to dispatch an event to the frontend state (React/TypeScript) whenever a file-system mutation is detected.
Additional Context
- This feature will significantly improve DX (Developer Experience), especially when working with CLI code-generators or git checkouts that modify the file tree externally.
- Behavior reference: VS Code's built-in file watcher and its "Refresh Explorer" button.
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Jun 4, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Jun 4, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.