Skip to content

feat(desktop): two-step setup wizard with chosen sign-in - #762

Draft
Kilyn544 wants to merge 8 commits into
mainfrom
feat/setup-two-step-wizard
Draft

Kilyn544 wants to merge 8 commits into
mainfrom
feat/setup-two-step-wizard

Conversation

@Kilyn544

@Kilyn544 Kilyn544 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #715
Fixes #757
Linear: WHI-1020, WHI-1036

What changes for the user

Desktop setup is two short steps in the same 760×660 window. The main button stays in the same place throughout.

  • Loader: a plain spinner while Linger checks this computer. The setup tools download stays hidden.
  • Step 1: three cards, each a title and one line: Local model, BYOK and Subscription. There are no subtitles, tags, badges or "Private to this computer" pill.
  • Step 2: only what the chosen source needs, plus Back and Install.
    • Local model: the model's name and size.
    • Subscription: Claude Code and Codex, each a name and one status line, read live from this computer: Not installed, Installing (with a bar), Not signed in, Signing in…, Signed in. There is no Pi row; the installer installs Pi by itself when a source needs it. Install is enabled once one of them is signed in.
    • BYOK: URL, API key and Model ID. Install first tests the endpoint quietly. If the test fails, one short line appears ("Couldn't reach this URL.", "This API key was refused.", …).
    • BYOK and Subscription offer "Also download the local model", off by default.
  • Installing: one progress bar with one short line under it that changes as the install moves on: "Downloading Linger", "Setting up your workspace", "Creating your account", "Connecting this computer", "Waking up your agents". The line shows no sizes, so it can't disagree with the bar. There is no checklist and no timings. The scene is centred and the orb is the Linger brand orb. The local-model download is folded into that line. While the local model downloads, a link offers to switch to Subscription or BYOK.
  • Error: a short message and a single Report issue button. When the installer stops answering, the message reads "Couldn't reconnect to the installation." (zh-CN too) and no longer asks to try again, since there is no retry. It uses main's diagnostics flow, including the consent dialog, and shows the report ID afterwards. Quitting and reopening returns to step 1, and installing again works.
  • Account (Desktop setup: let users choose their own sign-in name and password #757): setup asks nothing about the account.
    • A new installation's owner is admin@gmail.com with a generated password. Existing and upgraded installations keep their own account.
    • On the ready screen, "Sign-in details" is collapsed by default. Expanded, it shows the email (read-only, with Copy) and the password (Show and Copy), plus Change password.
    • Change password posts POST /v0/account/password and only then updates the saved login in local-account.json. Desktop's automatic sign-in keeps working. The password is never logged.
  • All copy goes through i18n, with zh-CN included.

Round 4: motion, the model picker, free space

  • Welcome: the orb drops in with a small bounce, then the title settles under it.
  • Welcome → Choose your AI: the orb flies from the welcome position to its step-1 spot on a soft spring (about 0.7 s), shrinking as it goes, so it no longer snaps to the small size. The three cards then rise in one after another.
  • Local model picker: the model card shows the name with its build ("Inkling 2 Mini · Standard"), one line about why it fits, ≈ quality, ~ speed marked "est.", download size and a memory bar. The bar's legend reads macOS & apps · the model · Free; "macOS & apps" is the memory the system holds right now (total minus the kit's ram_available_bytes). Change opens a sheet that slides up with every model this Mac can run:
    • no subtitle under the sheet title; the build sits in each row's title line;
    • quality and speed are real bars, not dots; estimates carry ~ and "est.";
    • a Best fit chip and a Fastest chip appear only when the hardware report names them;
    • models that don't fit sit at the bottom, dimmed and disabled, with "Needs a 96 GB Mac" (or what they need); the list fades out at the bottom edge.
  • Installing → Ready (about 1.4 s): the progress bar dissolves into the orb, the orb blooms with one ripple, the check draws itself and the title rises. No confetti. Install and ready use the brand orb; step 2 keeps the orb of the chosen source.
  • Reduced motion: with "Reduce motion" on, nothing flies, bounces or ripples; screens just fade.
  • Free space (main's 0783e11, ported): the install location is not shown by default. Main's disk pre-check is the trigger: when the disk is short of room, or the location itself fails, the location row appears inline on step 2 with main's own warning ("Needs 37 GB free; this disk has 29 GB." or the location error), the rejected path when there is one, and Change… / Reset. Install stays disabled until it's resolved. The local model's size counts only when Local is the source (the picked model priced by its own check, otherwise the kit's pick), so BYOK and Subscription on the same disk show no warning. When the row shows, step 2 drops its small title orb and the model's one-line pitch so everything still fits above the buttons.

Where the picker's data comes from

