Commit Graph
28 Commits
Author SHA1 Message Date
Mao NakamotoandClaude Fable 5 4c8ab5425c feat(infra): exit Vercel — FleetCrown lives at fleetcrown.orangecat.ch
- swap dead fleetcrown.vercel.app for fleetcrown.orangecat.ch across src/,
  desktop/, README (Vercel team blocked for fair-use; serving 402s)
- scripts/deploy-hetzner.sh: build + rsync standalone + restart the
  fleetcrown-app unit on the bitbaum box (Caddy already vhosts the domain)
- brand.ts APP_DOMAIN remains the SSOT; historical thoughts essays keep the
  old domain as written

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 13:47:00 +02:00
Mao NakamotoandClaude Opus 4.7 eaeaa44356 feat(control): agent switching v0.8.0
Users switch agents from the Control UI without typing quit commands in
Zellij — click the agent chip on a project card, pick from Cmd+K palette,
or accept the rate-limit banner's fallback suggestion. Detection lives in
agent-resolution.ts (client-safe) + agent-process-scan.ts (server /proc
walk); switch enqueues pending_commands type switch_agent which the Fleet
Runner poller executes locally, quitting every running agent in the dir
before launching the next.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-08 18:46:30 +02:00
Mao Nakamoto deda43539b fix(desktop): make remote zellij control reliable 2026-06-08 13:12:22 +02:00
Mao Nakamoto 964b1d67f4 fix(desktop): detect user-installed agent CLIs 2026-06-08 12:23:45 +02:00
Mao Nakamoto 40cbf877d4 fix(desktop): push rich runtime snapshots 2026-06-08 11:52:28 +02:00
Mao Nakamoto 948934158a feat(desktop): v0.7.6 remote command control 2026-06-08 09:16:13 +02:00
Mao Nakamoto 797fa998e7 fix(control): repair local project sync and desktop command draining 2026-06-08 09:09:21 +02:00
Mao Nakamoto 8604d97a69 feat(desktop): v0.7.4 — Phase 1, delete bundled renderer + dead IPC
ARCHITECTURAL CLEANUP, first-principles pass per the design discussion.

PROBLEM:
Pre-0.7.4 Fleet Runner shipped TWO parallel UIs:
  1. The Next.js app at fleetcrown.vercel.app (the real UI, full feature
     set, accessible from any browser, phone, or workstation)
  2. A 407-line bundled renderer at desktop/src/renderer/ that read
     agent-projects.conf, talked to IPC for project state, and never
     reached parity with /control

This violated:
  - Ground truth #2 (one source of truth — two UIs is two truths)
  - Ground truth #3 (design for change — every feature shipped twice)
  - Ground truth #5 (complexity compounds — 2,135 LoC of dead/dual code)

The split also produced the v0.7.0 disaster, where the bundled renderer
became the default boot target and users saw 'YOUR MACHINES. YOUR AGENTS.'
+ '0 projects' + 'Sync error: Failed to fetch' — a half-working stub
instead of their actual /control page.

SOLUTION:
Fleet Runner is now what it really should be: a native Electron wrapper
around the cloud /control UI, with real local-execution services
(poller/pusher/watcher/peek) running in the main process. Same category
as Slack, Linear, Notion, Discord desktop apps.

DELETED:
  - desktop/src/renderer/ (407 lines App.tsx, main.tsx, globals.css,
    index.html — the bundled renderer that never reached parity)
  - desktop/src/main/runtime.ts (224 lines — only the deleted renderer
    called these IPC handlers; getLocalRuntimeStatus, getProjects,
    dispatchIntent, getCurrentState are gone)
  - electron.vite.config.ts renderer block (no more renderer build)
  - The USE_WEB_SHELL conditional throughout main/index.ts — there's
    only one mode now: web shell.
  - loadBundledRenderer() function
  - did-fail-load → loadBundledRenderer fallback (replaced with proper
    branded offline page that has 'Try again' button)
  - IPC handlers: ping, get-runtime-status, get-projects, dispatch-intent,
    get-current-state, probe-cloud, switch-to-cloud
  - Preload bridge methods for the above
  - FleetRunnerBridge type entries for the above
  - Dependencies no longer needed: @vitejs/plugin-react, autoprefixer,
    postcss, react, react-dom, tailwindcss, @types/react, @types/react-dom

