Repository navigation
feat(open): let a polling caller skip the first-screen wait - #4599
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 10 files
You’re at about 96% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Apex Sentinel · ✅ ApproveSince the last review: 0 new · 0 still open · 0 no longer raised No open findings. 1 finding below 💬 Talking to SentinelIn a finding's thread, reply with:
On this conversation, comment Earlier reviewsReview of
|
| Where | Finding |
|---|---|
packages/daemon/src/core/deferred-interaction-outcome.ts:251 |
open --no-post-gesture-stabilization drops a pending stabilization even when the open launches no app |
Reviewed with this repository's own Sentinel configuration (cfe08502f0f6).
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 3f99090. The verdict and the full list are in the summary comment.
An app whose first screen labels nothing, such as a game canvas, held the first capture after open for the full 10 s first-screen budget. open now accepts the existing postGestureStabilization opt-out (--no-post-gesture-stabilization, the user config key, or AGENT_DEVICE_POST_GESTURE_STABILIZATION=0). With it, open marks no wait and still drops the record the replaced screen left pending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-out is set Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed an app Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cb1bbfd to
65294d3
Compare
|
This PR is ready at 65294d3: I found no problems in the code, and the first-screen skip follows the issue. All 13 CI jobs are still running on this head and none has failed, so they need to pass before merge. There are no conflicts. Not blocking, and you can take or leave each: (1) the only committed tests call |
Summary
Since #4513, the first capture after
openon a local iOS simulator waits up to 10 s for a labeled first screen. An app whose first screen labels nothing, such as a game canvas, always waits the full 10 s.opennow accepts the existingpostGestureStabilizationopt-out, so a caller that polls the screen itself can skip the wait:agent-device open com.example.game --foreground --no-post-gesture-stabilization AGENT_DEVICE_POST_GESTURE_STABILIZATION=0 agent-device open com.example.game # operator-wideWith the opt-out set,
openmarks no wait. On every platform, it still drops the record the replaced screen left pending, such as a scroll's stabilization record. The field stays operator-only: MCP and AI SDK schemas do not offer it, so the always-loaded schema budget doesn't change, and./agent-device.jsonstill rejects the key.Rebased on #4601. The
opendocs paragraph also takes two wording fixes from #4601's review: "An unlabeled splash image", and the game-canvas example moved to the no-labeled-element clause.10 files: the open surface and client type, the daemon mark, flag and client docs, the guarantee cell, the user docs, and one test.
Validation
At 1c9adf2, with the review fixes rechecked at b0126a4 (typecheck, lint, 1,992 affected tests):
pnpm typecheckandpnpm lintpass.src/commands,src/mcpand the deferred-outcome tests: 3,662 tests.prepareDaemonCommandRequest('open', { postGestureStabilization: false })carries the field to the daemon.open --relaunch --foregroundwith and without the flag, 3 runs each. All succeed with the full tree and nopostGestureOutcome. Settings labels its first screen at once, so timing doesn't separate the two modes; the daemon test covers the skip.open --relaunch --foreground --metro-port 8081, interleaved, 4 runs per mode. All 12 runs returned the 52-node home screen with nopostGestureOutcome. Median time: 7.3 s by default, 6.5 s with--no-post-gesture-stabilization, 6.3 s withAGENT_DEVICE_POST_GESTURE_STABILIZATION=0. The relaunch itself takes about 6 s, so the home screen is already drawn whenopenreads it, and the opt-out saves the confirming second read. The env run shows the operator config reachesopen.🤖 Generated with Claude Code