fix(core): print snapshot element refs as @eN and accept a copied eN - #1000
fix(core): print snapshot element refs as @eN and accept a copied eN#1000Lykhoyda wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b7b3bba87
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // types in one native operation. Shape: [verb, ref, rawText, ...flags] — | ||
| // text is a raw slot so leading '-' values are never eaten as flags. | ||
| const ref = cliArgs[1]; | ||
| const ref = cliArgs[1] && pinnedElementRef(cliArgs[1]); |
There was a problem hiding this comment.
Preserve eN text in the legacy type form
When the supported legacy invocation is ['type', text] and the text happens to match e\d+ (for example, typing the literal verification code e3), normalizing cliArgs[1] here turns the text into @e3 before the legacy-shape branch can run. Both builders consequently return a stale-ref command with empty text instead of typing e3; distinguish the two-argument legacy form before applying ref normalization.
Useful? React with 👍 / 👎.
QA dogfood (needs-qa)Verdict: pass Independent dogfood by the rn-dev-agent QA lane (Orchestrator-reporter posting). No product code changes. No merge. Original problemGH #979: snapshot/find/batch printed bare What I tested
Expected vs actual
Environment
Evidence
Open risks (non-fatal for #979)
Closes the presentation half of #979 for this head. Follow-ups on Metro axis / RN version skew are separate. |
Summary
eNwhile candidates printed@eN, so a copied press never attached pin fields and was refused (~120 ms). Print@eNas the single agent-visible form.eNat the argv boundary so both spellings attach the same pin fields.findRefByTestIDstays bare internally (GH bug: device_batch testID steps resolve against a stale cached snapshot, contradicting the re-resolve-at-execution contract #396 /@@eN).STALE_REFechoes@eNin the error even when the caller sente3. Closes docs: snapshot prints bare element refs while diffs print pinned refs, inviting a refused press #979.Test plan
node --test packages/rn-dev-agent-core/test/unit/gh-979-element-ref-format.test.ts(print form, iOS/Android pin-field parity, salient nodes, batchresolved/candidates, STALE_REF echo)story-05-batch-unique-testid,device-batch-testid, heal/stale,audit-b2-device-dispatchcorepack yarn format:checkBuild & Teston this PR