feat(greenfield): add Storybook and refresh test tooling - #405
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR replaces browser test sharding with two-partition coverage execution, adds timing inventory validation and pruning, reuses delivery-test fixtures at suite scope, updates test scripts and dependencies, and strengthens agent route readiness assertions. ChangesTest execution and timing management
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
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 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@greenfield/package.json`:
- Line 60: Restore the Effect dependency to version 4.0.0-beta.104 in
greenfield/package.json and update greenfield/bun.lock accordingly, preserving
the version expected by the greenfield documentation and tests.
🪄 Autofix
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7ec14d96-2fee-46dd-baa2-930947178638
⛔ Files ignored due to path filters (2)
greenfield/bun.lockis excluded by!**/*.lockand included by**/*greenfield/docs/generated/packages-and-runtime.mdis excluded by!**/generated/**and included by**/*
📒 Files selected for processing (15)
greenfield/.bun-browser-test-timings.jsongreenfield/.bun-test-timings.jsongreenfield/docs/development/testing-and-prs.mdgreenfield/package.jsongreenfield/scripts/delivery/installProductionSystemdUnits.test.tsgreenfield/scripts/delivery/productionReleaseActivation.test.tsgreenfield/scripts/delivery/productionReleasePublication.test.tsgreenfield/scripts/delivery/systemdProductionServices.test.tsgreenfield/scripts/runBrowserTests.test.tsgreenfield/scripts/runBrowserTests.tsgreenfield/scripts/runCoverage.test.tsgreenfield/scripts/runCoverage.tsgreenfield/scripts/runTestSuite.test.tsgreenfield/scripts/runTestSuite.tsgreenfield/src/browser/agents/AgentsRoute.test.tsx
💤 Files with no reviewable changes (2)
- greenfield/scripts/runBrowserTests.ts
- greenfield/scripts/runBrowserTests.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
- GitHub Check: backend-checks
- GitHub Check: frontend-checks
- GitHub Check: dashboard-checks
- GitHub Check: Analyze JavaScript and TypeScript
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-08-07T17:05:36.638Z
Learnt from: mira-2026
Repo: rajohan/Mira-Dashboard PR: 397
File: greenfield/src/server/domains/agents/service.test.ts:225-239
Timestamp: 2026-08-07T17:05:36.638Z
Learning: In Bun test files, write rejection assertions as `expect(promise).rejects...` without `await`. The repository's installed matcher types return `void`, and ESLint's `typescript(await-thenable)` rule rejects awaiting these matcher assertions.
Applied to files:
greenfield/scripts/runTestSuite.test.tsgreenfield/scripts/delivery/systemdProductionServices.test.tsgreenfield/scripts/runCoverage.test.tsgreenfield/scripts/delivery/installProductionSystemdUnits.test.tsgreenfield/scripts/delivery/productionReleaseActivation.test.tsgreenfield/scripts/delivery/productionReleasePublication.test.ts
📚 Learning: 2026-08-07T18:47:49.639Z
Learnt from: mira-2026
Repo: rajohan/Mira-Dashboard PR: 398
File: greenfield/src/server/domains/monitoring/catalogErrors.ts:3-3
Timestamp: 2026-08-07T18:47:49.639Z
Learning: In the greenfield TypeScript application, use the pinned Effect version 4.0.0-beta.104 API. Preserve `Schema.Literals` for readonly literal tuples and arrays, and do not replace it with variadic `Schema.Literal(...)` unless the replacement has been validated against the pinned Effect version.
Applied to files:
greenfield/scripts/runTestSuite.test.tsgreenfield/scripts/delivery/systemdProductionServices.test.tsgreenfield/scripts/runCoverage.test.tsgreenfield/scripts/runTestSuite.tsgreenfield/scripts/delivery/installProductionSystemdUnits.test.tsgreenfield/scripts/runCoverage.tsgreenfield/scripts/delivery/productionReleaseActivation.test.tsgreenfield/scripts/delivery/productionReleasePublication.test.ts
🔇 Additional comments (13)
greenfield/src/browser/agents/AgentsRoute.test.tsx (1)
114-120: LGTM!Also applies to: 174-180, 216-216, 256-256, 284-284, 312-312, 346-346
greenfield/.bun-browser-test-timings.json (1)
1-67: LGTM!greenfield/.bun-test-timings.json (1)
1-277: LGTM!greenfield/docs/development/testing-and-prs.md (1)
26-36: LGTM!greenfield/scripts/runTestSuite.ts (1)
2-34: LGTM!Also applies to: 36-102, 161-163
greenfield/scripts/runTestSuite.test.ts (1)
6-7: LGTM!Also applies to: 46-71
greenfield/package.json (1)
26-31: LGTM!Also applies to: 50-52, 62-62, 81-81, 91-91, 101-108
greenfield/scripts/runCoverage.ts (1)
16-22: LGTM!Also applies to: 57-71, 80-115, 174-180
greenfield/scripts/runCoverage.test.ts (1)
12-16: LGTM!Also applies to: 32-49, 94-94, 106-132
greenfield/scripts/delivery/installProductionSystemdUnits.test.ts (1)
1-1: LGTM!Also applies to: 38-65, 79-79
greenfield/scripts/delivery/productionReleaseActivation.test.ts (1)
2-10: LGTM!Also applies to: 63-98, 187-187, 263-263, 325-325, 390-390, 449-449, 521-521, 643-643
greenfield/scripts/delivery/productionReleasePublication.test.ts (1)
1-1: LGTM!Also applies to: 36-37, 54-83, 170-170, 207-207, 235-235
greenfield/scripts/delivery/systemdProductionServices.test.ts (1)
1-1: LGTM!Also applies to: 29-64, 83-83, 224-224
Summary
10.6.0-alpha.4, Vite to8.2.1, and retain the qualified Effect refresh at4.0.0-beta.106Boundaries and behavior
4.0.0-beta.106remains the resolved runtime dependency; architecture references and release-manifest fixtures now match that reviewed pinBehavior and regression coverage
Verification
4.0.0-beta.106ea39d162: 1,580 Bun tests, 278 browser tests, 91.16% coverage, type/lint/format/boundaries/docs/database/audit, and clean-sourcebuild:release6eb53d8cRisk checklist
.envfiles, database dumps, or runtime state committedDeployment / operations
e3b390e7Notes for reviewers
Review production/source isolation, Storybook interaction teardown, real-component state coverage, fail-closed test-runner inventories, and the intentional Effect
4.0.0-beta.106audit alignment. Update the coordinated Storybook package set together when stable 10.6 is available.