Priority re-ranking reshuffled rows under the cursor on every state
refresh — two misdispatches on 2026-07-03 (one to the wrong project,
one swallowed by a re-render). Row order now recomputes only when the
sort mode, the query, or the set of visible projects changes; live
refreshes update card content in place.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The devLog append (and its OrangeCat wall promote) only lived on the
LOCAL runtime path in /api/control — the cloud ingestion path
(runtime-state route, the ONLY path for box-executed sessions) persisted
handoffs to project_states but never recorded them in the project
changelog. Extracted recordSessionHandoffChangelog() as the single
append point (same changed-done guard, heartbeat-safe) and wired it
into both paths. Also: the dossier header clamps 1000-word agent briefs
to a gist — the full text stays in the brief attrs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
/projects/[id] is a real server-rendered page answering the captain's
three questions per project: Done (changelog from devLog + run history
with outcomes/commits/durations), Now (live agent state, latest handoff
checks, mission/brief attributes), Next (resume state from the handoff,
linked goals with progress, dispatch CTA). Identity strip carries
status/maturity chips, the outcome streak (deep-linked to Activity),
and repo/live-site/OrangeCat/Control links.
One SSOT assembly (getProjectDossier) composes EXISTING queries —
getProjectDetail, getProjectOrchestrationRuns, getRecentOutcomes,
getProjectStateByProjectId, getProjectActivity, user_projects row —
zero new tables, no parallel state. Deliberately deterministic: no
vector retrieval (pgvector stays where similarity earns it — the
cross-project fleet-RAG already injected into dispatches); a project's
own dossier must be exact, not similar. getProjectContext (the
agent-facing projection) is slated to converge on this assembly so the
page a human reads and the context an agent receives cannot disagree.
Grid/list clicks navigate to the page; the drawer remains the
quick-edit surface via the page's Quick-edit button and ?open= links.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The cloud dispatch path (assembleInjectPrompt) never instructed agents
to write ~/.claude/sessions/<tab>.md — the run-closure signal
(closeRunFromSession reads the pusher-persisted handoff). Box agents
finished real work, ls'd ~/.claude/sessions/ for the contract, found
nothing, wrote no handoff, and were reaped as timeouts; laptop agents
only complied because the founder's personal global CLAUDE.md happens
to describe the same contract. Extracted the field block into
sessionHandoffContract() (SSOT) — buildPromptWithSession (local
enrichment) and assembleInjectPrompt (cloud) both consume it.
Tilde-relative path on purpose (executing machine expands HOME);
resolveSessionFile already reads case-insensitively.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Big dispatch prompts (RAG context blocks) were still being ingested by
the TUI when injectPty's fixed-delay CRs arrived — swallowed as
in-paste newlines, prompt parked unsubmitted in the composer (visible
in the Workspaces activity column). Wrap the body in explicit
ESC[200~/ESC[201~ so ingestion is atomic and the trailing CR is a real
keypress; the poller's verify-retry now sends a bare Enter first (a
parked composer submits without duplication) before a full re-inject.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude Code writes live per-PID status to ~/.claude/sessions/<pid>.json
(status idle|working, cwd). Three fixes hang off it:
- Dispatch verify: isPtyBusy was fooled by boot-screen redraw — on a
fresh clone the trust-folder dialog ate the injected paste and six
agents were acked 'launched + injected' while idle at an empty
composer. waitForAgentGenerating() now polls the CLI's own status
(fallback to isPtyBusy for agents without live status files) and
re-injects once when verifiably idle.
- Pusher lifecycle: readFastState synthesizes the direct_terminal
observation from live status, so headless PTY agents mid-task read
as Working instead of 'process detected, no lifecycle signal'
(the producer the presenter test always described but nothing built).
- Deploy hardening: the restart ssh runs under timeout 180 +
keep-alives after hanging 47 minutes post-restart and freezing the
deploy before verification and the runner sync.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The headless box has no claude-projects.conf (a laptop dotfile), so
buildProjectRuntimePayload pushed ZERO project entries — project_states
was only ever fed by the laptop runner. When the laptop slept, the
cloud UI froze on a days-old snapshot ('5 awaiting input') while real
PTY agents ran unseen. With an empty conf the pusher now synthesizes
{tab, dir} from the agent processes actually running.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 25-nudge cap predates the scheduler actually firing (the
user-selection bug made it a no-op); the first live tick would have
cold-started ~18 agent PTYs at once on the 4 GB box. Same throttle as
fleet-kick; idle/cooldown gates spread the rest over later ticks.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dogfood session drove FleetCrown against production and found the fleet
had been silently dead for 2 days behind a green light:
- nudge-idle raw-queried beacon_settings WHERE mode != 'off', so users
with NO row (missing row = default 'on') were invisible to the
scheduler — autopilot dispatched nothing while the hero said
'Autopilot on'. New SSOT getFleetAutopilotUserIds() decides
enrollment for schedulers; missing rows count as on.
- The stale-run reaper only ran on /api/control page loads: 16 runs sat
'waiting' for 51h until a human looked, then got stamped with
fabricated 51h durations. New hourly reap-stale-runs cron reaps all
users; finishedAt = startedAt + STALE_RUN_MINUTES (truthful).
- Hero headline was mode-derived ('Building' + pulsing green with 0
working and 16/16 failed runs). deriveFleetPulse() (pure, tested)
now derives Building / Waiting to dispatch / Stalled(+Review
failures link) / Paused from live counts + latest outcomes.
- OutcomeStreak ✗ glyphs were unlabeled dead-ends; the streak now
deep-links to /activity?window=week&project=<key>.
- box-runner logged 'connected · last poll 0s ago' every 2s to journald
(~40k lines/day); now logs on state change + 15-min heartbeat.
Presenter tests 25/25 (6 new fleet-pulse cases).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
OrangeCat users can now land in FleetCrown with an intent to create:
/projects?new=1 opens the Add Project dialog on load, ?name= prefills
the name field. Params are one-shot — stripped via replaceState after
opening so reload/back doesn't retrigger the dialog.
- ModalForm: new optional defaultOpen prop (backwards compatible)
- NewProjectButton: autoOpen + initialName props + URL cleanup effect
- projects/page.tsx: reads searchParams server-side, passes down
- docs: bridge Part B status updated (deep link implemented; onboarding
gate drops the callback for brand-new users — noted as caveat)
Query params survive the sign-in redirect: middleware sets
callbackUrl=pathname+search and SignInForm passes it to signIn().
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Closes the two operational gaps in bridge Parts A/C (FC master plan
Phase 0.4/0.5):
- /api/crons/orangecat-promote-backfill re-emits project_published +
recent devlog promotes for every OC-linked project daily (09:00 UTC
timer added to install-hetzner-crons.sh). Deterministic external ids
make re-posting idempotent — 'best-effort must not mean silently
lossy' is now true.
- promoteMomentToOrangeCat/promoteDevLogEntry return a PromoteOutcome
so the janitor can count posted/skipped/failed (user-action call
sites still fire-and-forget via void).
- Settings → Account gains a Connect OrangeCat row for existing users
(env-gated like the sign-in button); links via the same OIDC flow,
which also unlocks Publish to OrangeCat.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The smoke section's early exit 0 (server not running) returned from the
hook before the appended push-deploy block, silently disabling
push-to-deploy whenever the local dev server was down.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
OrangeCat's token endpoint only supports client_secret_post; Auth.js
defaults to client_secret_basic, so the code exchange failed with
400 "client_id is required" and sign-in surfaced error=Configuration.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- publishProjectToOrangeCat: opt-in per-project publish as the USER's OC
actor (OIDC access token from Login with OrangeCat, with refresh-token
rotation persisted); back-link on user_projects.orangecatProjectId
(migration 0035, applied to live + dev DBs).
- Promote step: config-driven policy (src/config/orangecat-publish.ts),
async + fire-and-forget + idempotent (deterministic external_id) onto
OC's publish bus /api/v1/timeline/publish. Dev-log appends now promote
as project_updated; first publish posts project_published.
- Cat icon action in the project detail header: publish / view-on-OC /
connect-first states.
- orangecat-identity: per-user token resolution distinct from the studio
ORANGECAT_API_KEY service key.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Mount an 'orangecat' Auth.js OIDC provider against the orangecat.ch
authorization server (endpoint discovery via issuer; PKCE + state; email
account-linking policy matching GitHub/Google). Requests the full 7-scope
one-consent grant so the stored access token also powers project publish
and timeline promote later (bridge Part C).
- users.orangecatActorId (uuid, partial-unique) persisted on every OC
sign-in from id_token.sub via events.signIn. Migration 0034 (applied to
the live DB).
- 'Continue with OrangeCat' button on sign-in, gated through the
auth-providers SSOT (env pair ORANGECAT_OAUTH_CLIENT_ID/SECRET).
- Bridge doc status updated: OC provider shipped 2026-06-17, FC relying
party built now; B/C/embeds remain as specced.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wrap the dispatch-footer wait in a non-throwing gotDispatch check (local +
prod paths). On timeout, record a high-severity weakness and a timeout
screenshot instead of throwing on waitForSelector, so a hung Send produces a
report rather than aborting the whole run. Also force-click the owner-key tab
with a bounded timeout. (Concurrent-session edit, committed to keep the tree
clean — see pattern-concurrent-autopilot-worktree-race.)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
npm run dogfood:self drives Control → Loki "Move forward" → Terminal Cloud →
Projects against local or prod (fleetcrown.orangecat.ch), screenshots each
step, and emits a weakness report. Mirrors dogfood:loki (same playwright/
chromium convention, undeclared dep shared by both — tracked as follow-up).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cloud inject always queues even when box-runner is connected; distinguish
runnerConnected in Loki footer, Control toasts, and dispatch-status SSOT.
Add prod dogfood script and dispatch-status tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Browser-first onboarding and executor-copy SSOT; Loki imperatives and move-forward
route to the same builder queue as Control with cloud-first Terminal links; fleet-kick
queues when offline; deploy script syncs box-runner.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add Build/Pause selected on Control, multi-project command fan-out in Loki,
and route scoped screenshots to dispatch with vision preflight instead of chat.
Co-authored-by: Cursor <cursoragent@cursor.com>
Start building now batch-dispatches next_best on eligible idle projects
(capped at three concurrent) and Loki accepts develop-all phrasing; restore
the daily idle nudge for users with autopilot on after the mode collapse.
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire NL fast paths before resolveCommand so Loki can generate living business
plans and queue profile field changes through Today’s action queue instead of
silent chat writes.
Co-authored-by: Cursor <cursoragent@cursor.com>
When a project is selected, named, or resolved for chat, prepend the same
getProjectContext block dispatch uses so Loki answers with mission, stack, and goals.
Co-authored-by: Cursor <cursoragent@cursor.com>
Groq Llama 4 Scout describes pasted/picked images for chat and dispatch.
Add scoped-project pill, quick-action chips, hide model picker on mobile,
and hide the shell FAB on /loki.
Co-authored-by: Cursor <cursoragent@cursor.com>
Route shell FAB and loki:open to /loki with composer prefill; retire the
chat-only modal. Add fleet list/create NL fast paths, project picker chips
for ambiguous dispatches, and a db helper to inspect recent conversations.
Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify Saved prompts vs Up next vs Recent dispatches vs Paste from history
via config/control-labels.ts; align activity stats and composer hints.
Co-authored-by: Cursor <cursoragent@cursor.com>
Merge SLH into surf-your-life on prod, drop orphaned box DB, remove SLH from
hetzner manifest, and wire Bitbaum user_projects dir for local dispatch.
Co-authored-by: Cursor <cursoragent@cursor.com>
Merge Cockpit and empty dupes into canonical entities, delete infra/stub
rows, and ship retire-stale-projects.ts plus merge helpers for future hygiene.
Co-authored-by: Cursor <cursoragent@cursor.com>
Re-ran enrich-prod-profiles against Hetzner — 16 projects now have
architecture/conventions/DoD. Add Groq retry for transient fetch failures.
Co-authored-by: Cursor <cursoragent@cursor.com>
Surface fleet-knowledge chunk counts on /memory, document box RAG ops via
install-fleet-rag.sh, and add rag-retrieval test script. Reindex on production
already active (24 chunks across 21 project profiles).
Co-authored-by: Cursor <cursoragent@cursor.com>
Phone/Loki/beacon dispatches queued bare promptKey strings on the cloud host;
assembleInjectPrompt now matches orchestration/run. Persist architecture/
conventions/DoD from AI briefs, expand injected fields, add build-contract UI,
and reindex profile embeddings on save when RAG is enabled.
Co-authored-by: Cursor <cursoragent@cursor.com>
Hide bottom nav and top bar while drawers/modals are open; improve project
profile header layout, tab bar, and card action sizes. Add mobile pages audit script.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expand/collapse on phones gives xterm usable height; Loki dispatches route
"let's develop" through next_best and link to watch the agent. Profile drawer
follows action-first hierarchy with filtered activity noise.
Co-authored-by: Cursor <cursoragent@cursor.com>