Repository navigation
feat: permissions widget, bearer-only SSE client, app-level notifications - #1
Merged
Merged
Conversation
…nd failover - permissions: header widget (Sheet CRUD, pagination, optimistic-lock version) with one shared data layer feeding the users roles combobox; mutations refetch via refetchQueries — no redux event spine - sse: fetch-based bearer client (no EventSource, no tickets, no credentials in URLs — BE ADR-0007); generation guard, 45s silence watchdog, wake recovery, token_expired/logged_out termination contract; ticket lib removed - backend-down UX: per-component, no global health state — failed refresh keeps cached rows (data ?? previousData) with a short stale notice + Retry; nothing cached -> error card + Try again; copy generic and production-appropriate; never a Not Found swap, never toast spam - notifications provider owns the single app-level stream; users page state lives in the URL - tests: 75 passing (Vitest + RTL + MSW); E2E-verified live incl. SIGTERM graceful-shutdown badge flip and cross-surface recovery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four commits on top of
main: realtime live-updates, a permissions widget, and backend-failure UX rework.src/providers/notifications.tsx+src/hooks/useSseUsers.ts) gated on auth state; generation-counter supersession, 45s silence watchdog on top of server heartbeats, auto-recovery ononline/tab-visible, and thetoken_expired/logged_outtermination contract (remote logout locks every route viaexpireSession()).getAccessToken()proactively refreshes before every REST/GraphQL request.refetchQueries; users freshness comes from the server's singleUSERS_SYNCEDSSE broadcast per mutation (no local invalidation racing the async fan-out).previousDataon failed refreshes, no toast spam.page/size/sort/desc) and the cross-feature redux event spine removed in favour of the shared data layer + stream invalidation..credentialsrule.Validation
bun run check— 0 errors (pre-existing warnings only)bun run test— 9 files, 75 tests passedUSER_CREATED/UPDATED/DELETED), permission rename/delete → users-table chips update on the singleUSERS_SYNCEDbroadcast, reconnect-after-outage catch-up viaonConnectrevalidation, dark mode, pl/en, responsive at 375–1280 with no horizontal overflow, clean console.