feat: add goal-mode indicator to desktop status bar - #43020
Closed
akshan-main wants to merge 1 commit into
Closed
Conversation
Shows a 'Goal' label with highlight in the bottom-right status bar
when goal mode is active (via /goal). Mirrors Codex's goal-mode badge.
Backend:
- _session_info() reports goal_active via GoalManager.is_active()
- _mirror_slash_side_effects emits session.info after /goal commands
- Goal set/resume/clear handlers emit session.info immediately
- Goal judge verdict re-emits session.info on turn completion
- REST endpoint GET /api/sessions/{id} returns goal_active + goal_text
Frontend:
- atom + setGoalActive for reactive state
- session.info handler extracts goal_active from gateway events
- Goal state preserved across session switches (state cache)
- Status bar renders 'Goal' text with bg-(--chrome-action-hover)
- i18n with English, Japanese, Chinese, Traditional Chinese
teknium1
reviewed
Jul 14, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the focused desktop status-bar feature. The premise remains valid: current main has neither goal_active in tui_gateway/server.py:_session_info nor a goal status-bar item.
Problems
tui_gateway/server.py:2041reads the goal key only from the optionalsessionargument. This PR also invokes_session_info(agent)without that argument at lines 2576 and 3766, so those paths necessarily publishgoal_active: false. Use anagent.session_idfallback (as current main now does for other session metadata) and cover it.- The PR has no tests. Add coverage for backend emission and Desktop active-session cache switching, including active → paused/cleared updates.
Suggested changes
- Port the frontend work to current main's split metadata path:
apps/desktop/src/app/session/hooks/use-message-stream/utils.tsanduse-session-state-cache.ts. The former pre-refactor hook files in this branch no longer represent the active architecture.
Automated hermes-sweeper review.
| try: | ||
| from hermes_cli.goals import GoalManager | ||
|
|
||
| session_key = (session or {}).get("session_key") |
Contributor
There was a problem hiding this comment.
_session_info(agent) is also called without a session object on this branch (for example lines 2576 and 3766). In those calls this lookup is empty and the payload always reports goal_active: false; fall back to agent.session_id (and cover that path) so resumed/fallback session metadata remains accurate.
teknium1
added a commit
that referenced
this pull request
Jul 26, 2026
Append a "⊙ goal 3/20" segment (turns used / turn budget) to the CLI status bar whenever a standing /goal is active. Mirrors the desktop composer goal indicator: active-goal-only — paused/done goals stay out of the bar since they already print their own glyph lines in-thread. - Snapshot: goal_active / goal_turns_used / goal_max_turns from the cached GoalManager (in-memory attribute read, no DB hit per repaint). - Rendered in all three width tiers of both _build_status_bar_text and _get_status_bar_fragments, and it respects the /statusbar toggle for free (the toggle gates _get_status_bar_fragments as a whole). - Tests: segment composition, active-only contract, all width tiers. Status-bar goal indicator concept from #43020. Co-authored-by: Akshan Krithick <akshankrithick305@gmail.com> Assisted-by: Claude Fable 5 via Hermes Agent
teknium1
added a commit
that referenced
this pull request
Jul 27, 2026
Append a "⊙ goal 3/20" segment (turns used / turn budget) to the CLI status bar whenever a standing /goal is active. Mirrors the desktop composer goal indicator: active-goal-only — paused/done goals stay out of the bar since they already print their own glyph lines in-thread. - Snapshot: goal_active / goal_turns_used / goal_max_turns from the cached GoalManager (in-memory attribute read, no DB hit per repaint). - Rendered in all three width tiers of both _build_status_bar_text and _get_status_bar_fragments, and it respects the /statusbar toggle for free (the toggle gates _get_status_bar_fragments as a whole). - Tests: segment composition, active-only contract, all width tiers. Status-bar goal indicator concept from #43020. Co-authored-by: Akshan Krithick <akshankrithick305@gmail.com> Assisted-by: Claude Fable 5 via Hermes Agent
Contributor
|
The goal-mode status bar indicator was unified into #72244 (now merged) with credit. Thanks! |
sebmarion
pushed a commit
to sebmarion/hermes-agent
that referenced
this pull request
Aug 6, 2026
Append a "⊙ goal 3/20" segment (turns used / turn budget) to the CLI status bar whenever a standing /goal is active. Mirrors the desktop composer goal indicator: active-goal-only — paused/done goals stay out of the bar since they already print their own glyph lines in-thread. - Snapshot: goal_active / goal_turns_used / goal_max_turns from the cached GoalManager (in-memory attribute read, no DB hit per repaint). - Rendered in all three width tiers of both _build_status_bar_text and _get_status_bar_fragments, and it respects the /statusbar toggle for free (the toggle gates _get_status_bar_fragments as a whole). - Tests: segment composition, active-only contract, all width tiers. Status-bar goal indicator concept from NousResearch#43020. Co-authored-by: Akshan Krithick <akshankrithick305@gmail.com> Assisted-by: Claude Fable 5 via Hermes Agent
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
Append a "⊙ goal 3/20" segment (turns used / turn budget) to the CLI status bar whenever a standing /goal is active. Mirrors the desktop composer goal indicator: active-goal-only — paused/done goals stay out of the bar since they already print their own glyph lines in-thread. - Snapshot: goal_active / goal_turns_used / goal_max_turns from the cached GoalManager (in-memory attribute read, no DB hit per repaint). - Rendered in all three width tiers of both _build_status_bar_text and _get_status_bar_fragments, and it respects the /statusbar toggle for free (the toggle gates _get_status_bar_fragments as a whole). - Tests: segment composition, active-only contract, all width tiers. Status-bar goal indicator concept from NousResearch#43020. Co-authored-by: Akshan Krithick <akshankrithick305@gmail.com> Assisted-by: Claude Fable 5 via Hermes Agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a "Goal" label with subtle highlight in the desktop status bar when goal mode is active (via /goal). Mirrors the goal-mode badge that Codex shows.
When a user sets a goal with /goal, the backend emits a session.info event with goal_active: true, and the desktop frontend displays Goal session timer.
Type of Change
Changes Made
Backend
tui_gateway/server.py— _session_info() reports goal_active via GoalManager.is_active(); _mirror_slash_side_effects emits session.info after /goal; goal set/resume/clear handlers emit immediately; goal judge verdict re-emits on completionhermes_cli/web_server.py— REST endpoint GET /api/sessions/{id} returns goal_active + goal_textFrontend (desktop)
store/session.ts— $goalActive atom + setGoalActive()use-message-stream.ts— handles goal_active from session.info eventsuse-session-actions.ts,use-session-state-cache.ts— preserves goal state across session switchesuse-statusbar-items.tsx— renders Goal text with bg-(--chrome-action-hover) highlightapp/types.ts,types/hermes.ts,lib/chat-messages.ts,lib/chat-runtime.ts— type plumbingi18n/types.ts,i18n/en.ts,i18n/ja.ts,i18n/zh.ts,i18n/zh-hant.ts— all 4 localesHow to Test
keep working until you count till 20 and print it in chatChecklist
Screenshots
Status bar shows Goal text with highlight, right of session timer. Hidden when no goal is set. This only displays when the chat window pertaining to it selected, if switched to another chat window, this doesn't appear.