Skip to content

TUI visual clarity: 60% strip density improvement + richer status bar - #26

Merged
bearmug merged 23 commits into
mainfrom
autoresearch/tui-visuals-2026-03-17
Mar 18, 2026
Merged

TUI visual clarity: 60% strip density improvement + richer status bar#26
bearmug merged 23 commits into
mainfrom
autoresearch/tui-visuals-2026-03-17

Conversation

@bearmug

@bearmug bearmug commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Autoresearch lab sweep (3 agents, 30 cycles) targeting cluttered listings under load (10+ sessions, 5+ PRs). All 20 implementation cycles kept; build and tests pass.

Strip improvements (strip.go, pill.go)

  • Tiered pill compaction: selected=20 chars, running/waiting=8, idle/dead=4 → strip fits 10+5 without overflow at 120-char terminal (295→118 chars, -60%)
  • Passive pill weight: idle/dead pills lose background entirely — dim text only, clear active vs passive hierarchy
  • Attention-first sort: pending→running→waiting→idle→dead; critical sessions never scroll off left
  • Terminal PR collapse: merged/closed PRs → (+N done) when active PRs exist
  • Compact PR pills: non-critical unselected shows ⏳ repo#42; title only for failing/approved
  • State-group summary: ▶3 ⏸1 ✔5 ●1 prefix at 5+ sessions
  • Enriched overflow: +4(▶2⏸1) shows hidden active-session breakdown
  • Dead session collapse: (●3) at 8+ session load
  • Critical PR emphasis: failing→red dim bg, approved→green dim bg

Status bar + zoom improvements (app.go, zoom.go, pr_zoom.go, queue.go)

  • Session state breakdown: 7▶ 2⏸ 1✔ replaces flat "7 running"
  • Alert badges: [⚡ 2 PENDING] 45s ago and [✗ N FAILING] with colored backgrounds
  • PR state breakdown: 5 PRs 3✓ 1✗ 1⏳ mirrors session breakdown
  • Fleet map: above session zoom, Session 3/10: [▶]▶▶⏸⏸✔●
  • Merge readiness summary: first body line of PR zoom — ✓ approved ✓ checks (2/2) ✓ mergeable ⎇ squash
  • Done-state treatment: merged/closed PR zoom shows clean ✔ Merged header
  • Safety grouping: queue splits destructive vs safe tools per session

Fix

  • PR zoom line 2: removed duplicate mergeable and ⎇ method (now shown only in readiness summary)
  • Non-critical PR pills: show repo#N instead of bare #N

