mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 22:32:04 +00:00
test(onboarding): the AI panel names the variant it settled on
The panel paints before its status query answers, and every variant inside it is conditional, so an assertion that a variant is absent could pass on a question that had simply not been answered yet — which is how the journey for the unmeasured-provider case passed on a retry against the very defect it was written to catch. The panel now carries the variant it settled on, absent until it has settled, and the three journeys wait on that instead of racing it. The third journey covers the state a freshly deployed instance is in before its first AI call: no offer, and no claim of an outage either.
This commit is contained in:
1 parent
41596d1cb8
commit
34caeeea3c
4 files changed
+92
-3
No files matched your search
@@ -117,6 +117,23 @@ export async function seedSharedProviderResult(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The ledger holds nothing for either shared tag, with the operator's key
|
||||
* still in place: a brand-new instance before its first AI call, which is
|
||||
* what every deployment looks like until somebody makes one.
|
||||
*/
|
||||
export async function clearSharedProviderResult(): Promise<void> {
|
||||
const pool = connect();
|
||||
try {
|
||||
await pool.query(
|
||||
`DELETE FROM provider_health
|
||||
WHERE provider_type IN ('admin-openai', 'admin-codex')`,
|
||||
);
|
||||
} finally {
|
||||
await pool.end();
|
||||
}
|
||||
}
|
||||
|
||||
/** No receipt on file — the state a fresh account reaches the screen in. */
|
||||
export async function clearAiConsent(username: string): Promise<void> {
|
||||
const pool = connect();
|
||||
|
||||
Reference in new issue
Block a user