8000 fix(base): wake idle agy/Gemini panes by simon-inkie · Pull Request #41 · simon-inkie/inkie-deck · GitHub
[go: up one dir, main page]

Skip to content

fix(base): wake idle agy/Gemini panes - #41

Merged
simon-inkie merged 3 commits into
mainfrom
fix/agy-live-wake
Oct 4, 2026
Merged

simon-inkie merged 3 commits into
mainfrom
fix/agy-live-wake

Conversation

@simon-inkie
Copy link
Copy Markdown
Owner

What

An idle agy/Gemini pane was never woken by a live push: the idle-composer probe recognised only Claude Code's U+276F and Codex's U+203A, so the composer could not be confirmed idle and the wake was skipped. The message then sat unread until the agent happened to take a turn.

Two changes:

  • IDLE_PROMPT_RE and COMPOSER_PROMPT_GLYPHS accept agy's bare > composer as a third idle glyph.
  • ACTIVE_PANE_RE accepts esc to cancel alongside esc to interrupt, so a busy agy pane is skipped rather than woken.

A dirty agy composer (> git status) still fails the bare-prompt check, and a bare > still falls through the shell-frame guard, so neither opens a new wake path into a shell or a half-typed line.

Review legs

  • Remote CodeRabbit unavailable (subscription, 2 Oct). Not treated as a clean review.
  • Peer reviewer: pending, cross-lane.
  • Independent model-diverse check: pending.
  • Suites: deck 2083 passed / 11 skipped (94 files), typecheck clean, check:leaks clean (385 files, 30 rules), check:dashes clean, lib-version-gate clean, tmux.test.ts 84/84.

Not tested

  • No live agy pane was probed; the glyph shapes come from captured viewports recorded in the test fixtures, matching the same change already running on the internal upstream.
  • No e2e browser run.

OSS-clean

Public repo. No personal or customer names, no internal agent names, no /home paths, no keys, no commercial or pricing content.

The idle-composer probe recognised only Claude Code's U+276F and Codex's
U+203A, so an idle agy pane was never woken by a live push and the message
sat unread until the agent took a turn.

Recognise agy's bare ">" composer as a third idle glyph, and accept
"esc to cancel" alongside "esc to interrupt" as the active-turn marker so a
busy agy pane is skipped rather than woken.

A dirty agy composer ("> git status") still fails the bare-prompt check.
@simon-inkie
Copy link
Copy Markdown
Owner Author

Review, Sol 6.1, 2026-10-02

Reviewed dfa2cbe.

  • Major — packages/deck/app/lib/tmux.server.ts:334: Adding > to the shared composer glyphs also recognises Bash’s default continuation prompt as a clean agent composer. A viewport ending in user@host:~$ echo \ followed by > now returns true from both paneTextIsIdle and paneAcceptsSend; the base rejects it. The shell guard only examines lines below the recognised prompt, so the live-push path can type and submit inbox text into unfinished shell input. Require a recognised Gemini frame before accepting >, and add a shell-continuation regression test.

51 focused predicate tests passed using PR-head sources in a write-free, in-memory harness. An additional Gemini esc to cancel check passed. I did not run Vitest, the full suite, builds, or live tmux/Gemini delivery tests.

@simon-inkie
Copy link
Copy Markdown
Owner Author

Review, Sonnet, 2026-10-03

PR 41, fix(base): wake idle agy/Gemini panes
Head SHA reviewed: dfa2cbe
Verdict: NEEDS CHANGES (2 Major)

Summary

Adds > as a third idle glyph (IDLE_PROMPT_RE, COMPOSER_PROMPT_GLYPHS) and esc to cancel to ACTIVE_PANE_RE. The regex change itself is fine. The glyph list is also consumed by findPromptLineIndex, which matches with line.includes(glyph). That is harmless for two exotic glyphs and not harmless for >. The PR body's claim that "a bare > still falls through the shell-frame guard" is only true when a user@host$ line sits BELOW the prompt, which is not the shape of a bash continuation prompt.

