mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 15:47:43 +01:00
The "Could not bring zellij up" toast fired on every Fleet Runner boot. It came from a cold-start that could not work: `restoreFleetOnBoot` fetched the user's last runtime snapshot — whichever channel pushed last, so on the laptop it got the box's fleet with `/home/ubuntu` paths — wrote a zellij layout for it, and spawned `zellij --session fleet --layout` detached with no TTY. A zellij client needs a terminal to bring up its server; probed three ways on 2026-09-11, that spawn never produced a session, every time. The toast said "Open Settings to retry"; Settings had a Restoration section that the desktop never read (autoRestore hardcoded true) and no retry. Since 0.8.3 the owned PTY was the default with zellij kept as the fallback for tabs it could not find. The fallback is where every stuck dispatch ended: "no zellij tab with that name in any active session" (2026-09-10 21:08, an inject into Heidi), a keystroke typed into "Tab #9", a session spawned that no terminal could show. This release deletes the fallback instead of hardening it a fourth time. Runner: - poller: inject requires a live owned PTY and fails loudly otherwise (the cloud enqueues a DISPATCH for a project with no session, so a miss is a real error); launch/dispatch/switch own the PTY with no fallback; close and peek answer from the PTY or say there is none; focus_tab is retired; install_cli runs the installer in an owned PTY; the zellij session/tab helpers, the pre-flight `ensureSessionForCommand`, the ETIMEDOUT translation, and FLEETCROWN_RUNNER_PTY are gone. - pusher: open tabs are the owned PTYs; pane records no longer join through ZELLIJ_PANE_ID or stamp a session name. - index: no cold-start on boot, no bundled-binary PATH prepend, no zellij in the prerequisites scan; peek-tab reads the owned buffer. - desktop/scripts/download-zellij.mjs and the prebuild download are deleted. Web (the pieces that existed only for the cold-start): - /api/control/runtime-state/desired (cross-channel snapshot read) deleted. - Settings → Agent → Restoration (FleetLifecycleSettings + its API) deleted; the users.fleet_settings column stays (migrations never DROP) and is unread. - src/lib/zellij-bootstrap.ts and zellij-layout-generator.ts deleted. Fleet Runner 0.8.19; changelog entry written for the person who installed it. Claude-Session: https://claude.ai/code/session_01WSNERoZZqW2TgqbAGHSQZf Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
57 lines
2.5 KiB
Bash
Executable File
57 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Typecheck and build the Fleet Runner desktop app.
|
|
#
|
|
# WHY THIS EXISTS
|
|
# ---------------
|
|
# `npm run verify` covered src/, home/ and widget/ — everything except desktop/.
|
|
# The root tsconfig does not include it, `workspaces` is packages/* only, and
|
|
# eslint is pointed at src/ home/. So for the desktop app's entire life the only
|
|
# thing that ever compiled it was `desktop-release.yml`, which runs on a version
|
|
# TAG. Every desktop breakage was therefore discovered at release time, on three
|
|
# OS runners at once, after the version number had already been minted — which is
|
|
# how v0.8.6-v0.8.9 shipped Linux-only or not at all.
|
|
#
|
|
# Auto-merge turned that from expensive into unsafe: a PR touching only desktop/
|
|
# has nothing that can fail, so it goes green and merges itself. The three open
|
|
# Dependabot PRs bumping desktop's vite (6->8, a major), @types/node (20->26) and
|
|
# @electron-toolkit/tsconfig were all in exactly that position.
|
|
#
|
|
# IT RUNS ON EVERY PR, NOT JUST desktop/** CHANGES
|
|
# ------------------------------------------------
|
|
# A path filter here would be wrong, not merely conservative. desktop/src/main
|
|
# imports ../src and ../home through the @/* and @home/* aliases, and the built
|
|
# main bundle really does contain src/lib/agents/*, src/lib/agent-registry.ts and
|
|
# friends. A change confined to src/ can break the desktop build; only building
|
|
# it proves otherwise.
|
|
#
|
|
# COST
|
|
# ----
|
|
# ~70s cold, and no Electron binary is downloaded: the install runs with
|
|
# --ignore-scripts, which skips electron's ~100MB postinstall and
|
|
# electron-builder's install-app-deps. Neither is needed to typecheck or to let
|
|
# vite compile the main and preload bundles. Packaging still happens only in the
|
|
# release workflow, on the real OS runners.
|
|
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/../desktop"
|
|
|
|
# The lockfile is the SSOT for what to install; --ignore-scripts is what keeps
|
|
# this cheap. `npm ci` always wipes node_modules, so only pay for it when the
|
|
# deps are actually absent (CI: always; a repeat local run: never).
|
|
if [ ! -d node_modules ]; then
|
|
echo "[check:desktop] installing desktop deps (no electron binary)"
|
|
npm ci --ignore-scripts --no-audit --no-fund
|
|
fi
|
|
|
|
echo "[check:desktop] typecheck"
|
|
npx tsc --noEmit -p tsconfig.json
|
|
|
|
# `npx electron-vite build`, not `npm run build` — the latter fires the prebuild
|
|
# hook, which regenerates icons. That does not affect whether the code compiles.
|
|
echo "[check:desktop] build (main + preload)"
|
|
npx electron-vite build
|
|
|
|
echo "[check:desktop] ok"
|