feat(meticulous): integrate Meticulous session recorder and testing w… - #28
Conversation
…orkflow - Add .env.example for Meticulous project ID and API token configuration. - Create GitHub Actions workflow for Meticulous visual regression tests. - Implement Meticulous recorder script in layout component. - Add utility function to retrieve Meticulous project ID from environment variables. - Define constant for Meticulous recorder script URL.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Meticulous visual regression testing: the app layout conditionally injects a recorder script, environment placeholders are documented, and a new GitHub Actions workflow builds, serves, and runs Meticulous tests. ChangesMeticulous Visual Regression Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/meticulous.yml:
- Line 24: The workflow step using actions/checkout currently leaves the job
token persisted in .git/config, which can be reused by later third-party
actions. Update the checkout configuration in the meticulous workflow to disable
credential persistence for the checkout step, and keep the rest of the job
behavior unchanged. Use the actions/checkout@v4 step as the place to apply the
fix.
- Around line 37-40: The CI build is not passing
NEXT_PUBLIC_METICULOUS_PROJECT_ID, so the recorder gate in
app/[locale]/layout.tsx never activates and the built site is uninstrumented.
Update the Meticulous workflow build step to export
NEXT_PUBLIC_METICULOUS_PROJECT_ID during pnpm build, matching the environment
expected by the layout logic so the recorder snippet is included in the CI-built
app.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ae7a75b3-fc48-4395-ba9a-c66492171c87
📒 Files selected for processing (5)
.env.example.github/workflows/meticulous.ymlapp/[locale]/layout.tsxlib/constants/meticulous.tslib/utils/getMeticulousProjectId.ts
| - name: Build Next.js app | ||
| run: pnpm build | ||
| env: | ||
| NODE_ENV: production |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Pass NEXT_PUBLIC_METICULOUS_PROJECT_ID into the CI build.
app/[locale]/layout.tsx only renders the recorder when NEXT_PUBLIC_METICULOUS_PROJECT_ID is set, but this workflow never exports that variable. The app built here will therefore omit the recorder snippet, so the Meticulous run is exercising an uninstrumented site.
Proposed fix
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
+ env:
+ NEXT_PUBLIC_METICULOUS_PROJECT_ID: ${{ vars.NEXT_PUBLIC_METICULOUS_PROJECT_ID }}
steps:🤖 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/meticulous.yml around lines 37 - 40, The CI build is not
passing NEXT_PUBLIC_METICULOUS_PROJECT_ID, so the recorder gate in
app/[locale]/layout.tsx never activates and the built site is uninstrumented.
Update the Meticulous workflow build step to export
NEXT_PUBLIC_METICULOUS_PROJECT_ID during pnpm build, matching the environment
expected by the layout logic so the recorder snippet is included in the CI-built
app.
Disable checkout credential persistence before third-party actions, drop companion-assets config that caused API 400 errors, and set METICULOUS_BUILD for deterministic CI replays.
|
Addressed CodeRabbit review in 2bf92dd: ✅ ⏭️ Also fixed the CI 400 error by removing |
|
🤖 Meticulous evaluated 1 user flows and took 2 visual snapshots. Meticulous has not yet run on 36c1337 of the main branch and so there was nothing to compare against. If you recently setup Meticulous, this is expected. Meticulous will start reporting comparisons for new pull requests after the next commit to the main branch. Last updated for commit |
…orkflow
Summary by CodeRabbit