feat(tui): glasspane attention tiers 1-4 — bar, jump, filter, row highlight #191

Merged
clawdie merged 1 commit from feat/glasspane-attention-tiers into main 2026-06-25 18:34:46 +02:00
Owner

Summary

Attention system for colibri-tui — makes "does this agent need me right now?" impossible to miss. All changes in a single file (crates/colibri-glasspane-tui/src/main.rs, +340/-25).

needs_attention() — single source of truth

fn needs_attention(pane: &Pane) -> bool {
    pane.state == AgentState::Error
        || pane.state == AgentState::Blocked
        || pane.stalled
}

Blocked is included because the glasspane doc comments say Blocked = "operator attention needed" (queue_update / pending steering / approval).

Tier 1 — Attention bar (replaces header)

Red-bordered panel with ⚠ ATTENTION (N) title. Replaces the normal header when any pane needs attention — same 3-line footprint, no extra space consumed. Shows pane id, reason (Error/Blocked/Stalled), and agent name.

Tier 2 — Jump keys (n / N)

n = next attention pane, N = previous (wrapping). Respects session scope via filtered_panes(). Detail pane follows the jump.

Tier 3 — Attention filter (a key)

Toggles attention_only: bool. Composes with session filter (AND) in filtered_panes().

Tier 4 — Row highlight (invert on selection)

Row state Normal Selected
Attention bg(Red) + fg(White) bg(DarkGray) + fg(LightRed) + bold
Normal plain bg(DarkGray) (current)

Per-row styling handled manually; row_highlight_style set to default.

Test coverage

14 TUI tests (was 10). Added:

  • needs_attention_detects_error_blocked_and_stalled
  • attention_bar_renders_when_panes_need_attention
  • attention_filter_hides_healthy_panes
  • attention_bar_does_not_render_when_all_healthy

Gate

  • cargo fmt --check — clean
  • cargo clippy --workspace --all-targets -- -D warnings — 0 warnings
  • cargo test --workspace — all pass

Design doc: PR #189 (docs/GLASSPANE-TUI-ENHANCEMENTS.md)

(Sam & Claude)

