Commit Graph
28 Commits
Author SHA1 Message Date
CatoandClaude Fable 5.1 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>
2026-10-21 05:51:24 +02:00
CatoandClaude 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>
2026-10-19 18:28:45 +02:00
CatoandClaude 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>
2026-10-19 16:00:02 +02:00
CatoandClaude 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>
2026-10-19 13:12:58 +02:00
CatoandClaude 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>
2026-10-17 21:21:56 +02:00
CatoandClaude Opus 5.5 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>
2026-10-17 20:40:41 +02:00
CatoandClaude Opus 5.5 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>
2026-10-17 20:22:12 +02:00
CatoandClaude 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>
2026-10-15 06:25:50 -07:00
CatoandClaude 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>
2026-10-15 05:21:22 -07:00
CatoandClaude Fable 5.1 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>
2026-10-07 07:12:11 -07:00
CatoandClaude 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>
2026-10-05 05:49:55 -07:00
CatoandClaude Opus 5.5 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>
2026-10-05 05:27:53 -07:00
CatoandClaude Opus 5.5 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>
2026-10-05 04:55:48 -07:00
CatoandClaude 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>
2026-09-28 07:09:06 -07:00
CatoandClaude Opus 5.5 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>
2026-09-24 15:55:43 -07:00
CatoandClaude Opus 5 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>
2026-09-20 05:37:59 -07:00
CatoandClaude Fable 5.1 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>
2026-09-13 16:13:10 -07:00
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>
2026-09-04 14:47:12 +00:00
GandClaude 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>
2026-08-27 05:17:03 +00:00
GandClaude Opus 5 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>
2026-08-26 09:52:39 +00:00
GandClaude 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>
2026-08-25 17:45:45 +00:00
e314835acb feat(bip): adopt bip-kit, public theme SSOT, BiP docs & essays (#333)
* refactor(thoughts): adopt bip-kit — the essay parser is now the published package

The inline block union, frontmatter parser, and parseThoughtBlocks in
thoughts-content.ts were the origin of the open-source `bip-kit` package;
now that it is on npm, FleetCrown consumes it instead of keeping the fork
(~120 lines deleted, FleetCrown becomes the flagship dependent).

Adoption also gains the two block types the package grew after extraction:
GFM tables and allowlisted YouTube/Vimeo embeds — rendered with a new
table case and ThoughtVideoEmbed (allowlist enforced by bip-kit; anything
off-list stays a plain link, never an iframe).

scripts/test/bip-seam.ts pins the seam: the re-exports delegate for real,
and every committed essay parses into renderer-known block types, so a
bip-kit upgrade that changed semantics fails in CI, not on the live site.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(bip): public theme SSOT, BiP docs, and essay dogfood on bip-kit

Stop forcing .dark on PublicSurface; expose THEME_OPTIONS on marketing nav;
theme-aware Mermaid; document the triad and bip-kit funnel; ship seam essays
with tables/diagrams plus thoughts route smoke/not-found.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: t <t@t.t>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 00:56:51 +00:00
GandClaude 16098aeebb fix(mobile): a phone that reads the name you typed and the session you asked for (#324)
Reported from a phone: /loki and /terminal were unusable, and the work did
not appear to happen. Both halves were real.

It did not work. "…what is left to do with Orange Cat…" resolved to no
project and came back as a nine-chip picker that did not contain the project
just named. Two bugs lined up: project matching was `text.includes(slug)`, so
the registered `orangecat` never matched a typed "Orange Cat"; and
looksLikeDispatchTask treated any sentence over 16 chars containing " for " as
work, so a question was routed to an agent instead of answered.

- project-mention.ts is now the one matcher (four call sites each had their
  own copy). Contiguous token runs, so "Orange Cat"/"orange-cat"/"OrangeCat"
  all resolve, while "going" still does not match a project named `go`.
- Naming a project we do not have says so, in the operator's own words,
  instead of listing nine others.
- The picker gained a filter and "Just answer" — a question that arrived
  without a project is still a question.

It was awful. Loki centred the composer in ~1000px of empty grey, out of
thumb reach, and kept its opener chips through the whole conversation.
/terminal stacked 331px of desktop chrome above four visible lines of a
terminal whose text arrived torn mid-word.

- Loki docks the composer to the thumb zone on phones and fills the space
  above it with the threads you were last in.
- /terminal hides the desktop stack below md for one two-row control bar;
  the link bar collapses to a single line.
- xterm auto-fits its font until 80 columns fit (the width agent TUIs draw
  for) instead of tearing that output into a 44-column grid, with an A−/A+
  stepper and a live column readout. TERMINAL_MIN_COLS 40 → 60 so a phone
  never reshapes a session a laptop is working in.

And the dangerous one: /terminal?tab=orangecat found no such session,
silently attached to sbb-lost-found, and left the bar below promising
"keystrokes go straight to the session". A miss now attaches to nothing
until the operator picks.

Covered by scripts/test/project-mention.ts and the extended
terminal-viewport suite; both run in test:unit.


Claude-Session: https://claude.ai/code/session_019imtHmWBrC94hVK1EMTpzi

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-18 09:14:17 +00:00
Mao NakamotoandCursor ba7ac4b328 fix(mobile): full-screen overlays and project drawer tap targets
Hide bottom nav and top bar while drawers/modals are open; improve project
profile header layout, tab bar, and card action sizes. Add mobile pages audit script.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 17:30:17 +02:00
Mao NakamotoandCursor 6dd74f2c2b feat(terminal,loki): mobile full-screen terminal and develop handoff
Expand/collapse on phones gives xterm usable height; Loki dispatches route
"let's develop" through next_best and link to watch the agent. Profile drawer
follows action-first hierarchy with filtered activity noise.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 16:22:30 +02:00
Mao NakamotoandCursor 215a4fe3ea fix(projects): merge duplicate entities and simplify fleet overview
Resolve case-insensitive duplicate project rows in Postgres, prevent
recurrence in entity creation, and redesign the Projects page hierarchy
(search-first, compact list, attention cards, activity redaction).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 12:13:43 +02:00
Mao NakamotoandCursor 32cbb19fd3 feat(shell): unify theme control and improve mobile navigation
Replace three theme buttons with one cycle control in the top bar, sidebar,
and mobile menu; restructure the mobile Menu sheet to mirror sidebar sections.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 09:52:29 +02:00
Mao NakamotoandCursor 023c513f88 fix(ui): make all app surfaces usable and polished on mobile
Mobile chrome tokens and viewport panes replace ad-hoc height math on Loki,
Terminal, and workspace routes; modals, drawers, composer, and Control rail
stack correctly on narrow screens. Docs and changelog updated.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 09:23:26 +02:00