Skip to content

feat(tui): add full-screen tabbed /status sub-page#81

Merged
yishuiliunian merged 4 commits intomainfrom
feat/status-subpage
Apr 5, 2026
Merged

feat(tui): add full-screen tabbed /status sub-page#81
yishuiliunian merged 4 commits intomainfrom
feat/status-subpage

Conversation

@yishuiliunian
Copy link
Copy Markdown
Contributor

Summary

  • Replace /status one-line system message with a full-screen tabbed sub-page (Status / Config / Usage)
  • Status tab shows session metadata, Config tab provides searchable dot-notation settings, Usage tab displays token metrics
  • Follows existing SubPage pattern (ModelPicker, RewindPicker) with snapshot-on-open data model

Changes

  • New files (8): app/status_page.rs, command/status_cmd.rs, command/status_config.rs, input/status_page_keys.rs, views/status_page/{mod,status_tab,config_tab,usage_tab}.rs
  • Modified files (8): app/{mod,types}.rs, command/{builtin,mod}.rs, input/{mod,sub_page}.rs, render.rs, views/mod.rs

Test plan

  • CI passes (clippy + rustfmt + build)
  • Manual: /status opens tabbed sub-page, ←/→ switches tabs, ↑/↓ scrolls, Esc closes
  • Manual: Config tab filter works, long keys truncated with "…"
  • Manual: Empty provider / empty MCP servers show graceful fallbacks

…/Usage tabs

Replace the old one-line system message with a full-screen sub-page
following the existing SubPage pattern (ModelPicker, RewindPicker).

- Status tab: session ID, CWD, auth, base URL, model, mode, MCP servers, sources
- Config tab: searchable dot-notation settings list with filter input
- Usage tab: token metrics, context window, turns, tool calls

Key design decisions:
- Snapshot-on-open (no live session lock during render)
- SessionSnapshot + ConfigSnapshot separation (SRP: session vs disk-loaded data)
- Render writes back clamped scroll offset to prevent key handler dead zones
- JSON flatten with depth limit, api_key redaction, empty Object/Array handling
- Unicode-width-aware key column truncation and padding
- Remove SessionsCmd (replaced by ResumeCmd on main)
- Update test_status_cmd to verify SubPage opens instead of system message
Store listener port in Hub struct after start_hub_listener(),
expose via SessionController::hub_listener_port(), and show
as "Hub Endpoint: 127.0.0.1:<port>" in the Status tab.
@yishuiliunian yishuiliunian merged commit 2818748 into main Apr 5, 2026
3 checks passed
@yishuiliunian yishuiliunian deleted the feat/status-subpage branch April 5, 2026 01:36
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.

1 participant