Skip to content

fix(codex): recognize dim status suffix - #141

Merged
AltanS merged 1 commit into
AltanS:mainfrom
mauhai:fix/codex-dim-status-field
Aug 30, 2026
Merged

fix(codex): recognize dim status suffix#141
AltanS merged 1 commit into
AltanS:mainfrom
mauhai:fix/codex-dim-status-field

Conversation

@mauhai

@mauhai mauhai commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

The symptom

Every reply sent from Collie to a current Codex pane was refused with:

The agent's input box isn't on screen — a menu or dialog is probably up. Nothing was typed.

The composer was visibly present and held an ordinary one-line draft (test); no dialog was open.

The cause

Current Codex paints the final collaboration-mode status field together with its separator as one
dim ANSI segment:

<coloured model> · <coloured cwd><dim> · Main [default]</dim>

Collie's context-less status-row detector accepted only alternating coloured fields and standalone
dim separators. It therefore rejected this valid status row, so locateComposer returned null
and the guarded reply path refused to type.

This is separate from #140: that PR fixes deeper indentation in multiline draft continuation rows;
this failure occurs with a one-line draft and is in the status-row parser.

The fix

Accept one combined dim separator + field suffix only when it follows at least two ordinary
coloured fields and is the final segment. The existing paint checks, field bounds, control-character
rejection, and tail-anchored prompt/status shape remain intact. Unstyled lookalikes still fail closed.

Evidence

The parser was run directly against the affected live pane's format:ansi output after the change:

{"composerReady":true,"draft":"test","status":["  gpt-5.6-sol medium · ~/.herdr/worktrees/kausate/feature-kau-6102-repair-dex-services-and-run-tabs · Main [default]"]}

The rebuilt Collie page was reloaded against that pane; the false refusal disappeared and the draft
remained ready to send.

Tests

  • pre-push backend typecheck and web typecheck: passed
  • backend suite: 691 passed
  • collie-ctl.test.sh: passed
  • web suite: 3,827 passed / 30 todo
  • production build: passed
  • scripts/check-version.sh: passed at 0.36.0

Per CLAUDE.md, version files and CHANGELOG.md remain untouched because this is a fork PR.

Suggested changelog line:

- Codex replies work with the dim collaboration-mode status suffix — the composer gate recognises the final ` · Main [default]` renderer segment without accepting unstyled lookalikes

@AltanS

AltanS commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Thank you — this is a well-diagnosed fix, and the separation from #140 in your description made it easy to review. Verified against main alongside #140, #142 and #121: no conflicts, full suite green (717 bridge tests, 3866 web tests, both typechecks, the ctl lifecycle suite).

@AltanS
AltanS merged commit e233280 into AltanS:main Aug 30, 2026
AltanS added a commit that referenced this pull request Aug 30, 2026
Brings #140, #141, #142 and #121 across. Two of them needed a hand on the way
in, because git merged the text and not the meaning:

  · codex/markers.ts — #141 was written against main's `CONTROL_CHARS` regex.
    v1 replaced that constant with `hasControlChar()`, which scans by code unit
    the way links.ts does. The merge took #141's new `isDimSuffixFieldSegment`
    verbatim, so it called a name v1 had deleted. Swapped to the function; the
    two are byte-equivalent, tab exempted on both sides.

  · omp/markers.test.ts — #142's new cases bind `const row`, and this file has
    a module-level `row(name, i)` helper. main has no lint gate so it passed
    there; v1's oxlint calls it no-shadow, and it is right to. Renamed to
    `borderRow`, which is what v1's own version of the conflicted case already
    used.

The one textual conflict was the same assertion under two names. Took main's
"painted in one foreground end to end" — after #142 the rule reads a colour
CHANGE, so v1's older "no unstyled text to anchor against" no longer describes
what is being tested.
AltanS added a commit that referenced this pull request Aug 30, 2026
Cuts the merge of main's four fixes (05561ae) — #140, #141, #142, #121.
AltanS added a commit that referenced this pull request Aug 30, 2026
The operator build no longer runs the lint gate (4720769), plus a correction
to beta.43's notes: #141 used a synthetic test row, not a real capture.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AltanS added a commit that referenced this pull request Aug 31, 2026
fix(codex): recognize dim status suffix
AltanS added a commit that referenced this pull request Aug 31, 2026
Brings #140, #141, #142 and #121 across. Two of them needed a hand on the way
in, because git merged the text and not the meaning:

  · codex/markers.ts — #141 was written against main's `CONTROL_CHARS` regex.
    v1 replaced that constant with `hasControlChar()`, which scans by code unit
    the way links.ts does. The merge took #141's new `isDimSuffixFieldSegment`
    verbatim, so it called a name v1 had deleted. Swapped to the function; the
    two are byte-equivalent, tab exempted on both sides.

  · omp/markers.test.ts — #142's new cases bind `const row`, and this file has
    a module-level `row(name, i)` helper. main has no lint gate so it passed
    there; v1's oxlint calls it no-shadow, and it is right to. Renamed to
    `borderRow`, which is what v1's own version of the conflicted case already
    used.

The one textual conflict was the same assertion under two names. Took main's
"painted in one foreground end to end" — after #142 the rule reads a colour
CHANGE, so v1's older "no unstyled text to anchor against" no longer describes
what is being tested.
AltanS added a commit that referenced this pull request Aug 31, 2026
Cuts the merge of main's four fixes (b5a38b1) — #140, #141, #142, #121.
AltanS added a commit that referenced this pull request Aug 31, 2026
The operator build no longer runs the lint gate (e321c39), plus a correction
to beta.43's notes: #141 used a synthetic test row, not a real capture.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants