Skip to content

feat(tui): show active profile in the status bar (#36081) - #92058

Closed
Enough1122 wants to merge 1 commit into
NousResearch:mainfrom
Enough1122:fix/issue-36081
Closed

Enough1122 wants to merge 1 commit into
NousResearch:mainfrom
Enough1122:fix/issue-36081

Conversation

@Enough1122

Copy link
Copy Markdown
Contributor

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.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Aug 22, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Related to #21693: both implement #36081 through different lifecycle events. This PR carries the launch profile in gateway.ready; #21693 derives it from session info. Please consolidate the preferred contract.

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

Copy link
Copy Markdown
Contributor Author

Ack — will align with #21693 on the lifecycle contract (carrying the profile in gateway.ready vs deriving it from session info) and consolidate toward whichever the maintainers prefer; happy to fold this one in if theirs lands first.

@Enough1122

Copy link
Copy Markdown
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.

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

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Active Profile icon/Theme

2 participants