Critical

None.

Major

M1. Bash PS2 continuation prompt (and any > REPL) reads as a clean idle composer

packages/deck/app/lib/tmux.server.ts:332 (glyph list), :344-352 (findPromptLineIndex), :394-403 (composerIsClean), :508 (paneAcceptsSend).

A shell with an unterminated quote or heredoc renders:

user@host:~$ echo "foo
>

The last line containing a glyph is the bare >; IDLE_PROMPT_RE matches it; the stale-frame guard only scans lines BELOW the prompt index, and there are none, so composerIsClean returns true. paneAcceptsSend has no activity check, so wakeIdleAgent and pushMessageToIdleAgent will type the [inbox from ...] text into the shell. The same applies to a node REPL (> ) left behind by an exited agent. The existing guard exists precisely to stop "send-keys at a shell", so this reopens the hole it closes.

Fix: do not accept a bare > on its own. Require agy's frame, which the PR's own fixture shows (───\n>\n───):

const BORDER_RE = /^\s*[─━═]{3,}\s*$/u;
function isAgyPromptLine(lines: string[], i: number): boolean {
  return /^\s*>\s*$/.test(lines[i] ?? "") && BORDER_RE.test(lines[i - 1] ?? "");
}

and in composerIsClean also reject when any line ABOVE the prompt within the viewport matches SHELL_PROMPT_RE and there is no border line between it and the prompt. Add tests for: PS2 > below a user@host$ line (must be false), node REPL > (must be false).

M2. includes(">") lets any line containing > hijack composer detection, regressing Claude and Codex wakes

tmux.server.ts:348, findPromptLineIndex. It takes the LAST viewport line that merely contains a glyph. > appears in statuslines, diffs, redirects, =>, ->, HTML and blockquotes. With a Claude composer ❯ and any statusline or footer line below it containing > (for example "main -> origin" or a custom bar), the last glyph line becomes the statusline, IDLE_PROMPT_RE fails on it, and composerIsClean returns false: the wake is silently skipped for a runtime that worked before. The code's own NOTE (the latent statusline dependency, around line 437) already warns about exactly this class of failure and this change widens it from two near-unique glyphs to a very common character. It also affects the Codex dim-hint path (composerLineIsDimHint reuses the same index on the raw capture).

Fix: anchor > to the start of the line, and keep the old includes behaviour for the two TUI glyphs:

function lineHasPromptGlyph(line: string): boolean {
  return COMPOSER_PROMPT_GLYPHS.some((g) =>
    g === ">" ? /^\s*>(\s|$)/.test(line) : line.includes(g));
}

Add a regression test: Claude composer ❯ with a statusline Opus 4.8 | main -> origin 32% below must still be idle.

Minor

  • tmux.server.ts:301: esc to cancel also appears in Claude Code and Codex permission and confirmation dialogs. Reading those as active is the safe direction for paneTextIsIdle, but note the comment above ACTIVE_PANE_RE describes only the spinner; add the dialog case so nobody later "fixes" it.
  • Tests: the new dirty-agy case and "> do something real" assertion pass on the old code too (negative assertions), so only the bare-agy cases prove the change. Nothing pins M1 or M2.
  • COMPOSER_PROMPT_GLYPHS is also used by composerTextFromViewport in PR 43 via candidate order (❯, ›, >); if both PRs land, a staged payload containing > after a ❯ is fine (first glyph wins) but an agy composer > a > b finds > at the first position, which is correct. No action, just a merge-order note.

Nit

  • Doc comment lines in the IDLE_PROMPT_RE block are now over 100 columns and the comment still says "the runtimes MC live-wakes" while describing three.

Public-repo hygiene

Diff contains no internal agent names, /home paths, secrets or plan mentions. Fixtures use neutral hostnames. Pre-existing comments in the touched file mention TASK numbers and "!42"; out of scope.

