Skip to content

test(e2e): select the onboarding Codex card by its exact name - #24439

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/e2e-onboarding-codex-card
Oct 1, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/e2e-onboarding-codex-card

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 0
Prod 0 0 0 0

ELI5

Five E2E tests that walk through first-run onboarding fail every night because they can't find the "Codex" button on the "pick your agent" step. The button is still there; its name changed, and the tests were looking for the old name.

What Changed

Test-only; users see no difference. onboarding.spec.ts (3 tests), golden-core-flows.spec.ts, and golden-fresh-profile-terminal.spec.ts now find the card with getByRole('button', { name: 'Codex', exact: true }) instead of /^Codex\s/.

Why

#22720 removed the command subtitle (codex) from each onboarding agent card. That changed the card's accessible name, which screen readers and Playwright both use, from "Codex codex" to "Codex". /^Codex\s/ requires more text after "Codex", so it now matches nothing, and each test times out after 30 s on the click. The tests first failed on the 2026-09-30 nightly, the first one after #22720 merged, and failed again on 10-01 (run).

An exact match is stricter than the old prefix match. No other agent's label is exactly "Codex", and other model-picker labels such as "GPT-5.3 Codex" don't start with it. Bringing the subtitle back was not an option: #22720 removed it on purpose. I also checked the 74 UI strings #22720 removed against tests/e2e/; no other test references any of them.

Testing

  • Targeted E2E dispatch for the three specs on this branch: 36909013377 (in progress)

  • oxfmt and oxlint are clean on the touched files.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Linked Issue

N/A (maintainer fix for the red nightly E2E run on main)

Visual Proof

N/A: test-only change, no UI or behavior change.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Test-only. No SSH, mobile, wire, or cross-version impact.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

#22720 dropped the command subtitle from onboarding agent cards, so the
Codex card's accessible name is now "Codex" and /^Codex\s/ never matches.
@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low risk] Updates end-to-end test selectors for onboarding flow.

The test-only selector change appears safe to merge.

Summary

The PR updates five onboarding E2E selections to match the Codex card’s current accessible name.

  • Replaces a prefix expression requiring text after “Codex” with an exact “Codex” match.
  • Changes tests only; no application behavior changes.

Reviews (1) · Last reviewed commit: "test(e2e): select the onboarding Codex c..."

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Onboarding Codex card selector updated — the five onboarding/fresh-profile E2E helpers now target the card with getByRole('button', { name: 'Codex', exact: true }) instead of the anchored regex /^Codex\s/, restoring the nightly run after the card's accessible name changed.

The claim behind the fix checks out: src/renderer/src/lib/agent-catalog.tsx:57-58 sets the codex label to exactly 'Codex', and AgentStep.tsx:216-218 renders only {agent.label}, so the button's accessible name is now bare "Codex" and the old /^Codex\s/ (which requires trailing whitespace) matches nothing. A grep of tests/e2e/ found no remaining onboarding-card use of the old pattern; the ^Codex hit in tests/e2e/helpers/golden-stub-agent.ts:54 is for the tab-bar menu item and already tolerates a bare Codex.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 20ede7f4-6d2f-41c6-aee0-6c610f352443

📥 Commits

Reviewing files that changed from the base of the PR and between 198fe72 and 2cc9689.

📒 Files selected for processing (3)
  • tests/e2e/golden-core-flows.spec.ts
  • tests/e2e/golden-fresh-profile-terminal.spec.ts
  • tests/e2e/onboarding.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

Five E2E test locators now match the button with the exact accessible name Codex. This replaces regular-expression matching that required whitespace after Codex.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 2cc96

The E2E tests now select the rendered Codex button by its exact English name. No actionable merge-blocking risk remains in this change.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description covers the change, cause, rationale, testing status, visual proof, scope, and checklist. The linked issue is marked N/A because this is a maintainer fix, which matches the template's s…
Title check ✅ Passed The title is concise and accurately describes the main change: E2E tests now select the onboarding Codex card by its exact accessible name.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brennanb2025
brennanb2025 merged commit 9912042 into main Oct 1, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant