Skip to content

fix: bind guarded submit to verified prompt - #177

Closed
stekman08 wants to merge 1 commit into
AltanS:mainfrom
stekman08:fix/guarded-reply-prompt-race
Closed

fix: bind guarded submit to verified prompt#177
stekman08 wants to merge 1 commit into
AltanS:mainfrom
stekman08:fix/guarded-reply-prompt-race

Conversation

@stekman08

Copy link
Copy Markdown
Contributor

Summary

  • Bind guarded submit to the prompt region verified immediately after typing.
  • Forward that region as expected_prompt so the bridge rejects a stale submit with prompt_changed before sending submit keys.
  • Preserve the verified draft and existing screen-changed error behavior.

Tests

  • web/src/lib/reply-action.test.ts: verifies the binding and the prompt-change race, including that text remains unsent.
  • Focused reply-action tests: 42 passed.
  • Backend and web typechecks plus lint passed.

This fork PR intentionally leaves version files and CHANGELOG.md unchanged, per CONTRIBUTING.md.

@github-actions github-actions Bot added the area: web Phone PWA — UI, mirror, composer, service worker label 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 lands too, and it is in 1.5.5. Cherry-picked with your authorship kept (e7c1c78) and credited in the changelog. You closed a real gap: the bridge already checked expected_prompt and already answered prompt_changed, and the guarded path simply never sent it, so a dialog that took focus between the typing and the Enter was answered instead of refused. I verified the bridge side live against a matching and a stale prompt before tagging. Closing this since the commit 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: web Phone PWA — UI, mirror, composer, service worker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants