Repository navigation
fix(tui,agent,screenshots): a full wordmark; cancellations in one write; cell-exact captures - #1353
Merged
Merged
Conversation
The header's identity block is the 5-row `FUTURE OS` block font beside the 4-row whale, but the header band was five rows tall *including* the hairline, and the loop painted `0..4`. So the fifth wordmark row — the bottom stroke of F, U, E and S — was never drawn: the art read as clipped rather than as a frame, and the launchpad hero, which iterates all five, disagreed with the chat header about the same wordmark. The tall-layout header is now six rows (five identity rows + the hairline), so `body_y`, `body_h`, the band tiling and the test that pins `header.h` all move by one. `docs/guide/tui.md` already described the header as "5 rows … ── hairline", so it needed no change: the code was the one out of step. A new test asserts every one of `wordmark_rows`' five rows appears in the header and that row 5 is still the hairline; reverting the loop makes it fail with the missing row printed. Also fixed while capturing it: the pty capture ends by killing the child, which can land mid-character, and decoding that stump with `errors="replace"` drew a literal U+FFFD into a cell (observed in the wordmark's bottom row). `run` now drops an incomplete trailing UTF-8 sequence — only the character, never the partial frame, whose written cells are the newest content — with a self-test.
`cancel_all_queued_runs` called the single-receipt wrapper once per queued run, so cancelling a busy session's queue cost one write transaction and one commit per run. The shutdown path calls it inside a fixed stage budget, and with a session holding several queued runs on a large store that was enough to overrun the budget and report "Agent shutdown deadline exceeded during queues and cancellation" - the host then exited with Failed even though the cancel had already happened in memory. `cancel_queued_receipts` is already the batch form (one transaction, a row update per run, all-or-nothing); the loop simply did not use it. Collect the run ids and pass them in one call, keeping the ephemeral skip, the `scheduled_snapshots` removal and the flush where they were. A refused batch now names every run id that was not recorded, since a restart recovers all of them rather than all but the last. Measured on the same three-queued-run scenario, counting the write transactions the cancellation opens: 3 before, 1 after; at twelve queued runs, 12 before, 1 after. Tests: every queued receipt is marked cancel_requested by that one write; a batch the store refuses commits none of its rows (which is what a per-run loop could not do); an ephemeral session writes no receipt.
…directions The alignment gate had two defects, one blocking and one silent. Blocking: it measured every cell as one column wide, so a right-leaning full-width glyph read as "no ink in its own cell". `(` sits on the right of its em, and every live frame containing a Chinese parenthesis was refused — the four P0 fixes could not be re-shot at all. Silent: "every character cell has ink" cannot see a shift. A row pushed sideways by a whole cell still leaves each character's box partly inked, so the gate said "aligned" for a frame with a deliberately shifted row. It now also requires that a cell the grid leaves blank carries no glyph, with the threshold measured on a trusted frame (worst blank cell: 11%) and a negative control proving a one-cell shift is caught. Both rules are a pure function of the grid and the ink picture, so the self-test pins them without a browser: the wide-span case, the shift, and a missing glyph. All 19 frames in docs/tui/assets/ are re-shot with the fixed renderer, live against an isolated agent; the previous set was rasterized before absolute placement landed and carried the flowed-text skew. The three picker frames are now reproducible scenarios (`picker-model`, `picker-theme`, `picker-sessions`) instead of hand-made captures.
The three picker assets come from shot.sh picker-model|picker-theme|picker-sessions like every other frame, so the figure index, the note that called them deterministic captures, and the recipe describe that instead of a separate tool path. Also records what the re-shoot changed: the sidebar border's longest unbroken run went from 3 text rows to 24.
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.
What and why
Four changes on the integration branch. The TUI workbench header now draws all five rows of its wordmark instead of clipping the last of them. The agent records a session's queued cancellations in a single write, so a reader can no longer observe a half-written receipt list. The screenshot tooling measures a wide (two-column) cell in both directions, which is what the regenerated TUI assets under
docs/tui/assets/depend on. The last commit is documentation: the picker frames are live scenarios now, and the verification record says so.Commits
Verification
Run at
f82307490(the branch tip before the docs-only commit; the last commit touches two Markdown files only), with rustc/clippy 1.97.0:cargo fmt --all -- --check— cleancargo clippy -p future-tui -p future-agent --all-targets -- -D warnings— cleancargo test -p future-tui --lib— 1026 passedcargo test -p future-agent --lib -- queued— 26 passedcargo test -p future-agent --lib -- rpc::session— 203 passedpython3 -m py_compile scripts/screenshots/capture.py scripts/screenshots/tui_capture.py scripts/screenshots/tui_terminal.py— cleanNotes
The TUI screenshot assets are regenerated by the same cell-measurement change, so they belong with it; the capture docs describe the corrected behaviour.