Repository navigation
MVP-11: one surface language for the CLI (units 1 to 9 and the close-out) - #103
Conversation
…oncept frames (D79–D82) On 2026-11-24 the maintainer asked for the CLI's remaining UI/UX work as one MVP: a popup that Esc closes for /doctor and every user-started report, setting and form; settings that do not stay in the chat; a sensibly ordered slash palette with /exit last. Follow-ups added a speaker marker instead of the you/agent labels, the approval's [v] preview as a popup, and a review of the first run. phases/mvp-11.md carries the business context, the target experience, the technical design, the security floor, eight steps with their review tiers, the decisions OD-1 to OD-23, risks, exit criteria and appendices. The recommendation of each decision was accepted the same day; two sub-questions stay open (the populated Home's title in OD-8, the default-model agreement in OD-23). The execution order, the cut line, the sheet design and the palette's row order are still proposals. phases/mvp-11/ holds the 27 frames, which are drawings on the real grid, not screenshots: Step 1's real-terminal spike must prove glyph widths, dimming and overlay behaviour. Around it: current.md (MVP item 11, D79–D82, execution order MVP-8, MVP-11, MVP-5), the roadmap and phases indexes, the Phase 2.6 header, CLAUDE.md and AGENTS.md status lines, five deferred-tasks triggers that named the "common-language increment" (three now name MVP-11, two say nothing owns them), and documentation-style §8/§11, which now allows UI mock-up PNGs in a folder named after the phase document. Product reference pages, the glossary and the ADR notes are not edited: they describe behaviour that does not exist yet, and the MVP lists them per step. Nothing is built and no ADR is written. Refs: D79, D80, D81, D82 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e merge checkpoint, the status documents and the register brought up to date PR #102 was merged on 2026-11-24 as c17e976 (its tree is identical to the final head f9cf262's). The new "PR #102 merge checkpoint" in the Phase 2.6 record states what the PR carried (157 commits: MVP-8's five steps, ADR-0139 to 0144, the answers to three external reviews and three security sittings, the Sonar fixes), the final-head evidence (CI run 45322172313: all 29 jobs green; the pull request's Sonar gate OK; the whole local gate green on a still tree at ae0326d) and what it does not show (the Windows runbook rows 1-38, the analysis and the push run of the merge commit on main, the maintainer's decisions, the stale pull-request description). current.md, CLAUDE.md, AGENTS.md and README.md say MVP-8 is complete and MVP-11 is next; mvp-11.md no longer waits on the pull request. The register closes the entries that listed the gate and the build as owed, notes the removed fixture directories and registers the 138 intentional SonarCloud smells (132 S7758, 5 S9382, 1 S6582) that need a maintainer's mark on main. Refs: ADR-0139, ADR-0140 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…sis of the merge commit (gate OK, no bug, no vulnerability) The analysis of c17e976 finished at 08:05Z; the merge commit's push run was still running when this was written and its result is not claimed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d the handoff for Step 1 Step 1 of MVP-11 asked for a real-terminal check before any popup is built. It is now partly run, and the plan records exactly what was and was not seen. Run: Ink 7.1 mounted with the Home's options, an absolutely positioned popup (68x21, and the 78x23 inspection size) over a full-screen body, checked cell for cell in tmux (15 checks; two deliberately broken builds fail the right ones), the repository's own measured-frame check on such a popup, glyph widths asked of three terminals (tmux, the VS Code terminal, Terminal.app: all 37 glyphs measure one column), and a by-hand pass in the VS Code terminal and Terminal.app reported clean by the maintainer. Found: a later sibling is drawn over the popup while the bounds check still passes (a drawn-frame comparison catches it), and an inline popup is safe only while the whole live region stays at most rows - 1 lines (at 24 of 24 rows Ink loses the user's scrollback). Both are now in the design (section 5.2), Step 4's acceptance and a new risk. Not run: Windows Terminal, iTerm2, SSH, and the inline form by hand; the Home's own code path is untested. The test is stored as .txt in docs so a repository-wide Vitest run cannot collect it. Handoff for whoever continues: mvp-11.md Step 1 says where it stands and the rules for continuing, current.md, CLAUDE.md and AGENTS.md say the spike is partly run, and deferred-tasks.md has an MVP-11 follow-ups section (two open sub-questions, the evidence rows owed, what is proposed and not ruled). No ADR is written and nothing is built. Refs: D79, D80, D81, D82 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ge, the Home and first run, the sheet frame and the popup MVP-11 Step 1. Four ADRs, written Proposed for the maintainer's approval: who started it picks the surface and one Esc/legend/glyph/registry language (0145); the calm Home and chat layout and a first run with no dead end (0146); the sheet frame with a wait clock that is in no snapshot and no guard reads (0147); the centred popup, its overlay slot, custody rules, inspection popup, doctor consent and the spike's evidence and conditions (0148). Revised the same day after seven read-only reviews (the plan against the code and the private UX analysis, a sandboxed observation of today's first run, and UX, performance, architecture and opus security design reviews). Refinements of the accepted decisions are marked in place with their reason. Nothing is implemented. Refs: D79, D80, D81, D82, ADR-0145, ADR-0146, ADR-0147, ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… proposed ADR-0145 to ADR-0148 Chat palette: the first row touches the prompt on every surface and /exit is the farthest row (0145). The Home's one-line title is the spaced wordmark, the first-run skip is remembered beyond the process, and the three default-model paths share one starter table of current models, Haiku 5.5 for Anthropic (0146). The popup's backdrop is dimmed through a leaf-level route with an every-cell test, and the secret step moves into the popup with the missing Windows Terminal row accepted as a risk (0148). Refs: ADR-0145, ADR-0146, ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ws; record the Step 1 evidence The maintainer approved the four ADRs on 2026-11-24 after three independent document reviews, answered here against the process and the code. Changes made in answer: the first-run texts are generated for all four providers, the exit guard joins the sheet frame, the doctor's consent freezes origins as well as provider ids, a mashed Esc cannot reject an approval inside the existing 400 ms settle, a live session's change into accept-edits or auto gets a content-free session row (the plan's rule 16, which no record yet satisfied; one additive migration, built in the settings step), the popup width, inline scrollback and state wording are corrected, ADR-0137 section 1 is reopened rather than superseded, and the draft-on-Ctrl+C claim is withdrawn and registered. The evidence the ADRs cite (the sandboxed first-run observation, the code re-read, the renderer probes and the dispositions of seven reviews) is recorded in mvp-11/step-1-evidence.md. Dated amendment notes are added to ADR-0064, 0068, 0115, 0122, 0129, 0134, 0137, 0139 and 0140. The plan carries the ten-unit order and a note that the ADRs win where they differ until the close-out brings it into line; the register's MVP-11 follow-ups are brought up to date. Refs: ADR-0145, ADR-0146, ADR-0147, ADR-0148, D79, D80, D81, D82 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ip gate derived from it MVP-11 Step 2.1. 'An overlay owns the keyboard' was written out by hand in a dozen places (the Home's screen slot, the paste flags, the wheel gate, the interrupt context, the strip's refresh pause, ChatView's and HomeView's paletteOpen, and the custody predicates of the Home frame, a gate card and a review). Now it is OverlayFlags (14 booleans) and a table of the gates each flag closes, so a new overlay is a field, a table row and a line in each host's builder, and the compiler refuses the omission. No behaviour change: the nine places where the old lists disagree are preserved row by row and pinned by overlay-flags.test.ts (49 tests; four mutations were shown to fail it). The popup of ADR-0148 will be one more flag whose row closes them all. Refs: ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…mmand in the TUI's remedies MVP-11 Step 2.2 and 2.3 (ADR-0145 sections 1 and 7, ADR-0122 section 6, OD-20). Registry. commands/repl-commands.ts is one CommandDefinition per name with a placement per surface (home, chat, home-chat): group, rank, a per-surface description, the surface class and an availability function, and every old export is derived from it. The palettes are built once per state change from cached state (palette-entries.ts) and the fold and the view read the same rows. The default row is the first enabled one, so '/' then Enter never leaves the application (it ran /exit before: exit code 0); /exit is the last entry of every list; /clear is dim with its reason on the bare Home and /resume when there is nothing to resume; arrows skip dim rows; a keyless Home leads with /providers; /help joins both palettes; a chat's list opens above the prompt with its first row beside it and its keys follow the screen. A command typed where it is not offered answers with one line that names the surface that has it. Wording. About forty strings that told a TUI user to run a shell command, or named a command or flag that does not exist (chat-export, --input/--output, provider add), now name the in-TUI action (/providers, /pricing, /export, /workflows, /resume); a pattern test (render/no-shell-remedy.test.ts, shown to fail when a remedy is added) reads the syntax tree of the TUI-reachable sources against a short reasoned allow-list. The /clear pointer in a stand-alone chat no longer names a /resume that is not there; provider names read as display names; the Home's pre-flight resolver is surface aware. A few strings in files owned by Step 2.4 stay listed as pending in that test. Pins broken on purpose are the palette, registry, help and Home palette-fit suites and the wording pins named in the two reports. The whole CLI suite passes (711 files, 14635 tests). Refs: ADR-0145, ADR-0122, D82 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t to do MVP-11 Step 2.4 (ADR-0146 sections 5 and 6, in the existing native cards; the popup comes with Step 6). A message typed with no provider key no longer builds a chat that fails. Enter opens the setup and the draft stays in the prompt, unsent, however the setup closes. A draft that the secret scrubber would mask (a pasted key) is never kept and never recorded in the input history, which is unencrypted and cannot be deleted; the setup says why. A chat build that fails for another cause restores the draft and shows its failure whole in the Home's wrapping, paging notice area (it was one row cut before its remedy), with secrets scrubbed from it. The setup: an Esc or Ctrl+C skip says 'Setup skipped', not the first-run sentence; after a network failure the first choice is 'Retry the check' (same key, no re-prompt) and 'Save it anyway' is never pre-selected; a down keychain offers no 'Enter a key' (the key would be validated and then lost) and names the environment variable once; rows read 'no key yet · Enter to add one' instead of pointing at /providers from inside /providers; the first-run sentence shows only on a real first run; the labels have one spelling and the provider names are display names. Below 80x24 at launch the offer waits unspent. The keyless line reads 'No provider key yet · Enter to connect · /providers' in the accent and stays visible with a hosted run or a focused row; the prompt cursor is drawn inverse with colour off (it was invisible under NO_COLOR). The strings left for this step by the wording sweep are fixed and its pending list is empty. Not in this step, by design: the environment-key consent's disclosure and input guards, and Esc stepping back from the key step (Step 6, with the popup). Fifteen mutations were shown to fail the new tests. The whole CLI suite passes (718 files, 14704 tests). Refs: ADR-0146, ADR-0122, OD-19 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Security (a separate sitting on the key path found no blocker and no high): - A key prompt was still reachable with the OS keychain down by three routes (the env consent card, the usable-key card, a custom endpoint); each now lands on the keychain card, so a key is never checked and then lost. - The env-key consent card opens on 'Not now' until Step 6 gives it the approval card's input guards; a held or typed-ahead Enter can no longer chain into a config write. - 'Looks like an API key' is its own predicate (render/provider-key-shape.ts) instead of the whole diagnostic scrubber: the four providers' formats, after stripping Unicode format characters, with no word-boundary dodge; ordinary prose that mentions Bearer, Basic or a token stays a normal message. A key-shaped draft is never recorded in the input history on any path, a slash-led key is no longer echoed as 'Unknown command', and the failed-build notice is bounded, glyph-blanked and chord-inert. - A short query no longer highlights /exit, /clear, /cancel or /compact while another row matched; the deferred first-run offer waits for an empty composer and no overlay. Correctness: a stand-alone chat's remedy no longer says 'restart' when another provider is usable; a Home-hosted chat's remedies point back to the Home; the model picker says whether it sets the default for new chats or switches this chat; the prompt cursor is drawn with a literal SGR when chalk is at level 0 (--no-color, FORCE_COLOR=0, dumb); a stand-alone /resume gets the pointer; scripted agent run and plain chats keep the shell wording of the effort and price notices (one shared NoticeSurface); dead branches and stale comments in the Home dispatch are gone; the typed /clear reads like its dim row; a slash draft keeps the keyed hint; notice rows no longer start with a stray space; palette group gaps are all or nothing. Tests: hollow tests fixed (the slash line is pasted; the dim row is checked by name), the detector of the no-shell-remedy test catches the bare subcommand phrases, and the usage-coverage permanent workload pin is 583 (repl-info.test.ts gained one case, counted by the real collection). Refs: ADR-0145, ADR-0146, ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… a help list that follows its surface MVP-11 Step 2 clean-up after the first review round (ADR-0145 section 7). The Home had two parallel dispatchers for its own words: a regular-expression chain for typed lines and a name chain for palette selections, with eight stub 'run's in the registry. Both are now one table (argsNotice, unavailable, open) in the controller; typed and palette routes call the same opener, so they cannot differ, and a command definition is either run over a session or opened by the Home (a union the compiler checks). Cognitive complexity of managementCommand went 56 to 5 and handlePaletteKey 52 to 10 (the estimator in the scratchpad; Sonar's own number is read on the PR). The palette and its list are one value instead of two fields that had to be set together; the unused palette exports and an unused parameter are gone; overlay-flags precomputes the gate to flags table. /help and the unknown-command hint in a Home-hosted chat now read that chat's placement (its /exit says it goes back to the Home and /resume is listed); plain, --json and one-shot output is byte for byte what it was. The popup allow-list in the registry test now means something: a popup placement is either listed as not built yet (with the increment that builds it) or has an opener, never neither or both. 25 mutations were shown to fail the dispatch and registry tests. A running implementation log of the MVP starts at docs/roadmap/phases/mvp-11. Refs: ADR-0145, ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Two more independent sittings and a re-observation of the final build found no blocker. Fixed: - /doctor in a plain or --json chat printed the TUI wording, and a hosted /run showed shell commands in the run view: the notice surface is now a required field of the run core, the doctor host and the leg finisher; relavium run and gate pass 'shell', the Home's host 'tui'; the plain driver keeps the /export hint the TUI drops. - A key-shaped draft on a keyed Home was sent to the model and written to the transcript: it is refused before the chat is built, like the keyless one. The key-shape predicate folds compatibility forms and strips invisible and combining characters, adds sk-None-, sk-or-v1-, gsk_, xai- and a generic sk-<word>- rule, requires a non-alphanumeric before a generic prefix and a credential-shaped value after an assignment, and a slash led key is no longer echoed in any chat or recorded in any history. - Short queries: no row of clear, cancel, compact, exit or trim is highlighted unless the query starts its name (/rel ran /exit, /res ran /clear); a query that matches no row, including Home-only words and typed arguments, is dispatched as the typed line instead of silently dropped. - The automatic first-run offer is spent after any provider run; a failed resize-time open is caught; a stale setup note cannot return; the failed-check card no longer carries a leftover progress label and an unverified key is 'Saved', not 'Connected'. - Five functions brought under the complexity limit; StripPauseFacts requires the whole overlay record; paste flags are checked against an explicit decided list; dead API removed; a wrapped notice is memoised. - Tests the mutation check found weak: the notice-surface threading at five call sites, the notice wrap, the setup guard's mode clause, the Home-hosted chat's key line. Counts: 741 test files and 15504 tests; typecheck, lint and prettier clean; the pinned cohort counts (583, chat.test.ts 185) hold. The implementation log records the human text that changed on non-TTY paths and the limits the reviews accepted. Refs: ADR-0145, ADR-0146, ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…y renderer, colour and size Mounts the real Ink renderer (alt screen and inline, colour on and off, 80x24, 100x30 and a below-floor 60x20) on the repo's own TTY double, reads the screen through a small terminal emulator and the raw bytes in the same mount, and asserts five properties per cell: a frame no taller than its bound, no line wider than the terminal, the exit key on screen, no scrollback clear inline and no colour sequence with colour off. 69 registered surfaces (33 in the Home, 18 chats in both hosts) plus a hand-kept table of every product surface, so a surface that is in neither list fails the completeness test. Three surfaces stay NOT_COVERED_YET with a reason. The baseline found three real defects, each pinned as a knownFailure that fails the cell when it starts to hold (so whoever fixes it deletes the entry): the full-screen chat viewport fills exactly `rows` lines (ADR-0068 c; the plan's bound is rows - 1), the Home-hosted chat's palette is not windowed inline (29 lines at 80x24 and a scrollback wipe), and the stand-alone chat's inline palette is one line over. Ten mutation cases prove each property can fail. The shell-remedy pattern test skips the two harness directories (surface-matrix, legend-golden) and has a guard that no product source imports them. Refs: ADR-0145, MVP-11 unit 3 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ws, taken before the legend builder 68 producers (palette and pickers, the chat, the Home, the run screen and its cards, the approval card and its full view, the question and checkpoint cards, the tab host, the sheets, the native prompts, the Home's own sentences) recorded state by state, with and without colour and at 80x24, 100x30 and below the floor: 1,555 entries in legend.golden.json, each styled run tagged so a tone change shows. Pure functions are called directly; a view that holds its string inside the render is mounted over the real store or channel; a few whole-app sentences are read from the source syntax tree. A completeness guard reads every non-test source for a hint-shaped string (43 files, 195 literals today) and fails on a new one outside the ledger, on a count that changed, on a listed file without a producer and on a fixed word the golden does not hold, so the ledger can only shrink as literals move to the builder. A wording change is a deliberate commit: UPDATE_LEGEND_GOLDEN=1 regenerates the file and its diff is the reviewable change. Refs: ADR-0145 section 3, MVP-11 unit 3 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s key in one grammar
The legend builder (render/tui/legend.ts) now carries the grammar of ADR-0145 section 3 for the whole CLI: a letter or a Ctrl chord is written in
brackets and the universal keys plain (derived by one function, keyToken, so a sentence that names a key follows the same rule); one separator
(' · ', the three-space answer rows keep their width); the verb states the effect; the key that leaves goes last and its effect is a required
argument, built by the four Esc classes (close, step, decide, leave); free text between the keys; one fit-to-width rule (fitLegend) instead of
three; a hint beside a row with no exit (keyHint / legendItems). 43 files and about 190 hand-written hint strings moved onto it: the approval,
question, checkpoint, gate and run cards and the exit guard, the tab host and the sheets, the palette, pickers and native prompts, the chat and
the Home hints and the sentences that name a key. The views draw keys by the roles the builder gives instead of matching token text.
The wording changes are the reviewable diff of legend.golden.json (about 1,100 entries, every one an application of a rule: brackets, one
separator, imperative verbs, the four Esc words, one spelling of the arrows, 'close' where the native prompt said 'leave'). Cases where hint and
handler disagreed were corrected to the handler (the pickers' Esc closes at once, it does not clear a filter first). Two new test files press
every key a consent card's legend names; the ledger of hand-written hint literals shrank from 43 files to the four prose sentences that name no key.
Refs: ADR-0145, MVP-11 unit 3
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…hs, and a fence round the data modules Glyphs (ADR-0145 section 5): render/tui/glyphs.ts is the one place a status or marker glyph is written (33 roles: glyph, ASCII form, word, colour). Every status table reads it (run, history, active, tool, doctor, exit guard, strips, cards, selection, scroll markers). The plain forms are used exactly when colour is off, the trigger the banner already had (no code reads a locale; that switch is Phase 2.6.L's). The paused glyph is the double bar everywhere (the pause emoji retires, in the shell status, the gate prompt and the history list too); a status that stood as a bare glyph now has its word beside it where the row has room. The host-glyph set grows to the core's refusal plus every glyph of the table, pinned by a behavioural probe in apps/cli; the transcript guard that blanks marker glyphs in model text is written but wired in the chat unit. Notation (ADR-0145 section 8): render/notation.ts holds money, time, identifier and path helpers as pure functions. The budget gate's amount is shown exactly as frozen (integer arithmetic, up to eight fractional digits, never rounded; proved over about 4,400 values and by a toFixed mutant that fails 20 tests); a price reads '$3 / $15 per M'; no micro-cent number appears in human text any more (they stay in machine output and in the --approve-amount input); '12 s' is '12s'; ages, dates and run ids have one spelling; paths are project-relative or from the home directory, and a path outside both stays absolute; a provider id in a human line is its display name. The shell 'models pricing' sentences and their characterization oracle follow the new price words. A lint fence: the CLI data modules (the registry, the legend builder, the glyph table, the notation helpers) may not import ink, react or node:; a fixture proves it fires five times and tools/lint-fixtures/assert-fence.mjs pins the count. Refs: ADR-0145, ADR-0097, ADR-0139, MVP-11 unit 3 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…he CLI has one Surface type
Emphasis (ADR-0145 section 5, 'no colour means colour only'): chalk's level is 0 under NO_COLOR, --no-color, FORCE_COLOR=0 and TERM=dumb, and
at level 0 it strips bold and inverse too, so a selected row without colour was told apart by its marker alone. render/tui/emphasis.ts writes
the style as a literal SGR pair in both modes (the prompt cursor's solution, generalised): one mechanism, the same bytes everywhere, no colour
code ever, each span closed so a wrapped or truncated row cannot leak it. Every selection site (palette, pickers, mention list, native select,
the tab strip and rows, sheets, the Home strip, the run-card gate list, question options, the tool-call list) is bold and inverse; headings and
keys keep their weight. A source guard fails a raw bold/inverse/underline prop or a hand-written pair outside a reasoned allow-list (model
markdown and the syntax palette). The surface matrix gains a selected-row property (nine Home and seven chat surfaces declare it) and still
rejects every colour sequence with colour off.
Surface: render/surface.ts is the one vocabulary ('shell' | 'home' | 'home-chat' | 'standalone-chat') with total helpers; the seven parallel unions
(credential, setup, cleared-notice, palette, command-list ...) are narrowings of it, the hand mappings go through the helpers, the palette's 'chat'
placement is 'standalone-chat' so one word means one thing, and a guard fails a new union of surface literals spelled outside the module.
Refs: ADR-0145, MVP-11 unit 3
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Five reviewers (correctness, an opus security sitting, a real-terminal observation, a 345-mutant test-quality sweep, architecture) found no
blocker; what they confirmed is fixed here.
Real defects: the chat's '/' palette drew overlapping rows at 80x24 over any transcript (Yoga shrank the rows of a fixed-height box: flexShrink
on the overlay lists, a matrix property that the palette's own legend row is whole); a false 'Esc stops the turn' while '/mode' was open (the busy
line no longer shows while a command awaits its own card); a path display that read '~/x.yaml' for a project folder named '~' (chat export wrote
into the project and said home; displayPath now answers './~/x.yaml'); the host-glyph set blanked an author's bullets and made the MCP consent card
refuse a directory containing one (the bullet and the two scroll triangles are table glyphs but not blanked: hostBlanked); the question card could
lose its exit key at narrow widths (fitLegend, the note gives way) and, without colour, drew host shapes a model could copy ('(*)', '> 1'),
and its current-tab dot looked like a key ('[o]'); the mouse-selection highlight vanished without colour; the command card and the Home strip
showed absolute paths (shortened first, sanitised after, wired through the real hosts); NaN and Infinity reached the time helpers and 999.6 ms read
'1000ms'.
Wording and hints: 'type /exit to end', 'Enter choose', 'Tab all directories', 'Esc / [Ctrl+C] close' where both keys do the same, one diff count
'+3 -0', Leave-class exits for the keys that end the session, the doctor without 'ok ok', an attachment name that cannot forge a legend item.
Guards: the data-module fence lists 14 modules, asserts each exists and carries the rule, and its fixture covers chalk, react-dom and a vendor SDK;
the harness-import guard reads the syntax tree; the one-place-for-glyphs guard is inverted (any symbol outside a reasoned allow-list fails); a guard
that an implicit glyph reader is only reached inside withGlyphForm; selection marker polarity with colour on and off; literal pins for the matrix
sizes, the glyph roles, the colour-sequence range edges; both consent-legend suites key effects by item text and press every key they name; the
legend golden shares one recording.
Refs: ADR-0145, MVP-11 unit 3
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Five new reviewers (correctness, an opus security sitting, the rebuilt CLI in a real terminal, a 333-mutant test sweep, architecture) attacked the first round's fixes; none found a blocker, and everything they confirmed is fixed here. Consent path: the MCP consent card's fail-closed path check could be bypassed end to end (old code): the gate cleaned a path (zero-width, bidi, control characters, a 200-character cut) before any prompter or the card's own check saw it, so a program whose name held a hidden character got a card naming its visible twin while the real file ran, and the shell prompt and the non-interactive digest list showed the same twin. The gate now refuses such a path before any subject exists (hidden characters, a blank other than the ordinary space, a space at either end, a credential-shaped part, more than 520 characters, the longest executable plus directory pair an 80x24 card shows whole), says so in fixed words that name no path, and the digest list writes the hidden characters as visible escapes. 56 + 61 end-to-end cases through the real gate with real files, 25 mutants. Question card: the first round's blanking over-reached (it removed '(x)' and '(o)' from ordinary questions and made distinct labels identical): only the shapes the host draws are neutralised, only in the plain form, by blanking the parentheses or the cursor so labels stay distinct; the header sits behind the host gutter. The attachment bar keeps its exit key at any width and its separator guard is NFKC- and lookalike-aware. Paths: the resume picker's 'all directories' showed raw absolute paths that looked identical; the History tab hint ended in a lone '.'; the command card says '. (project root: <folder>)' and the resume banner names the directory; shorten, sanitise, then guard '~' (a control character before a '~' folder no longer reads as home); win32 case folding is ASCII only. Money and time: hours in durations, a past time reads as past, one rounding for context windows. Hints: a Home slash draft says 'Enter run'; the keyless line does not promise Enter while a row owns it; a '!' command waiting on its approval card no longer shows a running line that contradicts the card; the model picker and the mention list say '▲/▼ N more'; the chat sheets name Ctrl+C. Guards: the data-module fence also bans dynamic import(), require and process/Buffer reads and ignores inline disables, and its fixture pins ink-*; the withGlyphForm guard derives readers transitively and fails the six shapes the architecture review found; the harness-import guard reads templates and fixtures; the bundle-closure check fails on any harness input; a secrets-control pin (18 to 20 tests of chat-export) that would have turned the required shard red is corrected. Refs: ADR-0145, ADR-0084, MVP-11 unit 3 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…view rounds, the refinements and what it leaves Refs: ADR-0145, MVP-11 unit 3 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…one measured frame Step 4 part 1 (unit 4a) of MVP-11, ADR-0148 §2, §3 and §5. A popup is an external store per host (the Home, a stand-alone chat) with a pure reducer inside it and one slot drawing it. Owning the keyboard is no longer taking the rows: `nativePrompt` and `popup` own the keys, the new `replacesBody` flag says the body is replaced. In the alternate screen a popup is drawn in the overlay slot (the last child of every root branch, the only absolute node in the CLI) over a body that stays drawn; inline it is a framed block of at most rows-1. - popups/: geometry (one function, a data module behind the fence), frame model (four parts, four content states), reducer driver, host store (opening rules, opening guard, one key history, run ids, late results, depth two, loading clock outside the snapshot), notification channel, content-node measurement, error boundary. - Custody: `popup` closes `revokesCustody`; a popup that becomes the top resets the cards' acknowledgement and dwell origin synchronously, so a card is never answerable on a frame it had before the popup. - A sheet that arrives closes the popup unanswered. - The native-prompt identity is enumerated field by field (a test fails when a field is added without a decision); picker and the popup descriptor are now part of it. - Matrix: `home.popup`, `chat.popup`, `standalone-chat.popup` in all nine cells, with an overlay-layer and a popup-box property. Golden: three new producers, no existing one changed. - Found by mutation: an inline popup's content node stretched and could never be acknowledged (alignSelf flex-start). Refs: ADR-0148, ADR-0145, ADR-0147 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd an every-cell test proves it
Step 4 part 2 (unit 4a) of MVP-11, ADR-0148 §4 (the maintainer's ruling of
2026-11-24: the dimming is built to the same standard as the opacity).
- render/tui/text.tsx is the CLI's one `Text` (the only non-test, non-harness
file that imports ink's) and the context behind it. Inside a `BackdropDim`
it draws dim at paint time; outside, it is ink's `Text`, byte for byte.
Nothing enters a wrap cache or a pre-built string. 23 views import it; an
AST guard pins that.
- The hosts wrap everything but the popup slot in `BackdropDim`, so the slot
stays the last child and the only absolute node, and its own cells are
never dim. The slot's `slotDrawing` / `dimsBackdrop` are the one predicate
the slot and both hosts ask: dimmed exactly when an overlay box is drawn
over a body that stays, with colour on.
- A dimmed backdrop draws no bold: SGR 22 closes bold and dim, and ink's
cell-by-cell re-encoding (ansi-tokenize) never re-opens dim after it, so a
bold span left every cell after it plain. The state is avoided (`Text`
passes bold={false}, `Emph` drops its bold pair); inverse, underline,
italic and colour stay.
- The matrix emulator now keeps the SGR state of every cell, and a new
`backdrop-dim` property asserts: every cell outside the popup that shows
something is dim, on bodies that held bold, inverse and coloured cells
before the popup opened; nothing is dim after it closes; nothing newly
dimmed with colour off. Seven popup surfaces over populated Home, a
selected row, and rich markdown chats; 702 cells.
Refs: ADR-0148
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e dimmed backdrop and what it gives up) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…it sends a key The doctor opens as a popup on the Home, in the Home's chat and in a stand-alone chat, in both placements; it writes nothing into the Home's notice or the transcript. A plain, --json or one-shot chat prints the text report as before. Quick tier: the checks run in work the popup starts, off the render, and a new "provider keys" row reads presence only (warn at zero, no key value read). Controls: up/down, Enter (detail and remedy), [r], [d], [c], Esc. Deep tier is a consent (ADR-0148 section 8): [d] arms a line that names the origins a key would be sent to, frozen at arming from the resolver's pinned destination. Ctrl+Y answers it only through the approval card's chord guard (800 ms after the line's own acknowledged frame, quiet gap, lockout, window) and only if no non-navigation key reached the popup since it opened or armed. A refused answer disarms the line. The run is given exactly the frozen targets, refuses an endpoint that changed since, reads a key only after that check, is owned by the host (one at a time), and is aborted by Esc, close or exit. MCP rows only report the session; nothing is contacted. Every label and detail is scrubbed. The popup host gains a chord step kind, branching steps, an initial step and the popup's context on open; the doctor's code loads on first use. Refs: ADR-0148, ADR-0145 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e consent of its deep check) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… chat A typed or palette-selected line opens the popup before it is counted as a submit, in the Home's chat and in a stand-alone chat; a plain, --json or one-shot chat prints today's text, byte for byte (costNotice and catalogNotice are now the plain text of structured parts the popups draw too). /agent shows the bound agent's fields as a scrollable report and the docked agent sheet is retired. /workflows lists the project's catalog. /help lists the commands in the palette's order and the chat's keys (CHAT_KEYS, each one pressed by a test). Every untrusted field goes through the full scrub. /cost shows the per-model breakdown; [r] release is offered only when something is held and is a chord step (Ctrl+Y through the doctor's guard), and a typed /cost --release opens on it. At the answer the popup asks the host again whether anything is in flight and releases nothing if so; the release is the one durable-then-governor function the plain command uses too. It ends in a persistent result step; nothing is written into the transcript or a notice. The open gates of both hosts and the release re-check read one predicate (turn-in-flight). The popup host gains per-result controls and a final step. Refs: ADR-0148, ADR-0074 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… 1 says /agent, /cost, /workflows and /help copy exactly the scrubbed lines they draw, through the same clipboard path /copy and the doctor use. The control is offered only where the step shows a report (never while loading, on an error, with no project, or on /cost's release and result steps), the legend keeps it whole at 80 columns, and the notification says what was sent, failed, was too large or that copying is not available. Nothing is written into the transcript or a notice. Refs: ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…release's safety finding and what it leaves) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nt column, the speaker marker in the margin, a hanging wrap and the inline role words Plan Step 7b (ADR-0145 §6): the chat lives on the grid the Home already uses. The margin belongs to the host and the content column holds every word a person or a model wrote. - The transcript model: DisplayLine carries content only plus a typed margin role (the closed MarginRole union), so no string of a model or a person can occupy the marker's place; the person's turn has `›` (`>` without colour) in the margin and bold text, a tool call has `▸`, a reply is plain, a wrapped line hangs, one blank row separates turns, and one call has one row. The interim row-blanking guard of unit 7 is retired: the margin is composed from product constants only (marginCell takes no text), the content cell is exactly W wide, and a source pin forbids any other caller of wrapTranscript/liveScrollGeometry. The documents (/copy, /edit, /scrollback) are byte-identical; a drag-copy yields content only. - The chat's chrome: header, prompt editor (a Box of exactly W), rule, status line, hint, palette, attachment bar, the `@` and history views, the live region (tool rows through a MarginRow, the streamed answer wrapped as the finished reply will be) and the docked turn sit on the content column (68 columns at 80, 84 at 100, at most 96). - The inline renderer, the accessible mode, writes the role words `you`, `agent`, `tool` and `model` in the margin. - The measured-frame acknowledgement counts the separator rows in one pass; the legend golden's 72 moves are a pure left offset. Refs: ADR-0145 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…king back on model rows, the inline words cannot be forged, a hanging wrap without the break space, and empty replies without a blank row Round 1 of unit 9 (five reviewers: the scoped security sitting, correctness, the built CLI driven, independent mutation, architecture and docs; no blocker or high): - Security: the margin guarantee is exact in Ink's layout but not on a terminal that draws a default-ignorable code point (U+115F, U+3164, U+FFA0) wider than the layout library measures it. A pure screen-text filter (screen-text.ts) now drops those fillers and an orphan leading combining mark at the display boundary of every untrusted row (the transcript, the live tail, reasoning, tool rows, warnings, the notification; the documents are untouched), and the marker glyphs are blanked again on model-written rows as defence in depth. A simulated terminal that wraps like tmux witnesses that nothing lands in the margin. In the inline renderer a reply, tool or notice row that begins with a role word gets its entry's own word in the margin (new `notice` role, word `note`, also the model-switch word). - Layout: a continuation row no longer starts with the break space (the hanging wrap hangs); an empty reply draws no blank body row and no lone `agent`; the stand-alone inline chat keeps its blank row after the printed intro; the colour-off model-switch intro gets its margin role; the chrome's grid fallback is one helper. - Tests: the mutation reviewer's patch (50 tests) and the moved pins are in; the width sweep has a timeout; the 100-column popup cells exercise the legend-row refinement again. Refs: ADR-0145 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…the widths a terminal really draws, an approval card that escapes what it cannot draw safely, a word rule that survives invisible characters, and every chrome producer through the filter Round 2 of unit 9 (three new reviewers: a security re-sitting, correctness with the built CLI driven, independent mutation; no blocker or high): - The screen filter was quadratic on a long run of tag characters (a 64,000-character run froze the event loop for 28 s on the real binary): it is one forward pass now, with a performance test over 19 hostile classes and the 64,000-character audit of every regex and loop the unit added. It also covers the classes the layout library measures narrower than a terminal draws (VS16 after a non-emoji base, a skin tone after a non-modifier base, lone surrogates dropped; Thai/Lao AM and non-flag regional-indicator pairs rewritten so both measures agree; tabs expanded in the live region; the rest of Cf dropped). The simulated terminal's width table is rebuilt from widths measured on tmux, so the witness has teeth for each class. - The approval card, a consent surface, escapes those classes visibly (never drops them): the path row no longer shifts the frame. - The inline word rule folds its head (NFKC, no invisible or combining characters, the blank-looking set) so one kept invisible character cannot evade it; the live inline stream carries its `agent` word; a row-less first entry leaves no leading blank row; a reply of only marker glyphs is empty. - The inline intro, the `@` and history views, the attachment bar and the header pass through the filter at their drawing sites. - Tests: the mutation reviewer's 43 tests are in; 40 real-binary captures. Refs: ADR-0145 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s before the layout, a chunk-safe live stream, a clip that holds one row to one row, flags and the wide emoji measured on tmux, and a question card whose labels cannot draw alike The security sitting on wave 2 found that a Thai or non-flag regional-indicator row could be drawn wider than the layout counted, so the acknowledged text and the margin could be pushed on a real terminal while the host's flush resolved (R3S-1, high), and that a ZWNJ after a flag drew two columns where one was counted (R3S-2, medium). - the screen filter now runs before every layout that wraps (hanging rows, markdown, the question card's question and descriptions, the live tail); the per-row pass stays idempotent - a chunk-safe ScreenStream sits between the terminal stream and the markdown stream for the live tail (holds back only what a later chunk could change) - full-screen cells and live-tail rows clip (truncate-end), so one DisplayLine is one physical row by construction - regional indicators carry a ZWNJ only when lone; whatever would join onto a flag is dropped; every skin tone is dropped; the nine text-default emoji bases gain U+FE0F; what follows a whole-only wide emoji is dropped; four more zero-counted code points are dropped; the filter is two-stage and idempotent - the question card escapes all labels of a set when two would draw alike; the approval card's middle cut falls back to the start cut when it keeps nothing - the word rule's fold skips Hangul vowel/final jamo, private-use and unassigned code points; the broader lookalike residual is recorded - tmux 3.7b measurements are committed as a table the tests check the filter against (tmux-measurements.test-support.ts) Refs: ADR-0145, ADR-0146 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…al draws for Indic conjuncts and Prepend letters, a sequence differential on tmux, and the card escapes that follow from it The security sitting on wave 3 found that ordinary Hindi, Bengali, Khmer and similar text was counted by its first code point (string-width joins a conjunct into one cluster; tmux draws every spacing code point), so model text reached the margin and the person's turn could be forged (R4-S-1, medium), and that a mark after a narrow emoji base undercounted on the approval card (R4-S-2, medium). - the repo's own measure counts a cluster with an Indic linker (20) or a Prepend letter (27) as the larger of string-width and the sum over its code points, so it is never less than Ink's count and a row measured to fit is never re-wrapped; a bounded memo keeps natural text fast - where Ink fits text itself (the @ picker, history search, the native prompt, the palette query, the draft, the denial reason, the run screen) the text gets a display-only ZWNJ after a linker and a Prepend letter; the rows that Ink fitted on their own in the chat are pre-fitted by the measure - a sequence differential against tmux 3.7b (20,522 strings; held-out seed 20,132) went from 2,537 and 2,298 undercounts to 0; the committed table grew by 164 entries and 581 real tmux values, and the simulated terminal models sequences - the approval card escapes a combining mark after a narrow emoji base; the question card judges labels as drawn and as cut and escapes every label of an alike set one-to-one; the word rule folds with NFKD first; false comments fixed Refs: ADR-0145, ADR-0146 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…a cluster counts what a terminal draws unless tmux is shown to join it The security sitting on wave 4 (its own 64,000-string differential on tmux and the real binary) found six more mediums in width classes the earlier lists did not name: U+FF9E/U+FF9F after an emoji, a Prepend letter before a VS16 emoji, the Kirat Rai vowel signs, ZWJ chains of tag flags, the approval card's title row, and cutters that kept a cluster straddling the cut. - every multi-code-point cluster now counts the larger of string-width and the sum over its code points (a U+FE0F widens the 1-column cell it joins), except a finite whitelist of joins tmux performs (an untoned RGI emoji sequence, a Hangul-only cluster), checked exhaustively on tmux 3.7b (73,564 strings) and committed compactly; the wave-4 linker/Prepend special case is gone - a ZWJ before a pictograph is dropped unless it is part of an emoji sequence (the one case the sum cannot cover) - one cutter (fitColumns) keeps whole clusters only and draws `?` for a cluster wider than the row; every clip, status-line, label, popup-field and question card cut uses it - where text is fitted for Ink it is fitted by the repo's measure first (inkRows replaces inkSafe, so no display-only joiner is added); Ink's own truncation was found unsafe on the real binary and is no longer relied on - the approval card escapes U+FF9E/U+FF9F after an emoji or narrow base and a Prepend letter before a narrow base; RunApp and the Runs screen are filtered - differential vs tmux: 0 undercounts on every generator including a held-out seed of 711,670 pairwise strings (283 before) - two unit-8 tests no longer depend on the wall clock Refs: ADR-0145, ADR-0146 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s tmux glue a sequence into the previous cell, and a joiner-final cluster cannot undercount the one after it The focused security sitting on wave 5 found that the inverted measure held and that one class remained, in the filter's one exception rule: after a letter, U+FE0E or U+20E3 kept the following ZWJ, tmux glued the next recommended emoji sequence into the letter's cell, widened it and overflowed its cell buffer into a new cell, so a row was one column short per instance (R6-S-1, medium). - U+FE0E and U+20E3 leave the drop rule's lookbehind (tested over 122,619 strings: no undercount, no natural text changed) - one shared cluster walk (measuredClusters) adds a column to a recommended join holding U+FE0F that follows a cluster ending in U+200D; every walker (displayWidth, the cutters, the wrap helpers, the markdown layout, the question card, the prompt window) uses it - the in-context whitelist evidence (729 sequences in 44 contexts, 32,076 tmux strings: 0 undercounts) and the three untoned kiss sequences are committed - the command card's Runs-in row is escaped before it is cut, so two long directories cannot look alike; the Home's loading echo is filtered - tmux draws U+180E in no column, so the filter no longer drops it; RunApp's live header goes through the same fit as its other rows - differential vs tmux: 0 undercounts on every seed, including the sitting's two (41 before) Refs: ADR-0145, ADR-0146 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d limits and what is owed Writes the unit's documents from the final code: the implementation log's "Unit 9" section (six review rounds and security sittings, the decisions and accepted limits table, including the maintainer decisions: the autowrap-off fallback and the core refusal of conjunct-script words), the dated notes in ADR-0145 and ADR-0146, the plan's rulings, "The transcript grid" section of the chat-session reference (the margin, the speaker marker, the wrap, the screen filter and the measure), the accessibility and markdown notes, the glossary, Windows runbook rows 46 to 50, the deferred-task entries, and the status lines. Refs: ADR-0145, ADR-0146 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nguage reference, the owed ADR notes, the changelog and the documents that still lied - closeout-evidence.md: the 17 acceptance criteria and the repository measures of the plan, row by row, with the evidence and what is missing; the places where the plan and the code disagree; the gate, coverage and the one lane that failed once under load and passed alone - docs/reference/cli/surface-language.md: the canonical home of the grammar, the glyph table, the surface classes and the frames (ADR-0145) - dated implementation notes owed to ADR-0061, 0068, 0137, 0139, 0140, 0145, 0146 and 0148; the Status lines of ADR-0145 and 0146 - canonical specs: config-spec (first_run_setup_skipped, show_banner), database-schema and agent-session-spec (the session record rows), commands, home, chat-session, accessibility, glossary, the Windows runbook (rows 51 to 59), tech-stack and the CLI README corrected against the code - apps/cli/CHANGELOG.md: the user-visible changes of MVP-11 - deferred-tasks: the three entries that named this MVP closed or re-homed and the close-out follow-ups Refs: ADR-0145, ADR-0146, ADR-0147, ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @cemililik, this pull request is too large to review
It changes 1,175 files. Sourcery can review pull requests with up to 300 changed files.
Architecture Inside the changed components — 2 viewsComponent view — Popup and overlay framework The external popup store, frame overlay slot, and host integrations
Component view — Session persistence and record rows Session lifecycle and append-only SQLite persistence for mode changes and releases
Data flow Data model The other flows — 1 sequence
Review ✨ Nothing flagged · reviewed Tip The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change 🪧 More tips
Thanks for using PR Lens! It's free for OSS. If it helped, a star helps other teams find it. |
|
Review skipped: 1195 files exceed the limit of 150 WalkthroughWarning Review details and warnings were omitted to fit the comment limit. |
… slow runner, and SonarCloud's bugs and vulnerabilities
The first CI run of the pull request failed where the local runs had passed,
because the runner has a fraction of this machine's cores (the CLI suite took
1,106 s there against 166 s here).
- home-flow-popups-hosts.test.tsx (red on development since 2026-11-26): read a
recorder subscribed before Esc instead of the channel at one moment (a
notification lives 3 s of real time)
- tool-review-screen.test.ts: 60 s timeout on the two property loops
- vitest's 60 s worker RPC timeout ("Timeout calling onTaskUpdate", exit 1 with
every test passing): a file's synchronous tests ran 60 s without a turn of the
event loop; yieldBetweenTests() in 16 files, an async whitelist build, no file
now longer than 3.8 s without a turn
- SonarCloud (12 bugs, 22 vulnerabilities): sort comparisons written out, the
`then` field renamed `afterwards`, tryCall (process/attempt.ts) tells a
synchronous refusal from the work's later fault at four admission sites,
bidirectional test characters written as \u escapes, the spike scripts use an
absolute tmux path and an ESC constant
- the close-out evidence and the register record it
Verified with the CLI suite twice at full speed (1,130 files, 29,377 passed) and
once with two workers (986 s, no timeout), the closest local imitation of the
runner.
Refs: ADR-0145, ADR-0146
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…he channel when its notification is missing The notification assertion has failed on every CI run since unit 7 and passes on this machine under a clean environment, two workers and CPU contention; the message now carries the card, the busy flag, the channel and the frame tail, so the runner's next failure names its cause. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…es 19 to 20 minutes on the runner The pull request's CI runs showed that the workspace job (30 minutes) cannot finish any more: MVP-11 added about 3,500 tests; on the runner the CLI suite took 1,106 s and 1,142 s in two runs (986 s locally with two workers) and the steps after it (build, format, db-sync, smokes) take about 5 minutes more, so the job needs about 32 minutes and was cancelled at 30 twice, before its build step ran. The watchdog is a ceiling, not a target: 45 minutes, with the three guards that pin it (workspace-scheduling and the source-smoke check) moved with it, as the earlier 25 to 30 change did. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… gone
The CI diagnostic of the last run shows the card still open ('chord', busy, its
(wait) still drawn) after the one Esc the test sent, on a slow runner; the test
now repeats Esc a pause apart until the card is gone and names how many it took.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The fifth CI run of the pull request got past the workspace job's old time limit for the first time and found, besides the home flow test (now green there): - drive-home-unreadable-card.test.ts waited a fixed 500 turns of the event loop for a step that needs real time; the wait now also lasts 15 s - inline-text.test.ts: one property loop takes 1.5 s here and over the 5 s default there; 60 s timeout - screen-text-performance.test.ts: absolute 250 ms bounds failed four calls at 253 to 301 ms on the runner; the bound is 2 s, ten times the busy cost here and an order below the quadratic defect (28 s) the file exists for Verified with the whole CLI suite on four workers beside 26 busy loops (load 44), which spent 2,359 s in tests against the runner's 2,438 s: 1,130 files, 29,377 passed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ost release (PR #103 review) The external review of PR #103 was checked claim by claim against the code before anything changed; these are the data and scripted-path findings that held. - `listSessions` takes an optional `onUnreadable(sessionId)`: a row that does not parse is skipped and reported, so one damaged row no longer stops the Home from opening. Without the callback it throws as before (`chat list` is unchanged). The Home counts the skipped rows and takes them off the session total. - A gate's message in `status`, `gate list` and the clack prompt goes through `sanitizeUntrustedInline` (the redaction the Home's card uses); the `--json` output is unchanged, that being a machine contract for the maintainer to rule on. - `resolveSaveToRoot` falls back to the resumer's directory for any stat failure (permission, a path under a file), not only for "not found". - `cost_release.microcents` must be a safe integer; the database refused 2^53 with a raw constraint error. - The default-model writer reports as a cancel only its dedicated cancel marker, not every `invalid_invocation`. - `show_banner`'s comment says what the code does. - The pinned test count of `gate.test.ts` in the secrets control and its provenance test moves from 76 to 77. Each fix has a regression test that fails with the fix taken out. Refs: ADR-0145, ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…review) The findings of the external review of PR #103 that the code confirmed, in the terminal UI. Each has a regression test that fails with the fix taken out. - The live region of a running turn is one budget (`liveRegionRows`): the busy line or the answer and the interrupt note keep their rows, and the tool calls and the reasoning panel above them give up their oldest rows first. Before, four bounds and no total let a reasoning panel, six tool calls and a long answer push the rule, the status line and the hint out of an 80x24 frame. - Text delivered in one chunk with its return ("xyz\r") no longer answers a guarded option: the guards judge a key by what came before it, so the chunk is now a refused affirmative. - A question card's settle time runs from the frame the host acknowledged (as the checkpoint card's dwell does), and a paste counts as a foreign key for the approval guards. - `/models` opens on the refresh row when the model in force cannot be used or is not listed, so a bare Enter opens no model's second step. - The run view expands a model's tabs and blanks the marker glyphs in its text; the node-detail and History/Active text pass the screen filter; the legend's separator check treats U+2800 and the Hangul fillers as blanks (and the glyph guard names the one literal it now holds). - "/workflows (History tab)" is "/workflows, then [h]" in five places; the notice no longer pages behind the "@" picker; the Runs screen's empty text no longer offers /run; /pricing's clear no longer shows Rates as done on its confirmation; the card no longer offers [p], which does nothing there; the popup host hands a throw's cause to an optional `onFault` (not wired yet, recorded). - The legend golden is regenerated: ten lines, all of them these wordings. Refs: ADR-0145, ADR-0147, ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- `terminal-widths.test.ts`: the four tests that re-derive their counts from the runtime's Unicode data and pin the Unicode 17 numbers run only where `process.versions.unicode` is 17 or later; Node 22.13 carries Unicode 16. No Node 22.13 was available to confirm these are all of the floor job's failures, and the job (serialized) still cannot finish in 45 minutes: both are recorded. - `no-shell-remedy.test.ts`: every `commands/` file the TUI imports is in the exemption list, so a new TUI-reachable command is scanned. - `chat-native-card-busy.test.tsx`: the retired `model-picker` surface id becomes the live `settings-models`. - `home-gate-card-wait.test.tsx`: the wait clock is pinned, not read from the day. - `tmux-measurements.test-support.ts`: the header says the tables were copied from the measurement files and that the script and raw output are not committed. - `run-tmux-inline.mjs` exits non-zero when a check fails or none ran. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…, and record the rest The review's other large finding was that the close-out said things that were not so. Every claim was checked against the code first; these are the document corrections that held, and the decisions and deferrals that the maintainer owns. - Status lines: `CLAUDE.md`, `AGENTS.md`, `current.md`, `mvp-11.md` and `surface-language.md` no longer say unit 10 is next; they say PR #103 is open. - `closeout-evidence.md`: the code was not final at `03d923f3` (`7c434673` changed production code); "nothing is wholly unmet" was wrong (criteria 13 and 15); the runbook has 59 rows; criterion 7 is "met, with a deviation"; the oracle was changed in content by two commits; the D64 split names units 1 and 2 and calls unit 9's end a maintainer-accepted exception; a new section records what the review found and what became of it. - `chat-session.md`, `glossary.md`, `home.md`, `markdown-rendering.md`, `accessibility.md`, `surface-language.md`: every approval answer is a Ctrl chord (the agent's question answers with Enter); `run_command` is refused in plan; the retired play glyph; the width rule's "never less"; the inline reseat's documents; the first-run popup opens in the second frame; "/workflows, then [h]". - Dated implementation notes (never a rewrite) on ADR-0066, 0139, 0145, 0146, 0147 and 0148. - `deferred-tasks.md`: a section for the maintainer's decisions (the `--json` gate message, the inline spinner against ADR-0145 section 9, the inspection popup's 12 rows, the invisible-character set, the History root, the `relavium run` refusal, the Node 22.13 floor job, the two catalog rows the sync tool regenerated, an unexplained dropped first `Esc`) and for the deferrals, each with its trigger. - `apps/cli/CHANGELOG.md`: the new `relavium run` refusal is no longer listed beside "no exit code changes", the scripted-path changes the first draft left out are listed, and the review's user-visible fixes are added. - The implementation log gets a short unit 10 record. Refs: ADR-0145, ADR-0148 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nest status The README is rewritten around what is true of each state of the product, and its images are redrawn. - Three states, kept apart: published (`relavium@0.1.1`, checked against the `v0.1.1` tag: the old table listed the Home, the approval modes and the model catalog, which are on `main` but unpublished), built on `main` (v0.2.0, held by the release guard), and in review (PR #103). The PR-by-PR chronology is gone; `current.md` owns it. - A key-less workflow example that was run with the CLI (`Hello, Ada!`), the principles table with real headers, a section on the development build's Home, and a tutorials row. - The hero, the continuum and the architecture are soft pastel PNGs (the hero's chat window is a frame of the application's own chat view with a sample conversation); the tour is a GIF of real frames of the Home, captured from the built CLI in tmux. The old SVGs (dark, neon, glow) are removed; nothing else referenced them. - `assets/readme/README.md` says what is real in each image and what is ours (colours, captions, the tints on marks); `assets/readme/src/` rebuilds all four from a clean profile in about half a minute (a hand-written GIF encoder, an independent decoder that checks it, the captured frames). The GIF was also decoded by a browser's own decoder. - `deferred-tasks.md` records what the tour left out on purpose: a popup's dimmed backdrop leaves the tail of a longer hint (`wice)`) beside its box. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…enerator SonarCloud's gate failed on two conditions, both from `assets/readme/src/` (the generator of the README images): reliability C (one bug) and security B (one vulnerability); a BLOCKER smell sat in the same folder. - bug (S7727): `grid.map(rowHtml)` passed a function straight to `map`; it takes a lambda now (two places). - vulnerability (S4036): `tmux` was started by a PATH search. It is found by an absolute path (`TMUX_BIN`, or Homebrew's, `/usr/local`'s or the system's), as the spike scripts already do; the CLI under test is started with `process.execPath`. - blocker (S2699): the chat-frame capture asserted nothing. It now fails when a scene drew no request or no status line. - the smells of the same files that code can answer: five functions over the complexity limit (the GIF encoder and its palette, the PNG decoder, the SGR parser, the GIF verifier's LZW reader) are split into small functions, a nested template literal, a nested ternary, a dead assignment, global regexes (`replaceAll`), `charCodeAt`, and repeated `push` calls. The refactor is checked the strongest way a deterministic pipeline allows: all four images are rebuilt from the committed frames and are byte for byte the ones that were committed; the independent GIF reader gives the same error figures as before. Three "await inside a loop" smells remain on purpose: a tmux session and a browser profile take one step at a time. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…slow runner `run-snapshot-notice.test.ts` resumes a run in two separate vitest processes started from source. On the CI runner each takes 8 to 10 seconds before its test runs; the test took 12 to 17 seconds in four runs and 20 in the one that failed, where the child's own 5-second test limit (the vitest default) and then the 20-second limit on the process sat at the edge. The whole suite was not slower in that run (1,260 s against 1,323 s), and no change of the pull request touches the path. The child's `testTimeout` and `hookTimeout` are 60 s, the process's limit 90 s and the parent test's 240 s, named constants with the reason beside them. The assertions are unchanged. The closeout's CI findings table gets the row. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e runner's Five tests in three files failed on the CI run of `2d6f7a8e`: `inline-text` and three cases of `screen-text-performance` at vitest's default 5 s, and `tool-review-screen` against a 200 ms wall-clock bound (209 ms measured). A different test had failed in most runs of the pull request, each fixed alone until the next one fell. In this run the CLI suite took 1,677 s against 1,260 s and 1,323 s in the two before, on the same code; locally those cases take 0.8 to 1.5 s, so a good share of the suite sits within a factor of three or four of a 5-second limit. - `vitest.config.ts` (the one config every package resolves) sets `testTimeout` and `hookTimeout` to 30 s, with the reason beside it. A hang is still caught; a test that needs more still names its own limit. Verified through vitest's own API that the CLI, core and llm resolve it, and the whole CLI suite passes (1,131 files, 29,403 tests). - The wall-clock bounds that guard the SHAPE of a cost, not a speed, go to one second: `tool-review-screen` (200 ms, three tests, the one that failed and its siblings), `tool-review-listing` (250 ms) and `gitignore` (50 ms). A quadratic or backtracking version takes seconds, so the guards keep their teeth. The 500 ms `fs-*` bounds and the 100 ms `chat-projection` one (a latency promise) are left: they have not failed. - Nothing pins the old config's bytes (checked in `tools/` and `.github/`; only past evidence records under `docs/analysis/private/` name it). The closeout's CI table gets the row. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…at raced The third CI run of the pull request failed on one test, and the cause was not slowness: the `/models` helper opened the popup with one `Enter` and a 5 s wait of its own, which the 30 s default of the last commit never touched (the file took 44 s on the runner and 40 s here, and six concurrent runs under thirty CPU burners all passed). Imitating the runner with four workers and thirty busy loops (880 s) found a second one the first time: `report-hosts` asserted that no popup was open 30 ms after `/help`, which opens one about 100 ms later (false at 8 ms, true from 59 ms), so it won a race on a quick machine and lost it on a loaded one. The two races, fixed where they are: - `openModelsPopup` types the line again on the bare Home when nothing opened in 10 s, up to 30 s (the host refuses an open while the card before it is on its way out and drops a key the Home has not seen drawn; neither is cured by waiting), and says how many tries it made and what the Home answered when it gives up. Four tests of its own, each failing when the retry is removed. - `report-hosts` waits for the Home's own `help` popup, closes it, then asserts the rest; it fails when `/help` opens nothing. Every other limit follows one rule: a limit in a test is a ceiling on a hang, never a measure of speed, and costs nothing while the test passes. - `vitest.config.ts`: test and hook limits 60 s, `expect.poll` 30 s. - 37 named waits (`WAIT_MS`, `STEP_WAIT_MS`, `*_WITHIN_MS`) and 38 literal `waitFor` limits 30 s, the ten watchdogs that kill a hung child 30 s, about 55 tests' own limits below 30 s 60 s. - Not touched, on purpose: the wall-clock bounds that guard a cost's shape (`run-outputs` 5 s IS the assertion), the application's own timers measured by tests, packages/ (no failure there), and the 1,090 `vi.waitFor` calls on vitest's one-second default (none failed under the imitation; changing it takes a setup file that four gates copy). Verified: the whole CLI suite under four workers and thirty busy loops, before (one failure) and after (1,132 files, 29,407 tests, none); the five other packages; prettier, eslint, tsc; the test-isolation guard. The closeout's CI table and the log carry the finding. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e test reliability
|
…he merge checkpoint, the status documents and the register brought up to date PR #103 was merged on 2026-11-28 at 21:38Z as 79479a6 (108 commits, 1,244 files; its tree is the tree of head 66e362a, and development is fast-forwarded to it). - phase-2.6 record: a new "PR #103 merge checkpoint" with what the PR carried, the final-head evidence and what it does not show (no CI run on the final head is claimed: its run and the merge commit's had not finished; SonarCloud's gate on the pull request is OK; the whole CLI suite under four workers and thirty busy loops passes), and what is still owed (the Windows rows, the usability protocol, the maintainer decisions). - current.md, CLAUDE.md, AGENTS.md, README.md, mvp-11.md, surface-language.md and the CLI CHANGELOG: MVP-11 is complete on main; MVP-5 is next, then MVP-6, MVP-7, MVP-9 and MVP-10. - deferred-tasks.md: two new open entries (the one /models popup miss whose cause was not found, so the retry is a remedy and not a diagnosis; the limits the sweep left alone on purpose) and a note that the merge closed nothing in the maintainer's list. - closeout-evidence.md: the CI row now says the cause of that miss was not found, where it had named three mechanisms as if one had been observed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>



MVP-11: one surface language for the CLI
The Home, the chat and every card, picker and report inside them now share one palette order, one key-hint grammar, one glyph set and one surface per kind of interaction. Nine units are built here (94 commits) and the tenth is this close-out. The machine contracts (
--json, NDJSON, exit codes) are unchanged. npm still serves0.1.1; nothing is published (the D59 release path still guards it).What changes for a user
/thenEnternever leaves;/exitis last; a command that cannot act is dim with its reason;/helpis listed./doctor,/cost,/agent,/workflows,/help,/models,/effort,/mode,/permissions,/export, and on the Home/providers,/init,/import,/pricing,/resume,/run,/agents): a centred box over a dimmed screen (a framed block inline),Escsteps back or closes, every legend names its keys.[v]and/details.↓(this directory only);rruns a workflow again; a Runs screen replaces the tab host; the first run is aConnect a providerpopup with no dead end.you/agent/tool/note.<U+XXXX>; every floor pin of the plan is unchanged or only tightened.The user-visible key and label changes are in
apps/cli/CHANGELOG.md([Unreleased], "MVP-11"); the canonical page for the grammar, the glyph table and the classes is the newdocs/reference/cli/surface-language.md.Evidence (the plan's section 9)
The criterion-by-criterion table, with the evidence and what is missing, is
closeout-evidence.md; the running record isimplementation-log.md.03d923f3pnpm gateona82d8134(isolated worktree)check-fs-mutations-2of2) failed once at a load average of 56 and passed alone on the same tree (721 s): recorded in the evidence file, not dismissed.smoke:cli-packageandcheck:map-controlsare CI'spnpm coverage:enforcedpackages/)Criteria met: 2, 3, 5, 6, 7, 9, 17. Partly: 1, 4, 8, 10, 11, 12, 14 (the gaps are listed row by row in the evidence file and in the deferred-tasks register). Deferred or owed: 13 (real terminals), 15 (the usability protocol needs volunteers), 16 (the final-head runs above).
Review record
Each unit had its own review rounds with new reviewers and separate security sittings (the log lists them per unit). Unit 9 (the transcript grid) took six rounds and security sittings: each found a new class in which a terminal draws a character wider than the layout library counts, so model text could reach the margin and imitate the person's turn. Wave 5 inverted the measure's default (every multi-code-point cluster counts the sum of its code points unless tmux was shown to join it) and the sixth sitting found one class left, in a filter exception, which wave 6 fixed. On 2026-11-28 the maintainer ended the rounds: wave 6 has no independent sitting (it is verified by the sitting's own seeds, every earlier seed and a scan of 7.8 million strings). A reviewer who wants the independent look should start with
apps/cli/src/render/tui/viewport.ts(the measure),screen-text.ts(the filter) andtmux-whitelist.test-support.ts(the evidence).Decisions I need from the maintainer
Full tables with the other rows: unit 8 (21 rows) and unit 9 (22 rows) in the log.
ESC[?7l) in the full-screen renderer: makes the margin guarantee a terminal property. The sitting's replay of the hostile captures: header back, no forged row; Ink's erase-and-redraw assumes one line is one row. Cost: 6–8 files, ADR amending ADR-0068, a sitting,ESC[?7hon every exit path (akill -9leaves the shell in that mode); the measure is still neededplainTextRefusal(core) refuses ordinary conjunct-script words (स्वास्थ्य), so anask_userquestion in Hindi, Bengali or Khmer is refused›▸⇄are drawn as a space in replies; some ordinary text is drawn differently so it cannot overflow (no skin tones, U+FE0F on nine emoji, Thai/Lao decomposed); the status line dropsturnsat 80–81 columns/copy,/edit,/scrollback, the session file) keep every byte/modeis oneEnter(two reviewers proposed an extra dwell on the highlighted row)(wait); no blank row before popup legendsESC[6nin each)relavium@0.2.0stays blocked by D59; the changelog lacks entries for MVP-3, MVP-4 and MVP-8 and the earlier phasesOwed, not done here
docs/roadmap/deferred-tasks.md("MVP-11 close-out follow-ups" and the unit 7, 8 and 9 sections): the hand-kept surface matrix, stale registry-test pins, the 16 reasoned shell-command allowances, the money sweep.Pins broken on purpose
chat.test.ts185 (frozen, kept),run.test.ts85,lazy-load.test.ts36 (its list grew by five), the usage cohort 583, the data-module fence 60 modules, the secrets-control and provenance counts,screen-text.test.ts(U+180E), two unit-8 tests that read the wall clock (sheet-frame-rule,home-gate-card-wait) now take the caller'snow, and the legend golden (72 legends moved by a pure left offset in unit 9; no other golden moved after it).ADR-0122 §7 checklist, per surface family
exit-keypropertyEscclasses, tests/providersEscskips,Ctrl+Cwrites nothing🤖 Generated with Claude Code