Skip to content

fix(core): print snapshot element refs as @eN and accept a copied eN - #1000

Open
Lykhoyda wants to merge 1 commit into
mainfrom
align-element-ref-formats
Open

fix(core): print snapshot element refs as @eN and accept a copied eN#1000
Lykhoyda wants to merge 1 commit into
mainfrom
align-element-ref-formats

Conversation

@Lykhoyda

@Lykhoyda Lykhoyda commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

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, batch resolved/candidates, STALE_REF echo)
  • Related: story-05-batch-unique-testid, device-batch-testid, heal/stale, audit-b2-device-dispatch
  • corepack yarn format:check
  • CI Build & Test on this PR

…979)

Snapshot and find surfaces printed bare eN while candidates printed @en, so a copied press never attached pin fields. Print one form and attach the same pin at the argv boundary.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T19:54:03.286325Z 5b7b3bb PR opened
🔒 Security Review Completed 2026-09-08T19:56:59.142709Z 5b7b3bb PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Lykhoyda Lykhoyda added the needs-qa Independent dogfood QA on test-app simulator; Orchestrator posts a PR comment report label Sep 8, 2026
@Lykhoyda

Lykhoyda commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

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 problem

GH #979: snapshot/find/batch printed bare eN while pinned form is @eN, so a copied press refused in ~120ms for missing pin fields.

What I tested

  • Worktree /Users/anton_personal/GitHub/rn-dev-agent-pr-1000 @ 5b7b3bba876b82e07a127e3020d3c37efcf92164 (pr-1000-qa)
  • Primary checkout left on main
  • test-app already up: Metro 8081 + com.rndevagent.testapp on iPhone 17 Pro (CE9D3DB9-…)
  • Artifact-first inventory (8 learned actions); UI via plugin MCP only (device_screenshot, no raw simctl/adb input)
  • device_snapshot / device_batch / device_find / device_press with bare eN and @eN, plus find→bare press alternate

Expected vs actual

Check Result
Snapshot/batch print @eN PASS — e.g. "ref":"@e0" …; zero bare "ref":"eN"
Bare device_press(ref="e8") PASSok:true tapped 5104ms (not ~120ms missing-pin refuse)
@eN press PASS — tapped 6214ms
Alt find→bare press PASS — 6252ms
cdp_run_action / bind to live 8081 BLOCKED (non-fatal for #979) — session metroPort 8118 vs live 8081METRO_AUTHORITY_MISMATCH

Environment

  • Supervisor: worktree packages/claude-plugin/rn-dev-agent-core/dist/supervisor.js
  • Node: Homebrew v26.8.1 (framing: NDJSON; Content-Length hung on initialize)
  • CLAUDE-MD-TEMPLATE rules applied (snapshot-first, MCP-only UI)

Evidence

  • test-app/reports/2026-09-08-pr-1000-needs-qa.md
  • test-app/reports/needs-qa-1000/ (payloads + screenshots)

Open risks (non-fatal for #979)

  1. RN JS/native mismatch redbox on device (0.83.6 vs 0.85.3) — "Tasks" find NOT_FOUND; ref-format still proved on live nodes.
  2. External Metro 8081 vs session-allocated 8118 blocks CDP/learned-action replay.
  3. Unit test not re-run in this lane (build:core Auto-review block); live dogfood is the primary proof here.

Closes the presentation half of #979 for this head. Follow-ups on Metro axis / RN version skew are separate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-qa Independent dogfood QA on test-app simulator; Orchestrator posts a PR comment report

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: snapshot prints bare element refs while diffs print pinned refs, inviting a refused press

1 participant