add --setup flag to force re-open first-run setup wizard

- `openFirstRunSetupWindow` accepts a `force` parameter that bypasses the completed-state guard
- `--setup` arg sets `force=true` so the wizard opens even after setup is done
- README and docs updated to document `subminer app --setup` as the explicit setup command
- Fix docs tip: `subminer --setup` → `subminer app --setup`
- Collapse extra launch examples into a `<details>` block in installation.md
This commit is contained in:
2026-04-05 01:29:55 -07:00
parent 8338f27794
commit da0087bba6
3 changed files with 47 additions and 25 deletions

View File

@@ -2318,8 +2318,8 @@ const openFirstRunSetupWindowHandler = createOpenFirstRunSetupWindowHandler({
logError: (message, error) => logger.error(message, error),
});
function openFirstRunSetupWindow(): void {
if (firstRunSetupService.isSetupCompleted()) {
function openFirstRunSetupWindow(force = false): void {
if (!force && firstRunSetupService.isSetupCompleted()) {
return;
}
openFirstRunSetupWindowHandler();
@@ -3238,12 +3238,12 @@ const { appReadyRuntimeRunner } = composeAppReadyRuntime({
handleFirstRunSetup: async () => {
const snapshot = await firstRunSetupService.ensureSetupStateInitialized();
appState.firstRunSetupCompleted = snapshot.state.status === 'completed';
if (
appState.initialArgs &&
shouldAutoOpenFirstRunSetup(appState.initialArgs) &&
snapshot.state.status !== 'completed'
) {
openFirstRunSetupWindow();
const args = appState.initialArgs;
if (args && shouldAutoOpenFirstRunSetup(args)) {
const force = Boolean(args.setup);
if (force || snapshot.state.status !== 'completed') {
openFirstRunSetupWindow(force);
}
}
},
startJellyfinRemoteSession: async () => {