ADDED:
  - reload-web-shell IPC handler (offline page → main → loadURL retry)
  - reloadWebShell on preload + FleetRunnerBridge type
  - Improved offline page copy: 'cloud surface is offline, your local
    agents and Zellij tabs are running regardless' — honest about what's
    affected, accurate about what isn't

NET: 2,135 lines removed, 136 added. Build still works: out/main 199 KB,
out/preload 2.5 KB. Both tsc --noEmit clean (web + desktop). No behavior
change for users in the default path; the bundled-renderer escape hatch
that produced the broken v0.7.0 boot is gone for good.

Version bump 0.7.3 → 0.7.4. Auto-update pulls this on next launch.
2026-06-07 16:14:19 +02:00
Mao Nakamoto c04bb464f1 fix(desktop): v0.7.3 — clear stale tokens on 401 + Cockpit title purge
Dogfooded v0.7.x today and hit two real bugs that kept the user stuck on
the broken bundled-renderer experience even with v0.7.2 binaries live.

ROOT CAUSE 1 — Permanently-stuck dead tokens.
The pusher and poller both stop on 401/403 but DID NOT delete the stale
token file. FleetRunnerAutoMint's bail check is 'if (existing) return',
so a user with a dead token (revoked, expired, server-side row gone) is
permanently locked offline: the daemon never recovers, no fresh token
gets minted, /control reads 'Daemon offline' forever.

Fix in BOTH desktop/src/main/{pusher,poller}.ts: on 401/403, call
clearToken() before stopping. Next time FleetRunnerAutoMint mounts in
/control (next page navigation or relaunch), it sees no existing token,
mints a fresh one from the user's signed-in session cookie, saves it
via IPC. saveToken() already restarts the poller + pusher, so recovery
is automatic from there.

Verified on my own machine: my saved token from 2026-06-06 14:24 is
returning 401 against /api/control/runtime-state (server doesn't
recognize it). Pre-fix: every subsequent launch reads the same dead
token, pusher 401s once, gives up. Post-fix: pusher 401s, deletes
file, gives up; next /control load triggers auto-mint to fresh token.

ROOT CAUSE 2 — Stale 'Cockpit Fleet Runner' window title.
Caught earlier this session: desktop/src/renderer/index.html still had
the pre-rename title hardcoded. Window manager picks that up before
the loaded /control page's title swaps it in, so taskbar showed
'Cockpit Fleet Runner' for a beat on every launch and as a permanent
state on bundled-renderer fallback. Already fixed in source, ships
with this release.

Version bump 0.7.2 → 0.7.3. Both bugs only affect FRESH desktop
binaries; v0.7.0 / v0.7.1 / v0.7.2 are unaffected at the source level
because the bugs were structural-in-shipping-code. After this commit
lands + CI builds + mirror finishes, electron-updater on v0.7.0+
installs will pick up v0.7.3 on next launch.
2026-06-07 14:22:59 +02:00
Mao Nakamoto b73bb9a8d4 feat(desktop+web): v0.7.2 — peek tab contents from /control
The hardest UX gap in /control was: you saw your tab NAMES + state chips
('Working', 'Awaiting input') but never the actual screen content. To know
what the agent was saying you had to alt-tab into Zellij and find the
right tab. Web-shell users saw even less.

v0.7.2 closes that. Per-tab eye-icon button on /control workspaces table
opens a drawer that captures the live screen of that Zellij tab and renders
it as a static terminal frame (monospace, dark background, scrollable).
Auto-refresh toggle re-peeks every 3s for watching long-running agents
without permanently leaving the user on the peeked tab.

Mechanism (sub-200ms round-trip):
  1. ZellijLiveRows eye-button → setPeekTab(name)
  2. PeekTabDrawer mounts → window.fleetRunner.peekTab(name)
  3. preload → IPC peek-tab → main process
  4. src/lib/zellij.peekTab: save focus, go-to-tab-name, dump-screen to
     /tmp file, restore focus, read+strip ANSI, unlink temp
  5. Returns content → drawer renders in <pre>

