You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mdxg router spec runs composable outside a component instance #587
In every reviewed Test run from 37579687657 (attempt 1, 2026-10-07T06:06Z) to 37807825636 (attempt 1), job site / test, step Run pnpm test:run, modules/mdxg/test/document-router.spec.ts emits [Vue warn]: onBeforeUnmount is called when there is no active component instance 7 times per run (112 total) because the spec calls useMdxgDocumentRouter outside setup, so the cleanup hook never registers and each test leaks a popstate listener on window.
Target:modules/mdxg/test/document-router.spec.ts
Verify with:pnpm exec vitest run modules/mdxg/test/document-router.spec.ts 2>&1 | grep -c 'onBeforeUnmount is called' returns 0
Estimated to change 1 file.
The ci-review routine opened this issue automatically on its 2026-10-08T21:00:00.000Z run. It is not Harlan's own report. Close it to reject the proposal, and the reason you give stops it being offered again.
Summary: Confirmed by code inspection: useMdxgDocumentRouter (modules/mdxg/src/runtime/composables/useMdxgDocumentRouter.ts:171-176) registers a window popstate listener and removes it in onBeforeUnmount, but all 7 tests in modules/mdxg/test/documen
Next action: In modules/mdxg/test/document-router.spec.ts, wrap each useMdxgDocumentRouter call in a mounted dummy component (withSetup helper that creates and mounts an app, returning the composable result and an unmount fn), then verify: pnpm exec vitest run modules/mdxg/test/document-router.spec.ts 2>&1 | grep -c 'onBeforeUnmount is called' returns 0.
Activity
harlan-github-agent commentedon Oct 8, 2026
🤖 ISSUE TRIAGE