Navi Code TUI: context-window fill gauge in the status bar
Add a ContextFill widget to the bottom StatusBar showing how full the LLM
context window is (absolute tokens + percent), colored by fill level:
dim < 70%, warning 70-89%, error >= 90%. Updates from stream_end and
compression_started/context_compressed events; seeded from get_session on
resume so the gauge isn't blank pre-turn. None from the backend keeps the
last known value.

Fix: name the widget attribute _ctx_fill, not _context — _context shadows
MessagePump._context (the internal context manager Textual wraps around
message processing) and hangs the app's message pump at mount time.

Polish: drop the "ctx " prefix (shows 12.0k/32.0k · 38%) and add a 1-char
margin between the activity indicator and the gauge.

Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d2ac769 commit 295479b86fb1f91d18e7ae43f4fa1a1dc6f99417
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 7 hours ago
Showing 3 changed files
View
clients/terminal/tui/tui_app.py
View
clients/terminal/tui/widgets/status_bar.py
View
tests/clients/test_tui_app.py