Same focus-dance pattern as injectIntoTab (already in zellij.ts) — users
have accepted that disruption budget for remote dispatch, this reuses it.

Outside Fleet Runner the button is hidden (one-tick mount probe of
window.fleetRunner.peekTab). No degraded "button that always errors"
experience for browser users.

Also in this drop:
  - desktop bump 0.7.1 → 0.7.2 (auto-update will pull this on next launch)
  - control-presenter test: "cockpit" string was a leftover from the rename,
    failed CI on the v0.7.1 push; now compares to 'FleetCrown' as intended
  - ZellijLivePanel daemon-offline CTA now points to /releases/latest
    instead of the hardcoded fleet-runner-v0.7.0 tag (was pointing users
    at the broken bundled-renderer build)

Next: v0.7.3 cloud-fallback (browser-only users get peek via the command
queue → daemon → result table → SSE), v0.8 inline terminal column.
2026-06-06 14:54:46 +02:00
Mao Nakamoto d68ffbff24 fix(desktop): v0.7.1 — REVERT Phase C primary flip, web-shell default again
v0.7.0 shipped USE_WEB_SHELL=false; the bundled local renderer became
the boot target. User QA on 2026-06-06 launched the installed app and
saw:
  - '0 active projects' (renderer reads agent-projects.conf, NOT the
    cloud DB; user's actual FC projects invisible)
  - Dev-surface copy ('YOUR MACHINES. YOUR AGENTS. / BUILT FOR BUILDERS
    WHO RUN REAL FLEETS') that has no place in a customer build
  - 'Sync error: Failed to fetch' on the connect-to-cloud action

That's not the experience anyone should ship. The Phase C VISION
(local-first renderer with parity to /control) stands — it's
task #44, v0.7.1+ work, multi-day real build. Until that ships,
the default reverts to v0.6 behavior: Fleet Runner opens the
fleetcrown.vercel.app UI inside Electron. Same UI users know from
the browser, same projects, same dispatch, no surprise.

Cursor / Anthropic / Grok ship the same pattern at this stage.
Local-first renderer is the destination, not v0.7.0's reality.

Bundled renderer stays OPT-IN via FLEETCROWN_WEB_URL=local for
power-user dogfooding while parity work happens in the background.
desktop/package.json: 0.7.0 → 0.7.1. Existing v0.7.0 installs
auto-update on next launch (electron-updater wired since v0.3.0).
2026-06-06 14:28:44 +02:00
Mao NakamotoandClaude Opus 4.7 28f775c715 feat(desktop): v0.7 Phase C — bundled local renderer is primary
The v0.6 essay called for local-first: cloud as the thin sync layer,
local as the source of truth for project state and dispatch. The
desktop's USE_WEB_SHELL default was the lever blocking that — set to
true, every launch loaded fleetcrown.vercel.app inside Electron and
the bundled renderer was a fallback for cloud failure.

v0.7 flips it. Initial-mode resolution:

  - No saved ck_* token at ~/.config/fleetcrown/fleet-runner-token →
    boot CLOUD (user needs to sign in; auto-mint drops the token).
    Subsequent launches go local.
  - FLEETCROWN_WEB_URL=https://... → boot cloud (preserves dev /
    preview deploy workflows; also becomes the "Try cloud" target).
  - FLEETCROWN_WEB_URL=cloud → boot cloud at APP_URL.
  - FLEETCROWN_WEB_URL=local or unset, token present → boot LOCAL.

WEB_SHELL_URL is now always defined (defaults to APP_URL) so the
"Try cloud" button works regardless of initial mode. Pre-v0.7,
probe-cloud and switch-to-cloud both gated on USE_WEB_SHELL and
silently no-op'd when the user booted local — the button was broken
in exactly the mode that needed it most.

Factored the conflation: USE_WEB_SHELL now means "boot cloud?"
exclusively. WEB_SHELL_URL means "the cloud URL" exclusively. They
were one variable doing two jobs.

Bundled renderer (desktop/src/renderer/) already shows runtime
status, project list from agent-projects.conf, dispatch UI, token
management, and a "Try cloud" button. It is less feature-rich than
the cloud view today (no /control orchestration runs, no prompt
library) — those land via the cloud view click-through. Reaching
feature parity for the daily-driver flows is the Phase C follow-up.

desktop/package.json bumped 0.6.0 → 0.7.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-05 16:04:50 +02:00
Mao NakamotoandClaude Opus 4.7 0b77c876ac feat(desktop): v0.6.0 — version bump + tray quick-links
Two small but signalling changes:

1. desktop/package.json: 0.5.1 → 0.6.0
   Aligns the version with the v0.6 platform series (Postgres LISTEN/NOTIFY
   bridge + SSE + Hetzner cutover + cloud bootstrap + Sessions/Decisions/
   Brief surfaces). The auto-pair flow from this morning's commit lands
   under this version.
   The next `git tag fleet-runner-v0.6.0 && git push origin fleet-runner-v0.6.0`
   triggers .github/workflows/desktop-release.yml — releases are gated on
   the tag, not on this bump alone, so this commit is safe to merge before
   the user is ready to cut a build.

2. desktop/src/main/index.ts tray context menu
   Was: "Show Fleet Runner / Quit". Two items. Lacked any quick-navigation.
   Now: jumps directly to Control, /control/new-from-scratch, /decisions,
   or /settings via a single tray click. Replaces the BrowserWindow URL
   in web-shell mode (USE_WEB_SHELL); in bundled-renderer mode it just
   surfaces the window since the router state lives in the local React
   tree.

The tray quick-links use a shared `surfaceAt(path)` helper that show()s +
focus()es + loads the URL — minimal, fits the "tray = one-click bounce
to a page" model. Order matters: Control first (most common entry),
then create flow, then logs, then settings, then quit at the bottom
where it can't be misclicked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-05 09:54:15 +02:00
Mao NakamotoandClaude Opus 4.7 09c46bbb81 fix(desktop): v0.5.1 — single source of truth for the local-renderer swap
Manually dogfooded v0.5.0 by launching with FLEETCROWN_WEB_URL pointed
at an intentionally-unresolvable host. The fallback to the bundled
renderer worked — log shows "cloud unreachable (-105: ERR_NAME_NOT_RESOLVED)
... falling back to bundled local renderer" and "loaded bundled local
renderer (cloud-independent mode)" — but then:

  Failed to load URL: https://this-host-definitely-does-not-exist.invalid/
  with error: ERR_NAME_NOT_RESOLVED
  failed to load web shell: Error: ERR_ABORTED (-3) loading
  'file:///.../out/renderer/index.html'
  [desktop] loaded bundled local renderer (cloud-independent mode)  ← second call!

The bundled renderer was loading TWICE because two paths both called
loadBundledRenderer():
  1. setImmediate(...).catch on the cloud loadURL promise rejection
  2. did-fail-load on the network failure event

Both fire for the same DNS error. The second loadFile() aborted the
first with ERR_ABORTED, polluting the logs and risking torn state.

Fix: did-fail-load is the single source of truth for the swap. The
setImmediate catch just logs the error and lets did-fail-load do the
work. One swap, no race.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-04 08:33:36 +02:00
Mao NakamotoandClaude Opus 4.7 3190d062a4 feat(desktop): v0.5.0 — local-first fallback when cloud is unreachable
The local-first promise: Fleet Runner is functional when the cloud is
down. Before v0.5.0, a Vercel outage or DB quota event (like the one we
hit today) left the desktop app showing a "FleetCrown is offline" data
URL with a retry button — useless. v0.5.0 falls back to the bundled
local renderer instead, which talks to the main process via IPC and
keeps every local capability (dispatch into Zellij, watcher, agent
session inspection, token management) working without the cloud.

Flow:
  1. Boot → splash → try cloud web shell (fleetcrown.vercel.app)
  2. Cloud unreachable / did-fail-load → load bundled renderer
  3. User clicks "Try cloud" in the bundled renderer header
     → probe-cloud (fetch /api/health, 4s timeout)
     → if reachable: switch-to-cloud (loadURL the web shell)
     → if not: stay in local mode, surface the result

New IPC channels (preload bridge updated):
- probe-cloud   → boolean (fast reachability check)
- switch-to-cloud → boolean (navigate window back to web shell)

The bundled renderer already had IPC for dispatch/projects/token/poller
(see App.tsx — it was the dev-only renderer until now). v0.5.0 promotes
it from "developer surface" to "primary surface when cloud is down."

Limitation (documented, not blocking): the bundled renderer's UX is
simpler than the cloud web app — no full project cards, no /today, no
/settings. Future v0.6+ work: render those locally too by reading
~/.fleetcrown/events.jsonl + ~/.claude/sessions/*.md directly. The
plumbing for that already exists in home/ and the embedded watcher.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-04 08:21:20 +02:00
Mao NakamotoandClaude Opus 4.7 7c66e73437 fix(desktop): v0.4.4 — runtime-state pusher so daemon shows online on web
CRITICAL — v0.4.0 through v0.4.3 shipped the poller (cloud → local
commands) but no pusher (local → cloud heartbeat). Result: /control
correctly received dispatch but the web UI rendered "Local daemon
offline · last seen Xm ago" the whole time, because /api/control's
isRuntimeAvailable() check only flips to true after somebody POSTs to
/api/control/runtime-state within the last 90 seconds. Nobody was.

Added desktop/src/main/pusher.ts:
- Loads ~/.config/fleetcrown/fleet-runner-token (same path as poller).
- POSTs /api/control/runtime-state every 30s with: openTabs from
  getZellijTabs(), projects: [], observedAt: Date.now().
- Fires once immediately on start so the "daemon online" indicator
  flips within seconds of launch, not after the first 30s tick.
- On 401/403: stops itself (token rejected, nothing to retry).
- Other failures: logged, skipped, retried next tick (network blip,
  cloud outage, etc.). Daemon shows "offline" worst-case, no data loss.

Lifecycle wiring in src/main/index.ts:
- startPusher() in whenReady alongside startPoller()
- restartPusher() in save-token IPC + deep-link auth path
- stopPusher() in clear-token IPC + before-quit cleanup

Verification path: launch v0.4.4, ensure token in
~/.config/fleetcrown/fleet-runner-token, watch /control on the web —
the "Local daemon offline" banner should disappear within ~5s and
"sync just now" should appear instead. Then autopilot ("Autonomous"
mode) can be set and dispatched intents will fire end-to-end through
the poller → injectIntoTab → Zellij chain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 23:00:39 +02:00
Mao NakamotoandClaude Opus 4.7 60b828ac98 fix(desktop): v0.4.3 — afterPack wraps Electron binary with --no-sandbox stub
v0.4.2 set linux.executableArgs: ["--no-sandbox"] but verification on a
fresh AppImage download showed it STILL crashed at FATAL setuid_sandbox_host.
Inspected the generated AppRun script and confirmed the flag was missing:
electron-builder only injects executableArgs into the .desktop file's
Exec= line, not the AppRun. So OS-menu launches via .desktop worked but
direct execution of the AppImage (double-click, ./binary from a shell,
electron-updater swap) did not.

Fix: a custom afterPack hook (desktop/scripts/afterPack.cjs) wraps the
real Electron binary in a small shell stub that bakes --no-sandbox into
argv before exec'ing the real binary. The AppRun unknowingly invokes the
wrapper, which in turn invokes the real binary with the flag. This is
the pattern Slack, Discord, VSCode, Cursor, and Obsidian all use.

Layout in appOutDir after afterPack:
  fleet-runner      ← bash wrapper (new, 0755)
  fleet-runner-bin  ← real Electron binary (renamed from fleet-runner)

Idempotent: skips if -bin already exists, so multi-arch builds don't
double-wrap. Scoped to electronPlatformName === 'linux'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 18:23:07 +02:00
Mao NakamotoandClaude Opus 4.7 3e1222ba7f fix(desktop): v0.4.2 — AppImage --no-sandbox via executableArgs (not main.ts)
v0.4.1's app.commandLine.appendSwitch('no-sandbox') ran too late: the
SUID sandbox helper aborts the process at FATAL *before* Electron's
main.ts loads, so any switch we set in code never gets a chance to
take effect. v0.4.1 AppImage still crashed identically to v0.4.0.

Correct fix: linux.executableArgs in electron-builder config — adds
--no-sandbox to the AppRun wrapper script that launches the binary, so
the flag is in argv before chrome-sandbox is invoked.

.deb installs are unaffected (and don't need the flag) — dpkg postinst
chmod 4755's the chrome-sandbox helper at install time, so the SUID
sandbox works the normal way there. AppImage can't run postinst, hence
this asymmetry.

Replaced the misleading in-main.ts switch with a comment explaining the
ordering constraint, so future-me doesn't try the same thing again.

Verification approach: AppImage built by CI will be unpacked and the
AppRun script inspected to confirm --no-sandbox is included.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 18:07:09 +02:00
Mao NakamotoandClaude Opus 4.7 05effdf454 fix(desktop): v0.4.1 — Linux AppImage no-sandbox so it actually launches
CRITICAL: Fleet Runner v0.2.0 through v0.4.0 crashed on launch from a
fresh Linux AppImage install with:

  FATAL:setuid_sandbox_host.cc(163)] The SUID sandbox helper binary was
  found, but is not configured correctly. Rather than run without
  sandboxing I'm aborting now.

The Chromium browser-process sandbox needs chrome-sandbox to have mode
4755 owned by root. AppImage's squashfs mount strips setuid, so the
binary aborts before any of our code runs. This is the same wall every
Electron AppImage hits (Slack, Discord, VSCode, Cursor, Obsidian) — they
all ship --no-sandbox.

Fix: app.commandLine.appendSwitch('no-sandbox') at module load, scoped to
process.platform === 'linux' (mac .dmg / Windows .exe don't have the
SUID-host wrinkle and keep their browser-process sandbox on).

Verified: v0.4.0 AppImage launched cleanly with --no-sandbox CLI flag —
web shell loaded, embedded watcher picked up 22 registered projects from
~/.config/agent-projects.conf, auto-update fired and correctly reported
"no newer version." v0.4.1 with the flag baked in means users no longer
need to know about it.

Anyone on v0.2.0/0.3.0/0.4.0 needs to manually re-download once. From
v0.4.1 onward, electron-updater handles future upgrades without user
action.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 17:54:37 +02:00
Mao NakamotoandClaude Opus 4.7 fa5bcf734a refactor(control): extract ZellijLiveRows from ZellijLivePanel
ZellijLivePanel.tsx was 327 lines, with ~118 of those dedicated to
rendering the live tab rows in two flavors (desktop table at md+,
mobile card stack at smaller widths). Both render the same row data
with the same callbacks; the file's actual orchestration logic
(header, composer, empty states, refresh/repair actions) was buried
beneath the dual rendering.

Moved both renderings to ZellijLiveRows.tsx as a single component
taking rows + highlightTab + focusTab + closeTab + onFocusProject.
The desktop table and mobile cards are still mounted together (Tailwind
toggles via hidden md:block / md:hidden), behavior identical.

ZellijLivePanel.tsx now drops 3 transitive icon imports (Focus,
Terminal-no-wait-still-used-by-empty-state-icon, Trash2) used only by
the row renderings. The isHighlighted helper moved into the rows file
since both views consume it.

ZellijLivePanel.tsx: 327 → 214 lines.
ZellijLiveRows.tsx: 151 lines (new).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 15:59:41 +02:00
Mao NakamotoandClaude Opus 4.7 deca859893 feat(desktop): auto-update via electron-updater (v0.3.0)
Wires electron-updater so Fleet Runner checks for new releases on launch
and downloads them in the background. Users on v0.3.0+ never have to
manually re-download — the next-launch upgrade prompt takes care of it.

Implementation:
- Adds electron-updater@^6.8.3 to desktop deps.
- main.ts: setFeedURL points at maonakamoto/fleetcrown-releases (the
  canonical public host) regardless of where electron-builder publishes
  the build. This decouples the build pipeline's draft target from the
  user-visible update channel — the mirror script in
  scripts/mirror-desktop-release.sh reconciles them.
- checkForUpdatesAndNotify() fires once at boot, disabled in dev to avoid
  interfering with the local Electron cycle.
- Listener on 'update-downloaded' surfaces an OS notification "Update
  downloaded — restart Fleet Runner to apply it." The actual install is
  staged automatically via autoInstallOnAppQuit.

Caveat: existing v0.2.0 users still need one manual download to v0.3.0
(their binaries don't know about the new feed URL). From v0.3.0 onward,
every subsequent release auto-propagates.

Marketing copy (setup step 02) updated to mention the auto-update flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 15:03:09 +02:00
Mao NakamotoandClaude Opus 4.7 7b26b90bf7 feat(install): one-touch Fleet Runner install — bundled Zellij, deep-link auth, copy button
Collapses the new-customer install path from "download → install Zellij →
install agent CLI → copy token → paste in app" into "download → click
Open in Fleet Runner". Bumps Fleet Runner to v0.2.0.

Desktop (Fleet Runner v0.2.0)
- desktop/scripts/download-zellij.mjs (new): prebuild fetches the pinned
  Zellij binary (v0.41.2) into desktop/resources/bin/ for the target
  platform; electron-builder packs it into the AppImage / .deb / .dmg.
  Idempotent — skips if the file is already present; FORCE=1 re-downloads.
  Handles linux-x64/arm64, darwin-x64/arm64; PRs add more.
- desktop/src/main/index.ts: bundledBinDir() prepends the bundled binary
  dir to process.env.PATH before any home/ or zellij call resolves, so
  every existing exec("zellij ...") picks the bundled binary first with
  the user's $PATH as fallback. Zero call-site changes.
- desktop/src/main/index.ts: fleetcrown:// protocol handler (single-
  instance lock, mac open-url event, Linux/Win argv scan, cold-start
  buffering). On a deep-link click, the token in ?token=ck_... is saved
  via the same path as manual paste and the poller restarts immediately.
- desktop/package.json: version 0.1.0 → 0.2.0; prebuild now also runs
  bundle:zellij so dist:linux/mac/win all ship the binary.

Web
- src/components/settings/AgentTokenSettings.tsx: "Open in Fleet Runner"
  button next to the freshly-revealed token, hrefed to
  fleetcrown://auth?token=<token>. Falls back gracefully if Fleet Runner
  isn't installed or the protocol isn't registered.
- src/components/public/DesktopDownload.tsx: CopyableCommand wraps the
  CLI command shown after download with a Copy button (Check icon for
  2s on success). Clipboard API failures are silent — the code stays
  selectable.
- src/app/globals.css: ui-public-download-command-row + -copy classes
  to keep the SoC of the public-download surface intact.
- src/config/marketing-content.ts: install copy rewritten around the
  new one-touch story (Linux command uses ~/Downloads/Fleet.Runner-*
  wildcard; Claude Code becomes required since shipped agents don't ship
  with a bundled CLI; prerequisites prose tightened).

.gitignore: excludes desktop/resources/bin/ — the binary is fetched at
build time, not source-controlled (10MB+ per platform).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 13:14:15 +02:00
Mao NakamotoandClaude Opus 4.7 aaab630bd7 feat(desktop+marketing): web-shell default, multi-OS release pipeline, honest download UX
Desktop:
- Fleet Runner ships in web-shell mode by default — the AppImage loads
  https://fleetcrown.vercel.app (the same React tree the browser serves) so
  desktop and web stay at parity from one codebase. FLEETCROWN_WEB_URL overrides
  for previews/dev; `=local` disables web-shell for IPC dev work.
- Stable artifact naming via `artifactName: Fleet-Runner-${os}-${arch}.${ext}`
  so /releases/latest/download permalinks work; package.json publish target
  corrected from "cockpit" → "fleetcrown".

CI:
- New desktop-release.yml workflow: build matrix on macos-latest, windows-latest,
  ubuntu-latest fires on fleet-runner-v* tag push. Each runner produces signed
  installers via electron-builder --publish always and uploads to a GitHub
  Release. workflow_dispatch with dry_run=true builds-only for pipeline tests.

Download UX:
- Page redesigned for non-technical visitors: hero → web vs desktop comparison
  → platform-aware CTA → 3-step "what happens next" → plain-language prereqs
  with required/optional badges → developer drawer (collapsed).
- mac/Windows surfaces no longer point at the repo as a "download" — they show
  a Coming Soon panel with a release-feed subscription and an honest "Use the
  web app instead" escape hatch. Build-from-source demoted to a dev drawer.
- ~30 new ui-public-download-* semantic classes for the new patterns; design
  guard remains clean.

Navigation:
- /download added to the sidebar Site section so logged-in users have an in-app
  entry point to the desktop app.
- Homepage redirect dropped for signed-in users (onboarding flow preserved);
  hero + footer CTAs now surface "Open FleetCrown →" when authenticated.

Marketing copy:
- Roadmap NOW phase reflects the desktop ship (web-shell, embedded watcher,
  multi-OS pipeline); NEXT phase reframed to "Distribution and auto-update"
  with concrete remaining work (signed mac/Win binaries publicly shipping,
  auto-update, native package channels, IPC bridge polish).
- Investors "what we have built" copy updated to mention the desktop app + CI.

Pre-existing fixes folded in:
- Control surface: AttentionBar deduplicates the "Needs attention" reason chip;
  control-presenter labels the session-with-mtime-but-no-readiness case as Idle.
- Scripts: cockpit → fleetcrown rename sweep across beacon/install/deploy.
- /api/system/daemon route updates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 10:37:30 +02:00
Mao NakamotoandClaude Opus 4.7 a3b13d3f84 chore: rename github handle g-but → maonakamoto across repo refs
Closes the loop on the github username rename. Replaces every
g-but → maonakamoto reference in:

- desktop/package.json (electron-updater publish.owner — drives auto-update)
- desktop/README.md, src/config/marketing-content.ts (clone/release URLs)
- scripts/install-fleetcrown-{app,daemon,beacon-window}.sh (systemd Documentation=)
- scripts/wait-for-vercel.sh (example output in code comment)
- src/app/api/project/bootstrap/route.ts (default github user fallback)
- legal/IP_ASSIGNMENT_MEMO.md (repository location only — natural-person
  identification preserved until bitbaum AG / FleetCrown GmbH incorporate)

Local + global git config (user.name, user.email) and the origin remote
URL already updated outside the tree. GitHub auto-redirects the old URLs
but flipping them eliminates the leak and matches the pseudonymous-founder
direction.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-02 18:52:47 +02:00
Georgy ButaevandClaude Opus 4.7 8fc676c488 feat(desktop): OS notifications on worker.idle + real tray/window icon
Embedded watcher gains an optional onIdle subscriber; the desktop main
process passes a callback that fires an OS notification (with a health
badge prefix and the handoff "done" line) every time a dispatched agent
writes its handoff. Clicking the notification surfaces the main window.
This closes the fire-and-walk-away loop: dispatch an intent, switch
context, get pinged when it lands.

Tray + window icon: replaces the placeholder nativeImage.createEmpty()
with the FleetCrown control-window mark, pre-rendered to PNG by a small
pure-Node generator (scripts/generate-tray-icon.mjs — wired into
prebuild + dev). 22px tray, 44px @2x, 256px window/builder icon. Icons
checked in under desktop/resources/ with a targeted gitignore exception
so packaged binaries pick them up without a build step. electron-builder
config gains buildResources + extraResources so the PNGs ship with
AppImage / deb / dmg / nsis.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-02 17:04:14 +02:00
Georgy Butaev b08ac4da14 feat(desktop): project selection + auto-sync on connect + Sync to Web (agent token to /runtime-state); switch to canonical injectIntoTab; ui-public-download-* classes (zero design violations); forward custom prompts as queueHead; clean lint; broad docs/marketing/scripts updates for FleetCrown desktop runtime 2026-06-02 12:17:12 +02:00
Georgy Butaev 2d98638e38 feat(desktop): project selection, auto-sync on connect, Sync to Web button using agent token; polish site download instructions and settings promotion; update .gitignore and docs for current state 2026-06-02 11:51:23 +02:00
Georgy Butaev 5bc875fb3a feat(desktop): introduce Electron Fleet Runner (local authoritative runtime) with home/ stack integration, x.ai minimalist styling, dispatch with real prompt rendering + zellij injection, and electron-builder packaging for AppImage/deb 2026-06-02 10:59:30 +02:00