Did not check

  • No live agy, Claude or Codex pane was probed; I did not verify agy's real frame shape beyond the PR fixture.
  • Did not run the test suite or typecheck.
  • Did not check other consumers of IDLE_PROMPT_RE outside packages/ (the grep for non-test users inside packages returned only tmux.server.ts).
8000

Review (Sol + Sonnet) found two Majors in the original dfa2cbe fix:

M1 - adding bare > to the composer glyphs also matched Bash's PS2
continuation prompt and a node REPL, so paneTextIsIdle / paneAcceptsSend
read an unfinished shell as a clean composer and the live push could type
inbox text into the shell. A bare > now counts only when agy's frame
border sits directly above it (isAgyPromptLine); otherwise it is refused.

M2 - the glyph list is consumed by findPromptLineIndex with
line.includes(glyph). That is harmless for the two near-unique TUI glyphs
but not for >, which appears in statuslines, diffs and redirects. A
statusline line containing > below a Claude composer would hijack the
last-glyph-line scan and silently skip the wake. lineHasPromptGlyph now
anchors > to the start of the line and keeps includes for U+276F/U+203A.

Adds regression tests that fail on the pre-fix head: PS2 continuation,
node REPL, a > in a statusline below a Claude composer, and the positive
agy-frame wake. Revert-to-red verified: 6 new tests fail without the fix.
@simon-inkie
Copy link
Copy Markdown
Owner Author

Fixes pushed: both Majors addressed (head now 27b48ff)

Thanks for both reviews. I agree with the finding and the shape of the fix: anchor on the frame, not the glyph.

M1 (PS2 / node REPL reads as a clean composer) - fixed. A bare > is now accepted only when agy's frame border sits directly above it (isAgyPromptLine, checking a horizontal border of U+2500/U+2501/U+2550). A > under a user@host$ line or a node REPL > has no such border and is refused, so paneTextIsIdle / paneAcceptsSend no longer treat unfinished shell input as an idle composer.

M2 (includes(">") hijacks detection) - fixed. findPromptLineIndex now uses lineHasPromptGlyph, which anchors > to the start of the line (^\s*>) and keeps includes only for the two near-unique TUI glyphs (U+276F, U+203A). A statusline main -> origin, a diff marker or => can no longer be mistaken for the composer and silently skip a wake.

Minor (dialog case in ACTIVE_PANE_RE comment) - not taken in this PR; it is a comment clarification only and out of scope for a fix commit. Noted.