## Summary Attention system for `colibri-tui` — makes *"does this agent need me right now?"* impossible to miss. All changes in a single file (`crates/colibri-glasspane-tui/src/main.rs`, +340/-25). ### `needs_attention()` — single source of truth ```rust fn needs_attention(pane: &Pane) -> bool { pane.state == AgentState::Error || pane.state == AgentState::Blocked || pane.stalled } ``` Blocked is included because the glasspane doc comments say Blocked = "operator attention needed" (queue_update / pending steering / approval). ### Tier 1 — Attention bar (replaces header) Red-bordered panel with `⚠ ATTENTION (N)` title. Replaces the normal header when any pane needs attention — same 3-line footprint, no extra space consumed. Shows pane id, reason (Error/Blocked/Stalled), and agent name. ### Tier 2 — Jump keys (`n` / `N`) `n` = next attention pane, `N` = previous (wrapping). Respects session scope via `filtered_panes()`. Detail pane follows the jump. ### Tier 3 — Attention filter (`a` key) Toggles `attention_only: bool`. Composes with session filter (AND) in `filtered_panes()`. ### Tier 4 — Row highlight (invert on selection) | Row state | Normal | Selected | |-----------|--------|----------| | Attention | `bg(Red) + fg(White)` | `bg(DarkGray) + fg(LightRed) + bold` | | Normal | plain | `bg(DarkGray)` (current) | Per-row styling handled manually; `row_highlight_style` set to default. ## Test coverage 14 TUI tests (was 10). Added: - `needs_attention_detects_error_blocked_and_stalled` - `attention_bar_renders_when_panes_need_attention` - `attention_filter_hides_healthy_panes` - `attention_bar_does_not_render_when_all_healthy` ## Gate - `cargo fmt --check` — clean - `cargo clippy --workspace --all-targets -- -D warnings` — 0 warnings - `cargo test --workspace` — all pass Design doc: PR #189 (`docs/GLASSPANE-TUI-ENHANCEMENTS.md`) *(Sam & Claude)*
clawdie added 1 commit 2026-06-25 17:44:29 +02:00
feat(tui): glasspane attention tiers 1-4 — bar, jump, filter, row highlight
Some checks failed
CI / markdown (pull_request) Has been cancelled
CI / port (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / agent-jail-pkgs (pull_request) Has been cancelled
db841a92f7
Attention system for colibri-tui — makes 'does this agent need me right
now?' impossible to miss. All changes in a single file
(crates/colibri-glasspane-tui/src/main.rs).

needs_attention() = Error + Blocked + Stalled (free function, single
source of truth). Blocked is included because the glasspane doc comments
say Blocked = 'operator attention needed' (queue_update / pending
steering / approval).

Tier 1 — Attention bar:
  Red-bordered panel with '⚠ ATTENTION (N)' title, replaces the header
  when any pane needs attention (same 3-line footprint). Shows pane id,
  reason (Error/Blocked/Stalled), and agent name.

Tier 2 — Jump keys (n/N):
  n = next attention pane, N = previous (wrapping). Respects session
  scope via filtered_panes(). Toast 'no attention panes' when empty.
  Detail pane follows the jump.

Tier 3 — Attention filter (a key):
  Toggles attention_only: bool on App. Composes with session filter
  (AND) in filtered_panes(). Toast on toggle.

Tier 4 — Row highlight (invert on selection):
  Attention rows: bg(Red) + fg(White) normally, invert to bg(DarkGray)
  + fg(LightRed) + bold when selected. Non-attention rows unchanged.
  row_highlight_style set to default (we handle per-row). This is the
  visual equivalent of a per-row red border.

Tests: 14 TUI tests green (was 10). Added:
  - needs_attention_detects_error_blocked_and_stalled
  - attention_bar_renders_when_panes_need_attention
  - attention_filter_hides_healthy_panes
  - attention_bar_does_not_render_when_all_healthy

Gate: fmt + clippy + 262 workspace tests all green.

Rebased onto current main (was stale on pre-#186 base).

(Sam & Claude)
clawdie added 1 commit 2026-06-25 17:55:20 +02:00
fix(tui): remove hardcoded dark-terminal assumptions — theme-agnostic styles
Some checks failed
CI / markdown (pull_request) Has been cancelled
CI / agent-jail-pkgs (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / port (pull_request) Has been cancelled
2f9b088395
Structural colors that assumed a dark terminal background replaced with
terminal-relative alternatives:

- Footer key labels: bg(DarkGray)+fg(White) → REVERSED modifier
  (terminal's own reverse-video color, adapts to any theme)
- Row selection (normal): bg(DarkGray) → REVERSED modifier
- Row selection (attention): bg(DarkGray)+fg(LightRed) →
  REVERSED|BOLD+fg(Red)
- Status messages: fg(Cyan) → ITALIC|BOLD (cyan is invisible on
  light backgrounds)
- Footer auto-refresh text: fg(Gray) → terminal default

Semantic colors preserved: Red/Green/Yellow/Blue/Magenta for state
indicators work in both dark and light terminals. The attention row
bg(Red)+fg(White) is kept — red=danger is universal.

14 tests, workspace green (0 failures).
claude-domedog force-pushed feat/glasspane-attention-tiers from 2f9b088395 to 22c16b811c 2026-06-25 18:00:05 +02:00 Compare
codex-osa added 1 commit 2026-06-25 18:31:32 +02:00
fix(tui): force crossterm color output — override NO_COLOR=1 inherited from Hermes sessions
Some checks failed
CI / markdown (pull_request) Has been cancelled
CI / agent-jail-pkgs (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / port (pull_request) Has been cancelled
2d37132d55
Hermes sessions leak NO_COLOR=1 into subprocess environments
(pre-sets on os.environ copies in bitwarden/secrets CLI calls).
crossterm honours NO_COLOR per https://no-color.org, stripping
all ANSI colors from the dashboard.

Call force_color_output(true) at startup so the attention bar,
row highlighting, and state colors render correctly regardless
of the inherited environment.
codex-osa force-pushed feat/glasspane-attention-tiers from 2d37132d55 to c858cde01c 2026-06-25 18:34:01 +02:00 Compare
clawdie merged commit 2228b10203 into main 2026-06-25 18:34:46 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: clawdie/colibri#191
No description provided.