Ghostlight/web
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens ce382a8557 Cut 15: subscribe to revisions after any sign-in, not only the redirect flow, and keep a poll fallback (PA.f191)
main.ts subscribed to the api/eve/events revision stream exactly once, in an
`if (api.hasAuthenticatedSurface())` check that ran right after host.start()
and the redirect-flow resumeHeimdallAccess() call resolved. authenticatedSurface
reflects whatever the *last* surface() fetch saw, and it can flip from false
to true well after that point: a player who signs in through the in-page gate
(heimdall.auth_completion_status.v1, resolved entirely inside the vendored
host's own submit()/refresh() cycle, on its own 100ms-later timer) never
retriggers that one-shot check. That tab never got a revision subscription
for the rest of the session, so every answer after the first was refused as
stale and the card looked frozen.

trySubscribeToRevisions() replaces the one-shot check: idempotent, called
after host.start(), after the redirect flow's own refresh, and on a 2s
recheck interval, since main.ts has no direct hook into the in-page flow's
own completion moment.

pollMs moved from 0 to 5000: the app relied entirely on SSE for live
updates, so a dropped stream (closed by an intermediary, or simply never
subscribed) had no fallback at all. The vendored host's own poll already
no-ops when the surface version has not moved, so this is a low-frequency
safety net, not a second primary channel.

Verified: npm run typecheck (clean) and npm test (3/3, unchanged) in web/.
No headless-browser harness exists for main.ts's transport/host wiring; this
was verified by tracing the vendored host's own submit()/refresh()/consumeCommandResult
control flow (vendor/eve/packages/eve-browser-lowering/dist/index.js) against
the fix, not by an automated end-to-end test. Flagging as a follow-up in the
Cut 15 report rather than adding test infrastructure out of scope for this cut.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-23 05:32:17 +02:00
..
src Cut 15: subscribe to revisions after any sign-in, not only the redirect flow, and keep a poll fallback (PA.f191) 2026-09-23 05:32:17 +02:00
test Complete Heimdall auth across browser return contexts 2026-08-22 11:43:42 +02:00
index.html Lower Ghostlight as one Eve-native surface 2026-08-22 02:05:01 +02:00
package-lock.json Lower Ghostlight as one Eve-native surface 2026-08-22 02:05:01 +02:00
package.json Complete Heimdall auth across browser return contexts 2026-08-22 11:43:42 +02:00
tsconfig.json Type-check the browser release build 2026-08-18 23:00:26 +02:00
vite.config.mjs Lower Ghostlight as one Eve-native surface 2026-08-22 02:05:01 +02:00