All real, from the installed kit on this Mac:

  • library status --json: the models, whether each one fits, and what a model that doesn't fit needs.
  • stack hardware --json: quality, decode speed and the smartest / fastest picks.
  • stack plan --llm … --offline --json for the picked model: its real disk size and whether it can run.

Install passes the local model only when one was picked from the list; otherwise the kit picks as before.

How it's wired

  • setup-sources.ts runs the installer's headless commands, which answer in JSON lines: --runtime-status, --prepare-runtime, --runtime-login and --download-local-model. They call main's existing code: managed-runtimes, RuntimeLoginManager and runLocalmodels. Nothing installs to a global location.
  • The default owner email lives in @linger/local-installation (DEFAULT_OWNER_EMAIL). It applies only when local-account.json doesn't exist yet.
  • Change password goes through local.account.password. LocalServer signs in privately, posts the change, signs that session out, and writes the new password next to the old file before renaming it into place (owner-only). It then signs the window in again.
  • Both runtimes: when Claude Code and Codex are both signed in, the job carries linkedRuntimes, and both are configured.

Assumption, please confirm: with both Claude Code and Codex signed in, setup configures both and makes Codex the default runtime.

Overlap and lineage

  • Rebased on main at 6a511c1. A real isolated install on the rebased build reached ready and signed in automatically.
  • 0783e11 overlap (main's "redesign setup install location and pre-check disk space"): it rewrote the same setup page. Its backend is kept as is (local-server free-space check, setup-window location pick / reset / refreshLocationSpace) together with its tests. Its UI is ported into the new step 2 under the owner's rule that the location stays hidden unless there's a problem (see Round 4). Its page tests were adapted to that rule; the one for the always-visible "customize location" toggle no longer applies.
  • Featured Inkling (41760a4): main's Inkling 2 Mini spotlight on the desktop setup page (the featuredInkling flag, its badge and the announcement link) is removed, per the round 3 request for no badges or spotlights. The web installer's SetupChoicePanel keeps it unchanged.
  • PR feat(desktop): allow skipping local model download with direct BYOK setup #303 overlap: feat(desktop): allow skipping local model download with direct BYOK setup #303 (db94c27b) also changes the desktop setup page. This PR does not touch that branch. Whichever lands second will need a rebase of apps/desktop/src/shell/setup.html and setup.messages.ts.
  • Prototype lineage: this is a fresh implementation on current main of the approved prototype (proto/feat-setup-two-steps), not a rebase. The prototype's base, 2226ee3, sits on 23 commits that are not on main, including 3699ef27 and db94c27b / PR feat(desktop): allow skipping local model download with direct BYOK setup #303. Only the UI design was carried over. The wiring is new and uses main's install and login paths.

Screenshots

Same 760×660 window. Before is the previous push (f875a8e). After is this push (af12c47), from a real isolated run with its own HOME, data directory and ports.

Contact sheet: f875a8e2 vs af12c47f

Round 3 → round 4 on the same head: round 3 vs round 4 sheet

Free space: a real disk with 29 GB free. Local (16.1 GB model) shows the row and holds Install; BYOK on the same disk shows nothing.

Local on a short disk BYOK on the same disk

Welcome → Choose your AI (bounce, orb flight, staggered cards):

Welcome to step 1

Installing → Ready (bar into orb, bloom and ripple, check, title):

Install to ready

Full walkthrough, about 1.5 min (the welcome check and the install wait are sped up): welcome → step 1 → Local with the picker → Subscription → BYOK → BYOK error → install → ready → sign-in details.

Walkthrough

MP4: walkthrough · welcome clip · ready clip

Mockup vs real, for checking drift against the approved direction A:

Mockup vs real

Where the build differs from the mockup, on purpose:

  • The picker is a slide-up sheet with bars (round 4 feedback), not the mockup's inline table with dots.
  • Model subtitles use the kit's real wording (maker · size · active parameters · variant).
  • BYOK has no green verified tick or Model ID chevron: the endpoint is tested when you press Install, and there's no model list to choose from yet. After a failed test, Install stays enabled so a fixed URL can be tried again.
  • The error screen shows only Report issue (round 3 decision).
  • Agent cards use the real agent names (Inbox, Assistant).
  • On step 2 the orb's tint follows the chosen source; install and ready use the brand orb.

Notes on the run

  • Real:
    • Runtime status for Claude Code and Codex.
    • The BYOK endpoint test, against a local stub endpoint.
    • The install itself.
    • Change password: the new password signs in, a wrong one is refused, and Open Linger still signs in automatically.
    • Report issue, sent to a local stub upload server. The zip held only logs and config, with no account file.
  • Not real:
    • The multi-GB local model was never downloaded.
    • openExternal was stubbed.
    • The error shot is a real failure in the isolated run, induced on purpose; it reads "Couldn't reconnect to the installation." (the new installer_unreachable failure code).
    • The low-disk shots come from a real 30 GB disk image with 29 GB free; the native folder picker behind Change… couldn't be driven in this environment, so clearing the warning after a new folder is covered by the page tests only.
    • The GPU size is simulated (LOCALMODELS_DEBUG=simulate:vram_gb=24) so the picker shows fitting and non-fitting models; the picker data itself comes from the real kit.

Tests

  • apps/desktop:
    • Full suite: 783 passed, 1 skipped (setup page: 63 tests).
    • Setup page tests cover: the steps, the Install enable rule, runtime install / sign-in / cancel, the short BYOK failure lines, one bar with a changing line, the error with only Report issue (and the lost-installer wording without "try again", EN and zh-CN), the folded sign-in details with Change password, the model picker, and the install location / free-space warnings (hidden while there's room, main's warnings in EN and zh-CN, rejected path, Change and Reset, the model counted only for Local, Install held until resolved).
    • local-server covers the password change (status codes, file update, no password in logs), the BYOK failure code, the model list and check, and holding the install when the disk has no room for the picked model.
  • apps/linger-installer: 244 passed.
  • packages/local-installation: 831 passed, 22 skipped. This includes the default owner email for new installs only. On the latest run, the crash-loop timing test in native-process.test.ts failed once while another install was running on the same machine, then passed 3 of 3 times on its own; this push doesn't touch that package.
  • Typecheck, lint and Prettier pass for the changed packages.

For the owner to decide

  1. Both signed in → configure both, with Codex as the default (see the assumption above).
  2. After a failed install, the only way forward is Report issue, or quitting and reopening, which returns to step 1. There's no Try again button, as requested.
  3. The sign-in dialog that opens from Subscription keeps main's "Show logs" link and the Pi switch.
  4. The script installs (scripts/install/install.sh, install.ps1, scripts/prepare-local-owner.mjs, scripts/source-native.mjs) still default to owner@linger.local. Only the desktop and standalone installer use admin@gmail.com.

@Kilyn544
Kilyn544 force-pushed the feat/setup-two-step-wizard branch 2 times, most recently from 6f37252 to 337cc4b Compare November 26, 2026 10:48
Replace Quick Install and Customize with a two-step welcome: a short
check of this computer, three source cards (Local model, BYOK,
Subscription) with the recommended one picked, then the chosen source's
settings and Install in the same window size.

- Subscription lists Claude Code, Codex and Pi read from this computer
  through new headless installer commands (--runtime-status,
  --prepare-runtime, --runtime-login, --device-login); Claude Code and
  Codex install with progress and sign in with Cancel, Pi installs only.
  Install is enabled once Claude Code or Codex is signed in; with both,
  Codex is the default and Claude Code is linked (linkedRuntimes).
- BYOK always runs on Pi; no runtime picker.
- BYOK and Subscription can also download the planned local model in the
  background (--download-local-model, off by default).
- The local model's wait offers Use Subscription / Use BYOK: the job is
  cancelled, the model keeps downloading and step 2 shows its progress.
- A new installation's owner sign-in is chosen on step 2: prefilled
  owner@linger.local and a generated password, editable with show/hide,
  confirm, generate and the server's rules. The installer writes it to
  local-account.json before the owner exists (--owner-account, stdin);
  existing installations keep theirs. The ready screen copies the email
  too.

Fixes #715
Fixes #757
- Setup opens on a plain loader; step 1 offers three cards, each a title
  and one line, with no subtitle, tags or private badge.
- Step 2 keeps only what each source needs: the local model and its size;
  Claude Code and Codex (Pi installs itself when needed); BYOK as URL,
  API key and Model ID, with a short line for the usual check failures.
- Installing shows one progress bar and one changing line, the local
  model download included, plus the link to switch source.
- A failed install shows a short message and one Report issue button,
  which uses the diagnostics consent flow.
- New installs get the owner admin@gmail.com with a generated password;
  existing installs keep theirs. The ready screen folds the sign-in
  details, with copy, show and Change password, which posts
  /v0/account/password and updates the saved desktop login.
@Kilyn544
Kilyn544 force-pushed the feat/setup-two-step-wizard branch from 337cc4b to f875a8e Compare November 26, 2026 17:14
…he system, and centre the install scene

Drop the picker subtitle, put the build next to the model name, list what
fits first, and show quality words beside the bar. The memory bar now
shows what the system holds, the model and what is free. The install line
no longer carries file sizes; a download moves the bar through its step.
The install and ready orb use Linger's own colours.
When main's free-space pre-check or a location error surfaces the install location row on step 2, the row ran under the fixed Back/Install buttons. While it shows, the title orb and the model's one-line pitch step aside, the model card tightens and the row is compact, so every source fits without moving the buttons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant