Repository navigation
fix(router): preserve joined navigation and clear expired timers - #112
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesPublish the latest joined navigation location when its component becomes available or its shared load fails. Example: Start loading /page?first=1, navigate to /page?second=1 with the same match identity, then reject the loader.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a current-main location mismatch with a focused change, useful regression coverage, and built-package proof; no actionable defects were found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe framework-independent router accepts route definitions, locations, and history adapters, then publishes loading results and observable navigation state. flowchart LR
A[Navigation calls] --> B[Match identity]
B --> C[Shared navigation run]
C --> D[Component and data loading]
D --> E[Match store]
C --> E
A --> F[History adapter]
E --> G[Application subscribers]
Technical reviewBest possible solution: Use the existing navigation run's latest location consistently at component, success, and failure publication. Do we have a high-confidence way to reproduce the issue? The current-main join branch updates ongoing.location while the failure branch publishes its captured first location; the contributor's before trace shows that exact mismatch, though this review ran no target code. Is this the best way to solve the issue? This is the smallest complete fix for the reported mismatch: reuse the location already owned by NavigationRun and preserve match identity, loading, cancellation, and history-adapter contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5acce8720c86. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 20, 2026, 8:12 AM ET / 13:12 UTC. |
Finish shared-load URL publication and immediate cache-expiry cleanup, with regression coverage. Refresh eligible development dependencies while preserving the release-age policy and runtime contract. Co-authored-by: Sebastien Tardif <sebtardif@ncf.ca>
d3762ec to
64eed84
Compare
steipete
left a comment
There was a problem hiding this comment.
Both original regressions reproduced before the fixes. Full package gate (83 tests and packed import), independent P0–P2 review, and exact-head Linux/macOS/Windows CI passed.
What Problem This Solves
Shared navigation loads can publish an old URL after a second navigation joins them. A preloaded route that immediately expires can also leave an armed retention timer after
stop().User Impact
History, active matches, and resolved locations now stay aligned with the latest joined navigation, including while the component becomes visible and when loading fails. Stopping the router clears expired preload timers. Public exports, runtime engines, and zero-runtime-dependency packaging are preserved.
Why This Change Was Made
Finish the fixes from this PR and #114 together: publication uses the inflight navigation's latest location, and immediate cache expiry cancels its previous timer before forgetting it. Refresh eligible development dependencies, including #120, while keeping the two-day release-age policy.
Evidence
Both original regression tests fail on main and pass with the fixes; a third regression covers component publication before the loader settles. Independent P0–P2 review with full source context is clean. The complete package gate covers formatting, build, types, lint, all tests, and packed-package import validation.
Thanks @SebTardif for both fixes and @dependabot[bot] for the dependency update.
Related: #114, #120.