laststance / laststance/gitbox
Preserve query and hash on silent refresh redirect
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 2
- Avg merge
- 6h 9m
- Merged PRs (30d)
- 2
Description
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
- Refresh on
/board/abc?filter=open#card-123returns to the same URL - All call sites updated (
useOrganizationData,useRepositoryData, others) - No regression in existing refresh flow tests
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/hooks/board/useOrganizationData.ts:65 and src/hooks/board/useRepositoryData.ts:62, then find any other silent refresh call sites. Run the existing refresh flow tests and verify that refreshing /board/abc?filter=open#card-123 returns to the same URL without regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100