Skip to content

fix: recognize Codex inline queue status - #176

Closed
stekman08 wants to merge 1 commit into
AltanS:mainfrom
stekman08:fix/codex-composer-inline-status
Closed

fix: recognize Codex inline queue status#176
stekman08 wants to merge 1 commit into
AltanS:mainfrom
stekman08:fix/codex-composer-inline-status

Conversation

@stekman08

@stekman08 stekman08 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Codex can render its queue hint and context percentage on the same raw terminal row while a turn is active. Collie's composer locator previously recognized the older dot-separated/context status-row shapes, so this visible composer was treated as absent and the guarded reply path returned Message didn't reach the input box before typing or submitting.

The root cause is the raw pane layout, not the phone's visual line wrapping: the captured ANSI buffer contains one footer row with both to queue message and 93% context left. The parser must recognize that generic row shape before applying the existing prompt, verification, and guarded-submit flow.

Changes

  • Recognize the generic inline queue/context Codex footer row in the Codex marker parser.
  • Add a small anonymized ANSI fixture preserving the observed SGR styling and one-row layout.
  • Add focused parser and sendGuardedReply regressions proving type -> verify -> submit ordering.
  • Keep dialog detection, text verification, prompt binding, and guarded submit behavior unchanged.

Red-first evidence

With the pre-change parser, the new fixture produced locateComposer returned null. With this change it locates { promptRow: 2, statusRow: 4 }, and the focused send regression passes with submit still guarded.

Scope

This PR is limited to the Codex parser, its fixture, and the focused regression tests. Release metadata is intentionally untouched, as required for functional changes submitted from a fork.

Verification

  • Backend and web typechecks: passed.
  • Lint, version consistency, and git diff --check: passed.
  • Focused Codex/reply-action tests: passed.
  • Full web Vitest suite: passed.
  • Bridge root, mux, journal, pack, CLI, and scripts test groups: passed when run independently.

The local full backend invocation also reaches all assertions in the STT suites but does not terminate under the installed Bun 1.3.14/macOS runtime because two existing response-body disposal tests leave a deliberately pending stream cancellation; the changed files are outside that code. The pushed PR's CI run is the authoritative full-suite check.

@github-actions github-actions Bot added area: web Phone PWA — UI, mirror, composer, service worker area: harness Per-agent adapters and send guards (claude/codex/pi/omp) bug Something isn't working regression Worked in an earlier release, broke in a later one labels Sep 6, 2026
AltanS added a commit that referenced this pull request Sep 7, 2026
…hey meet

The Unreleased lines for #176 and #177, which a fork PR may not write for
itself. The test edit is the one place the two touch: Codex supplies
`composerPrompt`, so #177's binding now rides the submit that #176's fixture
exercises, and the expectation is written out rather than loosened to hide it.
@AltanS

AltanS commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Thanks Fredrik, this is exactly the kind of fix that lands, and it shipped in 1.5.5. Your commit went in as a cherry-pick with your authorship intact (0ad4f2f), and the changelog credits you and this PR. Your diagnosis is right: the raw footer row carries both the queue hint and the context metric, and the parser had to know that shape before the guarded path could see the composer. One thing landed on top of it: 1.5.5 also binds the guarded submit to the verified prompt (#177), so your inline-queue fixture test now expects the bound prompt as well, which I wrote out in a follow-up commit. Closing this since the branch is on main through the cherry-pick.

@AltanS AltanS closed this Sep 7, 2026
simcoehsieh added a commit to simcoehsieh/collie that referenced this pull request Sep 7, 2026
Takes v1.5.4 and v1.5.5 together, both released 2026-09-07.

What arrives that matters for this deployment: the composer attaches text files
as well as images behind a paperclip; the attach button asks Photos or Files, so
a phone stops hiding the camera roll behind a thirty-extension `accept`; the tap
is acknowledged before a bottom sheet can cover the button 42ms later; a
truncated error in the header opens on a tap with a copy button; the Codex
footer parser learns the shape Codex prints while a turn is active, so a reply
there stops reporting it never reached the input box (AltanS#176); and a dialog that
takes focus between the typing and the Enter is refused rather than answered
(AltanS#177). `COLLIE_MAX_UPLOAD_MB` and `COLLIE_UPLOAD_EXTRA_TYPES` are new and
additive — unset is the old behaviour.

The pack, systemd-run, package-manager-owned installs and the flake toolchain
pin are all in here too and none of them reaches a solo herdr install behind
Cloudflare Access.

NO FORK PATCH WAS DROPPED. Upstream fixed none of the defects this fork patches:
`sw.ts`, `push-decision.ts` and `bridge/push.ts` are untouched across the whole
range, so the iOS silent-push fix stands; upstream's three `bridge/server.ts`
commits are uploads, packaged-install detection and a root-owned install
refusal, none of them near the `checkAccess` Origin rule the folder-picker fix
rewrote; and upstream's `sheet.tsx` edit exports `useDialogFocus` while the
fork's moves the `--safe-bottom` tokens, on different lines.

All eight conflicts resolved as keep-both: both code bases added parallel,
unrelated capability fields to the same declarations — `docHosts` here, `upload`
upstream. Two of them shared a `/**` opener or a closing brace with the other
side, so the naive concatenation would have compiled the upstream half into a
comment or left a `describe` unterminated; both are spliced explicitly.

The one removal is the `ImagePlus` import in `composer.tsx`, unreachable once
upstream replaced the picture icon with a paperclip. That is following
upstream's replacement, not dropping a patch.

`CHANGELOG.md` did not conflict.

Verified: both typechecks; web 189 files / 5251 tests green; every backend test
file green except two that are red WITHOUT this merge as well —
`bridge/pack/harness.test.ts` hangs identically at the pre-merge fork HEAD, and
`scripts/collie-cli.test.sh` fails its systemd-run assertion on a checkout of
pure upstream v1.5.5 on this machine, because the test assumes Linux.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QnMJ6LunXPw3Xs6XMFvXkT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: harness Per-agent adapters and send guards (claude/codex/pi/omp) area: web Phone PWA — UI, mirror, composer, service worker bug Something isn't working regression Worked in an earlier release, broke in a later one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants