Skip to content

feat(tui): show extended context mode indicator in status bar#1752

Merged
bug-ops merged 3 commits intomainfrom
feat-tui-show-extended-context
Mar 14, 2026
Merged

feat(tui): show extended context mode indicator in status bar#1752
bug-ops merged 3 commits intomainfrom
feat-tui-show-extended-context

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Mar 14, 2026

Closes #1686.

Summary

  • Adds [1M CTX] badge next to model name in the TUI header bar when enable_extended_context = true in the Claude config
  • Adds Max context: 1M line in the Resources panel
  • Reads config.llm.cloud.enable_extended_context directly in runner.rs, avoiding false positives when Claude is wrapped by Router or Orchestrator providers

Changes

  • crates/zeph-core/src/metrics.rs — add extended_context: bool to MetricsSnapshot
  • crates/zeph-core/src/agent/mod.rs — add extended_context: bool to MetricsState
  • crates/zeph-core/src/agent/builder.rs — add with_extended_context(bool) builder method
  • src/runner.rs — read flag from config and pass via with_extended_context()
  • crates/zeph-tui/src/app.rs — render [1M CTX] badge in header
  • crates/zeph-tui/src/widgets/resources.rs — render Max context: 1M in resources panel

Test plan

  • Snapshot test for resources panel with extended_context = true
  • Badge presence test: [1M CTX] shown when extended_context = true
  • Badge absence test: [1M CTX] not shown when extended_context = false
  • cargo nextest run --workspace --features full --lib --bins — 5493 passed
  • cargo clippy --workspace --features full -- -D warnings — 0 warnings
  • cargo +nightly fmt --check — clean

bug-ops added 2 commits March 14, 2026 16:20
Add a visible [1M CTX] badge in the TUI header when enable_extended_context
is active in the Claude config, and a Max context: 1M line in the Resources
panel. Fixes cost-transparency gap per TUI Rules.

- Add `extended_context: bool` to `MetricsSnapshot` and `MetricsState`
- Read flag from `config.llm.cloud.enable_extended_context` in runner.rs
  (avoids false positives when Claude is wrapped by Router/Orchestrator)
- Render [1M CTX] badge next to model name in TUI header
- Render Max context: 1M in Resources panel when flag is set
- Add snapshot test and two badge presence/absence tests
@github-actions github-actions bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate enhancement New feature or request size/M Medium PR (51-200 lines) labels Mar 14, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 14, 2026 15:35
@bug-ops bug-ops merged commit 93bd717 into main Mar 14, 2026
15 checks passed
@bug-ops bug-ops deleted the feat-tui-show-extended-context branch March 14, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(tui): show extended context mode indicator in status bar

1 participant