Repository navigation
fix(auth): sync logout and profile changes across tabs (#124) - #194
lawalajose wants to merge 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@lawalajose This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-web.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared files like Automated message. It won't repeat unless the PR conflicts again after your next push. |
Resolve ROADMAP/ARCHITECTURE conflicts and move the changelog entry to changelog.d per the new convention. Keep SessionSyncBridge alongside the configurable Router.
|
@lawalajose Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@lawalajose This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-web.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@lawalajose CI is failing on this branch: Either call them, which I'd expect for a cross-tab logout broadcast, or remove the imports. Then run |
|
@lawalajose This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-web.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
What changed
Adds token-free
BroadcastChannelsynchronization for logout and acting-for profile changes. A logout clears auth, profile, and React Query state in every listening tab; profile changes carry only the profile ID and are applied without rebroadcasting. Browsers withoutBroadcastChannelkeep working as single-tab sessions. Mocked-channel tests cover received events, payload privacy, deferred profile selection, fallback behavior, and cleanup.This progresses #124 but does not close it: refresh single-flight is not implemented because the required
POST /auth/refreshflow from #9 is still open and absent from the base branch. No access tokens are sent over the channel.Which ROADMAP.md item does this close/progress?
closes #124
Progresses the W7 multi-tab session sync item for #124; refresh coordination remains blocked on #9.
Docs updated in this PR (check all that apply)
Validation:
npm run typecheck— passed.npx vitest run src/hooks/useSessionSync.test.ts— passed (6 tests).npm test— passed (41 files, 379 tests).npm run build— passed, with existing malformed-CSS and >500 KB chunk warnings.npm run check:dist— passed.package.json.No screenshots: this PR changes no screen or visual UI.