Resolve account subscription sync state

This commit is contained in:
2569718930@qq.com
2026-06-14 05:28:48 +08:00
parent 0084235b57
commit e783f35a4f
4 changed files with 60 additions and 1 deletions
@@ -259,6 +259,13 @@ export function runTests() {
hookSource.includes("retriedBackendJson"),
"account snapshot loader must retry with a refreshed Supabase token when local user exists but /api/auth/me reports unauthenticated",
);
assert(
hookSource.includes("shouldResolveAccountUnknownWithFullProfile") &&
hookSource.includes("backendJson = await readAuthSnapshot(latestHeaders);") &&
hookSource.indexOf("shouldResolveAccountUnknownWithFullProfile") <
hookSource.indexOf("setBackend((previous) => mergeAccountAuthSnapshot(previous, backendJson))"),
"account snapshot loader must resolve unknown entitlement-scope results through full auth/me before rendering account status",
);
assert(
hookSource.includes("refreshEntitlementAfterPayment") &&
paymentFlowSource.includes("refreshEntitlementAfterPayment") &&