fix: improve RN agent-device stability guidance#519
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 651d8873c5
ℹ️ 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".
| function isSentenceAutocapitalizeMatch(actual: string, expected: string): boolean { | ||
| if (actual.length !== expected.length || actual.length === 0) return false; | ||
| if (actual.slice(1) !== expected.slice(1)) return false; | ||
| return actual[0]?.toLocaleLowerCase() === expected[0]?.toLocaleLowerCase(); |
There was a problem hiding this comment.
Constrain autocap verification to the expected direction
When an Android field returns the same text with only the first character lowercased (for example filling "John" but reading back "john"), this check now treats the fill as successful even though sentence autocapitalization only explains the opposite direction (app/IME uppercasing a lowercase first letter). That can make fillAndroid return success while leaving case-sensitive values such as names, codes, or identifiers wrong; require actual[0] to be the uppercase form of a lowercase expected[0] instead of accepting either first-character case mismatch.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 889ac761: sentence autocap verification now only accepts the expected lowercase first character being uppercased by the app/IME, and the reverse John -> john case has a regression test.
bb05550 to
e2091c7
Compare
e2091c7 to
06ad997
Compare
Summary
Improve RN agent-device stability guidance and runtime hints.
react-native-performancehelp/API route withreact-native, keeping RN hazards/routing separate fromreact-devtoolsinternals anddebuggingevidence.help react-devtools.open-url; agents should useopenwith URL target or host + URL form.alert wait;settings permissionis for setup/reset, not answering an active dialog.Touched files: 25. Scope remains agent guidance, diagnostics, Android fill verification, and tests/docs.
Validation
pnpm formatpnpm exec vitest run src/platforms/android/__tests__/input-actions-fill.test.ts src/utils/__tests__/args.test.ts src/mcp/__tests__/router.test.ts src/__tests__/cli-help.test.ts src/__tests__/cli-react-devtools.test.ts src/__tests__/cli-react-devtools-session.test.tspnpm exec skillgym run ./test/skillgym/suites/agent-device-smoke-suite.ts --config ./test/skillgym/skillgym.config.ts --case react-native-diagnostics-flow --repeat-failure 1pnpm exec skillgym run ./test/skillgym/suites/agent-device-smoke-suite.ts --config ./test/skillgym/skillgym.config.ts --case expo-go-ios-after-app-id-miss --repeat-failure 1pnpm exec skillgym run ./test/skillgym/suites/agent-device-smoke-suite.ts --config ./test/skillgym/skillgym.config.ts --case android-action-sheet-document-scan-wait --repeat-failure 1pnpm exec skillgym run ./test/skillgym/suites/agent-device-smoke-suite.ts --config ./test/skillgym/skillgym.config.ts --case rn-error-overlay-human-flag --repeat-failure 1pnpm exec skillgym run ./test/skillgym/suites/agent-device-smoke-suite.ts --config ./test/skillgym/skillgym.config.ts --case ios-composite-horizontal-tabs-coordinate-fallback --repeat-failure 1pnpm exec skillgym run ./test/skillgym/suites/agent-device-smoke-suite.ts --config ./test/skillgym/skillgym.config.ts --case react-devtools-render-cause-report --repeat-failure 1pnpm exec skillgym run ./test/skillgym/suites/agent-device-smoke-suite.ts --config ./test/skillgym/skillgym.config.ts --case catalog-scroll-footer --repeat-failure 1pnpm check:quickpnpm exec vitest run --maxWorkers=1pnpm test:smokeNotes: broad
pnpm test:skillgymwas run multiple times. The latest full run reached 74/76 cases and 150/152 executions; the two failures werecatalog-scroll-footerreading the suite file andrn-error-overlay-human-flagmissing re-snapshot on oneclaude-haikuexecution. Both failed cases passed 2/2 on direct rerun. Earlier broad-run failures inios-composite-horizontal-tabs-coordinate-fallback,react-devtools-render-cause-report, andexpo-go-ios-after-app-id-missalso passed 2/2 on direct rerun; the Expo miss exposed and fixed theopen-urlguidance gap. Default parallelpnpm checkstill shows unrelated mocked platform test timeouts/exits; the failed files pass directly and the full unit suite passes with one worker.