Skip to content

feat(tui): add Project Files viewer/editor - #7021

Closed
ryangamerdev wants to merge 3 commits into
anomalyco:devfrom
gignit:feature/project-files-viewer-editor-standalone
Closed

feat(tui): add Project Files viewer/editor#7021
ryangamerdev wants to merge 3 commits into
anomalyco:devfrom
gignit:feature/project-files-viewer-editor-standalone

Conversation

@ryangamerdev

Copy link
Copy Markdown
Contributor

Summary

Adds a file browser and viewer/editor panel to the TUI for viewing and editing project files directly within OpenCode.

Features

  • Project Files Browser - File tree in sidebar showing project files with expand/collapse
  • File Viewer Panel - View files with syntax highlighting, resizable panel with drag divider
  • File Editor - Edit files directly in the TUI with save (ctrl+s) and cancel (ctrl+c)
  • Focus Management - Proper keyboard focus between editor and prompt
    • Click to refocus editor panel
    • Keys only captured when editor textarea is focused

Files Changed

FileChanges
routes/session/project-files.tsxFile tree component
routes/session/content-panel.tsxPanel wrapper with resize divider
routes/session/file-viewer.tsxView/edit functionality
routes/session/sidebar.tsxProjectFiles integration
routes/session/index.tsxContentPanel integration

fix: sidebar title padding to prevent scrollbar edge case
Adds a file browser and viewer/editor panel to the TUI:
- Project Files browser in sidebar showing file tree with expand/collapse
- File Viewer panel with syntax highlighting, resizable with drag divider
- File Editor with save (ctrl+s) and cancel (ctrl+c)
- Proper keyboard focus management between editor and prompt
- Click to refocus editor panel
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

⚠️ Potential Duplicate Found

PR #7017 - "feat(tui): add Project Files viewer/editor with vi mode support"

Why it's related:

This PR appears to be a very similar or competing implementation of the same feature. Both PRs are:

  • Adding a Project Files viewer/editor to the TUI
  • Implementing file tree navigation and syntax-highlighted file viewing
  • Adding file editing capability with keyboard shortcuts
  • Using similar component structure (content-panel, file-viewer, etc.)

The main difference appears to be that PR #7017 includes vi mode support while the current PR #7021 focuses on standard editing controls (ctrl+s, ctrl+c).

Recommendation: Check if PR #7017 is already merged, in progress, or stale. If it's open, coordinate with that PR to either consolidate into one or ensure you're not duplicating efforts.

@ryangamerdev

Copy link
Copy Markdown
ContributorAuthor
Screenshot from 2026-01-05 19-24-31Screenshot from 2026-01-05 19-24-44Screenshot from 2026-01-05 19-24-58

@ryangamerdev

Copy link
Copy Markdown
ContributorAuthor

This was experimental, closing PR. Available on my personal fork if interested.

@ryangamerdev
ryangamerdev deleted the feature/project-files-viewer-editor-standalone branch January 19, 2026 07:36
@qiangxue1206

Copy link
Copy Markdown

This was experimental, closing PR. Available on my personal fork if interested.

@ryanwyler Hello, I couldn't find the branch related to file editability on your personal fork. Could you upload it again for reference?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ryangamerdev@qiangxue1206