TUI Phase 7 — finish flash, richer markdown, block nav, click-to-fold#103
Closed
davidrhodus wants to merge 1 commit into
Closed
TUI Phase 7 — finish flash, richer markdown, block nav, click-to-fold#103davidrhodus wants to merge 1 commit into
davidrhodus wants to merge 1 commit into
Conversation
…to-fold Four viewing/affordance features closing out the grok-build TUI restyle: - Finish flash (7a): when a turn settles, the status line briefly glows in the outcome color (green done / red failed / amber warning), fading over ~450ms. New App.finished_at stamp + a pure flash_weight decay helper. - Richer markdown (7d): pipe tables (ruled `|---|` separator + muted `│` cells), inline [label](url) links and bare http(s) autolinks (underlined, URL trailing dimmed), and `- [ ]`/`- [x]` task-list checkboxes. Rendering stays line-local to fit the streaming commit path, so table columns align only as the source padded them. - Block nav (7b, Ctrl-B): a cursor over tool-output blocks; ↑↓/jk move, Enter or Space folds/unfolds one block independently of the global Ctrl-O, and the view follows the cursor. New per-block `expanded` override on the ToolOutput entry. - Click-to-fold (7c): a left click folds/unfolds the tool-output block under it, mapped through geometry the render pass caches. Mouse capture was already on for scroll, so this is purely additive. Tests cover the wave/pulse/flash weights, the markdown constructs, block-nav key handling + per-block flatten, and click→block mapping. Ratchet bumped for the five grown files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 7 — the last four grok-build TUI items, in one phase
Stacked on #102 (
tui-phase6). This PR's base istui-phase6, so the diff shows only Phase 7. Merge #102 first; GitHub will retarget this tomainautomatically.Four viewing/affordance features:
7a — Finish flash
When a turn settles, the status line briefly glows in the outcome's color — green done, red failed, amber warning, neutral otherwise — fading back to muted over ~450ms. A new
App.finished_atstamp (set on the working true→false transition) plus a pureflash_weightlinear-decay helper. Idle ticks already redraw every ~120ms, so the fade animates smoothly.7d — Richer markdown
|---|:--:|separator becomes a ruled├─┼─┤divider; data/header rows get muted│cell separators.[label](url)renders the label underlined in the link color with the URL trailing dimmed; barehttp(s)://…runs autolink (trailing sentence punctuation left outside).- [ ]→☐,- [x]→☑(success-colored).Rendering stays line-local to fit the streaming line-by-line commit path, so table columns align only as well as the source padded them — noted as a deliberate limitation (cross-row alignment would need buffering that fights the streaming architecture).
7b — Block navigation (Ctrl-B)
A cursor over tool-output blocks:
↑↓/jkmove,Enter/Spacefold or unfold one block independently of the global Ctrl-O,Esc/Ctrl-Bexit. The selected block gets a marker line and the view follows the cursor. New per-blockexpandedoverride on theToolOutputentry (moves with the entry through transcript capping — no fragile index set).7c — Click-to-fold
A left click folds/unfolds the tool-output block under the pointer, mapped through geometry the render pass caches (inner rect, scroll offset, per-block wrapped-row spans). Mouse capture was already enabled for scroll-wheel support, so this is purely additive — no new text-selection regression.
Tests & gates
flash_weightdecay; markdown links/autolinks, task lists, pipe tables (+ prose-with-a-pipe negative); block-nav key handling with independent per-block folding and cursor clamping; per-blockexpandedflatten; click→block coordinate mapping (+ out-of-area no-op). 164 hi-tui tests pass.cargo fmt --all --check, full clippy gate (-D warnings), and the file-size ratchet all pass (bumped render.rs, app/render.rs, app/commands.rs, lib.rs, tests.rs).Closes out the grok-build TUI adoption (Phases 1–6 handle theme, gutters, folding, panels, sticky headers, syntax highlighting, and the live accent wave).