remove the onboarding flow and the accountMode leftover

Onboarding was dead in three layers:

- The OnboardingAdmin screen was only reachable from a route block in App.tsx
  that has been commented out, so it never rendered. Its ServerTypeCard carried
  accountMode ('organization' | 'single'), inherited from the codebase this was
  based on and meaningless for a single-user platform.
- Two /onboarding-complete endpoints, one public and one protected, that no
  frontend code called. Both read a server_config key that was never written, so
  both answered false while the app's own path defaulted to true.
- HomeScreen gated on settings.onboarding.complete to show a welcome panel, and
  seedHomeDir created an Onboarding folder from DATA_PATH/Onboarding and
  /Onboarding_Admin — neither seed directory exists, so it only ever produced an
  empty folder.

Also drops the onboarding key from UserSettings and the now-empty home-header
panel from the default home layout.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
brunorezio
2026-07-25 23:30:20 +01:00
co-authored by Claude Opus 5
parent 10400310c5
commit 1ac79f9c68
15 changed files with 1825 additions and 382 deletions
@@ -8,8 +8,6 @@ type AIHarnesses = {
};
type ServerSettings = {
onboardingComplete?: boolean;
accountMode?: 'organization' | 'single';
aiHarnesses?: AIHarnesses;
plugins?: Record<string, boolean>;
};
@@ -25,8 +23,6 @@ export const useServerSettings = () => {
queryFn: () => client.get<ServerSettings>('/server-settings/settings'),
});
const onboardingComplete = settings?.onboardingComplete ?? true;
const accountMode = settings?.accountMode;
const aiHarnesses = settings?.aiHarnesses;
const plugins = settings?.plugins;
const saveSettings = useCallback(
@@ -37,5 +33,5 @@ export const useServerSettings = () => {
[client, queryClient],
);
return { onboardingComplete, accountMode, aiHarnesses, plugins, isLoading, saveSettings };
return { aiHarnesses, plugins, isLoading, saveSettings };
};
-7
View File
@@ -16,7 +16,6 @@ const mergeWithDefaults = (saved: Partial<UserSettings>): UserSettings => ({
appearance: { ...DEFAULT_SETTINGS.appearance, ...saved.appearance },
languages: { ...DEFAULT_SETTINGS.languages, ...saved.languages },
tts: { ...DEFAULT_SETTINGS.tts, ...saved.tts },
onboarding: { ...DEFAULT_SETTINGS.onboarding, ...saved.onboarding },
});
export const useSettings = () => {
@@ -77,9 +76,6 @@ export type UserSettings = {
tts: {
voice: string | null;
};
onboarding: {
complete: boolean;
};
};
export type UserState = Record<string, unknown>;
@@ -113,7 +109,4 @@ export const DEFAULT_SETTINGS: UserSettings = {
tts: {
voice: null,
},
onboarding: {
complete: false,
},
};