Problem
src/ui/results.ts's detached/expanded-result-view rerun() (the Data Pane
Expand's own standalone re-run, around src/ui/results.ts:1009) checks
app.conn.ensureFreshToken() before running, and on failure does only:
if (!(await app.conn.ensureFreshToken())) {
if (myGen === gen && !closed) settle('Not signed in');
return;
}
Unlike every other ensureFreshToken/getToken call site in the app —
net/ch-client.ts's authedFetch, workbench-session.ts, export-service.ts,
schema-graph-session.ts, app.ts, and
dashboard/application/dashboard-viewer-session.ts's own preflight() (which
explicitly calls deps.onAuthFailed?.() on the same failure) — this path
never notifies onSignedOut/onAuthFailed. It only shows a local "Not
signed in" message on the detached view itself.
Impact
If a user's only current activity is refreshing a detached/expanded panel
when the OAuth token (and its refresh token) have both died, nothing ever
tells the connection session the session is over: no teardown runs
(Workbench/graph/export/catalog/doc pane), and the login screen never
renders — the detached view just sits showing "Not signed in" while the
rest of the app still presents as signed in, until some other action
happens to hit the same expired token and correctly routes into
chCtx.onSignedOut.
This predates #502/#520 — it's a third, differently-shaped instance of the
same family of bug (a preflight check that doesn't route into the shared
teardown), not something introduced by either of those fixes.
Suggested fix
Either call an injected onAuthFailed-style hook here too (mirroring
dashboard-viewer-session.ts's preflight()), or make an explicit,
documented product decision that a detached view's own refresh failure is
deliberately scoped and must never force a global sign-out — in which case
that decision (and why) belongs in a comment at this call site, the way
connection-session.ts's ensureFreshToken doc comment already explains
the analogous choice for Dashboard tiles.
Problem
src/ui/results.ts's detached/expanded-result-viewrerun()(the Data PaneExpand's own standalone re-run, around
src/ui/results.ts:1009) checksapp.conn.ensureFreshToken()before running, and on failure does only:Unlike every other
ensureFreshToken/getTokencall site in the app —net/ch-client.ts'sauthedFetch,workbench-session.ts,export-service.ts,schema-graph-session.ts,app.ts, anddashboard/application/dashboard-viewer-session.ts's ownpreflight()(whichexplicitly calls
deps.onAuthFailed?.()on the same failure) — this pathnever notifies
onSignedOut/onAuthFailed. It only shows a local "Notsigned in" message on the detached view itself.
Impact
If a user's only current activity is refreshing a detached/expanded panel
when the OAuth token (and its refresh token) have both died, nothing ever
tells the connection session the session is over: no teardown runs
(Workbench/graph/export/catalog/doc pane), and the login screen never
renders — the detached view just sits showing "Not signed in" while the
rest of the app still presents as signed in, until some other action
happens to hit the same expired token and correctly routes into
chCtx.onSignedOut.This predates #502/#520 — it's a third, differently-shaped instance of the
same family of bug (a preflight check that doesn't route into the shared
teardown), not something introduced by either of those fixes.
Suggested fix
Either call an injected
onAuthFailed-style hook here too (mirroringdashboard-viewer-session.ts'spreflight()), or make an explicit,documented product decision that a detached view's own refresh failure is
deliberately scoped and must never force a global sign-out — in which case
that decision (and why) belongs in a comment at this call site, the way
connection-session.ts'sensureFreshTokendoc comment already explainsthe analogous choice for Dashboard tiles.