feat(tui): next-3 round — attention layer, linear mode, diff fences - #40
Merged
Conversation
Three panel-ranked improvements, each TDD'd with the README synced: - attention: turn completion and pending approvals set the terminal window title and ring the bell (--bel=false mutes); --notify adds OSC 9 desktop notifications. One raw tea.Exec write, terminal states only — never per token. - --plain: linear mode without the alt-screen; agent events print append-only to the native scrollback above a minimal chrome, with text-prefix severity for screen readers and pipes. NO_COLOR now deterministically degrades the palette. - diff fences: fenced ```diff blocks tint inside prose without mis-styling it, fences without @@ hunk headers render as diffs, and the +N −M step chip counts fenced stats.
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.
Summary
The three improvements ranked by the expert panel (NEXT_3_FEATURES.md), each implemented TDD-first with the README synced in the same commit.
1. Attention layer
✓ done — <model>/⚠ approval needed — <model>) and ring the bell;--bel=falsemutes the bell,--notifyadds OSC 9 desktop notifications.tea.Execwrite per event — terminal states only, never per token. Wire-borne strings pass throughsanitize/collapseso control bytes cannot inject terminal escapes.2.
--plainlinear mode[error],⚠ approval,▸tools,❯prompts,✓ done · N tools · Xs · N tok).bodek --plain < task > run.log).NO_COLORnow deterministically degrades the whole palette in every mode.3. Diff-aware rendering
```diffblocks tint inside prose without mis-styling the surrounding text (fence-first dispatch), fences without@@hunk headers render as diffs (fence is authoritative), and the+N −Mstep chip counts fenced stats.Test plan
make fmtclean ·make vetclean ·make lint0 issuesmake test—go test -race ./..., all packages greenattention_test.go(10 tests),plain_test.go(9),renderers_diff_test.go(6), cmd flag tests (3)