Repository navigation
fix(ui-react): guard completed mic holds through release - #4235
Conversation
|
No uploads on this PR yet This PR changes UI files (
Tips for agentsLabel each shot so reviewers know what they're seeing. Labels apply to every file in a call, so run one uploads put after.png --pr 4235 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 4235 --app ios --screen "Chat" --state afterNo CLI? With the Uploads MCP, call This comment updates with each upload, so you don't need to post the images yourself. A shot or two in the PR description is still welcome. Check what's attached with Workspace admins can turn this comment off in Settings → GitHub · docs |
Independent reviewReviewed head cc645d9 against base 0aeb62a. Reviewer: agent. 1 finding: 0 fixed, 0 filed, 0 rejected, 1 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4235,
"head": "cc645d9e2c235fd4b8fa71470754ca95f6d5ebfd",
"base": "0aeb62a7acaef51deabe6a6bc84d3b7b1b72e286",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-react/tests/browser/composer-mic.pointer.tsx:281: The rail-coarse Start regression case passes with the old fixed-expiry guard, as the PR's failing-first receipt confirms: its release coordinates do not activate Start. It therefore cannot detect this guard regression in rail-coarse and misses #4185's explicit requirement for failing-first native-touch proof in both rail-coarse and rail-mixed."
}
]
} |
Independent reviewReviewed head cc645d9 against base 0aeb62a. Reviewer: agent. 1 finding: 1 fixed, 0 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4235,
"head": "cc645d9e2c235fd4b8fa71470754ca95f6d5ebfd",
"base": "0aeb62a7acaef51deabe6a6bc84d3b7b1b72e286",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-react/tests/browser/composer-mic.pointer.tsx:281: The rail-coarse Start regression case passes with the old fixed-expiry guard, as the PR's failing-first receipt confirms: its release coordinates do not activate Start. It therefore cannot detect this guard regression in rail-coarse and misses #4185's explicit requirement for failing-first native-touch proof in both rail-coarse and rail-mixed.",
"disposition": "fixed",
"commit": "5c35488a8d23b9c8164a3cf0b49fce4efbcce9bb"
}
]
} |
Independent reviewReviewed head 5c35488 against base 0aeb62a. Reviewer: agent. No findings. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4235,
"head": "5c35488a8d23b9c8164a3cf0b49fce4efbcce9bb",
"base": "0aeb62a7acaef51deabe6a6bc84d3b7b1b72e286",
"reviewer": "agent",
"outcome": "no-findings",
"findings": []
} |
|
Collision receipt for head Hosted feedback passed on the pre-refresh head |
|
Current collision receipt: head The latest clean base merge leaves this PR's three files byte-identical. Current |
|
Collision receipt: head Current preflight passed; review refusal is null. GitHub synthetic checkout |
|
Merged in #4235 as |
Closes #4185
What changed
A completed composer mic hold keeps swallowing the original release's click even when the finger stays down for five seconds after Start or the S4 notice opens. A fresh tap still starts conversation or dictation. Cancelled holds keep their existing one-second guard.
Why this shape
The completed hold records its pointer ID and waits for that pointer's release before starting fallback listener cleanup. The window capture listeners survive the composer being replaced by Start. The release click, a new pointer press, or a key clears the guard; browsers that produce no click clean up automatically. HOLD_MS stays 600 and cancellation stays at 1,000 ms. No machine contract changes.
Proof
Citations verified against origin/main at
0aeb62a7acaef51deabe6a6bc84d3b7b1b72e286: HOLD_MS:5, SWALLOW_MS:8, swallowNextClick:57-76, no capture promise:31-33, and StartCard.tsx:151-161. No parent epic. Scope follows the issue and the maintainer's immediate implementation request.All gesture timings use the existing Vitest controlled clock. Native input runs in the pinned browser container with Bun 1.4.2 and Node 24.21.0. Command:
0aeb62a7acaef51deabe6a6bc84d3b7b1b72e286(the old fixed-expiry guard), with the updated spec. Separate pinned runs avoid concurrent failure-screenshot artifact collisions:node scripts/visual.mjs --project=rail-coarse --filter=composer-mic: 12 passed / 4 failed. Bothfive seconds after Start opens the original release never presses Start touch 320/1280cases failed atthe original release must not press Start: expected zeroconversation_startframes, received one.node scripts/visual.mjs --project=rail-mixed --filter=composer-mic: 24 passed / 6 failed. The same two native-touch cases failed at the same assertion: expected zeroconversation_startframes, received one.cc645d9e2c235fd4b8fa71470754ca95f6d5ebfd, restored afterwards (product code is unchanged by the review fix): (1) old fixed expiry is the failing-first run above; (2) removing only the keydown clearing listener madeafter a completed hold with no release click a new key ends the guardfail witha fresh key allows Start(no conversation_start), 1 failed / 17 passed in rail-fine; (3) removing onlyend()from click suppression made the correspondingnew clickcase fail witha fresh click allows Start, 1 failed / 17 passed in rail-fine. An exploratory mutation removing all three clearing paths also lost a deliberate native Start tap (expected one frame, received zero); isolated mutations avoid attributing its cascading failures to individual paths. Final restoration: 64/64 passed across all three projects.NODE_OPTIONS=--max-old-space-size=8192 bun run typecheck: passed. The default 2 GiB Node heap initially aborted with an explicit JavaScript heap-out-of-memory error; provisioning compiler memory completed the same strict check without changing source or scope.bun run build: passed.bun scripts/check-changeset-packages.tsand fullbunx --no-install changeset status: passed; pending plan has no major bumps.{"version":1,"kind":"brain-check-pr-receipt","head":"8806e48d435dc8c7b9100f69b3ac6c51d660a56e","base":"origin/main","mode":"focused","startedAt":"2026-11-17T22:30:24.417Z","finishedAt":"2026-11-17T22:31:05.283Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":13034.187211},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":118.85139100000015},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":84.47004799999922},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":20.464657000000443},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":27592.724557}]}Collision inspection (
bun scripts/collisions.ts --json --pr 4235) at heada1b28b8a2cb4fd72910145378303d7797eff4336: closure overlaps with #3054, #3056, #3059, #3069, #3581, #3622, #4151, #4198, #4199, #4234, #4236, #4237, #4238, #4240. No direct path collision was reported.The first handoff superseded the earlier draft heavy-feedback request (https://github.com/schlessera/brain-kit/actions/runs/44163361504). Fresh independent review of
5c35488a8d23b9c8164a3cf0b49fce4efbcce9bbis clean and recorded. Heavy feedback run https://github.com/schlessera/brain-kit/actions/runs/44166336099 tested that exact head. Browser shard 3 (job 134333899457, attempt 1) failed the four existing #4230 ArtifactTheme Layout Phone/Desktop Escape-focus cases (dark/light), with 4 failed / 3369 passed; verification, packaging, runtime and four changed-spec repetitions passed on that head. This failed job was not rerun. Remaining work on that superseded tree was cancelled.The base fix was already delivered in #4231 (
d226c76700e837f22c5b79d207f0c2d1fbe20ef2). A clean merge refreshed the branch:72c50e1c334651d15b5e9bcbba350b23e3be9419, parents5c35488a8d23b9c8164a3cf0b49fce4efbcce9bband743f1547503e9ed5078ca7a533691aade0676618. Its treef889f7088c59051088d062d64ae50a70ebac8428equals the independently computed automatic merge tree. The merge diff against the pre-merge head was read; it adds only main's nine changed files, with no overlap or content changes in this PR's three files and no duplicated block. No new implementation commit or conflict resolution was added. The review remains applicable under the clean-base-merge rule. The fresh feedback request at that head (run 44169068382) was cancelled during admission before any selected proof ran: two admissions were mutually yielding after the lease cleared. This coordination defect is filed as #4239. Requests are now ordered to avoid that cycle. A second clean merge includes the subsequently delivered #4179: head79c827ca2ea2cb4d820afaf8651c5ea50fa1b911, parents72c50e1c334651d15b5e9bcbba350b23e3be9419andd84fca3e08dfa7c5b65973f931ab08d740537d02, automatic merge tree19bcf241531eb76fcffffde17762e937c0b5fd55. The merge diff adds only main's four changed files; this PR's three files remain byte-identical, with no duplicate block or conflict resolution. The current-head focused preflight passed. The feedback slot cleared after the other run finished. Main then advanced through #4196, so one further clean merge refreshed the branch toa1b28b8a2cb4fd72910145378303d7797eff4336, parents79c827ca2ea2cb4d820afaf8651c5ea50fa1b911andade18f34fbfeb03f49a993268966974fd361cc69. Its tree94a0bab0942887434fb4078044ab13d92ec392b4matches the computed automatic merge tree. Comparing against the pre-merge head adds only main's 15 changed files: none overlap this PR's three files, whose contents remain byte-identical. Fresh heavy feedback and candidate proof remain required for this combined candidate.Review finding fixed in
5c35488a8d23b9c8164a3cf0b49fce4efbcce9bb(test-only follow-up; no product change).Coordinate audit for the review finding: both cases that lift an original hold onto the replacement Start button now press the upper portion of the mic and assert Start is hit at that same point before release. A coarse mic's centre lies below Start at 320 px and on its bottom edge at 1280 px. The earlier completed-hold case had the same weakness and is corrected too. Other mic releases target the unchanged mic (early release, cancellation, S4); their old-code S4 failures demonstrate the intended click is produced. The guard-clearing mouse cases intentionally produce no release click after replacement, then use explicit fresh Start activation coordinates.
Hosted heavy feedback qualification: https://github.com/schlessera/brain-kit/actions/runs/44177730826, attempt 1, success, exact head
a1b28b8a2cb4fd72910145378303d7797eff4336(tree94a0bab0942887434fb4078044ab13d92ec392b4). All selected proof workers' checkout SHAs were read from their actual logs and match that head. All three browser shards passed: jobs 134384419088, 134384419233 and 134384419141. The changed composer spec passed four repetitions under CPU load (job 134384419122). Verification, packaging, unit, runtime, native-host, layout, captures and endurance all passed too. The reporting aggregate runs its policy from the workflow's default-branch event checkout by design and reports the requested head; it is feedback, not candidate proof. No failed test job was rerun.After the passing feedback, main advanced through #4236. A clean refresh creates
d76d1504f60637c1b3885ffc872eaa65e321dfe8, parentsa1b28b8a2cb4fd72910145378303d7797eff4336and29e3cb0dc89d880143205edab2ae01e4f12c52c7, with tree3bee9ad4be17e5a96cf2974247cf8610984961a6equal to the automatic merge result. The diff against the pre-merge head adds only main's 15 CI watchdog/doc/test files; none overlap this PR's three files, whose bytes remain identical. The selected mic product timings remain on the controlled clock. The prior feedback receipt retains its actual head; new candidate confirmation and the squash's own main run establish the final combined tree. The current-head preflight receipt above passed.A further clean refresh after #4199 advanced main creates
4ce0b3b387512f30662410bf873c72617245abf5, parentsd76d1504f60637c1b3885ffc872eaa65e321dfe8and51d0f6de637509a97bed014eb0a284a196199e80. Its tree255b3c5741f431728d1d2dc8bd80fae2fa60d16bequals the computed automatic merge. The pre-merge comparison adds only main's five GitHub draft-body UI/test/changeset files; none overlap this PR's three files. The mic implementation and controlled-clock spec remain byte-identical to the passing feedback source. The feedback receipt is retained at its actual source, with fresh exact-candidate confirmation and squash main proof still required.While waiting for the reservation, #4237 advanced main. The clean refresh is
8806e48d435dc8c7b9100f69b3ac6c51d660a56e, parents4ce0b3b387512f30662410bf873c72617245abf5andcd896acbba3cdce68d5076171fe305835b0a01dc, automatic merge treeb203db5942ac7a99e1090a65eb9af55814dce541. Comparing to the pre-merge head adds only main's four determinism-warning/doc/fixture/test files. None overlap this PR's three files, which remain byte-identical; no duplicated block or resolution edit was introduced.Containment
This is a gesture suppression guard: completing a hold triggers it; cancelled holds use their original bounded path. It suppresses only the release click, including when Start replaces the mic; earlier releases still dictate. Fresh press/key/click clears it, and release starts automatic fallback cleanup if the browser makes no click. The visible outcome is Start or S4 remaining open; no host/backend restriction or durable failure state is added. Native browser tests prove a fresh Start/mic tap remains usable while the unwanted release is suppressed. No microphone, provider-history, or server path changed.
Checklist
Anything left open
Independent review is complete. Hosted heavy feedback, integration confirmation, and the squash main-run verification remain. Hosted feedback is feedback, not merge proof. The #4230 record recovered while this branch was being refreshed; its already-delivered base fix is included by the clean merge. This PR does not claim that incident fix as its own.