Context
This follow-up task was identified during the review of PR #72.
Source PR: #72
PR Title: feat: lvt-preserve attributes, navigate SPA nav, DOMParser script fix
Suggested by: @claude[bot]
Task Description
The invariant that liveUrlOverride is correctly reset via window.location in handleNavigationResponse after a sendNavigate call is documented in comments but has no test coverage.
Add a test for this navigation sequence:
- Same-pathname
sendNavigate (e.g. /route?s=A → /route?s=B) — sets liveUrlOverride to /route?s=B
- Subsequent cross-pathname fetch navigation (e.g. →
/other-page) — handleNavigationResponse reads window.location and calls connect()
- Assert:
liveUrlOverride reflects the cross-path URL, not the stale same-pathname URL
This confirms the self-correction behavior is working so a future refactor doesn't silently break it.
Original Comment
Missing test for sendNavigate → cross-pathname navigation sequence.
sendNavigate sets this.liveUrlOverride to the same-pathname URL. A subsequent cross-pathname navigation in handleNavigationResponse resets it via window.location.pathname + window.location.search (relying on pushState already having run). This invariant is commented but untested — a test for the sequence /route?s=A → same-pathname sendNavigate → click cross-path → confirm liveUrlOverride is the cross-path URL would be cheap insurance.
This issue was automatically created by prmonitor from PR review comments.
Context
This follow-up task was identified during the review of PR #72.
Source PR: #72
PR Title: feat: lvt-preserve attributes, navigate SPA nav, DOMParser script fix
Suggested by: @claude[bot]
Task Description
The invariant that
liveUrlOverrideis correctly reset viawindow.locationinhandleNavigationResponseafter asendNavigatecall is documented in comments but has no test coverage.Add a test for this navigation sequence:
sendNavigate(e.g./route?s=A→/route?s=B) — setsliveUrlOverrideto/route?s=B/other-page) —handleNavigationResponsereadswindow.locationand callsconnect()liveUrlOverridereflects the cross-path URL, not the stale same-pathname URLThis confirms the self-correction behavior is working so a future refactor doesn't silently break it.
Original Comment
This issue was automatically created by prmonitor from PR review comments.