Fixed a type error in the active-visitors hook test - #30345
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: QUIET Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (13)
🧰 Additional context used📓 Path-based instructions (6)Review Admin UI for existing Shade reuse, correct component layer, semantic⚙️ CodeRabbit configuration file Files:
Review whether tests prove changed behaviour, meaningful error/edge paths, and⚙️ CodeRabbit configuration file Files:
Review lens: "where does this data become trusted?"⚙️ CodeRabbit configuration file Files:
Prioritise concrete correctness, security, data-integrity, compatibility,⚙️ CodeRabbit configuration file Files:
Type-safe boundaries: Fail only if the PR:📄 CodeRabbit inference engine (Custom checks) Files:
Always use `pnpm`, never npm or Yarn.📄 CodeRabbit inference engine (AGENTS.md) Files:
🔇 Additional comments (1)
WalkthroughThe Merge Risk: ⚪ Minimal · up to This localized test-only change widens the inferred props type so the existing undefined-config case typechecks without changing hook behavior. The package typecheck and 14 hook tests pass, so no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
Full details: Type-Safe BoundariesExplanation PASS. The PR changes one line in Full details: New Files Are TypescriptExplanation PASS: The pull request changes only the pre-existing TypeScript file ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 8m 50s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin-x-f... |
✅ Succeeded | 3m 2s | View ↗ |
nx run ghost-admin:test |
✅ Succeeded | 2m 51s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 23s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 2m 6s | View ↗ |
nx run-many -t lint -p @tryghost/admin-x-framew... |
✅ Succeeded | 1m 52s | View ↗ |
nx run @tryghost/activitypub:test:acceptance |
✅ Succeeded | 53s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | <1s | View ↗ |
nx run @tryghost/e2e:test:fixtures |
✅ Succeeded | <1s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-08-27 12:54:59 UTC
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #30345 +/- ##
=======================================
Coverage 75.91% 75.91%
=======================================
Files 1671 1671
Lines 159291 159291
Branches 19362 19362
=======================================
Hits 120923 120923
Misses 37360 37360
Partials 1008 1008
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

apps/admin-x-frameworkfailedtest:types(tsc --noEmit): inuse-active-visitors.test.ts,renderHookinfers its Props type frominitialProps, which madeconfignon-optional — so thererender({config: undefined})that exercises the empty-site_uuidfallback didn't typecheck, and the package'spnpm testwas red locally.Widened the
initialPropsvalue totypeof statsConfig | undefinedso the inferred Props match the render callback's optional parameter. Test behavior unchanged.Verification:
npx tsc --noEmitclean in the package; the hook suite passes 14/14.