mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 11:07:40 +01:00
cursor-probe-trust
100
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
93ab3816a8 |
feat(loki): the start screen owns the phone too — floating chats · Loki · menu, nothing clipped (#1360)
* feat(loki): the start screen owns the phone too — floating chats · Loki · menu, nothing clipped What the owner saw on /loki from his phone (2026-10-21) was the START screen, which the thread redesign had left with the app shell: the app top bar, the bottom tabs, the starters and the composer around an inner scroller that clipped the spiral and the Build next row and drew Android's grey scrollbars. "It says the thread fills the display edge to edge, but it doesn't really." Now the whole of /loki takes the phone (useImmersiveChat on the start screen as well). The start screen is laid out like a thread: a floating one-line header — chats (the history drawer, as the ChatGPT and Claude apps keep it) · Loki · a menu that carries Home and every other page now that the tabs are gone — and the composer floating at the bottom with the starters above it, where the thumb is. The greeting, the recent chats and Build next scroll under both with the measured insets as padding, so nothing is cut off between two bars. Build next and the starter row scroll sideways with no scrollbar and a fade at the edge, never a chip cut in half. The desktop keeps its sidebar, top bar and in-flow composer. The TopbarPortal that lent two buttons to the phone top bar is gone with the bar. scripts/test/mobile-flow-browser.ts now pins it: no bottom tabs, no top bar, the page's own header on screen, Home one tap from its menu. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE * fix(loki): the starter row says it scrolls (ui-scroll-fade-right) CI's scroll-strips-have-an-affordance ratchet: a strip that hides its scrollbar must carry the fade, and the starter row above the composer had the one without the other. Room after the last chip so it clears it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
944ed15747 |
feat(cloud): private builders — an allowlisted agent environment, a runner without the database, one sealed unit per account (#1346)
* feat(runner): agents get an allowlisted environment; the cloud builder asks Loki what to clone
Track 1, PRs 2 and 3 of docs/architecture/private-builders.md, together.
- src/lib/agent-execution/agent-env.ts: with LOKI_AGENT_ENV=allowlist (set
by the box units) an agent PTY is born with a shell's environment, the
engine keys the unit holds and what its own spec passes — never
DATABASE_URL, never the org GITHUB_TOKEN. Off the box nothing changes.
- GET /api/control/workspace-source?tab=: a runner asks with its own token
and gets its own account's repository and a token that account may write
with (github-org-token.ts). box-workspace.ts reads no database any more;
the runner passes the run's token to the one agent that needs it
(GITHUB_TOKEN/GH_TOKEN in the spec env).
- mint-box-runner-token.ts --user <id>: a token per tenant.
- Records: changelog {#agent-env} {#runner-no-db}; roadmap milestone ticked.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
* feat(cloud): a private builder per account — the flag, the sealed unit, reconciled on the box
Track 1, PRs 4 and 5 of docs/architecture/private-builders.md.
- users.private_builder (migration 0122) is the one switch, set from
System → Plans (/api/system/private-builder). It grants cloud BUILDING
only: isCloudBuilderAllowed (founder or flag) for routing, Sessions and
the kickoff path; isFleetInfrastructureAllowed is the founder alone and
gates the org GitHub token, studio CD, own domains and the server's own
PTYs. LOKI_CLOUD_BUILDER_USER_IDS is retired.
- scripts/hetzner/loki-box-runner@.service: one unit per tenant as
lk-<short>, ProtectSystem=strict, ProtectHome=tmpfs with its own home
bound, the app and the runner env invisible, MemoryMax/CPUQuota/TasksMax,
its own dev root, the agent env allowlist, no database password.
- scripts/hetzner/new-tenant.sh: user, clean shell, dev root, a runner
token minted for THAT user, the agent contract, claude in its own home,
an env file for its engine keys, the unit. reconcile-tenants.sh runs
every minute from loki-tenants.timer (install-tenant-reconcile.sh, run by
the deploy) and brings units into step with the flag. The deploy ships
the scripts and template and drains and restarts every unit, each in its
own transient unit.
- A tenant's project path is written under its own root
(tenantDevRoot), which counts as box-rooted for routing.
- Records: changelog {#new-tenant} {#private-builder-flag}; roadmap.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
* chore(runner): Fleet Runner 0.8.50 — the allowlisted environment and the API-backed clone
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
f2b6fc7e66 |
feat: Sessions, an even session sheet, a terminal that scrolls, no ragged choice rows (#1331)
What the owner saw on a phone, and what changed: - "Terminal" over a "Claude | Terminal" pill: the page is now Sessions, and the pill is Chat | Terminal for every agent. The agent is named once, under the session's name; an agent with no chat view gets no switch. - The black terminal would not scroll: vertical swipes now belong to the terminal (touch-action: pan-x), and a swipe past the oldest kept line says so and offers Chat, where the whole conversation is. - The model sheet: Model and Effort are <Segmented> rows — equal cells, one line, the chosen one's meaning under it. "Next mode" (whose result showed only "with your next message") is a list of modes; a tap presses Shift+Tab until Claude Code's own footer names the one chosen, read live from the session's screen (use-live-mode, lib/claude-mode-footer). - More: no duplicate "Feedback on this page" row (the edge tab is on every page); sections regrouped so none is a heading over one row — Build (Home, Projects, Sessions, Prompts), Loki (chat, Voice, Today, Suggestions), To review, The fleet. "No-screen" is Voice. - Every pick-one row that wrapped into "4 + 1 orphan" on a phone is now <Segmented> (even row or grid), a one-line scrolling filter row, or one row per choice; scripts/test/choice-rows.ts fails on the old shape. - A page whose header is only its (phone-hidden) title no longer leaves a blank band above its content — Home opened on one. Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
556133788b |
feat: Home, four tabs, and a terminal that lists your sessions (#1327)
Walked as the owner (2026-10-19): what you expect, what happened.
- "I want something built." Control is now Home, and opens on the box:
what to build, with a project chip (the one you were last in, one tap to
change), sent to that project's agent via /api/inject. The empty
"Nothing is being built right now" card and its "Start something" (which
left for /loki) are gone. Done rows lead with what was done, not the
request quoted back.
- "Where is everything?" The phone's bottom bar is Home · Projects · Loki ·
More. Sections are grouped by thing — Build, Loki, To review, Your day,
The fleet, Private — not by abstract question. "Control" is "Home" in
every sentence that names it.
- "Where is my session?" With nothing open, the terminal lists your
projects, each with Resume, which opens it and continues its last Claude
conversation (/api/agent/launch {resume:true} → claude --resume of the
folder's newest log; runner 0.8.48). No more form with two dropdowns.
- Autopilot's toggle is a quiet control, not the page's filled primary.
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
39474428d7 |
docs: clear docs-truth drift and retired names (#1322)
- Fix stale paths/links in docs (model-vendors billingUrl, agent adapter placeholder, bridge host setup, entitlements not yet created, tokens module). - hetzner-migration: current hosts (evig, aoz) and a pointer to scripts/hetzner/apps.conf as the live app list. - Archive two point-in-time records (fleet-runner-pty-ownership, terminal-parity) into docs/archive with a README; fix inbound refs. - Thoughts essays: repo aoz-housing is now aoz-begleitung. Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
cde8d5f688 |
feat(terminal): phone session reads like a chat app — name in the header, one "+" (#1320)
The phone terminal had five bands of chrome around the session: the app bar, a scrolling row of session tabs with "+" beside it, a full-width view switch, the box with a paperclip AND a slash button, and the bottom tabs. - Header: back to Control · the session's name with "Claude · 2 sessions · cloud builder" under it · ⋮, and the Claude | Terminal pill centred below. The name opens the session sheet (every session, New session, where it runs, agent); ⋮ opens TerminalMoreSheet (What's going on?, full screen, text size, live keystrokes). No row of tabs to run off the edge. - An open session hides the app bar and bottom tabs below md (useImmersiveChat), so the session gets the screen and back is the way out. - The box is + · model · mic · send. "+" opens one sheet: photo or screenshot (presses chatkit's hidden paperclip, so paste and Camera/Photos/Files stay chatkit's), Keys on a phone, the agent's commands, Loki's records and the prompt library. - Conversation view: next steps are reply rows under the answer, sent by the box's own path (sendRequest). Terminal view: What's going on? and at most two steps in one sideways row. Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
925ab930be |
feat(ai-budget): newcomer reserve in the free pool + fix(billing): payments stay off until switched on (#1294)
* feat(ai-budget): keep a fifth of each day's free pool for people on their first week Pacing keeps the day from being spent before lunch, but not by evening: there is no clawback, so whoever signs up at 21:00 can meet a pool the vendors have already refused — a first answer that never comes, which is the moment a person decides Loki is broken. lib/ai-budget/newcomer-reserve.ts: returning accounts together stop at 80% of the day's capacity; an account under seven days old may draw on the rest, still under its own fair share. getDayUsage now also returns the day's total (same query as the active count). The gate reads the account's age only once the total reaches the held part, and fails open if it cannot; a paid plan with allowance left is not held back. The refusal says what the held part is for, when the day starts over, and the ways past it; the budget screen reads the same rule, so it never shows "12 left" to someone the gate will refuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CG9dupSVqoXCCqKfBCfd9B * fix(billing): payments stay off until switched on, whatever pay URLs are set Live after #1293: every paid plan's button on /pricing read "Pay in Bitcoin" and went to an OrangeCat product page that answers 404. The three ORANGECAT_PAY_URL_* were set on the box before the passes existed; while the tiers had no price that was invisible, and setting the prices turned the dead links on — skipping the reservation flow they were meant to fall back to, and showing "Buy" in Settings → Billing too. orangeCatPayUrl now also requires LOKI_PAYMENTS_OPEN=1. Opening payments is a decision (the company registered, the passes live), so it is a switch, not an inference from a URL. Until then every paid plan's button reserves, as designed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CG9dupSVqoXCCqKfBCfd9B --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
f80a315212 |
feat(control): the top of Control is the work being done for you, each job a tap from watching it (#1275)
The owner, on his phone (2026-10-17): "I see Building, I tap it, and I expect to see how it's building — the chat or the terminal. Here there is just so much… scary to non-technical users." The hero said "Building · 1 agent working" and could not be tapped; under it sat a builder sync line, three counters, a Workspaces list and a "Recent activity" log of the raw prompts sent to agents, safety fences included. - ControlNow: one card per job being built — what it is, what the agent is doing right now, how long — and the whole card opens the live session as a conversation (/terminal?project=…&view=chat&run=…). A job waiting for your answer leads with the question and says "Answer it". - ControlDone: the last day's results, what came of each (merged and deployed, partly done, stopped) and where to look: the site, the change, the conversation. Replaces "Recent activity". - ControlFoot: builder state, New project and Settings in one quiet line. The hero now speaks only for alarms or when someone is needed; Workspaces is desktop-only. - Titles (lib/task-title): a run named from its prompt the way a person would — a feedback fix is the report, an owner's decision is THE ASK, a site brief is its first line with the link as a domain. Never the prompt. - Live step without a viewer (lib/run-step): the runner's progress beat reads the tail of the agent's own session log and sends "Editing Header.tsx"; the server keeps it on the run (payload.lastStep) and /api/control returns it with the run's id, outcome, title and last beat. Fleet Runner 0.8.44. - The project the page auto-selects no longer becomes "your project" in the Profile · Chat · Control · Terminal strip; only one you open does. Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
8749efd100 |
feat(widget): say the state on screen, one button to open, a calmer panel (#1279)
The owner on their phone (2026-10-17): it should be clear on screen when Loki is watching and when it is recording, opening it should be easy, and the panel was too crowded and intimidating to use. Watching - The owner's launcher is ONE button that says its state in a word at every width: "● Watching" with a live dot and a ring, or "Paused". A tap opens Loki. Its second half, "Point", was the labelled, bigger part on a phone, so the obvious tap pointed instead of opening; pointing is "Point to area" in the composer. Recording - A red edge round the whole screen while Loki listens (it takes no taps; grey while it writes it down), a red-bordered dock that says "Recording 0:12", and a one-line hint instead of four. The panel - One status line instead of two rows: "Watching · 2 to look at · 4 live › Pause"; opening it shows what Loki noted and where each change is. - One microphone: the header's "Voice note" and the composer's "Record" did nearly the same thing. "Talk" in the composer is talk-while- scrolling, which also covers plain dictation; in chatkit it takes the tool row in place of chatkit's own mic. - "Fix it" and "Ask" instead of "Request a fix" and "Chat with Loki". - "Continue in Loki" appears once something has been said. - The visitor's phone launcher is 44px, the minimum tap target. Docs (widget/README.md, docs/architecture/feedback-widget.md, docs/development/contextual-voice-feedback.md) and the browser tests follow the new controls; new pure helpers watchHeadline and changesHeadline are unit-tested. Claude-Session: https://claude.ai/code/session_01E1qoQ9syUYXCRNbyrpqPGa Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
dc1e7ef1a7 |
feat(terminal): every tab says what its session is doing, and news from the others (#1278)
* feat(terminal): every tab says what its session is doing, and news from the others Several sessions at once only works if you can tell, without opening each, which one is busy, which one is waiting on you and which one is done. - Each tab, on the phone's row and the desktop strip, carries a status dot: a breathing accent while it works, amber when it needs you, green when it finished, grey when it is just open; the words go to screen readers and tooltips. Read from the same /api/control/stream Control uses, with the presenter's precedence (a running turn outranks a stale "blocked" handoff), so the terminal and Control never disagree (lib/terminal-session-status.ts). - When a session you are not looking at finishes or starts waiting on you, one line says so with Open (TerminalSessionNotice). One at a time, gone after ten seconds, on opening that session, or with ×. Tests: terminal-session-status (rules, precedence, what counts as news); terminal-tabs-browser now checks the dots and the notice at 320/390px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3 * chore(design): dead ui-* rule baseline 34 → 33 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3 --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
ab85172dda |
feat(terminal): sessions as tabs on the phone, and a second session per project (#1270)
* feat(terminal): sessions as tabs on the phone, and a second session per project Asked for from a phone: several terminal sessions open at once, the way a terminal has tabs, without clutter. Loki already ran several sessions and the desktop strip showed them, but below md the strip and its "+" were hidden, so a phone could neither see the other sessions at a glance nor start one while another was running. - Phone header: with more than one session the name becomes a sideways- scrolling row of them. The current one keeps its dot and chevron (and still opens the settings sheet); the others switch in one tap. One session looks as before, plus a "+". - "+" opens TerminalNewSessionSheet, the same start form as the desktop "+". - A project that already has a session now says so and offers "Start another session" or "Go to its session". Launching the same project used to target the same tab, which replaces the running agent. The second session is a lane tab (<project>~<id8>, run-tab.ts), named "project 2". - The runner gives a hand-started lane its own git worktree, as parallel dispatch already does, and refuses rather than share one checkout (desktop/src/main/lane-workspace.ts). The lane limit moved to run-tab.ts so dispatch and the "+" share it. - Close a session from the phone's session list (tap twice). - /api/agent/launch refuses a tab carrying "~" that is not a lane Loki minted. Tests: terminal-session-lanes (lane rules, refusal, numbering) and terminal-tabs-browser (320/390px: no sideways scroll, 44px targets, switch, sheet, second session beside a busy one). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3 * chore(desktop): Fleet Runner 0.8.43 — a hand-started second session gets its own worktree Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3 --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
87e4fec420 |
feat(widget): walk and talk — what was seen per moment, taps by their label, takes that chain, pictures Loki takes afterwards (#1239)
* feat(widget): walk and talk — what was seen per moment, taps by their label, takes that chain, pictures Loki takes afterwards The owner (2026-10-17): "I can scroll through the site and click different things while recording an audio … and as I comment, automatically the screenshots or whatever else needs to be taken, so the changes will be made in the most effective way possible." A page cannot film itself on a phone without a permission prompt, so the widget still takes no pictures. What it now takes, honestly, at the start, when scrolling settles, on every tap on the site and on Mark: the part of the page in view, the text at the reading line, how far the page is scrolled, and the control that was tapped — by its own label (aria-label, alt, title, text; a field by its label or placeholder), never by what was typed into it. Whisper's timings put each sentence under the part that was in view when it was said, as before; beside the note now travels the structured list of moments (widget/moments-contract.ts: said → seen, clamped on both sides, scripts/test/widget-server-caps-mirror.ts holds them together). - A walk is no longer one take: at the upload cap the recorder hands straight into the next take (the microphone stays granted), the clock keeps counting from the start of the walk, and Done joins the takes on one clock (joinTakes). Up to ten takes, about eighteen minutes. - Ingest validates and stores the moments (site_feedback.moments, migration 0108); the fix prompt renders them as a fenced WALK, one line per moment, so the agent knows what "this button" was. - The owner's row lists the walk (components/feedback/MomentsWalk) and a tap on "See what they saw" has Loki open that very view on the server — the page, scrolled to the tapped control or to the same scroll — and take the picture (/api/feedback/[id]/moment/[n] over page-picture.ts, which now takes a scroll position). The decision card says "4 parts of the page · tapped 2 things" so the owner knows a walk is behind it. Checked in real Chromium: a click on the host's own button while recording becomes a moment with that button's label and selector, Mark marks the part in view, the scroll is kept, the password field's value never travels; the owner and visitor flows at 320 and 390px pass as before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TNLstupcdvsPfTjy8yjR67 * chore(drizzle): regenerate the moments migration as 0109 on top of #1238 #1238 landed its own 0108 (site_feedback.read) first, so the moments column moves to 0109 and its snapshot is generated from main's. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TNLstupcdvsPfTjy8yjR67 --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
73df3dbece |
feat(widget): speak while scrolling, ask or send after, editors sign in (#1230)
What the owner hit on evig.orangecat.ch, fixed as one flow: - A long voice note looked cut off. It was not lost: the receipt quoted 300 characters and was the only copy shown. The receipt now quotes the start (at a word) and folds the whole note under "Show all you sent". - Speaking while scrolling: one dock (Listening · Mark · Done · ✕). Loki notes the part of the page in view at the start, when scrolling settles and on Mark; Whisper's sentence timings put each sentence under the part that was in view. No video, no screenshots, and the dock says so. The clock warns in the last 15 seconds before the 1:50 cap. - After speaking: "What you said", editable, never sent by itself. Ask Loki, or send it (visitor), or Build it / Save note (owner). - The aim button is "Point", labelled, everywhere. This page / Whole site / Point / Loki each say what they mean, and the placeholder follows. - Sign in: the header button explains what happens; "Create one free" keeps the way back to the site; sign-in follows the API redirect for real. The project's editors now get the owner's panel (one rule, lib/feedback/pass-holder.ts, for every widget route). Claude-Session: https://claude.ai/code/session_018LMe5Uv6mfWJibAiCaNbbk Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
25ae3de0e5 |
Make the Loki site widget one clear conversation (#1229)
* Improve widget conversation and mobile feedback flow * Update widget layout assertion for simplified header |
||
|
|
f617c3ca48 |
Speak while browsing and explicitly turn review notes into fixes (#1218)
* Capture contextual voice notes while browsing a site * Preserve unfinished page reads across reloads |
||
|
|
8288d3e39e |
feat(terminal): one box for the agent, with the microphone; a prompt library you can search (#1219)
The phone terminal made a person choose Type (keystrokes, no microphone),
Prompt (a task with a microphone) or Keys before saying anything, the next-step
chips reshuffled while you read them, and the prompt picker could not find the
prompts you had saved yourself.
One box for the agent (SessionComposer), in the terminal view and the
conversation view, on a phone and a computer:
- Microphone, screenshots and the prompt library ("/" or the book button) in it.
- It picks the path itself: one of the agent's own commands is typed as keys,
a screenshot goes through chat-send, a live session is typed into (paste +
Enter, as in the terminal), and with nothing running the words go as a task
that starts the agent or waits for the builder.
- "What's going on?" is the first chip above it; the header and the big button
that asked the same question are gone.
- Keys is a button in its tool row and opens only the keys — no second text box.
- Pressing the terminal puts the cursor in the box (or, with live keystrokes on,
hands the screen the keyboard).
- The Type / Prompt / Voice switch, the voice-only button and the exact-keys
composer are removed; Loki's side panel only asks, and a summary's step lands
in the box.
Next steps hold still: one set per settled screen or reply, waiting for the
fast model (then the rules), never reshuffled by a late answer, frozen while
you type, shown whole instead of clamped, two on a phone.
Prompt library:
- The picker lists your saved prompts first, then Loki's, with chips for Yours
and each group; the keyboard hint is hidden on touch screens.
- Search also finds a prompt by the words inside it, after name, tag and
description matches so a typo'd name still comes first.
- On /prompts the search box sits on top and searches your own prompts too.
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
d88cab3923 |
feat(notifications): turn this phone's push on, prove it, turn it off (#1212)
Production held ZERO subscribed push devices (the messaging doctor, 2026-10-15): the server could send a push, the VAPID keys and the service worker were in place, and no screen anywhere offered a phone the choice — usePushSubscription was imported by nothing. A new report on a site reached no device, and said so only in a log line. - Settings → Notifications gets an "On this phone" card: Turn on, Send a test, Turn off, with a plain sentence for every state (not asked, working, on, blocked by the browser, unsupported — with the iPhone Add-to-Home-Screen fix — error with retry, server has no key). Pure view logic (lib/push-card.ts) is pinned by scripts/test/push-card.ts; copy is SSOT in config/comms.ts. - GET /api/push/public-key hands out the server's own VAPID_PUBLIC_KEY, so a phone no longer subscribes against a key inlined at build time that a build can lose or leave stale; POST /api/push/test sends one test push and names the failed precondition instead of a bare zero. - The page-render harness is now a shared core (render-harness.mjs) with a thin script per page; the push card has one, and rendering it is how a filled button 8px shorter than its neighbour, and under 44px, was caught and fixed. Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3 Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
75a5831b43 | Add guided project reviews with shared browser evidence and pause controls (#1211) | ||
|
|
5e6b4602ca | Rebuild the project workspace around current work (#1203) | ||
|
|
62a019fc2c | Keep explicit agent dispatches concise (#1202) | ||
|
|
2b0b1bc49a |
Unify mobile agent conversations, run status and shared project progress (#1201)
* Make mobile agent conversations and shared project progress coherent * Remove the retired automatic personal-goal dispatch reader * Keep the conversation connection indicator in sync with its live stream * Preserve existing phone install identity and clarify the historical implementation plan * Make session recovery instructions user-facing and record the security-alert source review * Carry project proposals into coding handoffs and clarify empty-session routing |
||
|
|
7fc8721b78 |
Do not brief agents with imported or retired notes (#1189)
* Do not brief agents with imported or retired notes. A knowledge.sqlite snapshot and a sentence that restates a retired fact were still costing health and riding along in every dispatch. Age alone still does not clear a note someone wrote in Loki. * Drop the unused import that failed lint. hasAnswer left today/page.tsx when the flag check moved to signalIsLive. |
||
|
|
a1b9d212b2 |
fix: no silent standing approvals for Loki's own ideas, and no dead-end stalls (#1168)
* fix(approvals): standing approvals cover what you ask for, never Loki's own ideas The owner saw "✅ Done — Check in with Rajif Rao" on Telegram and feared Loki had contacted someone without permission. Nothing was sent: a commitment is a row in the operator's own list. But the path was still wrong. The check-in producer writes its suggestions as create_commitment rows, so the "Record commitments I mention" standing approval silently approved one nobody mentioned, and the confirmation read as if the check-in had happened. - standing-approval: RAIL 0. Every proposal now carries a required origin ("operator" | "loki"); only operator proposals may ride a standing rule. - enqueueAction takes the origin from every caller and stamps it on the payload so the calendar drain's confirmation can say the same thing. - Check-ins, the night plan and propose calls marked "not asked for" are origin "loki"; chat, the agent's propose tool and MCP are "operator". - A commitment's confirmation now reads "📌 Added to your commitments — “Reach out to …”. A reminder for you. Nothing was sent to anyone." - The Approvals setting says Loki's own suggestions still wait for a yes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XXM7KBHBym6au4L6sxShwz * fix(control): a stalled queue always has a button, and names who holds it On a phone the owner tapped "Run it in the cloud" under "Waiting for this computer". The next refresh said "Stalled — 2 dispatches queued for 118m, the builder is connected but not executing them. Restart the desktop app or check the cloud builder if this persists", with no button, under a foot line that read "This computer offline". Three things were wrong: - The stall clock ran from created_at, so work the cloud had held for seconds was reported as 118 minutes stuck. A reroute now stamps reroutedAt and the detector measures from it. - The sentence blamed a desktop app for work the cloud was holding. The stall query now counts cloud-held rows too, and the headline names the builder that actually has the work and whether it is connected. - A genuine stall had no way forward. It now offers "Stop waiting" (POST /api/control/stop-waiting): the stuck rows close as failed dispatches, where Retry sends them again verbatim and Dismiss clears them, and their runs close so the project's lane is free. The consequence is stated in the headline before the tap. Both hero queue buttons now report what they did ("Handed 2 dispatches to the cloud builder.", or why a project stayed put) instead of firing and forgetting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XXM7KBHBym6au4L6sxShwz * fix(loki): a screenshot sent with "fix this" finds the project it shows On a phone the owner opened a new chat, attached a screenshot of Loki's own Control page and wrote "Fix this so it works properly". The thread read "No project — answers only": the text named no project, so the screenshot fast path could not dispatch, and the picture was only ever described, never used to decide where the fix should go. - The vision preflight now opens with one line, "Shown: <app or site, and any URL visible>". - projectShownInScreenshot picks a project only when the evidence points at exactly one: a project's live host visible in the analysis (compared whole, so loki.orangecat.ch is Loki and not OrangeCat), else a single project named on the Shown line. Projects merely listed on the screen do not count, and two candidates stay a question for the person. - When Loki chose the project this way the reply says so and how to pick a different one, so a guess never reads as the person's own choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XXM7KBHBym6au4L6sxShwz * fix(notify): a failed run's Telegram message links to where Retry is "❌ loki: run error … choose another AI provider and Retry" arrived with nothing to tap. Failed, partial and timed-out runs now carry one button, "Open <project> in Control", which lands on the project card where Retry and the provider switch live. Successes stay buttonless. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XXM7KBHBym6au4L6sxShwz --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
696ce72e21 |
feat(builder): Loki from another computer offers the cloud, never a download (#1157)
* feat(builder): Loki from another computer offers the cloud, never a download The owner opened Loki on a second Mac (2026-10-12). Every builder surface named "this computer", said Fleet Runner was not connected there, and offered one fix: download the desktop app. "This computer" is per account — presence is one row per user — so from any other device that offer is a trap, and the account's cloud builder was online the whole time. The download it got is unsigned, so macOS called it "damaged". - lib/builder-way-forward.ts: the one answer to "nothing is running this work" per account — run it in the cloud / wait for the cloud / connect Fleet Runner / unknown — from cloudBuilderAllowed + presence. The download is honest only while the cloud is private for the account. - Dispatch card (Loki chat): a dispatch waiting for "this computer" gets "Run it in the cloud" (POST /api/control/reroute, same command id) when the account has the cloud; the download only when it does not. - Control setup banner: an account with the cloud reads that there is nothing to install; the offline variant no longer says "re-install". - Empty terminal: "Use the cloud builder" leads before "Get Fleet Runner"; the machine source's "not connected here" line names the cloud instead. - /api/builder/presence and /api/control carry cloudBuilderAllowed; useBuilderPresence is one shared poller for every reader (it was one interval per component, so a card per dispatch could not have it). - /download (macOS): the "damaged" dialog is Gatekeeper on an unsigned build, not a bad file; right-click → Open does not clear it. The page leads with the .zip and one Terminal line (ditto, xattr -cr, open). Signed builds need an Apple Developer account — docs say what it costs. Tests: builder-way-forward (new), dispatch-card (+5), phone-chrome updated to the moved wiring; execution-access, control-presenter, auto-reroute, dispatch-status, fleet-context pass. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Xssd1hFZCUSxqjACjoVBB * fix(terminal): no "start it, and it opens here" while the builder is offline A deep link to a project with no session rendered the session-miss screen ("sink isn't running on Cloud builder — Nothing is attached. Start it, and it opens here") while the chip beside it read "Cloud builder offline". The owner, on a second computer: "classic dead end" (2026-10-12). The miss is only a miss when the builder could have a session. Offline or gated, the empty state renders instead: it says the builder is down, what happens to the work, and offers the way forward for this account. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Xssd1hFZCUSxqjACjoVBB --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
06cf743de9 |
feat(browser): fill forms on the phone too — Loki for Firefox and one /fill page (#1156)
* wip(browser): Loki for Firefox + /fill page (validation in progress) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck * fix(fill): long values wrap under their label on a 320px phone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck * style: prettier on the extension test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck * fix(demo): /api/browser-task is denied in the demo sandbox — it reaches the owner's machine Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
7bf3220106 |
feat(browser): Loki fills a web form on your computer and stops at the final button (#1152)
A step behind the operator's own login ended in Loki listing fields to type. On 2026-10-11 npm's trusted-publisher form took three rounds of chat and a phone screenshot, and still hid two traps: an autofilled "Bitbaum" that cannot be edited once saved, and "Allow npm publish" off by default. Now Fleet Runner opens the page in Loki's own browser window (persist:loki-browser, so a sign-in sticks), fills it, outlines the final button and stops. The operator presses it and confirms any passkey. - config/browser-tasks.ts: recipes are the SSOT and the only thing a queued row can name — no raw url or free-form steps reach the runner. First recipe: npm-trusted-publisher. - lib/browser-fill.ts: one self-contained filler, found by visible label, React-safe value setter, idempotent, never presses the hand-off button. - browser_task pending command, channel "local"; validated on both sides. - Loki chat tool fill_web_form and MCP tool loki_browser_task (loki.act). - Fleet Runner 0.8.41. Tests: scripts/test/browser-fill.ts drives a React form built like npm's in Chromium, against a runner-style bundle and the actual Fleet Runner build (35/35; mutation-checked: a plain .value set fails 3). mcp-server 75/75, desktop-command-validator 17/17. Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
0096d86a4c |
feat(ship): done means seen — ship reports, and Loki records how Build next is used (#1150)
"Build next" (#1141) was reported to the operator as a merge notice: merged at 21:14, "should go live on its own", "I haven't confirmed that, or tried the screen in a browser myself", open /loki and tap a chip. Read on a phone. No link, no picture, no statement of what was checked — every rule this repo already states ("confirm the commit is LIVE, not just merged"; the fleet brief's "done means merged, deployed and checked live") skipped, because checking took tooling nobody had wired together. Ship report (`pnpm run ship:report -- /route --focus '<selector>'`): - confirms the running site's build commit contains the shipped one (/api/health `commit`, with `--wait` to sit out the deploy), never a guess from a timestamp - screenshots the real deployed page at 390 and 1440, crops the built section, counts console errors and 5xx during load - writes REPORT.md: live URL first, screenshots, what was and was NOT checked; exits non-zero while the build is not live or the section is missing - session auth shared with the responsive audit in scripts/test/lib/session-cookie.mjs (extracted, not duplicated) The contract — docs/development/ship-report.md — keeps the message it replaces, and the fleet brief now tells every dispatched agent to report the live URL first, a screenshot, and what was verified. After it ships, Loki watches whether it is used: operator_usage_events records each show, tap and rotate of Build next (surfaces and actions SSOT in src/config/usage-surfaces.ts; /api/usage refuses anything else; target is an id, never prose). A pure summariser turns the rows into one line per surface — shown, tapped, kinds offered and never taken — and a `usage` retrieval source hands it to Loki: "how am I using Build next?" leads with it, and every "what should I build?" reads it before recommending, with a prompt line to say when a surface is shown and never used and propose the one change. Tests: scripts/test/usage-summary.ts (registry refuses unlisted pairs, never-shown surface reported, window honoured, planner leads with usage when asked about use); retrieval-plan, telemetry-freshness, fleet-brief and account-deletion gates extended or passing as-is. Claude-Session: https://claude.ai/code/session_016T1Vm7uYyhpgUxbD3xXro9 Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
6c20cd4e0a |
feat(autopilot): the night works from what you said, and no further than you allow (#1123)
* feat(autopilot): the night works from what you said, and no further than you allow The night used to be `nudge-idle`: wake three idle projects at 04:00 with a generic "pick the highest-impact action" prompt, with no limit on what that spent and no record the owner could read in the morning. A run with no brief is where the queue of things nobody asked for came from. The night now - builds from the feedback inbox — one fix per project, the owner's own notes first, then what most visitors hit — through the same Implement path as the button, so a night's run is a person's run: same prompt, same auto-ship rules, same ledger; - is capped by a per-account budget counted in RUNS (beacon_settings .night_runs, default 4, max 20, 0 = file away but build nothing). A run is the unit that spends the owner's agent credits, and a run cap holds whether or not the runner reports a price; - reads one site not read this week, when there is budget left, through the same review prompt as "AI review this page" (now shared in lib/feedback/ai-review-prompt.ts), filing findings into the inbox; - files away reports nobody started in 21 days, with the reason on the row (site_feedback.archive_reason, cleared on reopen); - hands rows waiting for a shut laptop to the cloud builder; - writes one row per (user, night) to autopilot_nights and leaves one line on /feedback, Telegram and push — nothing when it did nothing. Decisions are one pure planner (src/config/autopilot-night.ts, tested in scripts/test/autopilot-night.ts); the lib gathers facts and carries the plan out; the same dispatch gates as Control refuse a working, blocked or failing project; a project paused on Control takes nothing. No model is called from the timer — every night action is an agent run on the owner's builder or a count — so no-free-background-ai stays green. Settings → When an agent finishes gains "Overnight: up to N runs a night"; the autopilot copy on Settings and the Control sheet says what On means now. docs/paths.md path 3 and CHANGELOG record it; effective-loop-operations.md names the night in place of the idle cron. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011L2dmcydDLYAiNQwK4XcF4 * docs(telegram): register the night's morning note The registry gate found the one new path that can reach the phone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011L2dmcydDLYAiNQwK4XcF4 --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
3ce95843d3 |
feat(control): work waits for nobody — an offline computer hands off to the cloud (#1119)
A phone tap ("Fix this" in the widget, "move forward" in chat) on a project
that prefers this computer sat "Queued for this computer" for 106 minutes
beside a cloud builder reading "online · not executing", and the hero told
the operator to restart a desktop app that was simply shut.
Routing
- A project that merely PREFERS this computer (no locus lock, cloneable
repo) falls through to the cloud builder when this computer is offline at
dispatch time and the cloud is online: `offlineFallbackChannel` +
`decideQueuedExecution({ offlineFallback })`. The chat says so
("… this computer is offline, so the cloud builder took it. Nothing to
do.") and the stored preference is untouched. A lock never falls
through; a cloud preference never falls to a laptop that cannot clone.
- The executor swaps in the cloud clone dir for a rerouted dispatch.
Already stuck
- `POST /api/control/reroute` (lib/reroute-queue.ts) moves unclaimed rows
waiting for this computer to the cloud — one row or all — on projects
the same rule allows; an `inject` row becomes a `dispatch` so it lands.
- Control hero: "Waiting for this computer · N queued 106m (loki), which is
offline. The cloud builder is online and can take it now." with ONE
button, "Run it in the cloud". The stall query reports `localQueued`.
- Feedback card: "This computer is offline — the cloud builder can take it
now" with the same button in place of "Open Fleet Runner … then Retry".
Control page, from the widget's own findings
- "N awaiting input" / "N working" now narrow the roster to that bucket,
with a chip to clear it (on a phone the tap changed nothing on screen).
- The page title is the shell's h1 at every width (md:sr-only), the Find
project and new-project fields carry labels, and the roster's 10px
evidence line and sort chips are 12px.
Claude-Session: https://claude.ai/code/session_011L2dmcydDLYAiNQwK4XcF4
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
fb25ac6734 |
feat: say who you're talking to, and whether the change is live (#1067)
* fix(terminal): name the conversation after the agent in the session; "Loki" is the supervisor only The view switch read "Loki | Terminal" (#1041). That named the coding agent's own conversation after a different AI: Loki runs on whichever model is first in its chain, and the thing in the session is Claude Code today, Codex tomorrow. The operator reported the result on 2026-10-07: "there can be one model powering the chat, and another model is open in the terminal". - TerminalViewSwitch takes the running agent's label: "Claude | Terminal", "Codex | Terminal", "Chat | Terminal" when unnamed. - "Loki" goes back to the supervisor panel: the desktop pane button and the session-sheet section, whose row now says it answers on Loki's own model. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jbux2e4GEruUYXn1PC3VhM * feat(projects): the Build strip ends on the outcome — live at skif.ch, or waiting on you The project page knew whether an agent was working, how the last run was graded, and (in the run's fix ledger) whether the change had merged and deployed. It read the first two and said "work reached the repo" — true, and not what the person who asked for the change wanted to know. - lib/project-state-sentence: one sentence per project (headline, detail, tone, waitingOnYou), from the build status plus the shipping ledger. Ends on the outcome ("Live at skif.ch", "In review — goes live by itself", "Merged, but not live"), never on the mechanism; no PR numbers, CI or auto-merge in the words. `waitingOnYou` is true only when nothing moves until the operator acts — a change in review is not waiting on anyone. - LastAttempt carries `shipping` (normalized payload.fix), and `landed` honours a deployed ledger, so a timed-out run that shipped is not "nothing". - ProjectBuildStatus renders the sentence; its kicker follows the tone, and a link to the live site or the change sits in the text — the action slot stays the one button that starts work. Control's card already shows the ledger line; Today lists only flagged projects. Both unchanged here. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jbux2e4GEruUYXn1PC3VhM --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
1138940bc2 |
fix(terminal): Chat in the switch, prompts that fit the screen, nav off the keyboard; questions stay questions (#1040)
From a phone report on /terminal and /loki (2026-10-05): - The input switch ended in a "Loki" chip that opened the same panel as the header's Loki button; tapping it was expected to show the session as a conversation. Chat is now the switch's first position (Chat · Type · Prompt · Voice) on phone and desktop, the chat view carries the same switch back, and the duplicate header chat icon and desktop "Conversation" button are gone. Picking an input mode also shows the terminal. - The Prompt box offers up to three prompts read off the screen (lib/terminal-suggestions.ts): the PR whose CI is pending or red, an error on screen, a y/n question, "continue" after Completed. A tap fills, never sends. - With the soft keyboard up the bottom nav floated over the Prompt box and the terminal was squeezed out. The nav now hides while the keyboard is up (fc-keyboard-open, every page), and in Prompt the key deck folds away until the keyboard closes. - "Are you able to work on improving Loki in this field." was queued as agent work: no question word the resolver knew, no question mark, and " on " hit the last-resort task rule. Auxiliary-led yes/no questions are now chat, and the no-LLM fallback keeps questions as chat too. - The queued-offline reply named the builder and then said "starts when a builder is online (cloud or this computer)". It now names only that builder. Claude-Session: https://claude.ai/code/session_01BQdyreKqCfy8iwRBRUVm39 Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
77ad544875 |
feat(terminal): attach from a phone, swipe to scroll, one bar, no dead ends (#1042)
* feat(terminal): attach from a phone, swipe to scroll, and a full screen that is full
Attaching. The paperclip on a phone opened a chooser of capture apps (Camera,
Camera, Recorder, "Photos & Videos") with no way to the screenshot: one file
input with a mixed accept. The composer is chatkit's, so the fix is there
(bitbaum/chatkit: Camera / Photos / Files sheet, one input per source) and
this bumps the pin. Control's own paperclip (attachment-strip) now renders
chatkit's AttachMenu instead of its own mixed input, and a picked PDF gets a
sentence instead of being read as text.
Attaching in the conversation view. It had attach={false}. A message with a
screenshot is folded by the same lib/composer-attachments every dispatch
uses (new /api/control/fold-attachments: the fold and nothing else) and
pasted into the session like any message. sendKey is now one serialized
chain, so Enter can never overtake a long chunked paste.
Scrolling. xterm 6 scrolls on the wheel only, so on a phone a swipe moved
nothing. lib/terminal-touch-scroll.ts turns a vertical swipe into
scrollLines, carries sub-row movement, glides after a flick, and leaves taps
alone. Verified with real xterm in Chromium under touch emulation: 0 lines
before, ~1 line per row of finger travel after. A "Live" button returns to
the newest output while scrolled back.
Full screen. Expanded kept the whole dock (two key rows, mode chips,
composer: more than half the phone), so it bought a few rows and read as
four toolbars stacked under the session. Expanded now collapses the dock to
one bar: Keys and Write open their panel on demand, Esc and Enter stay on
the bar. The phone switch drops Voice (the composer's mic dictates) and its
Loki chip (the header's Loki button is the one entry point).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck
* feat(ux): one composer per screen, one bar on the phone, no dead ends
Verified on the real app (production build, local Postgres, demo tenant,
a stubbed live session) at 320/390/768/1440: responsive audit green on
every page; screenshots of each changed surface.
Terminal, phone. Both layouts are now one bar (Keys / Write; Esc / Enter
while watching) with one panel open. The normal page opens on Write, full
screen on nothing. The stacked dock (two key rows + chips + composer) is
gone from both.
Conversation view. A builder that never sends the transcript used to show
"The conversation isn't coming through … Fleet Runner 0.8.38" — now the
surface shows the terminal for that session and drops the toggle, without
touching the saved preference.
Loki panel. A working run said it three times ("Working · 2 min" /
"Agent is working" / "Agent is generating. Inject to steer…");
railStatusLines prints only lines that add something. In the conversation
view the panel is Ask-only, so the page never shows two composers for one
session. Plain empty copy; the "Full chat" text link is an icon button.
Sheets. On a phone a bottom panel is a real sheet on the bottom edge — it
floated ~90px up, clearing a bottom nav that is hidden while it is open.
Floating clutter. The Ask Loki bubble is gone from /terminal (it sat on
the Loki panel's Send); on phones the feedback launcher hides behind the
bottom nav and "Report a problem" lives in the account menu.
Dead ends. An offline/gated terminal offers "Use this computer" and "Get
Fleet Runner" as buttons. Control's never-connected banner is one
sentence and one button: the duplicate "Start a new project" card goes,
and the five CLI installers — which queued commands no builder would pick
up — only show where a builder can act on them.
Also: no-op input-mode chips hidden in the conversation view; memory
descriptions wrap instead of a hover-only ellipsis; the responsive audit
honours CHROMIUM_PATH. Tests: phone-chrome.ts, railStatusLines cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck
* fix(shell): Report a problem falls back through the router, not location.assign
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck
* chore(deps): pin chatkit to the merged commit of bitbaum/chatkit#7
Same tree as the branch head it replaces (5c2cdd6), which was deleted
after the squash-merge; pinning main's commit keeps the install
fetchable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
4abd1664c0 |
feat(terminal): one Loki | Terminal switch, drawn in both views at every width (#1041)
* feat(terminal): the dock's Loki switch shows the session as a conversation Beside Type / Prompt / Voice, "Loki" read as a fourth way of working and then opened a side panel about the session instead. It now switches the screen to the session as a conversation — the chat-app view (ClaudeChatView) that was only reachable through an unlabeled icon in the header. Where the agent writes no conversation log (not Claude), the chip still opens the Loki panel; the header's Loki button keeps opening the panel everywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jbux2e4GEruUYXn1PC3VhM * feat(terminal): one Loki | Terminal switch, drawn in both views at every width The terminal screen named two different things "Loki" and hid a third behind an icon: a speech-bubble icon in the phone header (the conversation view), a "Loki" header button (the run summary panel), and since the last commit a "Loki" chip in the dock that disappeared with the dock the moment you used it. On desktop the conversation view had no way back at all — its only entry was a "Conversation" button inside the terminal pane. - TerminalViewSwitch: one labelled Loki | Terminal control, current view marked, in the phone header and the desktop session bar. - "Loki" now names only the conversation view. The run summary panel moves to the session sheet on phones and is "Summary" on the desktop pane. - Input modes (Type / Prompt / Voice) show only in the terminal view, where they do something. - Under 375px the switch drops its icons so the session name keeps its width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jbux2e4GEruUYXn1PC3VhM --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
a1cc13053c |
feat(mcp): message Loki from any AI app; the Telegram agent reads screenshots and videos (#965)
* feat(openclaw): the Telegram agent reads screenshots, photos and videos The Telegram agent is OpenClaw on bitbaum, and OpenClaw already describes inbound media before the chat model reads the turn — but on defaults that cut every description at 500 characters and read one attachment per message. A screenshot lost most of its text; an album was read as its first picture; video had a one-line "Describe the video." prompt. - scripts/openclaw/media-understanding.json: versioned tools.media.image and tools.media.video blocks (Gemini; screenshots transcribed verbatim, albums read whole; videos returned as transcript + visuals + claims + authenticity signs so the agent can argue about whether a clip holds up). tools.media.audio is deliberately untouched — voice notes already work. - scripts/openclaw/install-media-understanding.sh: the only way it reaches the box. Refuses without a Gemini key, writes through OpenClaw's own schema-validating `config set`, restarts the gateway, then proves an image (and, where ffmpeg exists, a video) is actually described. - scripts/test/openclaw-media-config.ts: pins the limits and the audio hands-off rule. Validated against openclaw@2026.4.23's schema locally. Not yet applied to the box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018tsc8Yu7TQR9a6Y5xNYkeD * refactor(actions): share the decision and the enqueue report; let a turn be read-only Groundwork for the MCP server, so it calls the same code the chat seams do instead of a copy of it: - lib/actions/decide-action.ts: approve/reject one draft, lifted out of POST /api/actions/[id]/decision (which now calls it; wire shape unchanged). - lib/actions/enqueue-report.ts: what an enqueue outcome may truthfully be called (auto-approved / awaiting-approval / deduped), lifted out of POST /api/actions/propose (wire shape unchanged). - config/orangecat.ts: the OrangeCat origin and OAuth issuer in a DB-free module; Auth.js and the identity bridge read the issuer from here instead of each re-deriving it. - askLoki / runLokiTurn take `readOnly`: the tool loop drops its propose tools and the OpenClaw gateway fallback is skipped, so a caller granted conversation but not action cannot get Loki to act by asking. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018tsc8Yu7TQR9a6Y5xNYkeD * feat(mcp): a remote MCP server so AI apps can message Loki and have it act POST /api/mcp speaks MCP Streamable HTTP (stateless JSON-RPC 2.0; protocol 2025-11-25 / 2025-06-18 / 2025-03-26). claude.ai and ChatGPT connectors, Claude Code and Cursor can ask Loki, list the approval queue and projects, dispatch work, book appointments and decide queued actions. Auth: a ck_* agent token (both scopes), or an OrangeCat RS256 access token verified with node:crypto against the issuer's JWKS — iss, aud (must be the Loki resource URL, never a client id), exp. `sub` maps to the Loki user via orangecatActorId; an unlinked actor gets the sign-in step, not a 500. A missing or bad token is a 401 whose WWW-Authenticate points at the RFC 9728 metadata served at /.well-known/oauth-protected-resource(/api/mcp). Scopes loki.chat / loki.act and the tool map are SSOT in src/config/mcp.ts. Act tools go through injectPrompt, enqueueAction and decideAction — the functions the Telegram skill's routes call — so the approval queue gates them exactly as it does there. Both paths are excluded from the session middleware (proxy.ts, with the reason), registered in api-route-auth and the demo sandbox. Docs: docs/development/mcp.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018tsc8Yu7TQR9a6Y5xNYkeD * fix(openclaw): match the installer's smoke output with a here-string, not a pipe printf | grep -q can report a miss on a match under pipefail (grep exits, the writer takes SIGPIPE). no-grep-q-in-a-pipe caught it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018tsc8Yu7TQR9a6Y5xNYkeD --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
839f35ef6c |
fix(feedback): one inbox surface, project links by id, a render harness (#961)
Landing from Implement on /feedback?project=<id> printed "Nothing waiting
on you for 5936f8fb-…": the inbox filtered by project NAME and showed the
reader the id, on a page whose chips, stat cards and section heads were
each drawn in a different style. Every check was green; nobody had
rendered it.
- The ?project= filter resolves a name or an id against the data; an
unknown value filters nothing instead of printing itself.
- A project-scoped view names its subject ("Showing petvity · 1 open ·
All projects"), scrolls the active chip into view, and drops the
per-row project chip. An empty project view says what is shipped and
offers "Show all projects" / "Open <project>".
- One chip primitive (ui-inbox-project) for project and source filters;
sections use the ui-inbox primitives; the three stat cards are one line
(metricsLine, pure).
- A failed row has one primary button: the provider switch (or Retry);
Watch steps down to secondary.
- Any refused feedback run gets one automatic second attempt; only
commands the runner could not read, dead credentials and a missing
workspace still stop. Test updated.
- scripts/preview/build-feedback-preview.mjs renders the real inbox with
fixture rows in headless Chromium at 390 and 1280, dark and light, for
every ?project= shape, failing on overflow or a console error. REVIEW.md
records the definition of done this adds; responsive-design.md documents
the harness.
Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
75c870da2d |
fix(terminal): PTY follows the grid, expandable full-width pane, one composer (#887)
* fix(terminal): resize the PTY to the grid on screen, not only when typing The resize was published only from an interactive (Type + live keys) view, so Prompt mode, Voice mode and every phone fitted xterm locally and never told the PTY. Measured: 79-col grid drawing a 120-col PTY on desktop Prompt mode, 86 vs 120 on a 390px phone — torn words and stray columns at the right edge. Fit + publish now run on mount, on every host resize, on a font step, and re-assert on window focus. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(terminal): one composer for chat and inject; expandable, full-width pane - components/composer/Composer is THE composer (text, attach, voice, model, Send/Stop, optional modes). Loki chat (LokiComposer), the terminal's Ask/Inject rail, the Prompt-mode box / phone dock and Control's quick send all render it. TerminalLokiComposer (bare textarea, no attach/voice) is deleted; Control's one-line ⌘Enter input is gone. - The rail's Inject is the prompt composer while the rail is beside the session, so the page no longer shows two inject boxes at once. - Terminal pane: rail is a fixed width (lg+) instead of 40% of the row, can be closed (remembered), is a sheet below lg; Expand works at every width and Esc leaves it, except when typed into the xterm or handled by a dialog. - Tests: one-composer (logic, per-call-site render, no private textareas), terminal-expand (Esc rules). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
fcd38cb463 | fix(loki): clarify terminal and retire stale guidance (#866) | ||
|
|
602a581c46 |
Organise navigation around the operator loop, give the header an identity, and stop Control contradicting itself (#797)
* refactor(shell): organise navigation around the operator loop, and give the header an account menu The sidebar carried 27 destinations in four sections, one of which was named "More" and held Approvals, Terminal, Prompts, Activity, System, Thoughts and the PUBLIC /fleet register — seven pages whose only shared property was that nobody had decided where they went. Alongside them sat a "Site" section: Mission, Philosophy, Roadmap, Whitepaper and Investors, in the signed-in app navigation. Loki is an operator console. Its surface answers three questions, so the sidebar now has exactly three sections and each one states its question: Now — what needs me? Today, Approvals, Feedback Fleet — what is my fleet doing? Control, Projects, Activity, System Command — how do I act on it? Loki, Terminal, Prompts Private stays PIN-gated below them. The marketing pages left the signed-in shell and stay reachable through Cmd-K, which now indexes NAV directly rather than whatever happens to be in the sidebar — curating the sidebar must never make a page unfindable. Alongside that, identity: - There was no way to sign out from the header, and nothing anywhere in the top bar said who was signed in. A grep of components/shell/ for "avatar", "UserMenu" or "ProfileMenu" returned nothing. Sign out, Settings and the private-zone lock lived in the sidebar footer, which is `hidden md:flex`, and were duplicated in the mobile Menu sheet's footer: two account menus, neither called one, and none where users look first. - AccountMenu now owns all of it, in the top bar, on every viewport. - The theme toggle moved inside it. It was the only control in the top bar drawn with a border and a fill (ui-theme-cycle-btn) while every signal beside it was a bare ghost circle (ui-topbar-btn) — a preference outweighing every piece of live state on the page. - SidebarFooter is deleted. Its collapse button was marked `md:hidden` inside a panel marked `hidden md:flex`, so it could never render on any viewport; SidebarBrand has always owned the working toggle. Two retired NAV entries are deleted rather than hidden: `agents` → /control and `atlas` → /projects pointed at the pages that replaced them, and since NAV_ITEMS is what AppTopBar and PageTitle scan for "which page am I on?", the first match won — /control would have been titled "Agents". Their redirect pages reference the targets, so the redirects stay honest. scripts/test/navigation.ts is rewritten to defend the new structure: every section must state its question, "more"/"misc"/"tools"/"site" are rejected by name, account items may not appear in the sidebar, marketing items may not, no two items may share an href, and the bottom bar must carry one entry point per loop section. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159PhgGrn6ccwfwVTJoTuYx * fix(control): stop the hero claiming "Idle" over a queue of six things Observed on prod: the Control hero read "Idle — nothing queued" while a panel titled "Needs you", badged 6, sat roughly a screen and a half below it, under a 23-project list. One page, one question — is anything waiting on me? — and two answers, with the confident wrong one on top. Two distinct faults, fixed together because either alone leaves the page contradicting itself. 1. The hero could not see the queue. deriveFleetPulse read agents, run outcomes and projects awaiting input, and nothing else, so the one queue on the page that literally counts things waiting on the operator was invisible to the headline that summarises them. It now takes `inbox` and ranks it last among the states that say something is up — a stall, a failure, a half-finished run and a blocked project all still outrank chores — but comfortably above "Idle". `unknown` is a separate state from `count: 0` on purpose. A queue we failed to read is not a queue we know to be empty; ControlInbox already refused to render silence as the answer "no", and the hero now refuses too. The count could not be lifted while it lived inside the panel rendering it, so the fetches moved to `useControlInbox`, called once in ControlPanel and passed down. One read, two consumers, one truth. It also removes a third copy of the /api/feedback/summary request from the page. 2. The panel was filed in the wrong tier. ControlPanel's own ordering rule says tiers 1-2 are about a human being blocked and "reporting never renders above blocking" — and a queue titled "Needs you" with a count badge is the definition of tier 2. It sat in tier 4. It now sits with AttentionBar and AgentEscalations, which it can afford because of how it was built: one line per group until opened, nothing auto-expanding, and nothing at all rendered when the queue is empty. Two rows above the fleet, not the ~1,400px of unbounded strips it replaced. The `inbox` state takes the warning dot rather than neutral grey, for the reason the `partial` state already does: grey beside the words "Waiting on you" is the page agreeing with itself in tone while disagreeing in substance. `unknown` stays neutral — that one really is "no idea". Four tests pin it: a non-empty queue is never Idle, an empty one still is, an unreadable one is not a claim of emptiness, and real trouble still outranks chores. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159PhgGrn6ccwfwVTJoTuYx * fix(design): un-invert the dark text ramp, and make token drift a build failure @bitbaum/design-tokens calls itself "the design single source of truth for OrangeCat, Loki and Solon". Solon proves it — its globals.css is 19 lines and imports the package. Loki's is ~5,800 and declares its own ramp, with the package present only as a devDependency used to generate the widget theme. A comment here said the quiet part out loud: "Loki still declares its ramp locally, so the value is kept in step by hand." Nothing was keeping it in step. Measured: Loki and the package disagree on 32 of the 36 tokens they both define, and the disagreement has a shape — someone transcribed the DIGITS between colour spaces without converting them. `--text-secondary` is `oklch(0.4 0 0)` here and `0 0% 40%` there; those are 30 of 255 apart. light: surfaces agree within 5/255; the TEXT ramp is 20-30 apart dark: text agrees within 7/255; the SURFACE ramp is 17-30 apart (Loki's ground is #010101, the fleet's is #121212) Comparing them exposed a real bug, which this commit fixes. Loki's documented ramp is primary → secondary → tertiary → muted, each quieter than the last. The light block follows it (0.1 → 0.4 → 0.58 → 0.72). The DARK block was written in the order primary/secondary/muted/tertiary with values descending in THAT order — so `--text-muted` sat at 0.65 while `--text-tertiary` sat at 0.59, and text marked muted rendered BRIGHTER than text marked tertiary. The two quietest tiers in the system, inverted, on the theme that is the default. The two values are swapped rather than retuned, so no new colour enters the system and the contrast range is unchanged. The rest is a gate, not a migration. Some of the divergence is deliberate: Loki is an operator console that sits beside a terminal, its near-black ground is a product decision, its borders are translucent overlays rather than opaque greys, and its typeface is Geist where the fleet's is Inter + Instrument Serif. Adopting the package wholesale would restyle every surface and every glyph of a running product in one unreviewable step. So scripts/test/token-drift.ts requires every difference to be DECLARED. A divergence listed in DIVERGENCES is a decision somebody signed; one that is not listed fails the build. Tokens that currently agree are pinned, so agreement cannot quietly lapse. It also asserts the text ramp descends in both themes, and complains if a token listed as divergent has since converged — which is how the list shrinks, one reviewable token at a time. It is picked up automatically by scripts/test-unit.ts (which globs scripts/test/*.ts), so it runs in `verify` and in CI without further wiring. Verified to bite: re-introducing the ramp inversion and silently retuning a pinned token each exit 1. Docs corrected to match the shell as it now is: CLAUDE.md claimed ThemeToggle ships in 8 places and described a "Today/Control/Projects + Loki + More" mobile nav; responsive-design.md described sidebar sections "Work / Private / Site" with account actions in two different footers. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159PhgGrn6ccwfwVTJoTuYx * refactor(shell): stop two navigation surfaces answering a question already answered Loki ran six navigation surfaces at once — sidebar, top bar, the Profile/Chat/Control/Terminal strip, the mobile bottom bar, the Menu sheet and the command palette. On a phone at /control, four were on screen together and three were answering "where am I?". Two of them now stand down where they add nothing. FleetSurfaceGuide renders only with an active project. Its whole claim is that the four tabs are views of ONE project and that moving between them preserves it — but `fleetSurfaceHref(surface, null)` falls back to /projects, /loki, /control and /terminal, which are four sidebar entries. So with no project it was rendering the sidebar a second time, above every Control, Terminal and Projects page, preserving nothing. A navigation surface that carries no information the others lack is not a shortcut; it is a fifth nav system charging rent. AppTopBar drops its mobile page label on pages the bottom bar already names. Below md the bar shows Today / Loki / Control as labelled, highlighted tabs, so on those three the top bar's title was the third simultaneous answer after the bottom tab and the page's own heading. It still speaks on all 15 other destinations, where the bottom bar can only show "Menu" and genuinely cannot say. scripts/test/nav-surfaces.ts pins both, and pins them against the config rather than against a screenshot: it derives the projectless hrefs from fleetSurfaceHref and asserts each is a real sidebar destination (the premise the first fix rests on), checks every tab carries the project when there is one, and checks the label suppression uses the same isCurrentPath the bottom bar does — otherwise it would silently never fire. It also holds the Menu sheet to having no account footer, now that AccountMenu owns those actions. Verified to bite: reverting the strip gate fails the suite. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159PhgGrn6ccwfwVTJoTuYx * fix(ci): pre-push ran the wrong suite for scripts/test/ The hook classifies changed paths into three arms and runs the gates each one can break. `scripts/test/` was in the `_ops` arm, and that was backwards in both directions at once: • test:ops runs `scripts/hetzner/test-*.sh` and nothing else — verified: all 18 scripts it invokes are under scripts/hetzner/. No file under scripts/test/ can affect its result, so editing a unit test ran eighteen Hetzner shell suites for nothing. • scripts/test/ holds the 218 .ts files that ARE the unit suite (scripts/test-unit.ts globs the directory). The unit suite runs in the `_app` arm, which scripts/test/ did not trigger. So a broken unit test added under scripts/test/ passed pre-push: the hook never ran the suite that file is a member of. Now: `scripts/test/*.ts` → `_app` (tsc, lint, design, desktop, test:unit, test:home). `scripts/test/*gate.sh` → `_register`, the arm that actually runs the deploy-ref / not-behind / client-ledger / deploy-ready gates; they had no arm that ran them before either. `_ops` keeps hetzner and site-template. scripts/test/pre-push-routing.ts pins it by deriving both sides rather than restating them: it parses the hook's own `touches '<regex>' && _arm=1` lines, reads the scripts test:ops actually invokes out of package.json, and asserts each path reaches the arm that covers it. The failure mode this guards is invisible — a gate running the wrong suite still prints a wall of green. Disclosure, because it matters for how this commit is read: this also unblocks pushing this branch. test:ops fails 4 of 92 checks in a container running as root (the .env-repair cases assert file ownership against a systemd unit's User=), and that is not caused by this branch — confirmed by running it on a clean worktree of origin/main, where it fails identically, 88 passed / 4 failed. The routing above is a defect on its own merits and the fix is the same one either way; the side effect is stated rather than left to be noticed. Those 4 ops failures remain, unaddressed by this branch, on main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159PhgGrn6ccwfwVTJoTuYx * chore(design): ratchet the dead ui-* rules in globals.css check-loki-classes.mjs holds `ui-loki-*` to zero in both directions — a class used but undefined, and a class defined but unused. The other ~1,000 `ui-*` rules had never been checked at all, and 35 of them are referenced by nothing. That matters more here than in most codebases. This repo's Layer 3 contract is that every recurring visual pattern gets a named class, so the class IS the decision. Someone looking for "how do we draw a metric card" finds .ui-control-metric-card, -value, -label and .ui-control-metrics-grid sitting in globals.css and reasonably concludes that is the house style. Nothing has used them in months. Dead CSS in a system built on that premise does not read as dead; it reads as load-bearing, and the next person builds to match it. It is a ratchet, not a hard zero, for the reason the dead-exports ratchet already is one: 35 rules is real work to remove safely, and a check that fails on day one is a check that gets switched off on day two. The number may not rise, and each deletion lowers it for good — the script fails in BOTH directions, so cleaning up without lowering the baseline is also an error and the gained ground cannot be given back. Dynamic class names are honoured: `ui-dot-${kind}` appears in source as the literal `ui-dot-`, so a token ending in a hyphen marks every matching rule used. Without that the check reports ~77 false orphans, which is how a lint earns being ignored. Eight such prefixes are in play. Also deletes .ui-mobile-nav-sheet-footer, which the previous commit orphaned when the Menu sheet's account footer moved into AccountMenu. Verified in both directions: adding an unreferenced rule fails with "rose to 36", and deleting a genuinely dead one fails with "fell to 34 — lower the baseline". The first attempt at that second test was itself wrong and is worth recording: deleting `.ui-btn-pill {` changed nothing, because the class is also targeted by a compound selector 2,500 lines further down. The checker was right and the test was wrong — which is exactly the sort of thing a rule counted by hand gets wrong. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159PhgGrn6ccwfwVTJoTuYx --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
f1d35e5d93 | feat(fleet): expose canonical public development profiles (#737) | ||
|
|
f7c4e35fdc |
feat(builder): a project can pin its work to the hosted runner — no Claude credential needed (#718)
builder_pref gains a third value, 'hosted'. A project pinned to it never touches a runner PTY: the dispatch goes straight to the hosted runner (Hermes in its own clone on the box, on the providers the box already holds keys for — Copilot, Gemini, Groq), and the hosted runner closes the tracked run with the pull request as evidence, so the outcome reaches the thread that asked, like any other run. Why now: the box's Claude Code credential died silently and every self-dispatch hung, while Hermes on the same box answered fine. The unattended path should not depend on a person's Claude subscription at all. - statuses.ts: HOSTED_BUILDER_PREF / BUILDER_PREFS (channels stay what they were — nothing claims 'hosted' from a queue); API enum widened. - inject-core: hosted branch before the channel pin; run id travels in the hosted_dispatch payload. - hosted-runner: closeHostedRun() through updateOrchestrationRun (outcome turn, ledger, escalation bookkeeping all fire); delivered stamp at claim. - Control → project profile → Runs on: third choice with its explanation. - docs/development/cloud-local-workflows.md: the tier in the SSOT table. Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
95c40a9cd8 |
refactor: rename the product from FleetCrown to Loki (#695)
The product, its assistant, the repo, the host and every unit on the box now share one name. 638 files, ~3,000 mentions: UI copy, config, env keys (FLEETCROWN_* -> LOKI_*), systemd units (fleetcrown-* -> loki-*), docs, articles, the deploy workflow other repos reuse, and nine file names. - Three article slugs carried the old name and had been shared; permanent redirects keep those links alive (next.config.ts). - test-no-retired-name.sh now also forbids the old product name across the whole repo, so the rename cannot creep back through templates and examples. - ASSISTANT_STACK collapses the product and the assistant into one entry, because they are now the same name. Infra was cut over ahead of this merge: /opt/loki, loki-* units, the `loki` database and role, loki.orangecat.ch (old host 308s to it; /api, /widget, /embed keep proxying), GitHub repos bitbaum/loki and bitbaum/loki-releases. The Resend sending domain stays fleetcrown.orangecat.ch until the new domain is verified in DNS. Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
6e6ca0bc7a |
docs(cloud-primary): nothing left that describes the old substrate — docs, marketing, comments, focus_tab (#631)
* docs(cloud-primary): nothing left that describes the old substrate — docs, marketing, comments, focus_tab The cloud-primary series (#615 routing, #618 OrangeCat auto-kickoff, #624 Fleet Runner 0.8.19, #630 web PTY-only) changed what the product IS. This sweep makes every surface that describes it say so, so neither an agent reading the repo nor a person reading the site is told about zellij tabs, presence-based routing, a cold-start restore, or a handoff that "starts nothing". Inventory-driven (≈105 doc lines, ≈30 user-facing strings, ≈22 code comments, 2 repo-level items), not a grep-and-replace: User-facing - /download prerequisites: the "Zellij — bundled" card is gone; copy says each agent runs in a terminal Fleet Runner owns. - Quickstart, license page, executor copy (cloud is the default; "This computer" is a per-project choice under Runs on), marketing pillars, whitepaper (owned-PTY design, "where a project runs is a decision, not a guess", ZSH typing-guard section deleted), Control terminal panel strings (components renamed LiveTerminalPanel / LiveTerminalRows), peek drawer copy, GitHub release notes for 0.8.19, repo description + topics. Agent-facing - README, CLAUDE.md, AGENTS-adjacent SSOTs: cloud-local-workflows.md now states the stored routing rule; priority plan closes B6; multitenancy plan routes by builder_pref; HANDOFF.md staleness table + terminals section; the 2026-09-10 cold-start handoff gets a dated "superseded" section; the two shipped proposals (fleet-runner-pty-ownership, desktop-app) carry a status banner; home/README describes the eight modules that exist; desktop/README describes 0.8.19; roadmap seed marks the migration done; box-runner unit and log drop FLEETCROWN_RUNNER_PTY; 22 code comments. Code (one coherent retirement) - focus_tab is removed from the pending-command contract, the desktop validator and poller, enqueueTabCommand's type, the validator test and the failure classifier (START_SESSION | RETRY). The runner had rejected it since 0.8.19; now it cannot be enqueued at all. Verified: tsc, eslint, 148/148 unit files, 130/130 home self-tests, check:desktop (typecheck + build). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WSNERoZZqW2TgqbAGHSQZf * chore(desktop): 0.8.20 — the focus_tab retirement touches desktop/, so it ships as a release The release-drift gate is right: a desktop change without a bump goes red on main once the next tag is minted. 0.8.19's changelog date is corrected to the release's real publishedAt. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WSNERoZZqW2TgqbAGHSQZf --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
a1aed85daa |
fix(cold-start): a brief becomes a repo and a live site through the normal path (#569)
* fix(cold-start): the starter ships a lockfile, so its first Deploy can install selfhost-deploy.yml refuses to install without a lockfile and installs with --frozen-lockfile; the Next starter declared pnpm and shipped no lock, so every fresh site failed before building. The lock is resolved once by scripts/templates/refresh-starter-lock.ts into a generated asset and seeded with the starter (one Git tree call, no pnpm on the app box). scripts/test/starter-lock.ts fails on drift, missing standalone output, a missing packageManager, or starter docs that point at npm. Seeding failures are recoverable: provision on a linked but bare repo re-seeds it instead of refusing with 409. The starter embeds the project-scoped feedback widget from its first commit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w * fix(cold-start): liveUrl means a Deploy on the current commit and a public 200 Registration persisted liveUrl because register-site.sh exited 0 with --no-deploy. Now: strict setup, then a workflow dispatch; GET reports pending/failed/live and the UI polls it. describeSiteDeployment (pure, tested) treats a queued run or a just-sent dispatch as starting, closing the race where the first poll after dispatch read as "no deployment exists". A status the client cannot read is shown as a failure, not swallowed. The deploy workflow resolves a freshly registered slug from the box register and proves the checkout belongs to the caller; deploy.sh builds with the same package manager that installed; register-site.sh runs release siblings, locks the register, fails without a deploy secret, and seeds a runtime env. check:deploy-ready no longer reads a box-registered checkout as laptop drift. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w * fix(feedback): Implement addresses the project id, never a same-named tab Feedback and kickoff dispatch resolve user_projects by stable entity id; a renamed project or a same-named sibling can no longer redirect a run, and the hosted fallback is off for actions tied to a tracked run. Batch Implement only advances when a run was accepted. Fix prompts require the normal ship path and live evidence; Resolve stays with the operator. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w * docs: FleetCrown builds independently; tab names are transport, not identity Product copy and agent docs describe FleetCrown as an independent product with optional OrangeCat linking that is not publication consent. Control drops the Focus terminal chip (Open terminal stays). Adds the cold-start handoff. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
03141d39c1 |
fix(cold-start): close GPT audit gaps for kickoff, feedback, OC, docs (#550)
Stop kickoff after a failed repo step; keep the operator's exact brief; mark feedback Queued only with a real run id; link Check live to the reported page; never backfill OC wall history from before publish consent; document eligible-only cloud builder and the new-site vs provision starter split. Co-authored-by: Cato <catomean@users.noreply.github.com> |
||
|
|
a48e7c52dd |
docs(billing): the docs still described a rail that was deleted yesterday (#514)
#508 removed the Stripe rail. Four living docs kept describing it, and one of them is named in CLAUDE.md as an SSOT — so the wrong answer was the documented answer. - `development/cloud-local-workflows.md` listed `Stripe billing | STRIPE_*` in the env-gated feature table. Replaced with the rail that exists: `ORANGECAT_PAY_URL_{PERSONAL,PRO,TEAM}`, names checked against lib/oc-pay.ts. - `sustainability-gates.md` Gate 3 argued from a `quantity: 1` hardcode in `src/app/api/stripe/checkout/route.ts`. The gate did not go stale, it HARDENED: that route is gone and the BTC rail is a static per-plan URL with no quantity concept, so there is no seat number left in the purchase path to correct. Per-seat Team is now a build, not a config change. - `oc-rail-monetization-scope.md` claimed the Stripe webhook "already calls" updateUserBilling and that /pricing has an isStripeReady() seam to reuse. The write survives (via /api/orangecat/entitlement, plus scripts/grant-plan.ts); the seam does not — the BTC CTA is the default case now, not one to add. - `development/user-flow-audit.md` asserted `/api/stripe/portal` returns 503. It returns 404. CH01-CH04 and the CH04 runbook tested four deleted endpoints; retired with a pointer to what replaced them. `scripts/grant-plan.ts` said it performs "the SAME write the Stripe webhook does" — updated to name the entitlement route instead. Two findings that were not about Stripe: `docs/self-improvement-plan.md` enumerated three `insertPromptHistory` call sites. There are four — `api/control/tab-inject` was missing — and all three line numbers had drifted (270→397, 452→514, 80→138). Following that list would have shipped the runId linking with one dispatch path still unlinked. Line numbers dropped in favour of "grep the symbol"; same for `src/auth.ts:234` in the OC scope doc, which now points at line 268's unrelated code. `src/config/demo.ts` still denied `/api/checkout` under its "money" heading long after #508 deleted that route — a deny rule for a route on no disk, which made the billing section of the sandbox policy look staffed. demo-sandbox.ts already had the reverse check for DEMO_SAFE_FAMILIES ("a family listed as safe that no longer exists is dead reassurance"); the denied lists had no equivalent, which is why that entry survived. Added the mirror check — it caught `/api/checkout` on its first run — and mutation-proved it with a fake prefix. 262 assertions. Also measured and did NOT gate: doc path references (314) and `pnpm run` commands (77) both came back clean once false positives were removed, and the dominant pattern is prose naming a file precisely to record its REMOVAL, which grep cannot tell from rot. A gate there would fire on the correct docs and stay silent on the wrong ones. CLAUDE.md's own four flagged paths were all correct, and all 22 routes in its Views table exist. verify green (13 steps, exit 0). Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
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
|
||
|
|
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> |