test(client): cover mobile navigation visuals - #972
Conversation
🔐 Codex Security Review
Review SummaryOverall Risk: MEDIUM Findings[MEDIUM] Test-only navigation entry ships to every user
NotesThe authoritative diff contains no changes to authentication, databases, plugins, infrastructure, protobufs, or mining-pool configuration. Generated by Codex Security Review | |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 332806b138
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| scopable: true, | ||
| }, | ||
| { | ||
| path: "/visual-probe", |
There was a problem hiding this comment.
Remove the unmatched visual-probe navigation item
This ungated entry is rendered for every authenticated user, but a repo-wide search finds no /visual-probe route or component, and router.tsx has no matching route, so clicking it navigates users to the unmatched-route error page. The commit describes this as a temporary visual probe; remove it before landing rather than shipping a dead production navigation item.
AGENTS.md reference: AGENTS.md:L65-L68
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR, as currently diffed, modifies ProtoFleet’s primary navigation configuration by adding a new “Visual probe” entry. The stated goal in the PR description (adding mobile navigation visual coverage in the ProtoFleet Playwright visual suite) is not reflected in the included changes.
Changes:
- Adds a new
primaryNavItemsentry for the/visual-probepath in ProtoFleet nav config.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| { | ||
| path: "/visual-probe", | ||
| label: "Visual probe", | ||
| icon: Activity, | ||
| }, |
| { | ||
| path: "/visual-probe", | ||
| label: "Visual probe", | ||
| icon: Activity, | ||
| }, |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ecb6c3bd55
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| await minersPage.clickNavigationMenuIfMobile(); | ||
| const navigationMenu = page.getByRole("navigation", { name: "Main" }); | ||
| await expect(navigationMenu).toBeVisible(); | ||
| await snapshots.captureLocator(navigationMenu, VISUAL_SNAPSHOTS.navigationMenu); |
There was a problem hiding this comment.
Wait for the mobile settings animation before snapshotting
In the mobile project this runs immediately after captureEmptyStateScreens() leaves the app on /settings/mining-pools; opening the drawer mounts the auto-expanded settings submenu with a 300 ms opacity/position animation, but visibility of the outer <nav> does not mean that submenu has settled. The committed mobile baseline already shows the submenu labels at partial opacity, so subsequent runs can capture a different animation frame and fail without a UI regression. Wait for the submenu animation to finish, or navigate to a route that does not auto-expand it, before capturing the locator.
AGENTS.md reference: AGENTS.md:L74-L78
Useful? React with 👍 / 👎.
🤖 Reviewable diff: +5/-0 across 1 file (excludes generated, test, and story files).
Summary
This PR closes a responsive visual-coverage gap where ProtoFleet navigation changes were detected on desktop but could pass unnoticed on mobile because the drawer stayed closed in every screenshot. It adds a focused navigation capture at the end of the existing sign-up and empty-state visual scenario, after all target content screenshots are complete.
How it works
The existing scenario continues through sign-up and every empty-state page with the mobile drawer closed. At the end, the shared visual helper opens the drawer only when needed, locates the main navigation landmark, and compares that element with a dedicated project snapshot.
Diagrams
Areas of the code involved
client/e2eTests/protoFleet/spec/onboardingVisual.spec.tsclient/e2eTests/protoFleet/helpers/onboardingVisuals.tsKey technical decisions & trade-offs
Testing & validation