Q176: onboarding progress survives a restart, and an unfinished setup reopens

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-09 05:25:01 -04:00
1 parent 43dcb1e7d3
commit fd79f059ca
20 files changed
+341 -71

No files matched your search

@@ -0,0 +1,9 @@
// Onboarding survives a restart: the unfinished wizard (never its key) and whether a created company finished setup; existing companies are done.
export const onboardingProgressSchema = `
alter table app_state add column onboarding_draft_json text;
alter table organizations add column setup_completed_at text;
update organizations set setup_completed_at = created_at;
insert into schema_migrations(version, name, applied_at)
values (105, 'onboarding_progress', datetime('now'));
`;
+2
View File
@@ -103,6 +103,7 @@ import { taskBlockedSchema } from "./migrations/101-task-blocked";
import { goalDueDateSchema } from "./migrations/102-goal-due-date";
import { workVerdictsSchema } from "./migrations/103-work-verdicts";
import { workLanguageSchema } from "./migrations/104-work-language";
import { onboardingProgressSchema } from "./migrations/105-onboarding-progress";
interface Migration {
version: number;
@@ -215,6 +216,7 @@ const MIGRATIONS: Migration[] = [
{ version: 102, name: "goal_due_date", sql: goalDueDateSchema },
{ version: 103, name: "work_verdicts", sql: workVerdictsSchema },
{ version: 104, name: "work_language", sql: workLanguageSchema },
{ version: 105, name: "onboarding_progress", sql: onboardingProgressSchema },
];
const SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1].version;