Tests. New regression cases, all of which fail on the pre-fix head (revert-to-red verified, 6 failures):

  • Bash PS2 continuation (echo "foo then bare >) must NOT wake.
  • node REPL > must NOT wake.
  • bare > with no border above must NOT wake.
  • bare > inside an agy frame MUST wake.
  • Claude composer \u276F with > in the statusline below MUST still wake (M2 hijack guard) and MUST NOT wake when the composer is dirty.

Evidence on 27b48ff: packages/deck suite 2091 passed / 11 skipped / 95 files; pnpm typecheck clean; scripts/leak-gate.mjs clean (385 files); scripts/lib-version-gate.mjs clean.

Not tested: no live agy pane was probed (no agy window available in this worktree); the agy frame shape is taken from the existing fixture and the review's own example. Worth one live agy wake before merge if a window is free.

Review legs on this head: Sol or self leg required; Sonnet + Aggy legs are being run by Io.

@simon-inkie
Copy link
Copy Markdown
Owner Author

Review, Sonnet, 2026-10-03

PR 41 (inkie-deck), fix commit
SHA reviewed: 27b48ff (previous head dfa2cbe)
Verdict: PASS with notes (no Critical, no Major)

Method: read the fix diff and surrounding code from FETCH_HEAD, then ran both versions of tmux.server.ts (old dfa2cbe and new) through a 20-case scratch harness outside the repo (scratchpad, nothing checked out or modified). I also took a read-only tmux capture-pane of a live agy pane to check the real frame shape.

Are the Majors fixed?

M1 (PS2 / node REPL read as clean): fixed. composerIsClean (packages/deck/app/lib/tmux.server.ts:~433-445) now routes any bare-> prompt line through isAgyPromptLine, which needs a [─━═]{3,} line directly above. Harness: PS2 and node REPL were true on old, false on new. An agy that has exited to a shell is still refused by the stale-frame guard.

M2 (includes('>') hijack): fixed. lineHasPromptGlyph anchors > to line start and keeps includes for U+276F / U+203A. Harness: Claude idle with main -> origin 32% below was false on old, true on new. Codex dim-hint with a -> statusline below: false on old, true on new (the raw-capture path reuses findPromptLineIndex, so it is fixed too).

Is the frame anchoring robust?

Live agy pane (80x24) shows: Tip: line, ─── border, >, blank line, ─── border, esc to cancel ... Gemini 3.8 Flash. So the border really is directly above the >, and a blank line sits between the prompt and the lower border. The anchor matches the real thing, and the PR's fixture (no blank line) matches too. NBSP and trailing spaces are fine (\s covers U+00A0). A real idle agy, Claude or Codex composer was not refused in any harness case.

Findings

Minor 1. A wrapped statusline can still hijack the scan in a narrow pane

tmux.server.ts:~370 (lineHasPromptGlyph). capture-pane -p does not join wrapped lines, so a statusline that wraps between - and > yields a continuation line starting with >. Harness: Opus | main - / > origin 32% below a clean Claude composer returns false (old behaviour, not a regression, and it fails in the safe direction: a missed wake). Fix if wanted: for the > glyph require the whole line to be bare, i.e. /^\s*>\s*$/ (or > followed by whitespace then text), not ^\s*>. Bare-only would also mean agy "dirty" composers still read dirty via the else if branch only if the anchor allows > text, so keep ^\s*>(\s|$) as the minimum. Low priority.

Minor 2. Border character set is narrow

AGY_FRAME_BORDER_RE (:~345) accepts U+2500, U+2501, U+2550 only, and needs 3+ characters. Dotted or dashed box-drawing (U+254C, U+2504, U+2508) and a pane narrower than 3 columns fail closed (false negative, wake skipped). Live agy uses U+2500, so fine today; widen to [─-╿] minus the corner and vertical characters if agy ever changes its theme. A rounded ╭──╮ / │ > │ box would also be refused; not what agy renders now. Worth pinning with a live-captured fixture rather than the hand-written one.

Minor 3. Test coverage is one-directional in places, and the commit message overstates it

packages/deck/test/tmux.test.ts. Of the 6 tests the commit says "fail without the fix", the real set is: PS2 (table + it), node REPL (table + it), Claude-with-->-statusline, and the lineHasPromptGlyph test (import is undefined on old code). That is 6, so the count is right. But two of the new tests pass on the old head: "WAKE - agy frame" (old code already accepted a bare >) and "NO WAKE - Claude composer dirty with -> footer" (dirty ❯ git checkout main was refused before). The commit message lists the positive agy wake among those that fail pre-fix; it does not. Also missing: Codex dim-hint with a > in the statusline (the raw-capture path, which I confirmed works), agy with > plus typed text (dirty), agy frame with a shell prompt below (exited), PS2 with a box-drawing line above (currently true, see Minor 4), NBSP/trailing-space agy, and a narrow-pane case. Add at least the Codex hint and agy-dirty cases.

Minor 4. PS2 or REPL directly under a box-drawing line is still accepted

Harness: a@h:~$ cat f / ─────── / > returns true. Needs a line made only of box characters immediately before the >, so very unlikely (a REPL normally prints undefined or a result between). Accepted residual risk; could be tightened by also refusing when a SHELL_PROMPT_RE line appears anywhere above within the last few lines and no composer glyph precedes it. Not needed for merge.

Minor 5. Stale doc comment contradicts the new behaviour

isAgentPaneIdle doc (:~496) still lists "or an agy (">") prompt" among the false-returning cases. After this PR a framed agy prompt returns true. Update the comment.

Minor 6. Pre-existing, out of scope: starship/pure shells use U+276F

A bare ❯ shell prompt (starship, pure, p10k) is read as an idle Claude composer; SHELL_PROMPT_RE only recognises user@host. Harness confirms true. Not introduced by this PR; note for a follow-up.

Public-repo hygiene

  • Diff content is clean: fixture hosts are alex@demobox, no internal paths, ticket numbers, tokens or agent names in code or comments. Author is Simon <simon@inkie.ink>, consistent with the PR.
  • Commit message body says "Review (Sol + Sonnet) found two Majors". Those are internal reviewer names in a public history. Low risk, but consider rewording to "review found" on a squash or in the PR description. Not a blocker.
  • Pre-existing comments elsewhere in the file reference TASK-537, #91, and CLI inbox-push, 2026-07-18; untouched by this PR, so not for this review.

Positive

Narrow, readable fix. Keeping includes for the two unambiguous TUI glyphs avoids regressing Claude and Codex. The comment on COMPOSER_PROMPT_GLYPHS warns later consumers (PR 43's composerTextFromViewport among them) that bare > must be gated; that is the right place for it. Fail-closed on every ambiguity.

Merge-order note for PR 43

If PR 43 reuses COMPOSER_PROMPT_GLYPHS for text extraction it must also use lineHasPromptGlyph or isAgyPromptLine (the latter is not exported), otherwise the same > hijack returns there.

@simon-inkie
Copy link
Copy Markdown
Owner Author

Deck PR 41 Fix Review (Aggy - Independent Review Leg)

  • Commit: 27b48ffc48f7aca1b48109d9cddcc4191fc51ff8 (git diff dfa2cbe FETCH_HEAD)
  • Review File: pr-41-fix-review-aggy.md
  • Verdict: PASS

1. Scope & Objective

Audit the follow-up fix for Deck PR 41 (fix(base): corroborate the agy composer with its frame, not a bare >):

  1. Verify it stops a Bash PS2 continuation prompt or node REPL > from reading as a clean/idle composer.
  2. Verify it stops a statusline arrow (e.g., main -> origin) or diff > from hijacking prompt detection for Claude or Codex.
  3. Verify it does not refuse real idle agy, Claude, or Codex composers.
  4. Verify source helpers, test coverage, and public-repo hygiene.

2. Findings (Ranked)

[Observation / Good Practice] Positive Frame Corroboration for agy

  • Detail: In packages/deck/app/lib/tmux.server.ts, isAgyPromptLine requires that a bare > line is preceded on the line directly above by horizontal box-drawing frame border characters (AGY_FRAME_BORDER_RE = /^\s*[\u2500\u2501\u2550]{3,}\s*$/u).
  • Assessment: Eliminates false-positive idle detection on unfinished shell commands (Bash PS2 continuation prompts like user@host:~$ echo "foo\n>) and node REPL outputs (>\nundefined), which render a lone > without a frame border.

[Observation / Good Practice] Selective Start-of-Line Anchoring in lineHasPromptGlyph

  • Detail: lineHasPromptGlyph anchors > with /^\s*>/ while preserving substring search (line.includes) for the rare and distinctive TUI glyphs \u276F (Claude) and \u203A (Codex).
  • Assessment: Completely resolves the prompt hijacking regression (M2). When scanning from the bottom of the viewport up in findPromptLineIndex, a statusline or footer containing ->, =>, or > (e.g., Opus 4.8 | main -> origin 32%) no longer matches as a prompt line, ensuring the actual composer line index is accurately located.

3. Correctness & Edge Cases Audit

  1. Bash PS2 Continuation & Node REPL:

    • composerIsClean checks:
      if (/^\s*>\s*$/.test(promptLine)) {
        if (!isAgyPromptLine(lines, promptIndex)) return false;
      }
    • Neither Bash PS2 continuation prompts nor node REPLs produce box-drawing horizontal border lines directly above the prompt line. isAgyPromptLine returns false, causing composerIsClean to refuse the send.
  2. Claude Code Idle & Statusline Protection:

    • Claude's composer rests on \u276F.
    • lineHasPrompt 8000 Glyph matches \u276F anywhere in the line via includes.
    • Any statusline beneath the prompt containing -> is rejected by /^\s*>/, preventing the scan from stopping prematurely on the statusline.
    • Verified that clean Claude viewports evaluate to idle = true and acceptsSend = true.
  3. Codex Idle & Dim Hint Protection:

    • Codex composer lines with rotating hints use \u203A and ANSI dim styling (DIM_SGR = "\x1b[2m").
    • lineHasPromptGlyph matches \u203A via includes.
    • composerLineIsDimHint correctly references findPromptLineIndex on the raw viewport capture. Real typed text stays dirty, while rotating hints correctly evaluate to clean/idle.
  4. Public Repo Hygiene:

    • Zero internal hostnames, user paths, or sensitive credentials.
    • Clean, descriptive test fixtures and clear comments.

4. Test Suite Verification

  • Ran npx vitest run test/tmux.test.ts in packages/deck: 92 passed, 0 failed.
  • New test cases explicitly verify:
    • agy frame with border: paneTextIsIdle is true.
    • Bash PS2 continuation without border: paneTextIsIdle is false.
    • Node REPL prompt: paneTextIsIdle is false.
    • Claude composer with -> in statusline below: paneTextIsIdle is true.
    • Claude composer dirty with -> in footer: paneTextIsIdle is false.
    • lineHasPromptGlyph behavior across all glyphs and edge cases.

Follow-up to 27b48ff from review notes, no behavioural change beyond the
doc fix:

- isAgentPaneIdle's doc comment still listed an agy prompt as refused; it
  now describes the real rule (an uncorroborated > is refused).
- Adds three cases the review asked for: a dirty agy composer, a > in a
  Codex statusline below the hint (must not hijack the dim-hint path),
  and a narrow pane whose wrapped continuation row contains a glyph.

Accuracy correction on the 27b48ff commit body: of its six new tests,
four failed on the pre-fix head, not six. The agy frame wake and the
Claude dirty-with-footer cases pass on the old head too (they are
negative assertions), so the earlier message overclaimed. On the old
head this commit's Codex-statusline case also fails; the dirty-agy and
narrow-pane cases pass there as negative assertions.
@simon-inkie
Copy link
Copy Markdown
Owner Author

Follow-up review, Sonnet, 2026-10-03

PR 41 follow-up a29f179 (on top of 27b48ff, "close review notes on the agy frame anchor").
Verdict: PASS with notes

Behaviour change

None. git diff 27b48ff a29f179 outside the test directory changes only the doc comment above isAgentPaneIdle in packages/deck/app/lib/tmux.server.ts (lines about 500-506); no executable line differs. The new wording ("an uncorroborated >, a bare > with no agy frame border above") matches the rule in the code.

Tests

Ran test/tmux.test.ts from a29f179 against the 27b48ff app code: 95 of 95 pass. Also ran it against the pre-PR base d1767a2: only the four pre-existing agy tests fail (they test the PR's feature); the three new ones pass there too.

  1. "NO WAKE - dirty agy composer" asserts paneTextIsIdle(...) is false for > refactor the parser. Meaningful as a negative pin (a bare-prompt regex must not match text after the glyph), though it passes on the base too, so it guards against future regression only.
  2. "WAKE - a > in a Codex statusline below the hint": plain and raw captures with the dim SGR on the hint, asserts idle true. Meaningful: it pins that a > in -> below the composer does not take over the prompt-line scan. The statusline main -> origin has > mid-line, so it would also pass under a line-start anchor and under the base; it does not exercise a statusline that begins with >.
  3. "NO WAKE - narrow pane wrapped row with a glyph" asserts false for ❯ a long draft plus that wrapped ❯ here. It would pass for the wrong reason: the last glyph line has text before the glyph, so the bare-prompt regex fails regardless of wrapping. The case that matters (a wrapped continuation row that is only a glyph, ❯) is not covered, so this does not pin the hole the review raised. Note PR 43's findComposerOpenIndex handles that case; if both land, add the bare-glyph row here.

The commit message corrects an earlier overclaim (four of six, not six). It also says the Codex-statusline case fails on the old head; on d1767a2 it passes. I did not test dfa2cbe, so that claim may refer to the intermediate head; it should name the SHA.

Findings

Minor

  • Tests 1 and 3 do not discriminate against the pre-27b48ff behaviour; tests are regression pins, not proofs of the fix. See above.
  • Commit message claim about the Codex-statusline case failing on "the old head" is unverified and false for the PR base.

Nit

  • packages/deck/test/tmux.test.ts (about line 419): the three tests and their comment block are inserted between the // SHELL_PROMPT_RE direct assertions comment and the test it introduces, orphaning that comment. Move the new block above it.

Public-repo hygiene

Diff and commit message contain no absolute home-directory paths or agent names ("Sonnet" is a model name in a comment, acceptable).

Did not check

  • Did not run the full workspace suite or typecheck, only tmux.test.ts.
  • Did not test dfa2cbe against the new tests.
  • No live agy or Codex pane.

@simon-inkie
Copy link
Copy Markdown
Owner Author

Deck PR 41 Follow-Up Review (Aggy - Independent Review Leg)

  • Target: inkie-deck (origin/d2fix/agy-live-wake)
  • Commit: a29f17983e133aa0971e5bb35b64992fead77668
  • Review File: pr-41-followup-review-aggy.md
  • Verdict: PASS

1. Scope & Objective

Audit PR 41 follow-up commit a29f179:

  1. Verify documentation updates in packages/deck/app/lib/tmux.server.ts.
  2. Verify the three follow-up test cases added to packages/deck/test/tmux.test.ts.
  3. Confirm zero unintended runtime behavioural changes.
  4. Ensure public-repo hygiene: no internal paths in the review file or commit diff.

2. Findings (Ranked)

[Observation / Good Practice] Accurate Documentation Alignment

  • Location: packages/deck/app/lib/tmux.server.ts:503-505
  • Detail: The doc comment for isAgentPaneIdle previously stated that any agy (">") prompt was refused as an uncertainty. It now accurately documents the corroboration rule: "or an uncorroborated '>' (a bare '>' with no agy frame border above it, e.g. a Bash PS2 continuation or node REPL)".
  • Assessment: Correctly synchronises code documentation with the multi-line corroboration logic implemented in 27b48ff.

[Observation / Good Practice] Test Coverage for Edge Cases

  • Location: packages/deck/test/tmux.test.ts:420-440
  • Detail: Adds test coverage for three distinct scenarios:
    1. Dirty agy composer: paneTextIsIdle returns false when text follows the > prompt inside the frame.
    2. Statusline > below Codex dim hint: Verifies that a statusline arrow (e.g. main -> origin 42%) below an idle Codex hint does not hijack prompt detection.
    3. Wrapped continuation row in narrow panes: Verifies that a draft wrapping across rows where a continuation line contains a prompt glyph fails closed (paneTextIsIdle returns false).
  • Assessment: Solidifies regression protection across edge cases without modifying implementation code.

3. Test Suite Verification & Public Hygiene

  • The commit contains zero functional implementation changes; it is strictly a doc comment update and three test additions.
  • The new tests execute cleanly under vitest.
  • Public-repo hygiene: Zero internal paths, credentials, or private identifiers.

@simon-inkie
simon-inkie merged commit fc5100f into main Oct 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0