Summary
Silent token refresh strips ?query and #hash from the destination URL, dropping users on a different page than they came from.
Source
P2 follow-up from /ship adversarial review of PR #176 (silent GitHub token refresh).
Details
src/hooks/board/useOrganizationData.ts:65 and src/hooks/board/useRepositoryData.ts:62 (and any other call site) pass window.location.pathname only. Users on /board/abc?filter=open#card-123 land on /board/abc after refresh.
Fix
Pass ${pathname}${search}${hash} instead. sanitizeNextPath already accepts the full string.
Acceptance
Summary
Silent token refresh strips
?queryand#hashfrom the destination URL, dropping users on a different page than they came from.Source
P2 follow-up from
/shipadversarial review of PR #176 (silent GitHub token refresh).Details
src/hooks/board/useOrganizationData.ts:65andsrc/hooks/board/useRepositoryData.ts:62(and any other call site) passwindow.location.pathnameonly. Users on/board/abc?filter=open#card-123land on/board/abcafter refresh.Fix
Pass
${pathname}${search}${hash}instead.sanitizeNextPathalready accepts the full string.Acceptance
/board/abc?filter=open#card-123returns to the same URLuseOrganizationData,useRepositoryData, others)