Repository navigation
Conversation
|
Thanks for working on targeted In interaction-positionals.ts, The same ambiguity breaks replay. interaction.ts records the type step as separate tokens from In interactions.ts, the This is a device-facing change, and the PR has only mocked-backend tests. Live evidence at c77f728 is required before merge: one iOS simulator and one Android emulator, each running Not blocking, and they can be taken or left: the press leg runs before text-entry admission in interaction.ts:127, so a refused Is a targeted The coverage check is failing and no log excerpt was available, so its cause is not attributed. Two body-rules runs were cancelled, not failed. Next, the maintainer needs to decide whether the feature is wanted. If it stays, the target form must be narrowed so base text never decodes as a target, live or on replay. The label validation and the live device runs are also needed. |
…oin the recorded text Review of callstack#4870 flagged three must-fix gaps at c77f728: - Unquoted multi-word text re-decoded into a target: `type selected items here` pressed the selected element, `type 555 123 4567` tapped (555, 123), and a quoted `type "@E12 more"` lost its text. The decoder now leads a target only with a minted snapshot ref (`@e12`, optionally `@e12~s3`) — the one leading token base refused — so every positional base typed as text stays text. - Recorded steps re-split on replay: the recorded type step now carries the text as one positional, so `press @e1` plus `type 1 2 3` replays one tap and the whole text, never a second tap at (1, 2). - MCP/Node input was not validated: `type` metadata spread the full interaction-target keys while the reader never checked them, so `{ref, label, text}` typed the label and `{selector, text}` silently retargeted nothing. The schema narrows to the ref vocabulary and `readTypeCommandInput` refuses a selector, a point, two targets, and a label without a ref, the way `readTargetedInput` does for targeted commands. The text-entry binding also admits before the focus tap now, so a refused targeted `type` never taps the device. The CLI usage line, the help topics, and the generated command docs follow the narrowed grammar (`type [@ref] <text>`), which fixes the Coverage lane's stale `command-explain` expectation. Co-Authored-By: Claude Code <noreply@anthropic.com>
Live evidence: targeted
|
|
Thanks for the update. At e31a217, one high-priority defect and one missing live check remain. The label leak from the earlier review (#4870 (comment)) is fixed for the cases it covered, but the same class still exists for
This is a device-facing change: it adds a press leg before text entry and moves admission order, and only mocked-backend tests exist at this commit. Before merge, please run Not blocking: the replay test in The failed Body rules check (run 44852795137) points at the PR body, not the diff: it reports 788 words against a limit below 250. The current body is about 270 words by Before merge, the |
|
The The defect: Live runs,
Replay leg, with two findings to flag. The recorded scripts replay to the same final value on both platforms — with the press step recorded as a coordinate press:
Recorded scriptsIf you want the replay leg to stand on a native field instead, say so and I'll re-record against one. Not blocking, left for now: the replay test still feeds recorded positionals straight to dispatch (see the correction appended below). Correction to the "Not blocking, taken" line below: it claimed the replay test round-trips through the script writer — false at the head you reviewed, and the claim is now gone: the replay test feeds recorded positionals straight to dispatch, and says exactly that. The gate moved once more per your review (0f991ae): |
|
Thanks for the follow-up. The earlier findings from #4870 (comment) are fixed at 43ef6f4, and one defect remains. The ref check lives only in the CLI/MCP input reader (metadata.ts:355). The typed Node client skips it: Would it be simpler to gate the ref once in Not blocking, and fine to take or leave: the comment at interaction-type-target.test.ts:139 says the replay test round-trips through The live device runs are taken from the author comment, not reproduced here. Tests were not run locally. The required evidence is present. CI is unclear. Twelve jobs were cancelled at run level and have no output. Smoke Tests in run 44907535178 failed, and no log was captured, so the failure cannot be attributed. The PR changes daemon type dispatch, which a smoke run that types text could exercise, so overlap is possible. There are no conflicts. Before merge, please gate the ref in |
…d with fill `type` typed every positional into the focused input, so text sent after a `focus` landed in whatever field that focus had moved to. `type` now takes an optional leading target with fill's vocabulary (@ref, selector, or x y): the press admission stack focuses it first, then the bound text-entry operation appends. Without a target the focused-input semantics are unchanged, and callstack#4360's discrimination holds: only a real snapshot ref (`@e12`) leads a target, `@elena` still types as text, and a ref with no text is still refused as the mistargeted `fill` it usually is. A target is detected only when text follows it, so `type 100 200` still types "100 200" and a lone selector-shaped word still types. An ambiguous selector refuses with AMBIGUOUS_MATCH from the focus tap's own resolution, before the text operation binds. The internal focus leg dispatches and records as `press`, so a recorded script replays one tap and then the append. Co-Authored-By: Claude Code <noreply@anthropic.com>
…oin the recorded text Review of callstack#4870 flagged three must-fix gaps at c77f728: - Unquoted multi-word text re-decoded into a target: `type selected items here` pressed the selected element, `type 555 123 4567` tapped (555, 123), and a quoted `type "@E12 more"` lost its text. The decoder now leads a target only with a minted snapshot ref (`@e12`, optionally `@e12~s3`) — the one leading token base refused — so every positional base typed as text stays text. - Recorded steps re-split on replay: the recorded type step now carries the text as one positional, so `press @e1` plus `type 1 2 3` replays one tap and the whole text, never a second tap at (1, 2). - MCP/Node input was not validated: `type` metadata spread the full interaction-target keys while the reader never checked them, so `{ref, label, text}` typed the label and `{selector, text}` silently retargeted nothing. The schema narrows to the ref vocabulary and `readTypeCommandInput` refuses a selector, a point, two targets, and a label without a ref, the way `readTargetedInput` does for targeted commands. The text-entry binding also admits before the focus tap now, so a refused targeted `type` never taps the device. The CLI usage line, the help topics, and the generated command docs follow the narrowed grammar (`type [@ref] <text>`), which fixes the Coverage lane's stale `command-explain` expectation. Co-Authored-By: Claude Code <noreply@anthropic.com>
The ref field reached the daemon unvalidated, so {ref:'Email'} typed the
literal into the focused field and reported ok. The selector owner now
exports the minted-ref test; the reader normalizes a bare minted id to
"@E12" and refuses any other value with INVALID_ARGS before dispatch.
Co-Authored-By: Claude Code <noreply@anthropic.com>
The typed Node client route skips the metadata reader, so {ref:'Email'}
still typed literally with ok:true. typePositionals now runs the
minted-ref gate every structured route shares; the metadata reader keeps
only the selector, point, and label shape checks.
Co-Authored-By: Claude Code <noreply@anthropic.com>
The coverage run died mid-suite with no assertion failure under a parallel PR's run; the affected suites pass locally. Co-Authored-By: Claude Code <noreply@anthropic.com>
1eb952c to
dee7431
Compare
|
The Coverage failure here is inherited from main: main HEAD |
|
Thanks for the update. The findings from the earlier review at 43ef6f4 no longer apply at dee7431, but one regression remains. The existing Could the daemon keep the original argument boundaries for targetless recordings, and could the ad-script grammar represent the targeted append as literal text, so a recorded payload such as A test that records a targetless Not verified here: tests were not run locally, and the regression was judged from the code before this update. The live iOS Safari and Android Edge runs at 43ef6f4 come from the PR description, and this update changes only the surface projection, so it needs no new device run. Coverage and Prose also fail on main at 4075dd1 (latest main Docs run 44929084442). Android Smoke Tests (run 44929380920) fails at No conflicts are known. The code needs the fix above, Coverage and Prose will clear when main's do, and the maintainer's open question on whether this feature is wanted still needs an answer before merge. |
A targetless `type " " @e2` recorded the folded single positional `[" @e2"]`, and the replay's mistargeted-ref check trims that first positional into `@e2` and refuses with INVALID_ARGS. The recorded positionals are now conditional on a decoded leading ref: a targetless `type` records its original positionals, so the saved script replays the same argument boundaries, and only a targeted `type` folds its text into one positional a replayed step cannot re-split into a target. Text semantics are unchanged (the join still happens in parseTypeTextRequest); only the recorded boundaries move. Proved by the record -> save -> replay round trip in interaction-type-target-recording.test.ts: - a targetless type records its two positionals and its saved script replays without INVALID_ARGS - a targeted type still folds its text into one positional and its saved script replays without a second tap and by interaction-type-target.test.ts: - a targetless type records its original positionals - a recorded targetless type replays the whole text with no focus tap and no INVALID_ARGS - a targeted type whose text reads as a ref records folded and replays refused (characterization of the open grammar question) Mutation check: reverting to the unconditional join turns the targetless round trip red (1 failed on the recorded `[" @e2"]` vs `[" ", "@e2"]` assertion); the restored fix is green (2/2 in the recording file, 9/9 across both type-target files), and the restored tree is byte-identical to the pre-mutation state. Addresses the regression reported in issue 4870 review.
|
Thanks — the regression is fixed at 77ada02, pinned by the exact round trip you suggested. What changed
const recordedPositionals =
decoded.target === undefined ? undefined : [decoded.textPositionals.join(' ')];Text semantics are identical for both shapes (the join happens in Prove-the-fix tests (record → saved script → replay)New
Extended
Your second questionKeeping original argument boundaries for targetless recordings — done, that is exactly this fix: the daemon now records Representing the targeted append as literal text — we kept the fold for targeted
Making the grammar represent a targeted append as always-literal text would touch both sides of the contract:
My lean is option 2 plus a matching tokenizer rule for quoted tokens, but it is a grammar-level contract change that deserves its own PR. If you prefer one of these directions, happy to drive it separately. |
|
Thanks for the update. This PR is ready: the findings from the earlier review at dee7431 (#4870 (comment)) are fixed at 77ada02, and no new problems were found. All 15 checks pass at 77ada02, and there are no conflicts. Not blocking, and fine to take or leave: a targeted |
|
This head (77ada02) now conflicts with main. Please rebase onto main and push; the rebased head gets a delta review. |
|
Thanks for the work and the live runs on iOS Safari and Android Edge. We are closing this PR for now: today the same result takes two existing commands ( To help us make that call, please open a Discussion with experiments under different conditions, for example:
If the data shows a gap that the two-step flow cannot cover, we can agree on the shape there before a new PR. |
Summary
typenow takes an optional leading snapshot ref: the press stack focuses it, then text entry appends. The target is one minted ref (@e12, optional@e12~s3) — the one leading token base refused — so text stays text. Review fixes: the decoder's selector and point branches are gone, sotype selected itemsnever taps; the recorded step joins the text into one positional; structured input refuses a selector, a point, two targets, andlabelwithoutref; a non-mintedrefnow refuses and a baree12normalizes to@e12; usage and docs follow.Before / after
type @e12 "more"refuses withINVALID_ARGS. head: taps@e12, then appends; the response names@e12.type 555 123 4567andtype selected items heretype literally with no tap.{ref:'@e12', label:'Email', text:'more'}typesmoreinto@e12;{ref:'Email'}refuses;{ref:'e12'}normalizes.Validation
At 43ef6f4:
tsc -bclean; selectors and command-surface suites green. Live on iOS Safari and Android Edge (physical K60):type @eN "more"appends on a pre-filled field (old textmore), response carriesref+text. A recorded press+type "more"script replays to the same value on both; the recorded-ref press itself diverges at replay on both browsers (Safari ancestry, Edge toolbar id) — reported as a replay finding, so that leg uses a coordinate press. First round: #4870 comment. The maintainer's feature-wanted question stays open.🤖 Generated with Claude Code