fix: avoid terminal cold-start paywall race

This commit is contained in:
2569718930@qq.com
2026-05-30 14:48:09 +08:00
parent 1c250906ed
commit c79619898a
4 changed files with 58 additions and 2 deletions
@@ -76,4 +76,10 @@ export function runTests() {
signedOutBlock.indexOf("setProAccess(createEmptyAccess(false))"),
"terminal auth listener must re-check the current Supabase session before clearing access on SIGNED_OUT events",
);
assert(
dashboardSource.includes('event === "INITIAL_SESSION"') &&
dashboardSource.indexOf('event === "INITIAL_SESSION"') <
dashboardSource.indexOf('event === "TOKEN_REFRESHED"'),
"terminal auth listener must hydrate access from Supabase INITIAL_SESSION events during first navigation from the landing page",
);
}