Repository navigation
test: llm use route registry for screen detection - #47730
Conversation
Builds ready [bc7032a] [reused from 58e30f8]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 3 warn · 🔴 3 fail)
Bundle Size Diffs
|
Builds ready [a2bc197] [reused from b151b6f]
⚡ Performance Benchmarks (Total: 🟢 2 pass · 🟡 0 warn · 🔴 2 fail)
Bundle Size Diffs
|
|



Description
mm describe-screenreturnedcurrentScreen: unknownfor main routes like#/activityand#/account-list. Screen detection relied on a hand-written list of URL matchers instate-inspector.ts, so every route had to be added to mm-cli by hand. Eachunknownalso ran a slow (2 s) page-object probe.Now that the route registry (#47691) is merged, screen detection uses it directly:
matchRoute()totest/e2e/route-registry. It ranks routes the same way the extension router does.currentScreenis derived from the matched route path, for example/account-list→account-listand/settings/privacy→settings-privacy. Unknown sub-paths fall back to their closest parent route.SCREEN_CHECKS(the page-object load checks used by launch and self-onboarding) is keyed by route constants and trimmed to the four screens those flows wait on.New routes are picked up automatically. The registry test already enforces that every route in
ROUTESis registered.Some screen names change, for example
onboarding-complete→onboarding-completionandswap→cross-chain-swaps-prepare-bridge-page. They aren't used outsidellm-workflow.Changelog
CHANGELOG entry:
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/AIENG-282
Manual testing steps
yarn build:test) and runyarn mm launch.#/account-listand runyarn mm describe-screen. VerifycurrentScreenisaccount-listandisUnlockedistrue.#/settings/privacy(expectsettings-privacy),#/send(expectsend) and#/(expecthome).yarn mm cleanup.Screenshots/Recordings
Before
After
mm-describe.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Changes are confined to Playwright LLM/e2e test helpers and screen naming for
mm describe-screen; no production wallet or auth logic is modified.Overview
LLM workflow screen detection no longer relies on a hand-maintained URL matcher list. It now uses the e2e route registry and a new
matchRoute()helper (react-router-style matching) so paths like#/activityand#/account-listresolve correctly instead ofunknown(which triggered slow page-object probes).currentScreenis derived from the matched route viagetScreenName(e.g./settings/privacy→settings-privacy); unknown nested hash paths fall back to the closest parent route.ScreenNameis now a documentedstringrather than a fixed union. Locked/unlocked classification is computed from registry routes aligned with unauthenticated UI routes, not hardcoded screen sets.SCREEN_CHECKSand launch/self-onboarding waits are keyed by route constants and narrowed to the four DOM checks those flows need. Tests covermatchRoute, URL detection, and onboarding flows updated to assert on routes instead of legacy screen literals (some reported names change, e.g.onboarding-complete→onboarding-completion).Reviewed by Cursor Bugbot for commit a2bc197. Bugbot is set up for automated code reviews on this repo. Configure here.