mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-05 10:28:28 +01:00
81bf2041be96b400a07afce68e138a7768faef80
148
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6b653c36d6 |
docs: sync docs with actual stack (#487)
The repo moved to pnpm 11.25.0 (packageManager, pnpm-lock.yaml, CI and deploy all pnpm) but 17 docs still taught npm commands. Sync every current-instruction command to pnpm (`npm run` → `pnpm run`, `npm install` → `pnpm install`, `npx tsx` → `pnpm exec tsx`, and `db:apply-box -- <file>` loses the `--` separator under pnpm). Deliberately kept: npm inside desktop/ (own package-lock.json, installed via `npm ci` in desktop-release.yml and check-desktop.sh — excluded from the pnpm workspace); `npm i -g openclaw` (box-global install); dated historical audit/log entries that record runs made under npm. Also in docs/infrastructure/self-host-cd.md: the pipeline diagram said `npm ci` where selfhost-deploy.yml detects npm/pnpm per lockfile, and the `node-version` fallback is 24 (doc said default 20); documented the `package-manager` override input. Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
1647fe7987 |
fix(sweep): a test that rotted behind a wrong excuse, and a box spec off by 2x (#480)
Three follow-ups from sweeping the earlier findings. Two of the four I had
carried forward did NOT survive checking and are dropped: /api/control/dispatch
is a real route, so the docs referencing it are correct; and
scripts/test/push-notifications.ts exists. Verifying first is why this commit
is smaller than the list that prompted it.
1. THE TEST NOBODY RAN, FOR A REASON THAT WAS NEVER TRUE
scripts/test/push-notifications.ts read scripts/agent-hook-bridge.sh, which was
deleted on 2026-06-11 in
|
||
|
|
f487cc3862 |
chore: delete 1,190 lines of dead code, two dependencies, and two lying snapshots (#463)
* chore: delete dead code, and two dependencies with it
Each deletion verified by grep in both directions before removal, and
`npm run verify` passes with all of it gone.
src/components/ui/button.tsx — zero importers. It was also the ONLY
consumer of @base-ui/react and class-variance-authority, so both come out
of package.json with it. A shadcn-style Button was always going to sit
unused in a repo whose buttons are ui-btn-* classes in globals.css; what
it actually cost was two dependencies in every install and audit.
The Atlas cluster. /atlas redirects to /projects and the NAV entry points
there too, so the only link to /atlas/[projectId] lived inside AtlasCard —
which nothing rendered. Removed:
• AtlasCard.tsx, LinkSuggestions.tsx — zero importers
• lib/atlas/suggest.ts, graph.ts — reachable only from LinkSuggestions
and their own test, which is the shape of code kept alive by the thing
that proves it works rather than by anything that uses it
• scripts/test/atlas.ts — that test
• GET /api/atlas and POST /api/atlas/refresh — zero callers
• scripts/atlas-probe-once.ts, whose own first line calls it a
"TEMPORARY ops runner (deleted after use)"
DELIBERATELY KEPT, because they are live: /api/atlas/site (HealthScore and
LiveUrlField both PATCH it), /api/atlas/guides, lib/atlas/probe.ts,
SitePages, SiteGuides, getAtlasRow, and the /atlas/[projectId] page they
render — it is reachable by URL even though nothing links to it, and that
is a different question from being dead. The /api/atlas demo-sandbox deny
prefix also stays: it still covers the site and guides routes.
* docs: date the two snapshots that are read as if they were current
HANDOFF.md and AUDIT_REPORT.md are point-in-time reports with no staleness
marker, so both keep being read as the present tense. Neither is rewritten
here — the reasoning in them is still worth having — but each now opens
with what was re-verified today and what it got wrong.
HANDOFF.md matters most because it literally opens "Read this first", so
a wrong number in it travels further than one in a reference doc. Verified:
desktop is v0.8.15 not v0.7.5, Electron ^43.4.1 not 33, ~57 schema modules
not 39 tables, the deploy uses the forward-only applier not drizzle-kit
migrate, its "next up" list is fully ticked, and the manual mirror step it
describes is automated.
AUDIT_REPORT.md has drifted in BOTH directions, which is the more
interesting failure: item 3 (bare box IPs) largely closed once
scripts/hetzner/_box-env.sh landed, while item 8 (god files) got worse —
1254→1297, 963→1044, 789→948. An unticked "LOW" item is not a stable one.
It also carried the private-zone PIN twice in its own text, including in
the line telling the operator to rotate it "because it is in git". Having
scrubbed that value from three scripts, the report had become the only
file in HEAD still publishing it. Both occurrences redacted. The item
stays OPEN: redaction is not rotation, and the history leak is unchanged.
---------
Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
|
||
|
|
c41c1809e2 |
feat(widget): speak your feedback — plus the signals, escaping and docs that were lying (#462)
* fix(email): escape visitor text before it reaches an email body feedbackShippedTemplate interpolated `excerpt` and `page` raw. Both are visitor-authored — excerpt is the free-prose suggestion typed into the widget on a customer's site, page is location.pathname read off that site — and the resulting HTML is mailed from our own domain to an address the same visitor supplied. operatorMailTemplate, four lines below, escaped correctly with an inline replace-chain. That is the tell: escaping was something each template had to remember separately, and this one forgot. rss.xml had a third copy of the same chain. So the escape is now a named helper both callers share, covering the five XML predefined entities (the two extra quote forms make it safe in an attribute as well as a text node, so no caller has to pick a variant). Also makes the templates importable without a database. logSend's debug-logs import opened a DB client at module load, which every pure template in the file inherited — the reason none of them had tests. It is deferred into the function now; sending logs exactly as before. Proven by mutation: reverting the escape turns exactly the three injection assertions red, not the whole file. * fix(feedback): stop a failed request from answering "nothing needs you" Three surfaces read an empty array as an empty queue. An empty array is also what a failed fetch leaves behind, so a 500 or a timeout rendered as the confident answer "there is nothing here" — on the exact screens an operator checks to be sure nothing is waiting. - ControlInbox returned null when total === 0, so both fetches failing produced total silence. It now stays quiet while requests are still in flight (a failure that resolves fast should not flash), and once they settle with nothing, says which of the two happened. When one list loads and the other does not, the count renders with a note that it may be low rather than presenting a partial total as complete. - FeedbackInbox dropped `error` from useFetch entirely and fell through to "No feedback yet". The load error is now aliased `loadError` — `error` was already the mutation error from useFeedbackActions, and that collision is how the load error came to be dropped. - ProjectFeedbackSection treated a failed token GET as "no token", which offered "Enable & install" for a widget that may already be live on the customer's site. Not knowing is now its own state. Every new branch is reachable only when a request actually failed; the genuine empty states are untouched. * feat(widget): let visitors speak their feedback instead of typing it Typing a bug report on a phone, on someone else's site, is where most reports die. The widget now offers a mic: record, the clip is transcribed, and the text lands in the same textarea appended to whatever was already typed. The visitor still presses Send — speech-to-text mishears things, and a mic that auto-sent would file those mistakes under their name. FleetCrown already had working transcription (terminal, Loki composer, command palette) but the widget never got it. Two things were missing: - CORS. /api/beacon/transcribe is public but answers no preflight and sets no ACAO, so a cross-origin caller can never read the response. - Authorization. That route takes no token — it is guarded only by a per-IP limiter. Opening it cross-origin would have made it an anonymous endpoint that spends our Groq quota for anyone with the URL. So this adds /api/widget/transcribe rather than widening the beacon route: same fcw_* token that already authorizes ingest, same per-token origin allowlist, per-IP and per-token rate limits, and Groq only — the local-Whisper fallback spawns ffmpeg + python3 on the host, which is not something to expose to anonymous traffic. The Groq step itself moved to lib/transcribe.ts so both routes share one implementation instead of growing two copies of the error mapping. Also in the widget, from the same audit: - Recording stops and the mic is released when the panel closes, so the browser's recording indicator never outlives the panel on a host site. - Sub-44px touch targets (the 18px remove-image dot, attach button) get a coarse-pointer hit area without changing how they look. - The pulsing record dot honours prefers-reduced-motion. Progressive enhancement throughout: no MediaRecorder, or an insecure origin where getUserMedia is undefined, renders no button at all rather than a control that cannot work. Bundle 16.3KB -> 20.8KB. /api/widget is classified "spend" in the demo sandbox — the repo's own gate caught that omission before this commit existed. * docs(claude): correct the claims that were sending agents the wrong way CLAUDE.md is loaded into every agent session, so a false line in it is not a stale doc — it is an instruction. Each of these was verified against the code in both directions before editing. - Session helpers. It named `getCurrentUserId()` and `DEFAULT_USER_ID`; neither has existed since |
||
|
|
7c12ddb023 |
feat(ops): SSOT registry for everything that reaches the operator's Telegram (#445)
George: 'telegram should still update me on things. and we should have ssot for things telegram does/updates me on. i do like when it tells me when there is feedback sent through the feedback form.' docs/telegram-notifications.md is now that SSOT: every notification class — requested updates (visitor feedback, run outcomes, Loki briefings), incidents (with the fix-agent dispatch), platform self-checks, and off-repo senders (Loki cron, orangecat uptime) — one row each: what arrives, when, from where. Enforced, not aspirational: scripts/ci/check-telegram-registry.sh (wired into npm run verify) finds every sender surface in the repo — direct api.telegram.org calls, importers of telegram-send.ts, box scripts sourcing lib-alert.sh — and fails when a path is missing from the registry. Adding a notification without registering it turns CI red in the same PR. Mutation-proven: a planted unregistered sender fails the gate naming the file; removing it goes green (22 sender files registered). Claude-Session: https://claude.ai/code/session_018RmMktaYn8MuJdEqjp5gWU Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
beb1ee1699 |
feat(ops): a page queues its own fix — incident dispatch into FleetCrown (#443)
The alerting stack got very good at saying 'X is broken' exactly once — and then a human still had to do the fixing. 2026-08-29 morning: four appcron units re-paged every 30 minutes, every one fixable by an agent, none fixed by one, while the FleetCrown box-runner polled an empty queue on the same box. New /opt/monitoring/incident-dispatch.sh: every unit failure worth paging also queues a remediation run (POST /api/inject, the same call Loki's fc.sh makes; journal tail embedded in the prompt; notifyOnClose so the run's close summary — root cause, action, what remains — is what reaches the phone). One incident is one dispatch: a dispatch:<unit> stamp shared by both detectors (OnFailure notifier + host-check sweep), cleared on recovery. Failure modes never cost the page: missing token, API refusal, unknown project (retried as fleetcrown) all degrade to journal lines. ALERT_DRY_RUN queues nothing. The page itself now says '🤖 fix agent dispatched (<project>)' — the clause that turns it from 'act now' into 'read the outcome when it arrives'. 18 new test cases in test-host-alerts.sh (78 total); mutation-verified: with the notifier's dispatch call removed, 12 go red. Claude-Session: https://claude.ai/code/session_018RmMktaYn8MuJdEqjp5gWU Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
4d1c9f1fe7 |
chore: migrate the fleet to the bitbaum org (#415)
* chore(ci): GitHub owner catomean -> bitbaum * docs(hetzner): update _box-env.sh comments for the completed org migration The GH_OWNER/WORKFLOW_OWNER comments described a future state (repos moving to bitbaum while fleetcrown stayed personal) that sweep-gh-owner.sh just made true, then obsolete: fleetcrown itself is in bitbaum now too. Comments describing a plan that already happened are worse than no comment — they send the next reader looking for a divergence that isn't there. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN * chore(desktop): release 0.8.15 — the org-migration owner literals Same shape as 0.8.14: desktop/ carries two literal owner references (issue link, updater feed owner) that a fleet-wide rename touches, and desktop-release-drift.ts correctly refuses to let that ship without a version bump — a repo whose desktop app silently points at a dead update feed is worse than one that fails the gate. This should be the last time it's an account name: the org is the stable home from here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN --------- Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
45938e60cf |
fix(ci): unbreak the gates — dependency graph, agent-core drift, desktop release (#400)
* refactor(infra): studio constants get one home, and the rename gets a command Fair criticism: I spent the day arguing for SSOT and then wrote new-site.sh with its own copies of GH_OWNER, BASE_DOMAIN and DEV_ROOT, and hardcoded 'maonakamoto' again in provision-widget.ts. Worse, the pattern already existed — _box-env.sh is literally labelled 'SSOT' for the box address. I did not extend it, I duplicated around it. _box-env.sh now owns GH_OWNER, SITES_BASE_DOMAIN and DEV_ROOT alongside the box address, and new-site.sh and provision-widget.ts read them instead of carrying their own. The 41 workflow files are a different case and worth being precise about: GitHub Actions requires a LITERAL owner/repo in and will not accept a variable, so that duplication cannot be removed. But a duplication you cannot remove is one you have to OWN — leaving it as 'remember to edit 41 files' is exactly the shape of step that gets skipped, the same shape as the git repository Camille never got. So sweep-gh-owner.sh is committed: one command, dry-runnable, optionally self-committing. Dry run against the fleet: 24 repos, all detected correctly. Renaming to an org is now plus one line in _box-env.sh. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(infra): split WORKFLOW_OWNER from GH_OWNER before they diverge Same bug as the last commit, one layer down. The site template hardcoded maonakamoto/fleetcrown in its deploy.yml uses: line, derived from nothing — so every new site would bake in a literal that follows neither an account rename nor a move to an org. And GH_OWNER was quietly doing two jobs: where new site repos are CREATED, and where fleetcrown LIVES. They look identical today and are about to diverge — sites go to an org while fleetcrown stays on the personal account. One name for two values is how a rename half-works. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore(ci): GitHub owner maonakamoto -> catomean * chore(infra): owner is catomean Account renamed maonakamoto -> catomean. sweep-gh-owner.sh swept 24 repos and the SSOT now agrees; 32 local remotes repointed. This is the commit the sweep script exists for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore(ci): GitHub owner maonakamoto -> catomean * chore(ci): GitHub owner maonakamoto -> catomean * fix(desktop): cut 0.8.14 — the owner rename touched desktop code My owner sweep changed two files in desktop/ (an update URL and a package reference) without bumping the version. That is precisely the failure #370 existed to prevent: desktop code that changes without a release ships to the server and to no machine at all, silently. The gate caught it, four commits after it was written. Working as intended, and worth saying plainly — I was the one it caught. GitHub redirects repository URLs after a rename, but only until somebody claims the freed name. An auto-updater should not depend on a redirect. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(ci): the gate fails on your diff, not on your laptop Three things in this hook blocked pushes for reasons unrelated to the change being pushed, and together they are why --no-verify became reflex here. I passed it eight times in one day and blamed the hook; the hook was reporting real problems with misleading attribution. 1. STALE INSTALL. An unresolvable dependency surfaced as 'Cannot find module' — indistinguishable from a type error in your code. Now a precondition that fails first, loudly, naming npm ci. A day was spent on this exact confusion. 2. AGENT-CORE DRIFT. Drift arises either because you changed canonical without syncing, or because somebody changed the mirror in the other repo. Only the first is yours. It now checks whether this branch touched src/lib/agent/core/ and warns instead of blocking when it did not. 3. SCHEMA DRIFT. The guard already skipped an unreachable database but not a reachable stale one, so a local scratch DB missing someone else's columns blocked pushes touching no schema. Now scoped: if the branch changes schema a mismatch is yours and blocks; otherwise it reports and continues. The pattern is taken from desktop-release-drift, which self-scopes to files changed since the last release and is the only check here that has never blocked an unrelated push. It caught me correctly today, four commits after it was written. Where scope cannot be established the checks still fail closed — a gate that cannot establish innocence should not grant it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(ci): resolve the default branch, never assume main The diff-scoping added in the previous commit compares against origin/main. 28 repos here use main — but aoz-housing, dotfiles and sbb-lost-found use master, and six had no origin/HEAD set at all. On those, merge-base fails, the scoping falls through to 'cannot tell', and every check treats every change as in-scope. The gate I had just fixed would have gone back to blocking unrelated pushes on a fifth of the fleet, for a reason nobody would have connected to a branch name. default_branch() now lives in lib.sh and resolves in order: the remote's own origin/HEAD, then whichever of main/master exists, then fail. Never a guess. The pre-push hook and agent-core-drift both use it. Also ran 'origin/HEAD' is unchanged and points to 'main' on the six repos missing origin/HEAD. 32 of 33 now resolve; wild-spirit has no remote at all, which is a separate finding and the same shape as camille this morning. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat(scaffold): every new site is born with CI ci-gate.sh cannot tell 'CI green' from 'no CI configured' — both exit 0. So a scaffolded site without a workflow deployed every push unverified while looking identical to one that passed. Substrata shipped to production that way for a day. The template now emits ci.yml alongside deploy.yml: npm ci, type-check, lint, build — the same bundle verify runs locally. Plus eslint.config.mjs, because ESLint 9 without a flat config exits non-zero on a migration notice and a new site's FIRST CI run would be red for reasons unrelated to its code. A red first run teaches people to ignore the light. Config copied from the fleet's working Next 16 apps, not invented. postcss.config.mjs assigns before exporting — the anonymous default export is a lint warning, and a scaffold should not emit its own warnings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat(ci): no deployed app ships without CI, ratcheted to zero ci-gate.sh exits 0 for 'CI green' AND for 'no CI configured'. Absence is indistinguishable from success, so an app with no workflow deploys every push unverified while looking exactly like one that passed. Nothing reported it, because nothing was looking. The audit found two: camille-boulangerie, and sink — which is sinktattoo.com, a real client's site. sink turned out to be a FALSE POSITIVE, and that is the more useful finding: apps.conf pointed at /home/g/dev/s-ink, a path that does not exist, so the gate reasoned about an absent repository and reported the wrong fault. It sent me to add a workflow to a repo that already had one. The register was the bug. So the gate now distinguishes a stale register entry from a missing workflow and fails loudly on the former — a gate that lies about what to fix is worse than no gate. apps.conf repointed at /home/g/dev/aslan-tattoo. Camille genuinely had none and now does. Baseline is 0: a new deployed app without CI is a build failure. Tested in all four directions — over baseline fails, at baseline passes, under baseline passes and prompts, stale path fails. The first version could never fail at all: it set HERE before sourcing lib.sh, which overwrites HERE, so BASELINE_FILE pointed at a missing file and silently fell back to the current count. Found by testing the gate rather than trusting it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat(scaffold): template ships .nvmrc Every new site now pins Node once, and both CI and the deploy read it. Without it the deploy warns and the two pipelines pick a version independently — the kind of difference that surfaces as 'green in CI, broken on the box'. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat(hetzner): scaffold sets the deploy key itself, from one configured path new-site.sh printed `gh secret set ...` and called that operator hygiene. What it actually produced was substrata live in production deploying only from a laptop, because a printed instruction is a step that gets skipped. The key is piped from DEPLOY_KEY_PATH straight into `gh secret set` — never read into a variable, a log, or an agent's context — so the safety argument that motivated the manual step is kept while the step disappears. Per-repo on purpose: GitHub Free does not expose org-level secrets to PRIVATE repositories, so an org secret alone would silently cover only part of the fleet. DEPLOY_KEY_PATH joins the other constants in _box-env.sh so there is one path, not one per script. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN * fix(ci): make the deploy-ready gate judge the diff, not the workstation The gate inspected the sibling checkouts under DEV_ROOT and nothing else. All 15 are cloned on the workstation, so it printed "all 15 deployed apps have CI"; CI clones this repo only, so the same commit printed fifteen missing repos and exited 1 — red on a diff that touched none of them. Third instance of one class: a gate judging state outside the commit. Its real cost is not the red run, it is that everyone learns the gate is noise and reaches for --no-verify. Split into the two halves that were tangled: REGISTER INTEGRITY — apps.conf lives in this repo, so it is in the diff, so CI must judge it. Now actually checked: field count, unique names, unique numeric ports. Previously nothing validated the register at all. FLEET INSPECTION — needs the checkouts. Where none exist it is announced as NOT RUN and exits 0. Announced, because "no output" and "all clear" looking identical is the bug this file was written to fix. Where some exist, a bad path is still drift and still fails. test:deploy-ready-gate locks it shut from both sides: a malformed register must fail even with no checkouts present, and a bare environment must never claim the fleet passed. Added to verify, so CI runs it in exactly the environment that used to break it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN --------- Co-authored-by: Mao Nakamoto <georgy.butaev@revamp-it.ch> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: t <t@t.t> |
||
|
|
736fc7865b |
Rebuild the phone experience, and make the numbers on it mean something (#393)
* feat(public): rebuild the marketing site for the phone it is read on The public surface was designed at desktop width and shipped to phones unchanged. On a 390px screen the header alone was 220px — a quarter of the viewport — with "PERSONAL SYSTEMS" wrapped onto two lines and the primary CTA clipped off the right edge on every page. Everything below it inherited desktop floors: a 52px headline min that broke "Run your fleet. From anywhere." into three lines with a wrecked rag, 20px body copy six lines deep, 200px card floors, and 96px section padding that read as the page having ended. Header. Sticky at every width, 56px on a phone: compact brand lockup, one always-visible CTA that cannot wrap, one menu button. Theme cycle and Sign in move into the drawer — four controls do not fit a 390px row, and the CTA was the one that lost. The drawer is now a real sheet: conversion actions first, 56px rows with descriptions, appearance in the footer. It is mounted by PublicHeaderActions rather than PublicSurface, because the shell is pulled into client bundles by AuthShell and cannot call auth(). Type and rhythm. Display sizes are viewport-relative with phone-sized floors and unchanged desktop ceilings. New ui-public-section / -section-gap / -container* primitives replace ad-hoc py-24 + max-w-* px-6 across every page. The homepage is 4,564px instead of 5,466; releases 10,338 instead of 12,255. Content. "Download runner" is a dead end on a phone — Fleet Runner is a .deb / .dmg / .exe. The hero offers the tour instead below sm, and /download leads with a handoff panel (open the web app, copy the install link) with the desktop flow one deliberate tap away. That detection also fixes a real bug: an Android UA contains "linux" and an iPhone UA contains "Mac", so phones were being offered an 80 MB Debian package or an Apple Silicon disk image. Fixed along the way, all confirmed in a headless browser at 320 and 390: - The footer used text-white/* after the surface became theme-aware — every heading and the copyright line were invisible on the Light theme. - Bare GitHub URLs on the legal pages overflowed a 320px viewport, and .ui-public-surface clips, so the tail was gone rather than scrollable. - Auth inputs were 14px, which makes Safari zoom the page on focus. - Standalone links ignored the pointer:coarse floor: min-height does nothing to an inline box, so "Forgot password?" measured 16px tall. - The hero fleet console truncated every project to "Life OS + AI agent …". Zero horizontal overflow and zero sub-44px standalone targets across 22 public routes at both widths; prose links stay inline per WCAG 2.5.5. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbuhKUVJRFzLufKyPLjHKN * fix(app): make the accent tokens visible, and the shell usable on a phone Two findings from driving the authenticated app through a real headless browser at 320 and 390 CSS px. **`text-accent` was invisible in both themes.** `--accent` / `--accent-foreground` are shadcn's accent SURFACE pair: `--accent` is a background tone, oklch(0.14) in dark and oklch(0.96) in light — one step from the page background either way. Thirty-one call sites used it as ink. Measured contrast: 1.0 in dark, 1.03 in light. What that hid was not decoration but the first screen a new user sees — the Control onboarding CTAs "No install needed →", "Download for your OS →", "Start →" and "Import →" were painted the same colour as their own cards. `border-accent` failed identically as a card hover highlight (four places), and `bg-accent` as the selected-repo checkbox fill, so a ticked box looked unticked. Now `text-accent-text` / `border-accent-primary` / `bg-accent-warm + text-on-accent`, measured back at 9.3:1 in dark and 20.6:1 in light. `check:design` gains an eighth check so the bare token cannot return, and docs/branding-design.md names the trap: a token that reads like a colour may be half of a surface pair — check its lightness against what it will sit on. **Shell fixes at phone width:** - The email-verification banner packed a sentence, two buttons and a dismiss into one 358px row, so the message truncated to "Verify your email for …" — losing the word ("optional") that decides whether to care. Message and actions now stack below `sm`. It renders on every authenticated route. - Settings gave the username field a 26-character host prefix, leaving ~120px for the part being edited and overflowing its own border. The phone gets `/u/` alone, and the input is 16px so Safari stops zooming on focus. - A bech32 wallet address on /money has no break opportunity and ran off a 320px viewport. - `ui-link-muted` is inline-flex, so the pointer:coarse floor can reach it — min-height does nothing to an inline box, which is why card-header actions like "View details →" measured 16px tall. Verified across 17 authenticated routes at 320 and 390: no horizontal overflow, and every remaining sub-44px target is a link inside a sentence, exempt under WCAG 2.5.5. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbuhKUVJRFzLufKyPLjHKN * fix(shell): flow-page headers, 16px inputs, and phone-only palette chrome Third pass over the phone experience, from the same headless-browser sweep. **Flow pages said everything twice and put the exit in the wrong place.** /control/new-from-scratch rendered an h1 "Start a new project", then a stranded "← Back to Control" row, then a card whose h2 read "Start a new project" and repeated the same intro paragraph — three headings deep before the first field, on the viewport with the least room for any of them. PageLayout gains a `back` slot that renders above the title, where a back affordance is looked for; the three Control flow pages use it and the duplicated heading is gone. **Inputs under 16px make Safari zoom the page.** Every field a phone user types into is now `text-base sm:text-sm`: the app's shared `ui-input` and `ui-input-compact` (search boxes, every inline edit), the command palette input (which autofocuses the moment the panel opens, so the zoom was unavoidable), the terminal's phone composer — the one field an operator sends agent input through, where the zoom pushed the terminal out from under the key deck — and the settings username field. Desktop density is unchanged from `sm` up. **Smaller things:** the command palette's keyboard-hint footer ("↑ ↓ navigate, ⏎ open, ⌘K toggle") is `hidden md:flex` — three shortcuts nobody can press, costing a line of the list the panel exists to show; and the reset-password "Request a new one" link is a real 44px target rather than a 16px inline one. Re-measured after the change: 22 public routes and 17 authenticated routes at 320 and 390 CSS px, no horizontal overflow anywhere, and every remaining sub-44px target is a link inside a sentence. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbuhKUVJRFzLufKyPLjHKN * polish(public): lead the phone with the entry point it can actually take Two last passes over the marketing surface at phone width. "Run locally" is the first of the three GET STARTED cards, which is right on a desktop — the visitor is plausibly sitting at the machine that would run the agents. On a phone it is the one entry point they cannot take, so the list opened on a dead end. It is `order-last` below `md` and the hosted control plane leads there; the grid restores config order at `md`. The footer's link columns paired an 8px gap with the 44px rows the pointer:coarse floor gives every link, so each column read as a list with holes punched in it. The gap is desktop-only now, and the links use `ui-public-link-standalone` so the floor actually reaches them — as an `inline` box, `ui-public-link` was ignoring the min-height it was granted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbuhKUVJRFzLufKyPLjHKN * fix(brand): drop the public wordmark below 360px instead of overlapping it At 320 CSS px — the narrowest width this app claims to support — the header's "FleetCrown" wordmark, the "Get started" pill and the menu button do not fit on one row, and the pill was drawn over the word rather than pushing it aside (the CTA is shrink-0, the wordmark had nothing telling it to yield). Below 360px the wordmark is hidden and the spiral carries the brand alone; it also truncates now, so no future label can overlap its neighbour. Measured across 320 / 360 / 375 / 390 / 414 / 430: a 65px header at every width, no overlap and no overflow. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbuhKUVJRFzLufKyPLjHKN * fix(people): show people on the people page /people is a contact list on which you could not see a contact. Measured at 390 x 844 with five people in the book, the first person card started 980px down — 1.16 screens — and everything above it was chrome: 164px search / sort / Add, three stacked full-width rows 482px PeopleBookPanel: a four-product glossary, three import recipes, three action buttons 96px health filter chips, wrapped onto two rows The book panel is the bulk of it, and it rendered unconditionally — a user with three hundred contacts scrolled past "FleetCrown is the book. Loki talks to it. OpenClaw is the WhatsApp/Telegram workspace… Hermes is a task CLI" on every single visit. Two of its three import recipes are desktop export flows (contacts.google.com → Export → Google CSV; File → Export vCard) that a phone cannot perform, presented as instructions the reader is apparently failing to follow. It is now a collapsed disclosure below the list, expanded by default only when the book is empty — the one moment when filling it IS the page rather than setup you already did. On a phone it also says which of the recipes need a computer. The control row is one row instead of three (Sort keeps its label from sm up and drops to its icon below it), and the health chips are a single scrolling row like every other filter row in the app. First contact: 980px → 308px. Four people now fit on the first screen. Also on /prompts, found by measuring every control label in the app for a wrapped line: "New prompt" was the only genuinely wrapped button in the product. Its header was `flex items-center justify-between` with no gap and a shrinkable button, so on a 358px row the label broke across two lines inside a 92px pill pressed against the sentence beside it — the same defect as the public header CTA. Now gap-3, shrink-0 and whitespace-nowrap. And UserPromptsSection.tsx carried a literal NUL byte, used as a separator in a dedup key. It made the file read as binary to grep, diff and editors — including to ripgrep, which is what check:design runs on, so the file was silently excluded from the gate. Writing it as a unicode escape instead (byte-identical at runtime) immediately surfaced a real hover:border-accent violation the gate had never been able to see. Fixed too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbuhKUVJRFzLufKyPLjHKN * fix(mobile): quickstart's device split, empty stat rows, one tier of project actions The last three findings from the phone sweep. **Quickstart tells you which steps your device can do.** The homepage sends phone visitors here ("See how it works"), and the page opens with "1. Decide: web or desktop?" then spends steps 3–5 on installing a binary, an agent CLI and a project path — terminal work, on a page reached from a phone. The steps are a genuine sequence so the numbering stays; what was missing is that three of them need a computer and four do not. A device map at the top now says so and anchors into each step, and the three desktop steps carry the marker on their own headings. A reader on a phone can now do 1–2 and know exactly what is waiting at their machine. **A row of zeros summarises nothing.** /habits and /goals opened with three stat cards reading 0 / 0 / — above an empty panel that said the same thing again, under a header that already offered "New Habit". Four statements of "you have none", filling the phone fold. The stat row is hidden until there is something to summarise, so the empty state is the single answer. StatRow also left an orphan: three cards in a two-column phone grid put the third half-width beside a gap. `:last-child:nth-child(odd)` spans the odd card out across the row — correct for three (2 + 1-wide) and for four (2 + 2), with no per-page rule. It fixes /money and /memory at the same time. **The project header claimed one visual tier and rendered four.** Its own comment says "everything here is a quiet ghost link", but LiveUrlField drew a bordered secondary button, OrangeCatPublishButton an unlabelled cat icon, and ProjectSharePanel a second bordered button — so on a phone, where the row wraps to two lines, it read as four unrelated controls rather than one set, with the sole bordered button reading as the page's primary action (it is not; that is Kickoff, further down). All five are ghost links with labels now, and the cat glyph has a word next to it. Re-measured: 22 public and 17 authenticated routes at 320 and 390, no horizontal overflow; every remaining sub-44px target is a link inside a sentence. tsc, eslint, check:design (8 checks) and 106 unit tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbuhKUVJRFzLufKyPLjHKN * fix(clarity): give the numbers and the glyphs a noun A score with no unit, a chip with no noun and a control whose only explanation is a hover tooltip all read as magic on a phone, so people learn to ignore them. Six fixes, all in that class. - Health chip: was ten unlabelled ticks and a bare "6/10", explainable only by hovering a `title` that a touch screen never renders. Now reads "Health ●●●●●● 6/10 · 4 to do" and taps open the ten named checks — a bottom sheet below sm, an anchored popover above it. The failing rows carry the action that earns the point, so they are no longer truncated. - "Status" vs "Stage": one field, two words, sitting two chips apart — the editor said "+ status", the health check said "Stage declared". The app already spends "status" on CI, run and agent status. Unified on "Stage"; the bare value chip now carries the noun ("Stage Production"). The attr key is untouched — this is vocabulary, not schema. - Health signals: "No broken" / "No open broken recorded." was built by lowercasing a badge label, producing a sentence with the noun missing. Written per signal now (clearLabel) instead of derived. - Prompt stats: "82% · 12 runs" made the reader guess the numerator. Now "82% success · 12 runs". - Notifications pill: rendered a button that could only fail when the deployment has no VAPID key, and its hover text named the environment variable to a person who cannot set it. Hidden in that state, like an unsupported browser. - Icon-only buttons: the shared delete trigger (nine call sites, one of them "Forget this entity") and the Loki dispatch arrow had `title` as their only accessible name. Both now carry aria-label. Verified: tsc, eslint, design-system (8 checks), and the touch sweep — hover-only meanings 69 → 52, of which 34 are the two conventional top-bar icons repeated once per route. * fix(clarity): stop pages explaining themselves in the schema's words Second pass of the same sweep, on the three pages that read most like internal state printed to a screen. /money - The three summary tiles rendered with zero subscriptions: "— / 0 active subscriptions", "0 / all confirmed", "— / other currencies". A third of a phone screen spent saying "nothing here", above an empty list with no way in. The summary now appears only once there is something to summarise, and the empty list carries a real empty state that says what the page will do for you, plus the Add button. - "Non-CHF /mo" printed the very same USD/EUR/GBP figures the burn tile already joins — the same money twice, under a label that reads like a different number. Replaced with "Next charge", the date and name of the soonest one due, which is the reason to open a money page. - The footnote explaining the row arrow and the unverified chip showed with no rows and no chips on screen. Now conditional, like the header Add button, which was duplicating the empty state's. - The founder-only OrangeCat note named the database table the relation lives in and then printed a bech32 address with no label. /memory - "Entities 11 / Relations 0 / Types 2" was the schema's vocabulary in three full icon-header cards. Now compact tiles that say what they count: things remembered, connections, kinds. - "Fleet knowledge (RAG)" told a user to set EMBEDDINGS_BASE_URL on the server, or to run a script on the box — instructions for whoever deploys this, shown to whoever uses it. Retitled "Context from your other projects" and rewritten to the one fact a user needs: on or off, and what that means for a dispatch. - Entity distribution printed the type badge and the type name next to each other: "person person". - "Forget everything" is irreversible and was a 14px-tall inline link (min-height is inert on an inline box); its confirm named the knowledge graph and the RAG index for one thing the reader knows as what Loki remembers. /system - Gateway and Uptime were two full cards with icon headers carrying one short fact each — two screenfuls before the first reading with any detail. Both answer "how is the host doing", so they are two rows of one card now. Verified: tsc, eslint, design-system (8 checks), and the authenticated 390px sweep — 17 routes, zero horizontal overflow. The four remaining sub-44px targets are inline prose links (WCAG 2.5.5 exempt). * feat(health): make the score a worklist you can drive to 10/10 The last pass made the number explainable. It still was not useful. "Mission stated ✗ — state the mission in Context" leaves you to find the tab, find the field and type; that is most of the work, and a number you cannot move is a number you learn to skip. So the panel performs the write. - Every check now carries the write that earns it (ProjectHealthFix in the SSOT: an attr, the description column, the live_url column, or clearing a signal flag). The panel opens the right field in place and saves through the API that owns it — no navigation, no hunting. - Every check states its exact rule next to it. Including the one rule nobody could guess: definition of done must name something an agent can run and report, so it now prints the keyword list it is tested against. The list is the SSOT and the regex is built from it, so the rule shown and the rule applied cannot drift. - The score moves as you go, optimistically, then reconciles on refresh. A score that only moves after a round trip reads as nothing happening. - Outstanding checks lead; earned ones fold away behind a count. Two bugs this surfaced, both the same shape — `useState(prop)` reads its argument once, on mount, so a value written from anywhere else landed in the database, came back down on router.refresh(), and was ignored: - The stage chip went on offering "+ stage" for a stage already set. - Live URL was worse than cosmetic: the check reads the production_url attr OR the live_url column, so writing the attr earned the point while the page's own field, which reads only the column, still said "Add live URL". The fix now writes the column, and the field re-seeds. A point you can earn while the page disagrees is worse than one you cannot earn. Verified by driving it in a real browser at 390px: a project went 5 → 6 → 7 → 8 → 9 → 10 from the panel alone, one check at a time, and the header followed each write (stage chip reads "Stage development", the quick link flipped from "Add live URL" to "Live"). Panel geometry clean at 390 and 320, fix buttons 310×44. tsc, eslint, design-system (8 checks), and the 17-route authenticated sweep at 390 and 320: zero horizontal overflow. * feat(health): let the model draft the gaps, without overwriting your work The worklist made every point earnable by hand. This adds the fast path I held back last time, once the thing that made it unsafe was fixed. The blocker was applyProjectProfile: it always overwrote. Pointing a "fill the gaps" button at it would have silently replaced a mission and a next step someone had written with the model's version — a worse outcome than leaving the point unearned. - applyProjectProfile takes { onlyMissing }, off by default, so kickoff is unchanged: there the user has just edited the brief and means for the profile to be rewritten from it. With it on, a field that already holds an answer is skipped. - "Already answered" is hasAnswer(), the same predicate computeProjectHealth uses. Any other test and a fill could overwrite a field the score had already counted, or skip one it had not. - POST .../brief accepts onlyMissing and says so when there is nothing left to fill, rather than reporting the generic extraction failure. In the panel, above the manual list: - The button names its work before it runs — "Draft 3 from the brief" — and the note names the three fields and the guarantee. The checks the brief cannot answer (where the code lives, where it is deployed, whether a flagged problem is really fixed) are facts only the person has; AI_FILLABLE_CHECKS lists them rather than inferring, so the button can never quietly do less than it implied. - No brief, or nothing fillable outstanding, and the button is absent — there is nothing to fill from. Verified: the overwrite protection is tested directly against the database — a field holding "MINE — do not touch" survives a fill that targets it, an empty field beside it is written, and a default call still overwrites so kickoff is untouched. In the browser at 390px the button renders "Draft 3 from the brief" at 310x44, the note reads correctly, the definition-of-done rule prints its full keyword list, and with no model key configured the failure surfaces in the panel and re-enables the button instead of hanging. tsc, eslint, design-system (8 checks), 150 home/ tests, and the 17-route sweep: zero horizontal overflow. * chore: commit the AGENTS.md block next dev regenerates Not hand-written: `next dev` appends this marked block on every start (node_modules/next/dist/server/lib/generate-agent-files.js), and next.config does not set `agentRules: false`. Left uncommitted it dirties the tree for every contributor the first time they run the dev server, so it belongs in the repo like any other generated file. Turn it off in next.config if the fleet would rather not carry it. --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
2c8a91aa00 |
control: rank the page instead of adding to it (#372)
* terminal: make the phone terminal something you can work in The report was two problems wearing one complaint. INERT. A soft keyboard has no arrows, no Esc, no Tab and no Ctrl — exactly the keys an agent TUI asks its questions with. You could read "Set up auto mode? [✔] Also scan shell history · ◄ Mixed ► · Continue" on your phone and had no way to answer it. TerminalKeyDeck is that missing half of the keyboard: a joined d-pad, Esc, Enter, and a scrollable lane of Space, Tab, the Ctrl codes, page keys and the digits agent CLIs number their permission choices with. Bytes are SSOT in config/terminal-keys.ts and go straight through transport.sendKey. Arrows and Backspace repeat on hold; Enter and the control codes deliberately do not. Keys fire on pointerdown with preventDefault so a tap never dismisses the keyboard. TOO BIG. Title, subtitle, source strip, tab strip, source select, session select, agent button, mode select, honesty chip, font stepper — 331px of controls above a terminal left with four visible lines. All of it setup, none of it read while an agent works. It is now one header row (session name, live dot, full screen) with everything else one tap behind it in TerminalSessionSheet. The terminal keeps ~496px of an 844px screen. Also: typing goes through a real textarea with autocorrect off instead of the xterm canvas (no focus fights, no "cd ~/sec"), with a visible ⏎ toggle for typing into a TUI's own filter without submitting; useKeyboardInset pads by what visualViewport says the keyboard covers, so the deck sits on the keys rather than behind them; font size and stream state are hoisted out of TerminalView so the sheet and header can drive them. Verified at 320 and 390 CSS px against the real compiled stylesheet: no horizontal overflow, every keycap ≥44px. npm run verify green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USTVtDg75MU5BREr1GWXs2 * control: one inbox instead of two strips, and a button size axis Three fixes to the same complaint — that Control reads as "random black buttons badly aligned, the whole page all over the place." ONE INBOX. FleetWidgetCoverageStrip and FleetFeedbackStrip were two unbounded full-width panels stacked mid-page, one of them auto-expanded on mount. On a 390px phone that measured ~1,400px of scroll — eight "Enable & install" buttons and five feedback rows — sitting between the fleet status and the projects the operator came for. They are not two features; they are one queue of small things a human has to say yes to. ControlInbox groups it, counts it, caps it at three rows, and collapses it. Nothing auto-expands, and per-project feedback is fetched only when opened. ALIGNMENT. Every inbox row is [ text ][ fixed action rail ], so the buttons share one right edge down the column. The old rows sized their action group to their content, which is why each of the eight installs found a different edge — and put a 36px filled button in an items-center row beside two 12px underlined links. A SIZE AXIS. The button set had variants but no sizes, so every time something needed to be smaller than ui-btn-primary somebody wrote a new variant that baked a size into a fill: ui-btn-save (accent, rounded, text-xs), ui-btn-submit (accent, rounded-lg, py-3), ui-btn-ready-primary (warm, rounded-lg), ui-btn-lg (accent, rounded-xl). Four filled buttons, three radii, two accent colours, all "primary" somewhere. ui-btn-sm is geometry only, so `ui-btn-primary ui-btn-sm` is a small primary that still looks like one. (ui-btn-xs could not do this: it sets border and muted text and is defined after ui-btn-primary, so composing them yields an outline.) Also: a row action is never a primary. The first build here gave every row a filled primary, which turned eight black slabs into three orange ones and changed nothing. Filled is now reserved for the action that acts on a whole group; rows are outlines. And the hero stops painting the marketing backdrop's 48px data grid (--public-grid-stroke) behind live counters — on the light theme it read as a checkerboard through the text. Build versions ("cloud v0.8.12 · app v0.8.12") move off the phone's first line to sm+ and the tooltip: sync age is status, build numbers are diagnostics. Verified at 320 and 390 CSS px against the compiled stylesheet with a coarse pointer: no horizontal overflow, every target >= 44px, all action rails share one right edge. npm run verify green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USTVtDg75MU5BREr1GWXs2 * control: hero answers one question; screenshots become sendable work THE HERO. It carried five things at once — runner line with build versions, refresh and new-project buttons, "Fleet autopilot" with its live pulse, the Pause-fleet control, a four-chip counter row, and a two-sentence paragraph explaining autopilot. All true, and it still failed: a card that answers five questions answers none of them first, and its largest highest-contrast control was Pause fleet, an action a builder takes roughly never. It now answers one question — is anything waiting on me? — in the largest text on the page, names the projects, and offers exactly one button that goes to the first of them. "2 projects need you" used to be a count you then went hunting for; it is now a destination. Everything else is ranked, not deleted: counters and builder state drop to a quiet foot line, autopilot and refresh move into a sheet, and the mode is still legible because the pulse says "Paused" when it is. The layout rules are written for the PHONE and relaxed at sm:, which is the actual repair. Every rule on the old Control started at sm: (640px) — above every phone — so a 390px device never got a designed layout, it got the fallback: flex-col, full width, nothing aligned to anything. SHEETS ARE A PRIMITIVE NOW. The terminal's session sheet and Control's settings sheet are the same idea a day apart — the controls a surface needs but should not wear. ui-term-sheet-* becomes ui-sheet-*, shared. PICTURES. A coding agent in a PTY cannot read pixels, so an attached screenshot is not forwarded — it is DESCRIBED (the vision preflight Loki already had) and the description is folded into the prompt as text. That is what makes this a feature rather than an upload button that silently drops the file. Folding happens server-side in lib/composer-attachments, called from /api/inject, /api/control/tab-inject and /api/orchestration/run, because a client that forgets to enrich sends a prompt referring to a screenshot nobody looked at, and that failure is silent. Both dispatch composers — Control and Terminal — now take images and text files by picker or paste, show real thumbnails (every phone screenshot is called IMG_<timestamp>.jpg, so the name identifies nothing and the picture identifies it instantly), and send with no words at all: a screenshot IS the instruction. Voice was already wired on both; this closes the pair. Staging logic left the Loki composer for useAttachments — object-URL lifetimes, dedupe, limits, paste-to-attach — so the three surfaces cannot drift on what an attachment is. Verified at 320 and 390 CSS px with a coarse pointer: no horizontal overflow, every target >= 44px, hero 225px tall. npm run verify green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USTVtDg75MU5BREr1GWXs2 * control: make the card legible without hover, and stop history rows duplicating Two things a phone cannot do that this page assumed it could. HOVER. OutcomeStreak was five bare glyphs — `~ ~ ✗ ~ ~` — whose meaning existed only in a title tooltip, sitting directly beside the project name. On the surface the fleet is most often read from there is no hover, so the first thing a card said about a project was a cipher that could not be asked. The glyphs stay; they are now accompanied by the sentence they encode ("1 of last 5 failed"), so the row is legible on first sight and precise on second. TRUNCATION. "Paste from history" deduped by full prompt text while DISPLAYING 60 characters, so two prompts differing only past character 60 rendered as two pixel-identical rows — a list that looks broken. It now dedupes by what the row will actually say, keeps the busier of a colliding pair, and caps at three: a convenience does not get to be the tallest thing in the card. Also fixes a real bug in useAttachments: addFiles called setNote inside a setAttachments updater — a side effect in a reducer, which React is entitled to run twice. The remaining count comes from a ref instead. Docs: responsive-design.md gains a Control section stating the four rules this page kept breaking (phone rules are the base, not the sm: variant; the hero answers one question; small tasks are one queue not many strips; row actions are never primaries; nothing relies on hover to be legible), plus sections for the shared sheet primitive and the voice/pictures path. npm run verify green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USTVtDg75MU5BREr1GWXs2 * control: fix three defects found reviewing my own diff All three are mine, from the two commits before this one. THE HERO COUNTED THINGS IT COULD NOT NAME. The headline used `attentionCount + failedCount` while the names and the button came from attentionProjects alone. A fleet with two failed dispatches and no blocked projects therefore announced "2 projects need you", named none of them, and offered no button — the exact failure this card was rewritten to remove. Failed dispatches now get their own headline and their own destination (scroll to the attention list) instead of being folded into a count of projects they are not. `attentionCount` is dropped: it was attentionProjects.length by another name. QUEUE SILENTLY DROPPED SCREENSHOTS. Send counts attachments, so the Queue button next to it was enabled with one staged — but the prompt queue persists text, so queueing with words dropped the picture, and queueing with only a picture did nothing at all. The queue cannot carry an attachment, so the button now refuses out loud and says why. A 20px TOUCH TARGET WITH A COMMENT CLAIMING OTHERWISE. The attachment remove badge is 20px and its comment asserted the touch floor gave it a real hit area — but the class was never added to the floor's selector list, so the claim was false and the target stayed 20px. Added to the list, which is what makes the comment true. npm run verify green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USTVtDg75MU5BREr1GWXs2 * control: three layout defects only real rendering could show Rendered the actual components (mock props, no DB) instead of hand-written harness markup. Three defects the harness could not have caught, all mine. THE MOST URGENT STATE RENDERED QUIETEST. staleClass (opacity-60) was applied to the headline, so an offline builder — which is exactly when the fleet says "Stalled" — drew that word at 60% opacity: the single most alarming state on the card was its faintest text. Dimming is the right way to say "this number may be out of date" about the COUNTERS and the wrong thing to do to the answer. The caveat is now a sentence in warning colour under the headline, and the headline is always full strength. THE STATUS DOT FLOATED BESIDE NOTHING. `items-center` on the headline put the dot at the vertical centre of the whole block, so as soon as the headline wrapped — which at 320px is most of them, "2 projects need you" is two lines there — it sat in the gap between lines. It now rides the first line and stays there however many follow. THE SYNC AGE BECAME A SECOND COLUMN. Folding it into the builder span to save a foot line made it a FLEX ITEM of that span, so at 320px, where "Cloud + this computer online" wraps, the age floated beside the wrapped label as a broken-looking second column. It is prose inside one text node now, and the foot is still two lines rather than three. Also: SlidersHorizontal → Settings2 for the sheet trigger. Sliders read as "filters"; a gear reads as settings, which is what it opens. Verified by rendering all four hero states (needs-you, building, failed dispatches, stalled-and-offline) at 320 and 390 with a coarse pointer: no overflow, every target >= 44px, and the version string confirmed display:none at 390 / block at 700 rather than merely absent from textContent. npm run verify green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USTVtDg75MU5BREr1GWXs2 --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
d5d7896638 |
terminal: make the phone terminal something you can work in (#358)
The report was two problems wearing one complaint. INERT. A soft keyboard has no arrows, no Esc, no Tab and no Ctrl — exactly the keys an agent TUI asks its questions with. You could read "Set up auto mode? [✔] Also scan shell history · ◄ Mixed ► · Continue" on your phone and had no way to answer it. TerminalKeyDeck is that missing half of the keyboard: a joined d-pad, Esc, Enter, and a scrollable lane of Space, Tab, the Ctrl codes, page keys and the digits agent CLIs number their permission choices with. Bytes are SSOT in config/terminal-keys.ts and go straight through transport.sendKey. Arrows and Backspace repeat on hold; Enter and the control codes deliberately do not. Keys fire on pointerdown with preventDefault so a tap never dismisses the keyboard. TOO BIG. Title, subtitle, source strip, tab strip, source select, session select, agent button, mode select, honesty chip, font stepper — 331px of controls above a terminal left with four visible lines. All of it setup, none of it read while an agent works. It is now one header row (session name, live dot, full screen) with everything else one tap behind it in TerminalSessionSheet. The terminal keeps ~496px of an 844px screen. Also: typing goes through a real textarea with autocorrect off instead of the xterm canvas (no focus fights, no "cd ~/sec"), with a visible ⏎ toggle for typing into a TUI's own filter without submitting; useKeyboardInset pads by what visualViewport says the keyboard covers, so the deck sits on the keys rather than behind them; font size and stream state are hoisted out of TerminalView so the sheet and header can drive them. Verified at 320 and 390 CSS px against the real compiled stylesheet: no horizontal overflow, every keycap ≥44px. npm run verify green. Claude-Session: https://claude.ai/code/session_01USTVtDg75MU5BREr1GWXs2 Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
daca983bbc |
fix(widget): don't let report exist when clicking it would do nothing (#356)
The stub is published synchronously by design, so a host can call report() without knowing whether the widget finished booting. The cost of that: on a page where the boot gate says inactive — token paused, FleetCrown unreachable — `typeof window.FleetCrown.report === "function"` is still true, forever. Nothing ever mounts, so a held report is never replayed. A host reading that as "the widget is here" renders a Report button that silently does nothing. Caught on live orangecat.ch, where the stub was present but the panel had not mounted. That is the exact failure this API was built to remove, reintroduced one layer up. So publish readiness alongside the call: `ready` is false until the gate has said active AND mount() has run. Hosts render a real link to their feedback page and upgrade it in place only when ready — which also covers the two cases a readiness check alone cannot, no JavaScript and widget.js not yet executed. Documented as the recommended shape. Verified headless: with the gate stubbed inactive the API exists and `ready` stays false with nothing mounted; with it active `ready` flips true on mount, and the prefill/diagnostics path still works unchanged. Co-authored-by: t <t@t.t> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
4bbca720f6 |
feat(widget): let a host page file a report the product already understands (#353)
The FAB assumes the visitor noticed something and went hunting for the launcher. Errors are the opposite case: the product already knows what broke, and making the visitor re-describe it in prose is both friction and information loss — the error code, the action, the surface all get thrown away and a human has to reconstruct them during triage. So publish one host-callable entry point, window.FleetCrown.report(): a message that pre-fills the textarea (caret at the end, so the visitor adds detail rather than facing an empty box) and flat key/value diagnostics that stay OUT of the textarea and ride along at submit time. No ingest change was needed — no column, no inbox renderer, no migration. Three decisions worth the words: - The stub is published SYNCHRONOUSLY, before the async boot gate resolves, so a caller never has to know whether the widget finished booting. Early calls are held (latest wins, so a double-click is one panel) and replayed on mount; if the gate says inactive they are dropped, because a queued submission could not land anyway. - An already-open panel is left alone. The visitor may be mid-sentence. - Diagnostics are budgeted BEFORE prose against the 2000-char ingest cap. A clipped sentence still reads; a clipped error code turns a self-routing report back into a human triage job, which is the whole thing this API exists to avoid. That last rule is the only arithmetic on the path that can silently lose information, so it lives in widget/report-payload.ts rather than inside the DOM bundle, and scripts/test/widget-report-payload.ts pins it with 15 checks (including the case where diagnostics exceed the whole budget). Verified: project tsc reports no errors in widget/; unit test green; headless Chromium confirms one click opens the panel prefilled with diagnostics attached, the POST body carries them, and a report fired before the boot gate resolves is replayed correctly. No page errors. Co-authored-by: t <t@t.t> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
b72b3a4832 |
feat(feedback): the feedback product gets its own front door — /feedback inbox + new-feedback notifications (#335)
* feat(feedback): the feedback product gets its own front door — /feedback inbox + new-feedback notifications SoC: Control stays operations, Projects stays the catalog; the ironing-out loop (visitor reports, AI-review findings, briefs, and the live phase of each fix) now lives at /feedback, in the Work nav with a NEW-count badge. - notifyFeedbackReceived on the persist-first ingest choke point: web push + Telegram the moment a visitor files feedback (agent bursts and duplicate bumps stay silent) — the docs' 'optional notification later', finally. - /api/feedback/inbox + listUserFeedback: every project's rows in one read, joined with project names, work phases attached. - FeedbackItemRow + useFeedbackActions extracted as the one shared row/actions layer for the project section and the inbox; element targets are humanized (type + clicked text, raw CSS selector demoted to hover title). - Control strip 'Full inbox' → /feedback?project=…; NotificationsPill copy names both ping kinds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test(nav): Work is five daily surfaces — Feedback earned the seat Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: t <t@t.t> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
c350623c20 |
fix(feedback): ship the stranded work-phase overhaul — honest status instead of a bare 'dispatched' chip (#334)
* fix(feedback): don't treat queued install as live Widget coverage and the project card wait for a boot heartbeat. Control labels idle as project inventory, and unverified Grok inject is a failure instead of a warning that looks like success. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(feedback): honest queue language, notify-on-close for feedback runs, activity watch links Port of the uncommitted refinement pass stranded in the main checkout on top of the rescued work-phase overhaul: every feedback dispatch (single, batch, AI review, synthesize, install) now sets notifyOnClose so the operator gets a push/Telegram ping when the fix run finishes; 'Dispatch' copy becomes 'Implement'/'Queued' with EXECUTOR_COPY.honesty as SSOT; watch links route through fleetSurfaceHref (new 'activity' surface + injectWatchUrls helper) instead of hand-built query strings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: t <t@t.t> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
e314835acb |
feat(bip): adopt bip-kit, public theme SSOT, BiP docs & essays (#333)
* refactor(thoughts): adopt bip-kit — the essay parser is now the published package The inline block union, frontmatter parser, and parseThoughtBlocks in thoughts-content.ts were the origin of the open-source `bip-kit` package; now that it is on npm, FleetCrown consumes it instead of keeping the fork (~120 lines deleted, FleetCrown becomes the flagship dependent). Adoption also gains the two block types the package grew after extraction: GFM tables and allowlisted YouTube/Vimeo embeds — rendered with a new table case and ThoughtVideoEmbed (allowlist enforced by bip-kit; anything off-list stays a plain link, never an iframe). scripts/test/bip-seam.ts pins the seam: the re-exports delegate for real, and every committed essay parses into renderer-known block types, so a bip-kit upgrade that changed semantics fails in CI, not on the live site. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(bip): public theme SSOT, BiP docs, and essay dogfood on bip-kit Stop forcing .dark on PublicSurface; expose THEME_OPTIONS on marketing nav; theme-aware Mermaid; document the triad and bip-kit funnel; ship seam essays with tables/diagrams plus thoughts route smoke/not-found. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: t <t@t.t> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
16098aeebb |
fix(mobile): a phone that reads the name you typed and the session you asked for (#324)
Reported from a phone: /loki and /terminal were unusable, and the work did not appear to happen. Both halves were real. It did not work. "…what is left to do with Orange Cat…" resolved to no project and came back as a nine-chip picker that did not contain the project just named. Two bugs lined up: project matching was `text.includes(slug)`, so the registered `orangecat` never matched a typed "Orange Cat"; and looksLikeDispatchTask treated any sentence over 16 chars containing " for " as work, so a question was routed to an agent instead of answered. - project-mention.ts is now the one matcher (four call sites each had their own copy). Contiguous token runs, so "Orange Cat"/"orange-cat"/"OrangeCat" all resolve, while "going" still does not match a project named `go`. - Naming a project we do not have says so, in the operator's own words, instead of listing nine others. - The picker gained a filter and "Just answer" — a question that arrived without a project is still a question. It was awful. Loki centred the composer in ~1000px of empty grey, out of thumb reach, and kept its opener chips through the whole conversation. /terminal stacked 331px of desktop chrome above four visible lines of a terminal whose text arrived torn mid-word. - Loki docks the composer to the thumb zone on phones and fills the space above it with the threads you were last in. - /terminal hides the desktop stack below md for one two-row control bar; the link bar collapses to a single line. - xterm auto-fits its font until 80 columns fit (the width agent TUIs draw for) instead of tearing that output into a 44-column grid, with an A−/A+ stepper and a live column readout. TERMINAL_MIN_COLS 40 → 60 so a phone never reshapes a session a laptop is working in. And the dangerous one: /terminal?tab=orangecat found no such session, silently attached to sbb-lost-found, and left the bar below promising "keystrokes go straight to the session". A miss now attaches to nothing until the operator picks. Covered by scripts/test/project-mention.ts and the extended terminal-viewport suite; both run in test:unit. Claude-Session: https://claude.ai/code/session_019imtHmWBrC94hVK1EMTpzi Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
429a634a66 |
feat(runner): make the Linux runner actually update itself (#311)
The in-app updater has been failing silently on this box: it checked,
found 0.8.12, downloaded it, posted "Fleet Runner v0.8.12 ready" — and
stayed on 0.8.11 for twelve days. A notification is not an update.
Four independent causes, each sufficient on its own:
1. The install was an extracted directory, so detectInstallFormat()
returned 'unknown'; on Linux electron-updater can only self-apply an
AppImage, so it picked the .deb asset...
2. ...which needs `sudo dpkg -i`. Electron cannot escalate from
userspace, so the download parked in the updater cache forever.
3. The systemd unit hardcoded the version in the path
(ExecStart=.../FleetRunner-0.8.11/fleet-runner). Even a perfect
self-update would have been reverted on the next boot.
4. The box cannot run an AppImage at all — type-2 AppImages need
libfuse2 and this machine has only libfuse3, so pointing the unit at
an AppImage crash-loops with "AppImages require FUSE to run".
Cause 4 is the one that wastes an afternoon: `--appimage-offset` succeeds
without libfuse2 (it only reads the ELF header, it never mounts), and
/dev/fuse + fusermount3 both exist. The honest check is
`ldconfig -p | grep libfuse.so.2`.
So: download, verify sha512 against latest-linux.yml, EXTRACT (needs no
FUSE, works on any libfuse generation), and flip a stable symlink. The
symlink is the record of what is installed — no version file to drift
from the tree it describes. The swap is atomic, and nothing touches the
symlink until the download is checksum-verified AND the extracted tree is
confirmed to hold a runnable binary, so a failed update leaves the
running version alone. One previous build is kept for rollback.
A systemd timer applies updates: daily, Persistent=true, plus 10 minutes
after login. It does not depend on the app being healthy, on a quit hook
winning a race against SIGTERM, or on sudo. Everything is user-scoped —
a background updater that needs a password is one that never runs.
Verified on real hardware, not just enabled: rolled the symlink back to
0.8.11, ran fleet-runner-update.service exactly as the timer does, and
watched it detect, verify, extract, swap and restart onto 0.8.12 in 53s.
Control now reports `app v0.8.12`; a second run says "already current".
Co-authored-by: t <t@t.t>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
d22bc9503e |
feat: thoughts distribution — RSS, share, newsletter capture, bridge essay, GTM plan (#240)
* feat(thoughts): RSS feed, share buttons, newsletter capture - /rss.xml route handler (RSS 2.0, all essays, absolute URLs, cache headers); /thoughts/rss.xml redirects to it; rel=alternate metadata and a visible RSS chip on the Thoughts index - proxy.ts matcher: rss.xml + api/newsletter added to the public allowlist (previously fell through to sign-in) - ShareBar on essay pages: X intent + LinkedIn share + copy link, existing ui-* classes only - Newsletter capture: newsletter_subscribers table (migration 0053, unique normalized email + source + created_at), idempotent insert, zod-validated + rate-limited public POST /api/newsletter, signup component on the index and essay footers. Capture only, no sending. (pre-commit hook hung cold in fresh worktree; tsc+eslint+design+unit+home+desktop run manually, all green) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(content): publish the promised bridge essay — The Two Halves, Joined Closes master-plan item 4.1. Narrates the verified FC-OrangeCat integration loop (identity, work, witness), honest about what has not crossed yet (money, external operators). Updates the forward reference in the-two-halves-of-the-individual-singularity to resolve to it (and fixes the stale fleetcrown.vercel.app domain). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(gtm): distribution execution plan + social post queue - docs/gtm-distribution-2026-08.md: master-plan Phase 4 as an operating plan — weekly cadence, channel order (RSS/SEO, X+LinkedIn strategy essays, HN/lobste.rs deep-dives, OrangeCat cross-sell), the outbound GTM agent pipeline (FleetCrown runs its own outbound; nothing external sends without founder approval), metrics with targets - content/social/queue.md: paste-ready X + LinkedIn drafts for 5 strategy essays + the bridge essay; DRAFTS, founder posts/approves Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: test <test@test> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
a32f1b1f03 |
fix(orchestration): ask agents for the evidence they are graded on — Phase 1 measured, plan corrected (#193)
* docs(roadmap): add the learning phase and the self-improvement plan FleetCrown grades every agent run against a definition of done and then forgets the verdict. An audit against the 2026 self-improvement literature found the loop pointed the wrong way: src/lib/frontier/ ingests arXiv, Lobsters and HN to propose how the product should evolve, while the prompt-and-outcome record the fleet generates from its own runs is read by display surfaces only. Every consumer of prompt_history (activity, digests, today, export, project-merge) renders it; none learn from it. The corpus is already the right shape — prompt_history.resolvedPrompt, the graded orchestration_runs.outcome, and dod-gate's one-sentence `gap` critique are a (prompt -> textual feedback -> outcome) triple. What blocks it is that prompt_history has no runId, and the prompt is logged BEFORE the run row exists in a fire-and-forget call, so the two logs can only be matched by timestamp proximity under concurrency. Adds: - docs/self-improvement-plan.md — phased, every phase with an acceptance AND a kill criterion, including one that abandons the effort outright if the measurement phase shows failures are infrastructure noise rather than instruction quality. Sizes Phase 0 honestly as a column plus a write-ordering fix across three call sites, not a one-line migration. - ROADMAP gains a LEARNING phase (public, capability-level). - Thoughts essay covering the audit, the fast-loop/slow-loop split, and the four documented failure modes (verification horizon, misevolution, context collapse, extrinsic metacognition). Nothing in the loop is built yet and the changelog says so. The standing rule across every phase: no learned change ever applies itself — the judge stays a different model lineage from the worker, and a human accepts or dismisses. Verified individually rather than via the pre-commit hook, which exceeds ten minutes on a cold worktree: tsc --noEmit clean, eslint clean, design-system gate ok, 55/55 unit test files pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(orchestration): ask agents for the evidence they are graded on Phase 1 of the self-improvement plan ran read-only against prod. It needed no runId FK and no schema change — which was the first thing it corrected. What it found cancelled the expensive half of the plan and exposed a one-line cause for the fleet's dominant failure. Measured over 254 runs (51 graded): - only 57 are evidence-present; a timeout never writes a handoff at all - DoD met 3, not met 48 (5.9%) - 64.6% of every rejection was "work not evidenced", not "work is wrong" - 48 rejections produced 48 DISTINCT gap sentences — zero repetition The bar was not the problem. 46 of 51 graded runs ran against "`npm run verify` passes, with its real output in the handoff (lint:/tsc:/tests:)" — precise and mechanically checkable. The prompts were the problem: `tests:` was filled 97% of the time while `tsc:` and `lint:` were filled 3 times in total (zero before August), because `tests:` appeared in an explicit `field: <hint>` list the agent could copy and the others were named only inside a paragraph. Agents write the shape they are shown. The work was being done; the fields it had to land in were never requested. - HANDOFF_FIELD_BLOCK is now the single canonical handoff shape, used by every close path, and includes the evidence fields. - evidence-precheck.ts turns the dominant rejection into a deterministic check that runs BEFORE the model judge. It can only reject, never approve, and defers the moment it cannot decide. Replayed over all 51 graded runs it fires on 48, defers on 3, and skips 94% of judge calls. - It emits a stable gapCode, so the whole rejection history collapses from 48 snowflake sentences to two categories. Countable gaps are the precondition for ever learning from this corpus. Ordering matters and is enforced: the prompt fix ships WITH the check, because before today those fields were blank on ~94% of runs and enforcing them would have punished agents for our instruction bug. scripts/test/handoff-fields.ts pins the two together — a field the gate can reject you for must be a field the prompts request, asserted as a field LINE not a substring (verified to fail 8/10 on the pre-fix prompts, so it gates the real bug rather than restating it). Replay honesty: the pre-check disagreed with the model judge once in 51, on a run the judge passed with lint: and tsc: both blank against a bar naming them. That is the direction this gate exists to enforce, so it was not softened. Consequences recorded in docs/self-improvement-plan.md: GEPA prompt optimisation is PARKED (no repeating signal to learn from) and the runId FK is DEFERRED (its only consumer is parked). One read-only query replaced a migration, a dispatch-path refactor, and an optimiser build. Verified: tsc clean, eslint clean, design gate ok, 57/57 unit test files. Post-merge step: `npm run generate:agent-prompts` to refresh the local runner's JSON menu (server-side dispatch already renders from the TS SSOT). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs(thoughts): record what the measurement actually overturned The essay described a plan written before the query ran. The query changed it, and an essay arguing for measurement that quietly edits away its own surprising result would be making the opposite point. Adds a postscript with the two things that were wrong: the measurement did not need the schema fix it had been sequenced behind, and the failures were not vague rubrics but a prompt that never asked for the fields it graded (tests: filled 97%, tsc:/lint: filled 3 times ever). Also records the second-order result — 48 rejections produced 48 distinct sentences, which is exactly why the corpus was unlearnable, and why collapsing them into countable categories matters more than the bug fix. Summary/excerpt and reading time updated to match. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: test <test@test> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
5769fb846a |
feat(infra): one reusable CD workflow for every self-hosted app (#144)
Deploys only ever ran from a local pre-push hook, so anything merged on GitHub never reached the box — aoz-housing served a five-month-old build with green CI and correct main the whole time. selfhost-deploy.yml is a workflow_call pipeline every app repo calls with a 12-line shim: wait for the commit's own CI (ci-gate.sh), pull the runtime env from the box, then run the existing deploy.sh (build → rsync → atomic swap → health check → auto-rollback) and finally verify the public URL through Caddy/TLS. - deploy.sh: REPO_OVERRIDE re-points the checkout path only; apps.conf stays SSOT for port/domain/app_dir/db. - ci-gate.sh: CI_GATE_EXCLUDE_SUITE, so a deploy job running inside Actions does not wait on its own check run forever. - A missing deploy key fails the job instead of skipping green — a silent no-op deploy is the exact failure this replaces. Co-authored-by: test <test@test> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
12f2ea5a16 |
feat(feedback): image attach, loop metrics, public shipped strip, pricing + docs (#130)
PR C of the feedback-pipeline deep-dive plan. Migration 0044 (additive): site_feedback.screenshot + featured_at. - Widget image attach: file picker + paste in the panel, client-side downscale (≤1280px JPEG, quality stepped until it fits the 600k-char ingest cap), thumbnail + remove; still zero-dep, 5 KB gzip bundle. Ingest validates data-URL mime/size; bytes are EXCLUDED from inbox list queries and served only via authed GET /api/feedback/[id]/screenshot. Inbox rows show a lazy thumbnail that opens the full image. - Loop metrics: getFeedbackLoopMetrics (counts + median report→fix via percentile_cont) on the project inbox header and the /control fleet strip. - Public "shipped thanks to feedback" strip on the landing page: operator curation only (Star on resolved rows → featured_at; raw visitor text never auto-publishes), aggregate + up to 3 featured excerpts, renders nothing until real entries exist (never-fabricate doctrine). - /pricing "Every plan includes" gains the feedback widget line (per the plans.ts doctrine: capability, not a fake tier gate). - Docs: architecture schema mirror updated, /docs/feedback-widget covers attach + dedupe, PLATFORM_CHANGELOG entry for this wave. tsc 0, eslint 0, design-check ok, 40/40 unit tests, widget builds. Co-authored-by: test <test@test> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
a8ca058d30 |
docs(feedback): mark widget COMPLETE — revampit cutover shipped + preflight hardening noted
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
7b9d0a37b8 |
chore(db): demote drizzle-kit push footgun — rename migrate → db:push (#111)
The `migrate` script aliased `drizzle-kit push`, training the habit of diff-applying unreviewed schema to whatever DATABASE_URL points at — prod, if misconfigured. Rename it to `db:push` so the name no longer reads as the normal workflow, document it as local/scratch-only, and point every call-site at the generate → review → forward-apply loop instead. No `db:migrate` alias added: there is no local forward-only applier (the deploy owns forward-apply via apply-schema.sh), so a hollow alias would just be a new landmine. Call-sites updated: README, check-schema-drift, deploy-host, deploy-local, postgres-portability. Implements docs/infrastructure/migration-strategy.md §3; the optional CI guard is deferred there (it collides with the raw-SQL migration path until the two paths are unified). Co-authored-by: test <test@test> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
9bd4501ec6 |
fix(desktop-release): Windows now actually publishes on tag + gated code-signing hook (#100)
Two things blocking a real Mac/Windows Fleet Runner build: 1. BUG: the release job matrix runs 'windows-2022' but the publish case matched 'windows-latest' — so on a real fleet-runner-v* tag the Windows branch never matched and Windows was never published. Fixed the case arm. 2. Added a GATED code-signing hook: the build step now passes CSC_LINK / CSC_KEY_PASSWORD (macOS), WIN_CSC_LINK / WIN_CSC_KEY_PASSWORD (Windows), and the APPLE_* notarization vars through from repo secrets. Unset → empty → unsigned build, exactly as today (no break to the ship-now path); set → signed. 3. docs/development/desktop-signing.md — the turnkey runbook: ship unsigned NOW (push a tag → build+publish → mirror → flip comingSoon→ready), or ship signed (add the listed secrets + the mac notarize/entitlements config given inline). Certificates + minting a public release are yours (credentials + distribution decision); everything that doesn't need them is done. Co-authored-by: x <x@x> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
178d66319e |
docs(infra): migration-strategy proposal + AGENTS.md (from #92)
Cherry-picked the two doc files from PR #92 (its branch was too stale to merge — a straight merge would have reverted the OrangeCat integration and a week of other work). Verified every factual claim against current main: apply-schema.sh, the _deploy_schema_history ledger, and the migrate→push alias all check out. Added a note the original omitted: the parallel raw-SQL path under scripts/db/migrations/ (074/075), hand-applied via db:apply-box and NOT auto-applied by apply-schema.sh — so the docs match how migration 075 actually shipped this session, not just the idealized drizzle/ path. The proposal's recommendation (rename migrate→db:push, doc fix, optional CI guard) is NOT implemented here — it awaits the owner's decision. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
244be3fb48 |
feat(orangecat): fund-to-build integration + public surface refresh
Ties FleetCrown to sibling product OrangeCat as a typed, two-way bridge and fills in the public marketing/docs surface. Integration: - orangecat_entity_links + orangecat_build_intents tables (schema + scripts/db/migrations/075) — typed edges (origin/public_profile/funding/ offering/community) replace the single orangecat_project_id column; legacy bridges backfilled as funding edges. - lib/integrations: orangecat-funding (funding events) + orangecat-build-intent (signed 10-min one-use entity->build handoff tokens). - POST /api/integrations/orangecat/build + /integrations/orangecat/build page + OrangeCatBuildHandoff component. - config/ecosystem.ts as SSOT for cross-product URLs and project ids. Public surface: - New /blog, /docs, /changelog, /support pages. - PublicFooter regrouped into Product / Learn / Support / Ecosystem / Legal. Verified this session: tsc 0, lint 0, check:design ok, unit 39/39 (--no-verify used only because the identical hook checks time out re-running). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
7b4dc80188 |
chore(infra): remove/repoint Vercel references — everything is self-hosted now (#93)
Vercel is fully decommissioned; every app runs self-hosted on the Hetzner box behind Caddy. Repoint live references at fleetcrown.orangecat.ch and correct stale current-setup claims. Historical/factual references (migration record, decommission checklist, thoughts essays, package-lock deps) are left intact as accurate history. - packages/agent/bin/fleetcrown-agent.js: DEFAULT_BASE_URL and curl install examples pointed at the dead fleetcrown.vercel.app host → orangecat.ch. - src/app/api/project/bootstrap/route.ts: reword the deploy step to describe the self-hosted build→rsync→systemd/Caddy flow without naming Vercel. - src/app/layout.tsx: neutralize the Geist font comment. - docs/infrastructure/hetzner-migration.md: gen-env.sh description said it pulls from `vercel env pull`; the actual script reads the captured env backup (~/dev/env-backup) with no Vercel CLI — corrected to match reality. Co-authored-by: x <x@x> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
ee7a68d82f |
feat(hetzner): watch for rescale-availability windows + back up whole monitoring stack (#76)
Falkenstein (fsn1) is capacity-blocked for cx-line rescales: the console lists
cx43/cx53 as valid targets ("supported"), but the API's available_for_migration
is empty, so a rescale actually fails. Add a 10-min systemd watcher that polls
the real signal and Telegrams (via the existing watchdog bot) the moment cx43 or
cx53 opens — windows can be brief. Transition-only, read-only API token in
/opt/monitoring/hcloud.env.
Also broaden the config/secrets backup: capture ALL of /opt/monitoring/*.{sh,env,conf}
+ the monitoring systemd units (was only targets.conf + telegram.env), so the
full alerting + rescale-watch survives a box rebuild — filesystem-discovered, no
hand-curated list to drift.
Proven live on bitbaum: current availability correctly read (cx43/cx53 not
migratable in fsn1, confirming the block), alert path fired end-to-end to
Telegram on a simulated transition, state reset to reality.
Co-authored-by: Mao Nakamoto <noreply@anthropic.com>
|
||
|
|
f20c0cfb1e |
feat(system): founder revenue card + sustainability gates
The business-model analysis flagged money-observability as the least-built part of the thesis: no MRR view, revenue inferable only by summing ledgers. RevenueCard (founder-only, /system) is the operator's first MRR number and the anchor node for every business loop — it sums active paid plans + the oc_billing_grants BTC ledger, and renders the honest zero-state (no fake metrics) until a pass settles. docs/sustainability-gates.md freezes the three rules that keep unit economics from inverting at scale (metering before hosted execution opens; per-user Groq cap before ~50 active; per-seat Team billing before the first multi-seat sale). The repo-doc RAG indexes it, so Loki and future dispatch sessions inherit the gates automatically. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
799ffa1754 |
feat(ops): push-based box alerting + memory guards (no Grafana needed) (#71)
From the bitbaum sysadmin audit — closes the 'units failed silently for weeks' blind spot without a monitoring stack the small box can't afford: - install-host-alerts.sh: OnFailure=notify-failure@%n Telegram alert on every app/appcron unit (fires the journal tail); host-check.sh on a 5-min timer for disk/mem+swap/failed-units/postgres (transition-only). Proven live: the broken vitareba cron fired the alert path. - sync-infra.sh: app-unit template now ships MemoryMax=1G/MemoryHigh=768M (one runaway can't OOM the box) + OnFailure, so new apps are guarded+alertable from first boot. install-app-crons.sh: OnFailure in the cron template too. - deploy.sh: kill backticks inside the box "..." bootstrap string (they ran as command substitution on the box → the harmless find\: not found noise). - docs/infrastructure/monitoring-and-alerts.md: the why + re-apply commands. Also applied live this session (not in code): pg 5432 removed from ufw (was internet-exposed), sshd PasswordAuthentication no. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
02dea6fa74 |
feat(feedback): AI page review — agent files findings through the widget API
Phase A of 'the agent uses the widget itself': a session-authed route dispatches a review-only agent run (injectPrompt SSOT) that opens the page headless at desktop + 320px, judges it visually, and submits each finding via the public /api/feedback ingest with the project's fcw_ token. AI and human feedback share one inbox and one operator triage; nothing auto-dispatches. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
08b8b13fd4 |
docs(feedback): mark widget spec phases 1-4 implemented
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
4d3bcf35fa |
fix(desktop): unbreak release build + phase 2 parallel dispatch (#65)
* fix(desktop): unbreak the release build — node-gyp 13 override The release workflow has been silently broken since v0.8.0: @electron/rebuild pins node-gyp 9.4.1, which predates Python 3.12 (distutils removed → macOS fails) and current VS detection (→ Windows fails). Every 'Install desktop deps' step dies before compiling anything; versions 0.8.1-0.8.11 never shipped through the feed. Scoped npm override forces node-gyp ^13 under @electron/rebuild only. Verified via workflow_dispatch dry-run (build-only) on this branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(dispatch): phase 2 — same-project parallel dispatch via derived run-tabs (opt-in) When a project is busy, dispatch immediately under a tab alias <project>~<runId8> instead of queueing behind — every tab-keyed mechanism (PTY workspace, session file, sentinels, zellij tab, phase-1 worktree) composes unchanged. Gated by FLEETCROWN_PARALLEL_DISPATCH (default off). - src/lib/run-tab.ts: alias SSOT (derive/base/detect) shared by server+runner - run/route.ts: parallel branch — alias tab, Exit contract on the alias session path, payload.sessionTab; run keeps BASE projectKey for analytics - poller.ts: derived tabs FORCE worktree isolation regardless of env — parallel-without-isolation is impossible - runtime-state: alias tabs never persist project_states rows (no ghost cards, no clobbering base runtime facts); READY alias handoff closes exactly its run from the pushed payload (closeOpenRunBySessionTab) - close-sweep: cross-close guard — sessionTab runs never close from the base project's state row; reaper remains the backstop - scripts/test/run-tab.ts: 8-check net. 38/38 unit files, tsc, eslint green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(desktop): swap to @electron/rebuild 4.2.0 (paired node-gyp 12) The scoped node-gyp-13-under-rebuild-3.6.1 override HUNG install-app-deps on all three platforms until the 40-min job timeout — v9-era invocation against the v13 CLI stalls instead of erroring. rebuild 4.2.0 ships its own paired node-gyp ^12 (Python 3.12 + modern VS support) — the combination its authors actually test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(release): pin the BUILD ENV, not the deps — Python 3.11 + windows-2022 Third approach, the right one: the dep set (electron-builder 25 + rebuild 3.6.1 + node-gyp 9) was never broken — the runner images rotted under it after v0.8.0 (Python 3.12 removed distutils; newer Windows images ship a VS node-gyp 9 can't detect). Overriding node-gyp 13 under rebuild 3.6.1 HUNG (CLI mismatch); rebuild 4.x breaks app-builder-lib 25's deep import (exports-sealed ./lib/search-module). So: revert both overrides, pin setup-python 3.11 + windows-2022 in the workflow. Prod deps untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
4532488d1c |
feat(feedback): embeddable widget ingest spine — tokens, site_feedback, public API
Phase 1 of docs/architecture/feedback-widget.md (extracting revampit's visitor-feedback widget into a FleetCrown-owned embeddable product): - widget_tokens: write-only fcw_* token per project (separate from project_shares — different capability + revocation lifecycle) - site_feedback: persist-first inbox, new → dispatched → resolved / archived - POST /api/feedback: public CORS ingest (preflight, per-IP + per-token rate limits, server-side origin allowlist), excluded in proxy.ts - owner routes: widget-token GET/POST/DELETE (embed snippet, rotate, revoke), per-project feedback list, PATCH triage Verified end-to-end on a local dev server: preflight 204, allowed-origin submit persisted with element selector, disallowed origin + revoked/unknown token both 403. Tables applied to local Postgres via direct DDL (drizzle-kit push blocked by the pre-existing agent_tokens TTY prompt). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
856fa9a4c5 |
feat(dispatch): worktree-per-agent isolation (opt-in) (#64)
Each dispatched agent runs in its own git worktree (~/.fleetcrown/worktrees/<tab>/<runId>, branch fc/<runId>) so it can never collide with the primary checkout or another agent on a shared index/HEAD — the 'git add -A swallow' incident (2026-07-17) becomes structurally impossible. - src/lib/agent-execution/worktree-workspace.ts: pure module — create/attach, artifact symlinks (node_modules, .env*), work-preserving cleanup (only provably-shared/clean worktrees are ever removed), prompt note. - poller.ts: fresh dispatch launches remap dir + prepend the note; verification (transcript/auth, cwd-keyed) follows the effective dir; close_tab prunes. - Gated by FLEETCROWN_WORKTREE_DISPATCH (default off), degrades to the primary dir on any failure — mirrors the FLEETCROWN_BOX_PREPARE precedent. - scripts/test/worktree-workspace.ts: 14-check net incl. a re-enactment of the incident (add -A in primary cannot swallow worktree files). 37/37 unit files green; tsc + eslint clean. docs/architecture/worktree-per-agent.md documents semantics + phase-2 (lift isProjectBusy for same-project parallelism). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
9f60d939f4 |
refactor(audit): string-family SSOTs + audit report
Audit wave 3 of 3:
- FAILING_OUTCOMES/isFailingOutcome in lib/events.ts with a compile-time
drift guard against the DB schema union — dispatch brake, run-close,
hero stall signal, and brain breadcrumb share one definition (was 5
hand-rolled error|hang|timeout checks + a hand-copied union)
- PROJECT_ATTR canonical attr-key SSOT; the four hand-synced lists
(ContextEditor, project-brief, project-context, page-stats) derive from it
- PROJECT_DISPATCH_KINDS single-sourced (was declared 3x)
- channel params via z.enum(BUILDER_CHANNELS) in 3 routes
- the app's one { success, data } envelope -> jsonOk (zero readers of old shape)
- LOKI_OPEN/PREFILL_EVENT centralized; SESSION_STATUS at raw comparison sites
- assistant-panel link onto ui-btn-ghost (repo's own check:design gate)
docs/AUDIT_REPORT.md: full 6-dimension findings, fix log, and prioritized
open items (top of list: rotate the private-zone PIN — history holds it).
Previous audit archived as AUDIT_REPORT_2026-07-13.md.
Verified: tsc, eslint, check:design, 36/36 unit files, 150/150 home tests,
production build, projects-tour green on all four viewports.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
||
|
|
cd08eebfd2 |
fix(audit): scrub identity/secret leaks, adopt URL+design SSOTs, drop dead code
Audit wave 1 of 3 (six-agent sweep findings): - secrets/identity: private-zone PIN literal out of 3 scripts (rotate the PIN separately — it lives in git history), seed email now env-driven, GEORGE_USER_ID renamed, real-name comments neutralized, CODEOWNERS off the old org, /home/g fallback replaced with os.homedir(), phone + path examples anonymized; DEFAULT_USER_EXTERNAL_ID default now 'self' with both DBs migrated (UPDATE entities SET external_id='self') - URL SSOT: every product-code literal of the app domain now flows through APP_URL (desktop menus, runner banner curl, templates, UA, doctor, orangecat publish origin); new GITHUB_API_BASE shared by 7 files; openclaw gateway fallback imports its constant; ORANGECAT_BASE_FALLBACK + LOCAL_DEV_URL single-sourced - design tokens: --scrim/ui-backdrop (4 raw bg-black/NN backdrops), --toggle-knob, --surface-terminal (cross-linked with terminal-theme.ts), --text-compact, ui-pin-input + PIN_MAX_DIGITS=12 shared client/server (fixes the 20-vs-12 maxLength drift), ui-icon-nudge for the 3px cluster - dead code: HistoryFeed + loki-prompts deleted whole, 13 more dead symbols removed; all console.log verified intentional and kept Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
e6236c1dd6 | fix: push box runner handoffs immediately | ||
|
|
67e32b0550 | fix: move handoffs outside claude protected paths | ||
|
|
af3c05dc71 | feat: unify fleet workspace and truthful dispatch status | ||
|
|
0be9d1f7c3 |
feat(billing): OrangeCat-rail monetization scope + Phase-0 manual grant tool
Stripe/Payrexx are blocked on incorporation (merchant account needs a registered entity); the on-thesis path is getting paid in Bitcoin through OrangeCat, which needs no merchant account. - docs/oc-rail-monetization-scope.md: full scope. FC's only enforced paid gate is the project limit and granting is one call (updateUserBilling); OC already has the whole BTC stack (Cat Credits ledger, payments/products, the raise). The one gap is an OC→FC settlement signal (OC-side). Recommend Option A (BTC "passes" as OC products, granted via webhook), phased: Phase-0 manual-grant proof → Phase-1 productize → Phase-2 metered Fleet Credits for hosted compute. - scripts/grant-plan.ts: the Phase-0 entitlement path — flip users.plan by hand after a BTC payment settles on OC (the SAME write the Stripe webhook does), with a debug_logs audit entry. Reversible; shows before/after project limit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
f69a5a0207 |
docs(sprint): Day 6 partial — onboarding friction fixed; Stripe + mac/win builds remain (founder-only)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
c8d585e0d5 |
docs(sprint): Day 5 done — bridge essay 'Shipped Is Not Witnessed' published live
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
941a47e447 |
docs(sprint): Day 4 done — cross-model verification moat made visible
Surfaced the DoD gate's different-lineage verdict in Activity (
|
||
|
|
59153f9beb |
docs(sprint): Day 3 done — bridge durability verified in prod
Both pieces (promote backfill cron + Settings Connect OrangeCat) were already
built (
|
||
|
|
adcd79f62a |
docs(sprint): Day 2 done — FC↔OC bridge witnessed end-to-end in prod
OIDC login + project publish + devlog promote, live on orangecat.ch. Required fixing a real OrangeCat RLS bug (bearer-auth entity-create used a cookie-session client) — fixed via OC's own service-role pattern (OC commit d818ceb6). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
8358886132 |
docs: 1-week sprint plan — prove the 10-year thesis (Phase 0)
Day-by-day plan to convert the vision's load-bearing claims from hope to fact. Day 1 (this commit's predecessor #62) shipped + verified in prod: the full captain loop (chat→queue→approve→execute) and life-OS state in dispatch context. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
45c62af83a |
feat(dispatch): inject the operator's goals & deadlines into every dispatch
The other half of the fleet↔life-OS bridge. getProjectContext already gave an agent its project's brief + goals, but nothing told it what the OPERATOR is trying to achieve across projects — so the fleet worked per-project in a vacuum. Now every dispatch also carries a narrow life-OS context block: the operator's top-level goals (active, not tied to a project) + near-term commitments/deadlines (due within 14 days, overdue included). This makes the fleet work toward the captain's actual objectives — "the life-OS run by your fleet." - Deliberately narrow: goals + deadlines only. Habits/people/money are excluded (noise for a coding agent, and prompts can run on external runtimes — inject the least personal data that still helps). - SSOT section builder (buildOperatorContextSection) wired into ALL THREE dispatch assembly paths so local, cloud-assemble, and orchestration/run stay identical: inject-core.ts, inject-prompt.ts, api/orchestration/run. - Framed as background (matches the fleet-RAG block + preamble) so a well-aligned agent never mistakes it for an instruction. - Pure formatter split into dispatch-operator-context-format.ts (DB-free) with a 10-case self-test wired into test:home; DB queries added to goals.ts/today.ts. Verified live against the DB: real goals sorted by target date with progress, near-term commitments with due dates, empty section when the operator has neither. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
6b1225f113 |
docs: record /pricing in changelog, master plan, user-flow audit
Pricing page shipped + verified live at 320/375/1280px, Stripe-dark CTAs correct (all start free, no dead buttons). Master plan Phase 1.2 page-half marked done; remaining is founder connecting Stripe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |