Repository navigation
Description
Problem
A failed background refresh of the caller's membership (GET /members/me) leaves its last good result in the cache. The dashboard still treats that failure as "access is loading", and never ends that state. The member sees a blank Knowledge page and permanent skeletons on Governance, Metrics and most Settings pages, with no message and no Try again. Paths at main 4cde0834a, under services/platform/app/.
- The flag.
routes/dashboard/$id.tsx:226setsconst isLoading = isAuthLoading || isQueryLoading || isError;. This value goes to every page asAbilityLoadingContext(:306). - The only error screen needs an empty cache.
:264shows the "error loading page" alert with Try again onlyif (isError && !memberContext). After a refresh fails, TanStack Query keeps the oldmemberContext, so this screen never shows. The role logic at:205-214keeps the last known role during a refresh, so the shell and navigation look healthy. - What the pages do with the flag:
- Knowledge:
routes/dashboard/$id/_knowledge.tsx:59renders{!abilityLoading && <Outlet />}, so every Knowledge tab's content is empty under an intact header. - Governance (
settings/governance/route.tsx:64-72) and Metrics (settings/metrics/route.tsx:61): the content pane is a skeleton. - Settings: Organization, Branding, Connectors, Providers, Data residency, Enterprise SSO, API (
use-api-settings-access.ts:47) and Sandboxes all wrap their content inSkeletonize loading={abilityLoading || …}.
- Knowledge:
- When it happens:
- The
/eventshint stream invalidates the member context on any member change in the organization (useBackendHints,:122), for example someone joining or a role change. - The query refetches after its 5-minute stale window (
router.tsx:39) whenever an observer remounts. - A failure during any of these refreshes starts the state. Transport faults retry 3 times first. A structured server error (
isStructuredBackendError, any error withdata) fails at once and is not retried on window focus (router.tsx:45-47). The page then stays blank until another member change or a full reload. - PR fix(platform): hold up under a load burst and a database restart #4853 shows the server does return such errors during load bursts and database restarts.
- The
Why nothing catches it: routes/dashboard/dashboard-layout.test.tsx:387-407 ("keeps outlet visible when query errors but has previous data") covers this exact state, but only asserts that the layout's own outlet renders. It never reads AbilityLoadingContext, which is still true, so it misses the pages under the outlet blanking themselves. The :205 comment shows the shell is meant to keep the last known role through a refresh; counting isError as loading undoes that for the pages.
Expected
- A failed refresh with a cached member context is not "loading". Keep the last known role and render the page. Add a non-blocking notice ("Couldn't refresh your access") with Try again, which calls
refetch. - Show the full-page error only when there is no cached context (the current
:264case). - Regression: extend the
:387case so it assertsuseAbilityLoading()isfalseunder the outlet and that a retry affordance is visible. Add a Knowledge layout test withabilityLoadingderived from the same state. On4cde0834athe flag istrue, and the Knowledge content is empty.
Severity and owner
- Severity: medium. The trigger is a transient backend fault during an ordinary membership refresh. The member gets no explanation and no way out except reloading. It affects about a dozen surfaces at once.
- Owner: platform (dashboard shell, access context).
- Found by: Review A (TALE-358), 2026-10-12 16:15 Zurich occurrence. A worker raised it as lead K1 at 08:15; I verified it at
4cde0834aacross all 17useAbilityLoadingconsumers. Automations is not affected, because its gate returns its children when the retained role allows. Members, Teams and Audit logs only use the flag for the access check. This is static reading; I didn't run it, because Review A's stack is BLOCKED.
Activity