[Feature]: Display Project Name and Git Status in TUI #4815

Open
opened 2026-02-16 17:45:33 -05:00 by yindo · 1 comment
Owner

Originally created by @LEON-gittech on GitHub (Jan 12, 2026).

Originally assigned to: @thdxr on GitHub.

Feature Request: Display Project Name and Git Status in TUI Status Bar

Problem

Currently, the OpenCode TUI does not display:

  1. The current project/directory name
  2. Git branch information
  3. Git working tree status (dirty/clean)

This makes it difficult to quickly identify which project and branch you are working on, especially when working across multiple projects or branches.

Proposed Solution

Add a status bar or header section in the TUI that displays:

┌─────────────────────────────────────────────────────────────────┐
│  AsyncVerl  │  main  │ ● 3 modified                            │
└─────────────────────────────────────────────────────────────────┘

Components:

  1. Project Name - Directory basename or configured project name
  2. Git Branch - Current branch name (already available via /vcs API)
  3. Git Status - Visual indicator for uncommitted changes:
    • (dot) when there are staged/unstaged changes
    • Number of modified files
    • Clean indicator when working tree is clean

Why This Matters

  1. Context Awareness - Users often work on multiple projects; seeing the project name prevents mistakes
  2. Branch Visibility - Critical for feature branch workflows to avoid committing to wrong branch
  3. Dirty State Awareness - Know at a glance if there are uncommitted changes before switching tasks
  4. Parity with Similar Tools - Claude Code displays this information prominently, setting user expectations

Implementation Notes

The backend infrastructure already exists:

  • /vcs API returns { branch: string }
  • Vcs.Event.BranchUpdated event fires on branch changes
  • Project name available from Instance.project or directory basename

What is needed:

  1. Extend /vcs API to include working tree status (git status --porcelain)
  2. Add UI component in packages/app to display this information
  3. Subscribe to vcs.branch.updated event for real-time updates

Mockup

Minimal:

BEPA (main)

With status:

BEPA  main ● 3 files modified

With icons (if theme supports):

 BEPA   main  ● 3

Additional Context

  • This could be a configurable option in opencode.json for users who prefer minimal UI
  • Consider color coding: green for clean, yellow/orange for dirty
  • Should update in real-time when files are modified or branch changes

Related

  • Existing VCS module: packages/opencode/src/project/vcs.ts
  • TUI layout: packages/app/src/pages/layout.tsx
Originally created by @LEON-gittech on GitHub (Jan 12, 2026). Originally assigned to: @thdxr on GitHub. ## Feature Request: Display Project Name and Git Status in TUI Status Bar ### Problem Currently, the OpenCode TUI does not display: 1. The current project/directory name 2. Git branch information 3. Git working tree status (dirty/clean) This makes it difficult to quickly identify which project and branch you are working on, especially when working across multiple projects or branches. ### Proposed Solution Add a status bar or header section in the TUI that displays: ``` ┌─────────────────────────────────────────────────────────────────┐ │ AsyncVerl │ main │ ● 3 modified │ └─────────────────────────────────────────────────────────────────┘ ``` **Components:** 1. **Project Name** - Directory basename or configured project name 2. **Git Branch** - Current branch name (already available via `/vcs` API) 3. **Git Status** - Visual indicator for uncommitted changes: - `●` (dot) when there are staged/unstaged changes - Number of modified files - Clean indicator when working tree is clean ### Why This Matters 1. **Context Awareness** - Users often work on multiple projects; seeing the project name prevents mistakes 2. **Branch Visibility** - Critical for feature branch workflows to avoid committing to wrong branch 3. **Dirty State Awareness** - Know at a glance if there are uncommitted changes before switching tasks 4. **Parity with Similar Tools** - Claude Code displays this information prominently, setting user expectations ### Implementation Notes The backend infrastructure already exists: - `/vcs` API returns `{ branch: string }` - `Vcs.Event.BranchUpdated` event fires on branch changes - Project name available from `Instance.project` or directory basename What is needed: 1. Extend `/vcs` API to include working tree status (`git status --porcelain`) 2. Add UI component in `packages/app` to display this information 3. Subscribe to `vcs.branch.updated` event for real-time updates ### Mockup **Minimal:** ``` BEPA (main) ``` **With status:** ``` BEPA main ● 3 files modified ``` **With icons (if theme supports):** ``` BEPA main ● 3 ``` ### Additional Context - This could be a configurable option in `opencode.json` for users who prefer minimal UI - Consider color coding: green for clean, yellow/orange for dirty - Should update in real-time when files are modified or branch changes ### Related - Existing VCS module: `packages/opencode/src/project/vcs.ts` - TUI layout: `packages/app/src/pages/layout.tsx`
yindo added the opentui label 2026-02-16 17:45:33 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 12, 2026):

This feature request is closely related to a few existing discussions:

  • #6521: [FEATURE]: Window System as Foundation for UI Plugin Ecosystem - proposes a broader architecture for UI extensibility that could support status bar information
  • #7533: [FEATURE]: display loaded skills in status page and sidebar - similar concept of displaying dynamic status information in the UI
  • #5971: Plugin API for custom sidebar panels - related approach to extending the sidebar with status information
  • #5826: Feature Request: Agent Session Tab Bar Navigation - addresses displaying information about sessions/projects in a top bar

These issues explore complementary approaches to displaying project/session context information in the TUI. You may want to cross-reference them to see if the proposed status bar could integrate with these broader UI architecture discussions.

@github-actions[bot] commented on GitHub (Jan 12, 2026): This feature request is closely related to a few existing discussions: - #6521: [FEATURE]: Window System as Foundation for UI Plugin Ecosystem - proposes a broader architecture for UI extensibility that could support status bar information - #7533: [FEATURE]: display loaded skills in status page and sidebar - similar concept of displaying dynamic status information in the UI - #5971: Plugin API for custom sidebar panels - related approach to extending the sidebar with status information - #5826: Feature Request: Agent Session Tab Bar Navigation - addresses displaying information about sessions/projects in a top bar These issues explore complementary approaches to displaying project/session context information in the TUI. You may want to cross-reference them to see if the proposed status bar could integrate with these broader UI architecture discussions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4815