Files
loki/docs/development
CatoandClaude Fable 5.1 696ce72e21 feat(builder): Loki from another computer offers the cloud, never a download (#1157)
* feat(builder): Loki from another computer offers the cloud, never a download

The owner opened Loki on a second Mac (2026-10-12). Every builder surface
named "this computer", said Fleet Runner was not connected there, and
offered one fix: download the desktop app. "This computer" is per account
— presence is one row per user — so from any other device that offer is a
trap, and the account's cloud builder was online the whole time. The
download it got is unsigned, so macOS called it "damaged".

- lib/builder-way-forward.ts: the one answer to "nothing is running this
  work" per account — run it in the cloud / wait for the cloud / connect
  Fleet Runner / unknown — from cloudBuilderAllowed + presence. The
  download is honest only while the cloud is private for the account.
- Dispatch card (Loki chat): a dispatch waiting for "this computer" gets
  "Run it in the cloud" (POST /api/control/reroute, same command id) when
  the account has the cloud; the download only when it does not.
- Control setup banner: an account with the cloud reads that there is
  nothing to install; the offline variant no longer says "re-install".
- Empty terminal: "Use the cloud builder" leads before "Get Fleet Runner";
  the machine source's "not connected here" line names the cloud instead.
- /api/builder/presence and /api/control carry cloudBuilderAllowed;
  useBuilderPresence is one shared poller for every reader (it was one
  interval per component, so a card per dispatch could not have it).
- /download (macOS): the "damaged" dialog is Gatekeeper on an unsigned
  build, not a bad file; right-click → Open does not clear it. The page
  leads with the .zip and one Terminal line (ditto, xattr -cr, open).
  Signed builds need an Apple Developer account — docs say what it costs.

Tests: builder-way-forward (new), dispatch-card (+5), phone-chrome
updated to the moved wiring; execution-access, control-presenter,
auto-reroute, dispatch-status, fleet-context pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Xssd1hFZCUSxqjACjoVBB

* fix(terminal): no "start it, and it opens here" while the builder is offline

A deep link to a project with no session rendered the session-miss screen
("sink isn't running on Cloud builder — Nothing is attached. Start it, and
it opens here") while the chip beside it read "Cloud builder offline". The
owner, on a second computer: "classic dead end" (2026-10-12).

The miss is only a miss when the builder could have a session. Offline or
gated, the empty state renders instead: it says the builder is down, what
happens to the work, and offers the way forward for this account.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Xssd1hFZCUSxqjACjoVBB

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-12 03:12:40 -07:00
..