feat(tui): show active profile in the status bar (#36081) - #92058
Closed
Enough1122 wants to merge 1 commit into
Closed
Enough1122 wants to merge 1 commit into
Enough1122 wants to merge 1 commit into
Conversation
Contributor
hermes -p <name> --tui users can now see the active profile at a glance.
Backend: gateway.ready gains an additive optional \profile\ field sourced
from hermes_cli.profiles.get_active_profile_name() (the same authority the
composer prefix uses). Both emission sites — stdio (tui_gateway/entry.py)
and WebSocket (tui_gateway/ws.handle_ws) — carry it; it is None for the
default home and for unrecognized custom homes, so old clients and default
single-profile UX are untouched (skin/change_events keys unchanged).
TUI: StatusRule grows a tail-budgeted segment that renders the name dimmed
(muted colour + truncate-end, matching its neighbours) between the context
bar and the elapsed clocks; it shares the context bar's >=72-col breakpoint
and drops whole before model | ctx ever shrink. Suppression reuses a single
predicate shared with composerPromptText ('default'/'custom' never surface),
so the composer prefix behaviour is unchanged and both surfaces agree.
launchProfile rides UiState from gateway.ready as the pre-session fallback;
a session.info profile_name wins once known.
Enough1122
force-pushed
the
fix/issue-36081
branch
from
August 22, 2026 05:30
7ae63a0 to
dcc2773
Compare
Contributor
Author
|
Ack — will align with #21693 on the lifecycle contract (carrying the profile in |
Contributor
Author
|
Closing as part of an open-queue triage — consolidating my open work so review attention goes to the highest-value changes. Nothing here is abandoned: happy to reopen (or rebase fresh) if there's interest or reviewer bandwidth. |
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.
Fixes #36081 (status-bar half; the composer prefix already exists and is untouched)
What
gateway.ready gains one additive optional key profile (active profile name; None for default/custom-home, mirroring exactly which names the composer prefix suppresses — so default UX renders nothing and old clients ignore the key). The TUI status bar renders a muted, truncate-end segment (>=72 cols, tail-budgeted like its neighbors); session-reported profile wins over the ready value once known, which is the correct precedence for remote multi-profile backends. Composer suppression logic was extracted into a shared predicate both paths use. Both stdio and WS transports populate it (WS off-loop per the existing threading contract).
Verification
Python: new gateway-ready-profile suite (named/default/custom/import-failure-fails-closed, entry.main frame content, real handle_ws end-to-end with FakeWS, skin/change_events byte-additivity) + full test_tui_gateway_server.py 588 pass via scripts/run_tests.sh. TS: 179 tests across status-rule/appChrome/event-handler suites; ui-tui full-suite failures identical to pristine tree (Windows PATH env, stash-verified); typecheck + eslint clean.