Skip to content

feat(tui): set up cloud while the model downloads, and see the pull anywhere - #227

Open
plombeer31 wants to merge 3 commits into
valeryb/onboarding-propose-secondfrom
valeryb/onboarding-meanwhile
Open

feat(tui): set up cloud while the model downloads, and see the pull anywhere#227
plombeer31 wants to merge 3 commits into
valeryb/onboarding-propose-secondfrom
valeryb/onboarding-meanwhile

Conversation

@plombeer31

Copy link
Copy Markdown
Collaborator

Stacked on #226#225#224#223#222#220.

Why

A local first run leaves the operator in front of a 2.7–22 GB progress bar with nothing to do, and a cloud model takes about a minute to configure. The pull is owned by a session-scoped orchestrator — it does not need the screen that started it — but it was only ever drawn inside the LLM panel, so walking away from that tab meant a multi-gigabyte transfer running with nothing anywhere saying so.

Three changes

The offer. The download screen carries an accent-marked block:

  ┃  Don't want to wait? Set up a cloud model in the meantime —
  ┃  it takes about a minute, and the download keeps running.    press c

Hidden when a cloud provider is already configured — nothing left to offer.

Wait or jump. Finishing that wizard while the pull is still running asks the only question left:

  ✓  Cloud model ready
  ⇣  gemma-4-e4b · 61% · 2.6 GB / 4.2 GB · about 2 minutes left

  ›  Start using the agent now
     the download keeps running; progress shows in the top bar

     Wait here until it finishes
     the agent opens with both backends live

Jumping is the default row — waiting is a preference, not a requirement. If the pull already landed by the time the wizard closes, the flow finishes instead of asking a question with one answer. Backing out of the wizard returns to the download, not to a backend choice that has already been made.

The chip. DownloadChip renders the pull in the status bar — model, bar, percent, ETA — for as long as one is running, from any screen:

   R U N    ⇣ gemma-4-e4b ███████░░░ 61%  about 2 minutes left

Notes for review

  • resumeAfterCloud on the flow state is what distinguishes "cloud wizard from the choice screen" (finish) from "cloud wizard from a running download" (ask). It is cleared on both exits.
  • The reducer decides wait-vs-finish from localModelsPanel.pull !== null — state, not config, so it stays pure.
  • The embedding-offer suppression now covers the whole local branch including the cloud detour, rather than only the download step.
  • use-typewriter.test.tsx got a longer poll deadline: it waits on Ink frame commits, which slow down considerably under a full parallel run.

Tests

Five reducer cases (open-with-memory, wait-or-jump on a live pull, finish when it already landed, back-out to the download, pull landing while wait-or-jump is up), plus download-chip.test.tsx — one-row chip, runtime naming, both rows of wait-or-jump and its default cursor.

Full suite: 5205 passed; the two long-standing failures are unchanged on main.

…nywhere

A local first run parks the operator in front of a 2.7–22 GB progress
bar with nothing to do. The download is owned by a session-scoped
orchestrator, so nothing about it needs that screen — but it was only
ever drawn inside the LLM panel, so leaving meant losing sight of it.

Three things:

- The download screen carries an accent-marked offer: press `c` to set
  up a cloud model in the meantime. The pull is not paused or restarted;
  it keeps running while the wizard is up.
- Finishing that wizard while the pull is still going asks the operator
  the only question left — start using the agent now, or wait here.
  Jumping is the default row; the download does not need the screen.
  Backing out of the wizard returns to the download rather than to a
  backend choice that has already been made.
- `DownloadChip` puts the pull in the status bar — the one row that is
  always on screen — so a transfer started during setup stays visible
  from the agent, with model, bar, percent and ETA.

The embedding-offer suppression now covers the whole local branch,
including the cloud detour, rather than just the download step.
The chip took ~50 columns unconditionally. On a 100-column terminal, with
the brand lockup, the breadcrumb, the session tag and a session title
already on that row, it did not fit — and Ink wraps rather than clips, so
the one-row header would have become two and pushed the rail, the chat
and the composer down the screen. Exactly the failure #221 fixes for the
title.

The chip now takes a column budget and sheds by rank, the same discipline
`hotkey-hint` uses: ETA first, then the bar and the model name, then the
chip itself below twelve columns. `StatusBar` computes what is left of
the row after everything with a stronger claim to it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant