fix(web): restore test harness compatibility - #664
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan includes up to 2 reviews per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR updates three frontend tests. It mocks overlay preferences, adds a conditional ChangesFrontend test harness
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This change restores compatibility in three web test harnesses without changing application behavior, dependencies, or production configuration; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Problem
The Web CI job on current
mainstops during typechecking because the intro-skip test stores an untyped Vitest mock where the hook requires a callable seek function. Once typechecking proceeds, two existing component test harnesses also fail:SeasonContentreaches the overlay preferences hook without its query context, andServerStorageSteprenders a Radix control without jsdom's missingResizeObserverAPI.Approach
Keep the fix test-only:
(seconds: number) => booleansignature.SeasonContentunit test, which does not exercise overlay behavior.ResizeObserverused by neighboring Radix component tests.No production code, dependencies, or runtime behavior change.
Verification
pnpm run buildpasses.pnpm run lintreports 0 errors and 151 existing warnings.pnpm run format:checkpasses.git diff --check origin/main...HEADpasses.Risks & follow-up
Low risk. This only restores the test environments and strengthens a mock type; application code is untouched.
After merge, PRs #336 and #368 can be rebased to pick up the fix and return their Web checks to green.
AI-use disclosure
Implemented with a combination of Claude Code and Codex assistance, with human oversight.
Summary by CodeRabbit
ResizeObserver.