bearmug added 23 commits March 17, 2026 23:58
Passive (idle/dead) unselected session pills now show icon + first 4
chars of name instead of full 20-char name, saving ~16 chars per
passive pill. At 5 idle + 5 running sessions, this recovers ~80 chars
of strip space, fitting far more sessions in a typical 80-char terminal.
Sessions are now sorted by state priority before rendering:
pending-tool sessions first, then running, waiting, idle, dead.
The selected session's index is remapped after sorting so selection
tracking remains correct. This ensures urgent sessions are always
visible even when +N overflow hides items at the end.
When active (non-merged, non-closed) PRs exist, merged/closed PRs are
hidden from the strip and replaced with a compact "(+N done)" indicator.
This reduces PR clutter significantly — 3 merged PRs take 0 pill slots
instead of 3, replaced by a 10-char "(+3 done)" label.
Replace dim "⚡ 2 pending" text with orange background badge
"⚡ 2 PENDING" that stands out against the status line and catches
attention even when the user's focus is elsewhere.
Idle/dead unselected pills now render without background — just dim
foreground text. Active (running/waiting) pills retain their colored
dim background, creating a clear visual hierarchy: colored boxes draw
attention, plain text recedes. Also removes 2 padding chars per passive
pill (6 chars vs 8 chars).
When 3+ sessions exist, show a 1-line glyph overview above the
session zoom panel: "Sessions: [▶]▶▶⏸⏸✔●". Current session is
bracketed, pending-tool sessions appear in orange. Gives full fleet
context without leaving the zoom view.
Apply same badge treatment to failing PR count as pending tools:
red background "✗ N FAILING" badge for visual parity. Both urgent
alerts now use consistent badge style for instant recognition.
Add a quick-scan summary line before the checks section:
"✓ approved  ✓ checks (12/12)  ✓ mergeable  ⎇ squash"
or "✗ changes requested  ✗ checks (9/12)  ✗ conflicts  ⎇ unset".
Lets user assess merge readiness in under 1 second.
Fleet map now reads "Session 3/10: [▶]▶▶⏸⏸✔●" — the bold N/total
position indicator tells the operator exactly where they are in the
fleet while still showing all session states.
Non-critical, non-selected PR pills now show just icon + number (e.g.
"⏳ #42" = 7 chars) instead of icon + number + truncated title (~23 chars).
Title is shown only for: checks_failing, approved (need action), or when
the PR is selected. Saves ~15 chars per non-critical PR pill.
In the approval queue panel, split pending tools per session into
"⚠ Destructive:" and "✓ Safe:" groups. Destructive tools listed
first so operators see what needs careful scrutiny immediately.
Labels only appear when a session has both types.
After the pending badge, show "Xs ago" indicating how long the
oldest pending approval has been waiting. Helps operator assess
urgency at a glance: "⚡ 2 PENDING 45s ago" vs "⚡ 1 PENDING 5m ago".
Merged/closed PRs now show "✔ Merged — no further action required"
(or ● Closed) at the top of the body, and skip the merge readiness
summary which is irrelevant for done PRs. Reduces visual clutter.
…akdown

Overflow indicators now show state breakdown of hidden active sessions:
"+4(▶2⏸1)" instead of just "+4" when hidden pills include running/waiting
sessions. Plain "+N" is used when only idle/dead/PR pills are hidden.
Directly solves the "+N confusion" problem — user can always see if
critical sessions are out of view.
After the PR count, show compact per-state counts: passing(✓),
failing(✗), running(⏳), merged(✔) — each colored and only shown
when count > 0. Mirrors session state breakdown for full fleet
overview in the status bar.
checks_failing PRs get bold + red dim background.
approved PRs get bold + green dim background.
Non-critical (checks_running, checks_passing) remain plain text.
Creates clear urgency gradient: plain < tinted < selected-border.
When 8+ sessions are present, dead sessions without pending tools or
active selection are removed from the pill list and replaced with a
compact "(●N)" count indicator. This eliminates ~6 chars per dead pill
(3 dead sessions → 18 chars replaced by 5-char "(●3)"). Saves ~13 chars
and removes truly-done sessions from the active view.
Strip: 295→118 chars at 10+5 load (60% reduction)
Status bar: state breakdowns, badge alerts, fleet map
Zoom: merge readiness summary, safety grouping, dead-state treatment
- Agent commands use --output-format stream-json --verbose for real-time output
- Parse STATUS: lines from agent text and push as ⚙ timeline events
- Prefix timeline entries with agent type (fix-CI:, review:, fix-review:)
- Write full stream log to /tmp/csm-agent-*-stream.log for debugging
- Accumulate agent cost from result events
- Remove fleet map (redundant with strip state summary)
- Remove duplicate mergeable/method from PR zoom header line 2
- Add 8 regression tests (stream-json flags, agentLabel, writeAgentLog, PR zoom dedup)
The streaming agent code spawns goroutines that race with TempDir cleanup
in CI where claude binary doesn't exist. Set ReviewState="clean" to skip
agent spawning since this test is about polling, not agent execution.
@bearmug
bearmug merged commit 1f2cb45 into main Mar 18, 2026
1 check passed
@bearmug
bearmug deleted the autoresearch/tui-visuals-2026-03-17 branch March 18, 2026 00:35
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