feat: show active project in chat status - #64721
Conversation
…dicator # Conflicts: # apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx # ui-tui/src/app/useMainApp.ts
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Overview
Adds project metadata to session.info, mirrors it into Desktop state, and renders the active project name in the Desktop status bar. The TUI status label and /status output now use the same project metadata, unifying workspace identity across chat surfaces.
Changes
- 13 files changed, 184 additions, 7 deletions
- Desktop: status bar, session hooks, store, types
- TUI: path utilities, test fixtures
- Backend: tui_gateway/server.py + RPC test
Assessment
- Correctness: Well-scoped feature, adds project name to status bar without changing session routing.
- Security: No secrets, credentials, or security-sensitive changes.
- Tests: Includes markdown-code.test.ts and paths.test.ts — good coverage for the path/markdown rendering changes.
- Performance: No N+1 or blocking operations.
- Debug artifacts: None found.
Summary
Clean feature addition with good test coverage and clear motivation. No issues.
Reviewed by Hermes Agent
teknium1
left a comment
There was a problem hiding this comment.
Thanks for carrying first-class project identity through both chat surfaces. The feature premise is confirmed on current main: tui_gateway/server.py:3410-3412 publishes cwd/branch but no project, and ui-tui/src/app/useMainApp.ts:1122-1130 formats only cwd/branch.
Problems
apps/desktop/src/app/session/hooks/use-session-actions/index.ts:664applies synchronous resume info throughapplyRuntimeInfo, bututils.ts:291-299does not mirrorproject. The new event handler covers only latersession.infoemissions.tui_gateway/server.py:5972-5976has an agentlesssession.cwd.setpayload withoutproject. Withgateway-event.ts:203-205, that preserves a previous project label after a cwd change.$currentProjectneeds the same reset/reconciliation coverage as cwd and branch; existing draft reset (index.ts:220-230) and gateway wipe (store/gateway-switch.ts:40-59) do not clear it.
Suggested changes
- Thread
projectthroughapplyRuntimeInfo, all agentless session-info shapes, and state-reset paths; add lifecycle tests for resume and an unowned cwd transition.
Automated hermes-sweeper review.
danspicytaco
left a comment
There was a problem hiding this comment.
Thanks for the review @teknium1 ~ pushed fixes for all comments and verified locally.
…dicator # Conflicts: # apps/desktop/src/app/session/hooks/use-session-actions.test.tsx # apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx # apps/desktop/src/app/types.ts
|
Thanks @danspicytaco — carrying first-class project identity through both chat surfaces is the right feature, and the backend shape you landed on (resolve the owning project from the per-profile Superseding with #67282, with one design change. This PR added a second source of truth on the Desktop — a per-session Also split out the unrelated markdown shell-fence change from this branch; that's worth its own PR if you still want it — ping me and I'll review it. Closing in favor of #67282. Appreciate the work here. |
feat: unify active-project identity in chat status (supersedes #64721)
…search#64721) Surface the session's first-class Project in both chat surfaces: the Desktop status bar (project name as the workspace label, full cwd in the tooltip) and the TUI status label + /status output. One source of truth. The per-profile projects.db is the authority, read in tui_gateway via _project_info_for_cwd (backed by projects_db.project_for_path) and threaded through every session.info emission path the TUI consumes. The Desktop already caches that truth in $projectTree, so it DERIVES the label from it (projectNameForCwd) instead of carrying a second per-session $currentProject atom fed from session.info. That drops the parallel state NousResearch#64721 introduced and the entire reset/reconciliation surface it required (resume, agentless cwd.set, gateway-switch, fresh-draft): the label is purely derived, so it stays correct whenever the cwd or the project tree changes. Only explicit, named projects resolve on both surfaces, so an auto-discovered repo root keeps the cwd-leaf label everywhere. Excludes the unrelated markdown shell-fence change bundled in NousResearch#64721.
…search#64721) Surface the session's first-class Project in both chat surfaces: the Desktop status bar (project name as the workspace label, full cwd in the tooltip) and the TUI status label + /status output. One source of truth. The per-profile projects.db is the authority, read in tui_gateway via _project_info_for_cwd (backed by projects_db.project_for_path) and threaded through every session.info emission path the TUI consumes. The Desktop already caches that truth in $projectTree, so it DERIVES the label from it (projectNameForCwd) instead of carrying a second per-session $currentProject atom fed from session.info. That drops the parallel state NousResearch#64721 introduced and the entire reset/reconciliation surface it required (resume, agentless cwd.set, gateway-switch, fresh-draft): the label is purely derived, so it stays correct whenever the cwd or the project tree changes. Only explicit, named projects resolve on both surfaces, so an auto-discovered repo root keeps the cwd-leaf label everywhere. Excludes the unrelated markdown shell-fence change bundled in NousResearch#64721.
…ect-status feat: unify active-project identity in chat status (supersedes NousResearch#64721)
Context
Projects are first-class workspaces in the desktop app, but the active chat does not show which project owned the session. Users had to infer it from the sidebar or cwd.
Problem
The chat chrome surfaced cwd and branch, but not the human project name. That made it easy to miss when a session moved into a different project.
Solution
Add project metadata to
session.info, mirror it into Desktop state, and render the active project in the Desktop status bar. The TUI status label and/statusoutput now use the same project metadata, so both chat surfaces expose the same workspace identity.Example of the project
websitein Desktop status bar