ci: add build + e2e gate on PRs, pin node 20 - #300
Conversation
- lint.yml -> CI workflow: lint (renamed from submit), build (wxt build), e2e (Playwright via xvfb) - triggers on pull_request -> main and push -> main - engines.node 20.x so local and CI agree Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Runtime and CI validation package.json, .github/workflows/lint.yml |
Declares Node.js 20.x, updates CI triggers and linting, and adds build and Playwright end-to-end jobs. |
Onboarding selectors and password setup ui/full-page/create-password/CreatePasswordPage.tsx, ui/full-page/welcome/WelcomePage.tsx, tests/pages/setup-password.ts, tests/onboarding.spec.ts |
Adds stable onboarding IDs and changes password setup tests to wait for the in-place screen without using an extension route. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately summarizes the main changes: adding build and e2e CI gates for PRs and pinning Node.js 20. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| 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. |
✨ Finishing Touches
📝 Generate docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
ci/build-e2e-gate
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.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/lint.yml (1)
42-43: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winUse
npm cifor CI dependency installs.
package-lock.jsonis committed, so replace thenpm installsteps in.github/workflows/lint.ymlwithnpm ciat lines 21, 43, and 60. This keeps CI installs deterministic and lockfile/package-consistent without rewriting the lockfile.♻️ Proposed fix
- run: npm install + run: npm ci🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/lint.yml around lines 42 - 43, Replace every npm install dependency-install step in the workflow, including the steps near lines 21, 43, and 60, with npm ci. Keep the existing step structure unchanged so CI uses the committed package-lock.json deterministically.Source: MCP tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/lint.yml:
- Around line 1-10: Add a workflow-level permissions block to the CI workflow,
granting only contents: read for the GITHUB_TOKEN. Place it alongside the
top-level name/on configuration, before jobs, and leave the lint job behavior
unchanged.
- Line 35: Update both actions/checkout@v4 steps in the workflow to set
persist-credentials to false, ensuring the GitHub token is not retained for
subsequent job commands.
---
Nitpick comments:
In @.github/workflows/lint.yml:
- Around line 42-43: Replace every npm install dependency-install step in the
workflow, including the steps near lines 21, 43, and 60, with npm ci. Keep the
existing step structure unchanged so CI uses the committed package-lock.json
deterministically.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: 80b4acd8-fccd-4521-97f7-6c2321488a05
📒 Files selected for processing (2)
.github/workflows/lint.ymlpackage.json
- restore #onboarding / #pass-onboarding ids on WelcomePage - add #setup-password-screen id on CreatePasswordPage - SetupPasswordScreen no longer navigates to removed #/setup route Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- permissions: contents: read at workflow level - persist-credentials: false on all checkout steps - npm install -> npm ci; sync lockfile engines field Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai All review comments addressed in a24e70d:
Verified: 🤖 Generated with Claude Code |
|
Tip For best results, initiate chat on the files or code changes.
🐇 ✅ If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
What
lint.yml→CIworkflow with three jobs, triggered onpull_request→ main andpush→ main:lint(renamed fromsubmit): prettier + eslint + tsc, unchanged stepsbuild(new):npm run build— real WXT production build, catches build breaks a typecheck missese2e(new): builds the extension,npx playwright install --with-deps chromium, thenxvfb-run npm run e2e— the fixtures launch headed Chrome with the MV3 extension loaded, so xvfb provides the displaypackage.json:engines.node: 20.xso local and CI agreee2e status: wired in AND green ✅
The test had never run anywhere, and it had rotted: onboarding was rebuilt as a step-based wizard, so
#onboarding/#pass-onboarding/#setup-password-screenno longer existed and the#/setuproute was gone. Fixed in this PR (12 lines): restored the three ids onWelcomePage/CreatePasswordPage, andSetupPasswordScreenno longer navigates to the removed route. Passes locally (~6s) and in CI.Branch protection (Leo, run after merge)
e2e ran green on first fixed attempt; if it ever turns flaky, drop its line from the command above and re-run — lint + build stay the hard gate.
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests
Chores