Skip to content

fix(tui): use esc back to leave the session dashboard#54

Merged
mkonopelski-gd merged 1 commit into
mainfrom
claude/tui-sessions-detail-nav-d57b07
Jul 23, 2026
Merged

fix(tui): use esc back to leave the session dashboard#54
mkonopelski-gd merged 1 commit into
mainfrom
claude/tui-sessions-detail-nav-d57b07

Conversation

@mkonopelski-gd

@mkonopelski-gd mkonopelski-gd commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What

On the session detail (dashboard) screen, returning to the sessions list required pressing b. Every other screen uses esc to go back. This aligns the dashboard with the app-wide convention: the binding is esc and it's labeled back — the same generic gesture users learn everywhere else (e.g. WorkspaceMessagesScreen), not a screen-specific key or a destination-specific label ("sessions").

Change

Two small edits in mcp_server/tui/app.py:

-        Binding("b", "sessions", "sessions"),
+        Binding("escape", "back", "back"),
-    def action_sessions(self) -> None:
+    def action_back(self) -> None:
         self.app.push_screen(SessionsScreen())

The footer now reads esc back (auto-generated from the binding), consistent with the rest of the TUI.

Why push, not pop

action_back keeps push_screen(SessionsScreen()) rather than pop_screen(), because the dashboard can be the root screen when the TUI is launched to resume an existing run (app.py:2116) — popping there would land on a blank screen. Pushing a fresh SessionsScreen also reloads session statuses.

Scope

Deliberately minimal. WorkspaceMessagesScreen already binds both esc and b; its redundant b alias is left alone since esc already works there.

Testing

uv run pytest tests/test_tui_app.py112 passed. No test asserted the old b binding or the action_sessions name (the check_action tests reference action names, not keys).

@mkonopelski-gd
mkonopelski-gd force-pushed the claude/tui-sessions-detail-nav-d57b07 branch from 754d0bf to 104e87d Compare July 23, 2026 14:29
@mkonopelski-gd mkonopelski-gd changed the title fix(tui): use esc to leave the session dashboard for consistency fix(tui): use esc back to leave the session dashboard Jul 23, 2026
akozak-gd
akozak-gd previously approved these changes Jul 23, 2026
The session detail (dashboard) screen was the only screen using `b` to
return to the sessions list; every other screen uses `esc`. Bind the
action to `escape` and label it `back` (matching the other back
functionalities) so users learn one generic gesture — esc goes back —
rather than a screen-specific key or label.
@mkonopelski-gd
mkonopelski-gd force-pushed the claude/tui-sessions-detail-nav-d57b07 branch from 104e87d to d5f8598 Compare July 23, 2026 14:39
@akozak-gd
akozak-gd self-requested a review July 23, 2026 14:40
@mkonopelski-gd
mkonopelski-gd merged commit aac3058 into main Jul 23, 2026
3 checks passed
@mkonopelski-gd
mkonopelski-gd deleted the claude/tui-sessions-detail-nav-d57b07 branch July 23, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants