96 Commits
Author SHA1 Message Date
CatoandClaude 7c5c8e081b fix(widget): the edge tab says "Feedback" and is 44px to hit (#1707)
OrangeCat's UX audit (chrome#13, 2026-11-12) found the widget's edge tab a
24px-wide dark sliver marked only with the spiral: the hardest control on a
near-black page to see, and half the 44px touch minimum.

- The tab button is 44px wide; its inner 12px is transparent padding and
  the visible handle is the outer 32px.
- The handle is the surface ringed in the text colour, so in either mode
  one of the two clears 3:1 on near-white and near-black host pages.
- A visitor's tab shows a speech bubble and a vertical "Feedback" label,
  named "Send feedback"; the owner's tab keeps its live dot and mark and
  now shows "Watching" / "Paused".
- Still an edge tab, never the round launcher it replaced.

The browser test now asserts the 44px width, the name and the label, and
measures the visible handle for Minimize's "smaller than the button".


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 12:28:57 +01:00
CatoandClaude Opus 5.5 900dbb6ae5 fix(ux): every Loki page reworked for a phone; idle sessions close; model-free commits; early pass renewals keep their days (#1652)
* fix(runner): idle agent sessions close themselves; agents sign commits without a model name; failures in plain words

Three things from running a real task through Loki on 2026-11-11.

- The cloud builder closes an agent session with no input or output for six
  hours (LOKI_AGENT_IDLE_CLOSE_HOURS; 0 turns it off), closed like a person
  closing it so a restart does not bring it back. 27 untouched sessions held
  the memory that took the sites down; the cap from #1634 stops the count
  growing, this gives the memory back. Shells and a person's own computer
  are left alone. The executor records the last byte in or out.
- claude-prep sets Claude Code's attribution to a model-free trailer when
  none is set. The commit behind orangecat#1601 was signed 'Claude Opus
  5.5', against the rule that no model identifier is pushed. A person's own
  attribution setting, including none, is kept.
- Activity words three more causes (signed out, the builder could not start
  the agent, opened but never answered) and Home's failure card drops the
  runner's 'launched claude (pty) + injected, but Loki could not verify
  generation' and the operator note after it. The stored error is unchanged.

Runner 0.8.65.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* chore(runner): 0.8.66, since 0.8.65 was taken on main while this was written

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix: an early pass renewal keeps its days; the menu shows @handle; three features work on any free model

From the package audit of 2026-11-12, the cases a person meets:

- A Bitcoin pass bought on OrangeCat was granted as 'now + days', so
  renewing before it ran out lost the days left. lib/billing/pass-renewal
  stacks onto a running pass of the same plan with @bitbaum/paykit's
  extendEntitlement (added); an upgrade or a lapsed pass starts at payment.
- The account menu got name, email and image but not the username, so a
  person with no name saw 'Account' instead of @handle.
- Event recovery, proposal extraction and Loki's chat fallback checked for
  GROQ_API_KEY although the call walks the whole free model chain; with
  OpenRouter or Gemini keys only they were silently off, and chat said
  'Loki is offline'. They now check usableChatChain().

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* chore(deps): @bitbaum/chatkit ^0.26.0

Loki resolved chatkit 0.22.1 while 0.26.0 is published, so it lacked
DictationField and CommentThread (0.23), the dictation sign-in/busy messages
(0.24) and the hidden microphone on a page whose policy refuses one (0.26,
bitbaum/chatkit#81). Type-check and the chat and voice tests pass.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(home): one answer to "is anything running?"

Seen on a phone on 2026-11-12: Home's card said "Stalled — the latest run
on 2 projects failed and nothing is currently building" and "Nothing is
working. Waiting for your reply. Reply", while the section under it was
headed "Being built" over two rows reading "Waiting for you · Waiting for
your a…". Three answers to one question, and the "Reply" link scrolled to a
project list that a phone hides, so the tap did nothing.

- "Being built" lists only work being done. Agents waiting for the owner
  move into "Needs you", each row showing the agent's question instead of
  the state twice, with a neutral dot rather than the warning orange.
- The card's waiting line reads "Nothing is running. 2 agents are waiting
  for you" and its link goes straight to the session ("Answer Orangecat")
  or to the waiting rows ("See who is waiting"), at least 44px and
  underlined so it reads as a link.
- The failing state says "Last runs failed — the last run on N projects
  failed." and the card stays away when "Done" already lists those runs
  with "Ask it to finish": the same fact twice, with two fixes.
- The card no longer repeats the builder line when the builder is on and
  working, and loses its "+" and settings icons: the foot rows are the one
  way to both. The foot row is titled "Settings" and says "Builds run in
  Loki's cloud" rather than "Cloud runner online".
- Copy: "Your desktop app is closed; the cloud does the work", "An update
  installs when current work finishes", "Not started yet — sent 2h ago",
  "No word from it for 2h".
- The composer's project picker says "Waiting for you" / "Gone quiet" for
  those jobs instead of "Being built now" for every open job.
- A failed load shows "Home could not load" with "Try again" instead of a
  skeleton forever.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(activity): say which runs are running, in words, from the whole window

Seen on 2026-11-12: Activity showed "Running (25)" while Home said nothing
was working. The same run read "Running" on Activity and "Waiting for you"
on Home, because Activity called every unfinished run running. Its rows
showed the raw instructions sent to the agent (flags, paths, session URLs)
and the builder's raw errors ("Sandbox cwd does not exist: /home/g/dev/…",
"exited (code 129)"). "Last 7 days" showed the same totals as "Last 24
hours", because the headline was summed from the 60 rows the list shows,
and the momentum line compared that capped count with an uncapped one.

- One rule for an unfinished run (lib/open-run-state), read by Home and
  Activity: waiting for you, gone quiet, not started, or running. Only the
  last counts as Running; a run waiting for you counts as needing you, and
  one never picked up as queued.
- Rows name the task the way Home titles it, and known failures in plain
  words: "Too many tasks were running at once", "The project's folder is
  missing on the builder", "The agent quit unexpectedly", "You cancelled it
  before it started", "Replaced by a newer request". An unknown error reads
  "It failed — open it to see why" instead of the raw text.
- The headline, agent time and "Runs need you" come from every row in the
  window; momentum compares like with like and carries its unit ("64 tasks,
  up from 6 the window before"). A capped list says "Showing the latest 60".
- "waiting on a runner" reads "waiting to start".

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(suggestions): keep PIN-gated goals and people off the board; say each fact once

Seen on 2026-11-12 with the private zone locked: Today said "goals,
people, habits, money & memory are hidden", while Suggestions showed "Due
43 days ago: Launch OrangeCat / Goal at 25%, target 43 days ago" and "Get
ahead of: Reach out to Ana Argentina / Commitment due 2026-10-15". Goals,
Crew and Events all live behind the PIN. Every row said its fact twice,
three identical "Unlock to see these" rows stood one under another, a
tap recorded a choice from a row with no sign it went anywhere, and an
open "…" menu sat under the next row's "…" button.

- Goals and Business (Crew) are private avenues: their reads and the
  build ranker's goals and commitments load only while the zone is
  unlocked, on /suggestions and in the build row alike.
- The goal leads the row and the fact sits once on the grey line ("25%
  done · was due 43 days ago"); a goal more than 60 days past its date
  asks "still the goal?" and sinks. A commitment reads "Commitment overdue
  since 15 Oct." instead of a raw date. Report rows say "Sent by visitors
  to the site; none looked at yet."
- Locked avenues are one row: "Goals, Business, People, Money and Habits —
  unlock to see".
- Rows carry a chevron; "Not now" reads "Hide for a month"; the top line
  reads "You've taken 2 suggestions so far." beside "All (40)".
- An open row menu rises above the rows below it.

Recording a choice only when the prefilled message is actually sent needs
the Loki chat to carry the suggestion through; left for a follow-up.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(today): say each need once, lead each card somewhere useful, show what is locked

Seen on a phone on 2026-11-12:
- "Needs you" said "7 approvals and 10 reports to triage." behind an
  orange warning triangle, then listed "7 actions waiting for approval"
  and "10 feedback reports to triage" — each fact twice, in two words.
  The rows were links that looked like text; the next row had a chevron.
- "Last night Loki built nothing (tonight's plan was not approved)." mixed
  two nights and opened the feedback inbox.
- The locked banner read "Private zone locked — goals, pe…", while "More"
  offered Goals and Money as if open.
- In "Log a conversation", a locked zone made the people search answer 403
  and the popover said "No results".
- The main-projects editor showed each project twice (raw folder name over
  a text box of the same name), spoke of "repositories", linked "Control →"
  and kept a second "Choose main projects" button over the open editor.

Now the rows are the answer (no summary sentence, no warning colour for
a to-do) and every row that opens something has a chevron. The night note
reads "built nothing — its plan was never approved" and, in that case,
leads to Autopilot settings. The banner reads "Goals, people, money,
habits and memory are locked." and wraps; locked rows under "More" show a
lock and "Unlock to see". The people search says "Your contacts are
locked." with Unlock. The editor lists each project once by its name, with
"Rename" one tap away, links "Home →", and hides its own opener.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(home): plain words in the settings sheet, the inbox groups and the new-project form

Seen on a phone on 2026-11-12:
- The sheet behind the sliders had no title and was built from builder
  internals: "Pause fleet", "Runner / Cloud runner online / Runner sync 2m
  ago / cloud v0.8.64 / Page data just now", "Default agent for new
  launches", "Not on this computer: Install Cursor Install Codex" on a
  phone, and a free-text model box repeating the selected chip.
- The two "Needs you" groups read "Widget not on live site" and "Feedback
  to triage" (Today calls the same thing differently), opened into "not
  enabled", "token paused", "never seen a boot from the live site", buttons
  "Install" / "Pause" and an unlabelled </> icon; a right-pointing chevron
  promised a page but the group opened in place.
- The new-project form asked a phone for a local disk path and a Git URL,
  and its × had no accessible name.

Now the sheet is titled "Settings"; "Pause all building"; the autopilot
hint reads "Loki keeps working through each project's list, and builds
overnight from visitor feedback within your budget."; "Where builds run"
says "Builds run in Loki's cloud" with sync age, versions and page age
folded under "Details"; "AI used for new work"; the model box opens from
"Other model…" (or when the model is not a chip); install buttons only
when the desktop app is connected; "Use it in running work too".
The groups read "Visitor reports to read" and "Sites without the feedback
button", the same words Today now uses, with "Not set up yet", "Turned
off", "Not seen on the live site yet", "Add the button", "Turn off
feedback" and a labelled "Copy code"; groups use a down chevron. The form
asks only "Name your project", with folder and Git address under
"Advanced", and its × is "Close". The hero's unused tool row style is gone.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(chat): say what runs, close drawers, plain words on cards (owner audit)

The owner's phone opens on /loki. On 2026-11-12 an audit of the chat pages
found it could not answer "is anything running, and can I watch it", and that
several screens were hard to read or leave. What the person saw, and what
changed:

- The start screen said nothing while two agents waited for his answer. It now
  lists, above the greeting, every job being built or waiting for him, the same
  row Home draws (NowJobRow), each opening the live session. Read once when the
  screen opens; the snapshot is too large to poll from a phone.
- If the chat list failed to load, Recent simply vanished. The start screen now
  says "Couldn't load your chats" with Try again.
- The chats drawer and the project picker covered the full phone width with no
  close. Drawer takes a title and draws a heading with a 44px close.
- A long thread name pushed the menu off a 390px screen; the floating title was
  drawn over the scrolled words. The header item gets min-width: 0 and the title
  the same frosted pill as its buttons. Render check added.
- The same chat opened as "No project" from Recent and as "Loki" from the rail.
  One openConversation is used by the rail, Recent and the inbox line.
- The chat's name was a hidden button to the project picker, and the menu had a
  third way to it. The composer's Project pill is now the one place; its whole
  pill is the button (it was a 27px name), and the queued-message x is 44px.
- The project picker listed raw folder names as bordered cards with "· 0%",
  and "All" chose all ~50 projects. Rows are ListRows named by projectTitle,
  progress said as "40% done", "New project", and "Pick all N matches" only for
  a search.
- "substrata~39554470" showed as a project. projectTitle and the By-project
  grouping use the base project key.
- Recent and the rail drew the same chat two ways. Recent uses the rail's line;
  a project already in the title is not repeated.
- A failed send printed the runner's admin instructions three times and offered
  "Watch it". It now reads "Couldn't start", says the reason in plain words,
  and offers Try again (the same words, same project) with Home second.
- Month-old cards polled a 404 every 2.5s and still said "waiting". A gone
  record now reads "No longer tracked" with Send it again; unsettled cards slow
  to 30s after ten minutes.
- An update said "Not done - nothing reached the site" beside a link to its
  pull request, then "Live" for the same change. A run that left a PR or push
  is part done; an earlier card for the same change folds into the later one;
  a real "Not done" offers Ask it to finish.
- "Asked" quoted the report's "--- technical details ---" tail. One helper
  (lib/feedback/asked-text) strips it for the board and the chat, at write and
  at read.
- "Not stated ... worth asking" appeared four times per card. It is one line,
  with an Ask button that sends the questions on that project.
- Cards named the project "loki" and the page "/control"; now "Loki", "Home".
- The answer footer listed model ids, routing and handler names. It now says
  "Answered with your xAI key · checked 24 of your records · 2.5 min"; the rest
  is behind Details, steps named from the tool-label SSOT (labels added for
  every handler). The work trail shows only a quoted search phrase.
- The model sheet showed "Gemma 4 31B It", a model called "Free", an Auto line
  naming a model not in the list, and "186 left today" on eleven rows. Names
  lose packaging tokens, "free" reads "Any free model", Auto reads "Loki picks
  the model for each message", a row repeats the count only when it differs,
  and the header link has a chevron.
- Answer replies came as a sideways pill strip cut mid-word; they now use the
  same rows as the other follow-ups (FollowUpRows).
- "Dispatched" became "Sent"; executor copy names Home and Terminal, not
  Control and Sessions.
- Build-next rows say "Start", since one tap sends the work.
- Voice page: plain words for the switches and commands ("Stop voice", "things
  waiting for your OK", no Autopilot), and no "Studio voice" under six names.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(terminal): say what a session is doing, confirm an agent switch, one way to each action

What the owner saw on a phone (audit, 2026-11-12):
- Chat view: while a session waited for a reply nothing said so in words; the
  header read "Claude · 5 sessions · cloud" beside a coloured dot. While Claude
  was busy the line above the box said "Waiting for the agent", the word Home
  uses for "waiting for you".
- A message Loki sent showed as the owner's own bubble with a "Dispatch
  details" fold holding a raw "<pasted_content id=…>" packet.
- Session sheet: rows read "claude · needs you", "gemini", "claude"; two of five
  had no state. One tap on "Grok" under "Agent" swapped the running agent with
  no confirmation. "Your computer" was offered with no word that it was offline.
- "New session" from inside Orangecat preselected Orangecat, so the sheet
  opened on a warning, "Start another session" and a "Go to its session" that
  only closed the sheet.
- "What's going on?" was both a chip above the box and the first row of the
  ⋮ sheet; the feedback edge tab covered the ends of terminal lines.

What changed:
- New copy SSOT src/config/terminal-copy.ts. The live line says "Claude is
  working"; an answer with nothing running says "Done. Waiting for your
  reply". The header subtitle carries the status words ("Claude · needs you ·
  5 sessions · cloud").
- The fold is "Full instructions Loki sent", without the paste markers, and
  the bubble says "Sent by Loki" (also in project Watch).
- Sheet rows always read "Agent · state" with the agent's name, "open" when
  the stream has nothing. The agent switch is titled "Switch this session
  to…", arms on the first tap ("Switch to Grok? Claude stops here") and
  switches on a second, like End. Disabled reasons drop "CLI"/"tab". "Your
  computer" says "Offline: open Fleet Runner on it" when it is.
- Opened from a session, the launcher preselects a project with no session,
  and never offers to go to the session already on screen.
- ⋮ offers "What's going on?" only while the chip is hidden (keys deck or
  full screen); on phones the raw terminal keeps 12px clear of the edge tab.

Tests: terminal-conversation, terminal-launch-project and
terminal-tabs-browser extended; terminal-clean-browser follows the new fold
label.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(models): one primary choice, honest counts, one price source, quieter cards

What the owner saw on /models on a phone (audit, 2026-11-12):
- The page's only filled button was "Add your endpoint", in the most
  technical part (Ollama, Tailscale Funnel, "OpenAI shape", "shared pool").
- "343 of 343 models" sat over 60 cards and a "Show 60 more" with 283 left.
- Two near-identical "where prices come from" paragraphs, with two different
  read times (06:05 and 06:18).
- Every card repeated "OpenRouter USD per 1M tokens", drew "Direct" /
  "OpenRouter" as bordered boxes that did nothing when pressed, labelled
  closed models "Weights not listed", and coloured "Open weights", "Free tier"
  and "Free catalog rate" status green.
- The lab filter listed "Meta · 9" and "Meta · 7"; picking one hid the other.
- "Your keys: xAI grok-4.7. Manage →": a raw model id and an 18px link.
- No name in the phone top bar and no way back to Settings.

What changed:
- "Run a model on your own computer": one line ("Optional. Loki works from
  your phone without it."), the how-to folded, plain words, and a secondary
  button.
- "Showing 60 of 343 · …" (with "matching (N in all)" under a filter) and
  "Show more (283 left)".
- Inside the store the Auto card drops its source paragraph; the footer says
  it once, with one time.
- The unit is the card's label ("Price per 1M tokens"), a free model reads
  "Free", "Runs via" is plain text ("Direct (your key) or OpenRouter"), every
  tag is the neutral shape, and closed models carry no badge. The unused
  ui-store-badge-* and ui-store-via* rules are gone.
- labsOf keys labs by name and applyFilters matches every namespace with that
  name, so Meta is one entry that shows all its models.
- The keys line names the model as the list does; "Manage" carries ui-tap.
- NAV.models (href MODEL_STORE_PATH) names the page in the top bar and the
  palette; the page links back to AI settings.

Tests: model-store pins the card markup and the Meta merge.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(watch): one thing happening at a time, in plain words

On 2026-11-12 the owner's watch page for Orangecat said "Next in line"
above three rows marked "Happening now" at once: "Waiting for a runner
31m 30s", "Claude Code is finishing up" and "Testing", with "Pull request
opened" already ticked below the first. The overview called the same run
"Building now". Nobody could tell whether anything was running.

- run-track: a run with a pull request, a push or commits has started,
  whether or not its claim was recorded, so the builder stage is done and
  never "Waiting". At most one stage is "now": the furthest; an earlier
  one is behind it ("Claude Code made the change"). A push while the
  agent is still in its session is done, not a second "now".
- The watch card's kicker reads "<agent> is working" once the track is
  past the queue, and its headline is the track's sentence, not "Queued".
- Stage words a non-technical owner can read: "Waiting for a computer to
  start it", "The change is ready for checks" (its headline without the
  #number or fix(...) prefix), "Checking the change — it goes live by
  itself once the checks pass".
- The autopilot button says what a tap does ("Pause after this" /
  "Keep going on its own") where the caption already says the state;
  "Follow fleet" is "Use my usual setting", drawn like its sibling.
- Timeline rows, "See the change" and "Show all" are 44px tall.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(projects): Priority puts the rows that want you first

Under "Sort: Priority" ("Projects with issues first"), Kivvi and Bitbaum
said "Needs you: 1 note" and sat 11th and 17th, under a dozen rows that
said "Live" (owner's phone, 2026-11-12). The order read only the flags;
the row's words come from projectListLine, which also knows unread notes
and what is running. The "Show" menu never offered "With a problem" for
them either.

Priority now ranks by the row's own line: a problem, then something
waiting on you ("Needs you", "Didn't start"), then something building,
then most recent work. The "With a problem" lens and its count use the
same rule, and the hint says "Problems and things waiting on you first,
then most recent work".

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(project): one next step, a way forward from past work, one way back

What the owner saw on Orangecat's pages on 2026-11-12, and what changed:

- Overview "Next step" printed the agent's handoff note word for word:
  "NOT PUSHED - pre-push hook fails … --no-verify was blocked; push
  test/box-safe-unit-tests, open PR, enable auto-merge", while Plan named
  a different next step. It now reads the plan's next step, then the top
  open goal — Plan's own source — and is hidden while a build runs, where
  "Building now · View progress" already answers it.
- "Past work" listed red "Failed" rows cut mid-word ("Dispatch failed
  before the prompt reached the agent: Sandbox c…") that led nowhere. Each
  row now says why in a sentence (explainRunFailure) and opens the run's
  watch page, where Retry lives. "Saved changes" shows commit headlines
  without the fix(...) prefix.
- On a phone, Workbench was a menu repeating the overview, with every
  explanation cut by an ellipsis. The overview row goes straight to the
  agent ("Talk to the agent — Say what to change"); the workbench's own
  rows fit one line and sit on the 16px margin, not 33px. "The robot" is
  "Talk to the agent"; "Review it" reads "See it as visitors do".
- Review's way back read "← orangecat"; it is the project's name with the
  same icon link every project page draws.
- The top bar said "Projects" on watch and workbench but nothing on the
  overview and review; every page of one project now names itself.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(project): Story, Feedback and Settings in plain words and calm colour

What the owner saw on Orangecat's tabs on 2026-11-12, and what changed:

- "Built from" cut package names mid-word ("@bitbaum/g / eo-kit"): the
  name is sized to itself and may break only after the scope; the
  version wraps to its own line.
- "Profile 10/10" sat above "The story 8 of 10 answered": the bar counts
  setup checks, so it is called "Setup". The stage chip said "production";
  it says "Live" (PROJECT_STAGE_WORD, one word per stage).
- "About it" filled a phone screen: four lines, then "Show all".
- Feedback: nineteen fixed notes each had a filled "Watch the fix"; on a
  fixed note it is a secondary button. The quiet moves and "Technical
  details" are 44px tall. The "--- technical details ---" tail is folded
  under the note instead of read as part of it.
- Radios were the browser's bright blue in both themes; every radio and
  checkbox takes the text ink token. The live-site panel starts with
  nothing chosen, not "Take it off the internet".
- "Reversible"/"Permanent" are plain words, not green/amber tags; a
  package behind is neutral unless an update waits on the owner.
- Plain words: "Feedback button is on the site", "Fix notes from helper
  agents without asking me", "Also delete the copy on this computer",
  "Posting updates on OrangeCat: on", and a two-sentence Flags note.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(activity): show what is running now, and say failures in plain words

What the owner saw on /activity on 2026-11-12, on a phone: 23 rows said
"Running", one of them for over two hours, on a builder the same page said
runs 8 at once; running rows were grey and mixed in with failures. "33 runs
need you" counted briefs a newer one replaced and waits he had cancelled
himself. Failure lines were the builder's own ("exited (code 129)", "Sandbox
cwd does not exist: /home/g/dev/orangecat", "no runner picked it up"), done
lines carried CRON_SECRET and commit hashes, and running rows showed raw
briefs with claude.ai session links. A grouped row of 8 failures across four
projects had one "Run again" that resent only the first, next to a cause
(the builder was full) that a retry cannot fix. "See all 33" reloaded the
page with the same three groups above the same list. A failed retry hid its
reason in a tooltip phones never show. "up from 9 the window before" named
no noun.

What changed:
- An open run silent past RUN_PROGRESS_FRESH_MS (the progress contract's
  window, read from the run ledger's last event) reads "Stopped answering"
  and counts as needing you; only runs still heard from are Running.
- A "Running now" section opens the page: live dot, project, "Working for
  12 min", the brief in plain words; each row opens Watch. The mixed feed no
  longer repeats them.
- "superseded" closes read "Replaced" and cancelled waits "Stopped by you";
  neither counts as needing you. Every row counted as needing you has the
  red dot (Partial had none). The headline drops "anyway" and says "waiting
  for a computer"; the filter says "Sent, no word back", like the rows.
- plainFailure maps exit codes, missing folders, a full builder, no free
  computer and replaced briefs to plain sentences; plainLine strips links,
  session ids, hashes, setting names, paths and leading routing notes from
  every row line.
- A full-builder group offers "See what's running" instead of a retry; a
  group spanning projects names the one run its button resends. A retry's
  outcome becomes the row's grey line.
- The needs-you card is hidden on the "Needs you" filter.
- Momentum says "up from 9 runs the 24 hours before".

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(feedback): label Do all, one story per report, shorter "Needs a yes"

What the owner saw on /feedback and /my-feedback on 2026-11-12, on a phone:
- The most consequential tap in the app, "Do all 109 · starts 106 runs", was
  an unlabelled round icon in the top bar; its sheet's button said "Do it"
  and never mentioned that the cloud builder runs 8 at a time.
- The same report read "Last try failed" on /feedback and "Fix is live" on
  /my-feedback; others read "Being implemented" for 21 days.
- "Needs a yes" listed all 112 rows (about 9000px), sixty of them "Last try
  failed · Try again" with the reason only inside the sheet; some thirty
  titles read "While I was using this page a request fai…", identical.
- "Last night Loki built nothing (tonight's plan was not approved)." had no
  way forward and mixed last night with tonight.
- The report sheet had "Watch the fix" and a second "Watch" promising "watch
  the agent, live" for a run that ended weeks ago, on two rows.
- Done rows showed two unlabelled times; the footer said "archived" beside a
  "Filed away" section and "6d median to confirmed".
- /my-feedback was the one page with a blank top bar, and nothing led to it.

What changed:
- Do all is a full-width labelled button under the sentence; the sheet's
  button says "Start 106 runs" and, past the builder's limit, says that runs
  beyond it are turned away and show on Activity.
- The reporter view reads the same facts as the owner's recommendation:
  Loki's page read "not visible" is "Not fixed yet", a partial run "Partly
  fixed", a live fix nobody could confirm "Fix shipped, being checked"; a
  finished run whose change has not reached the site after three days is
  "Stalled".
- "Needs a yes" shows 10 with "See all 112"; a retry row says why the last
  try failed. Report titles drop watch mode's lead-ins
  (lib/feedback/report-title.ts), on both pages.
- The night note reads "the plan was not approved" and links Autopilot
  settings beside it.
- The sheet shows "Watch it work" only while the run is open; afterwards
  "See what the agent did" sits under More.
- Done rows drop the second time when the line carries one; the footer says
  "filed away" and "usually fixed in about 6 days".
- /my-feedback is registered in navigation (no menu seat) so the top bar
  names it; /feedback links "Reports you sent". Footer links are 44px tall.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(approvals): one primary while locked; package updates in plain words

What the owner saw on /approvals, locked, on 2026-11-12: "7 actions
waiting for approval, behind your PIN" over a small outlined "Unlock to
review" (38px tall), and below it a filled "Update" on a breaking package
update — the eye went to the merge, not to the unlock. The card opened on
"@bitbaum/chatkit v0.21.2 → v0.23.0 breaking", offered "Not now" beside
"Stay on this version" without saying how they differ, and its "Pull
request #16" and project links were 16px and 24px tall. The top bar's page
action ("Write a report") was 40px.

What changed:
- Locked, "Unlock to review" is the page's one filled button, 44px tall;
  the package cards draw their "Update" as secondary there.
- The card leads with one sentence from config ("Keller can move to newer
  versions of 3 shared parts. 2 of them may need changes to the project's
  code."); package names and versions sit behind "Details".
- "Not now" says what it does: "Ask me again in 7 days".
- The pull request and project links are 44px tall, and so is the top
  bar's page action.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(system): alarms in plain words with a way forward; one reading per fact

What the owner saw on /system on a phone (2026-11-12): eleven alarms that were
the box's raw shell lines ("🧟 STRANDED agent work in loki-wt-scope — unpushed
fc/1840a4dd-…", "docker stop <name>", "sudo reboot", "Replace GEMINI_API_KEY in
… /opt/<app>/shared/.env"), each with only Dismiss; two disk alarms ("still
93%", "still 91%") above a live reading of 70%; the same branches listed twice
for two worktrees of one repository; a 41-day-old "Server size" reading that
still promised a Telegram alert; scheduled-job switches drawn "on" for jobs
that were off; eleven leftover "smoke-<timestamp> cron" test jobs; a "Health
check" section that only said it did not apply; "Recent errors" that was nine
heartbeats around one error; and builder words throughout ("claimed",
"runner", "Queued — a connected runner … will claim it").

What changed:
- config/box-alert-copy.ts turns each known box line (stranded work, new
  container, critical dependency, disk clean-up, pending reboot, dead API key)
  into a plain title, one sentence and an "Ask Loki to …" button that opens
  the chat with the ask and the original line written. The raw line stays
  behind "Details". Applied when drawn, so the rows already open read plainly
  too; rows of one kind collapse into the newest (both disk alarms, both
  worktrees of loki). Intrusion alarms keep their own words and button. The
  notice still carries no button, because a box line with one would reach the
  phone, which only an intrusion may.
- lib/notify/box.ts keys a line without its numbers, so a repeat updates one
  row instead of adding one.
- Server size: a reading older than six hours no longer draws "blocked" or the
  Telegram promise; it says Loki stopped checking and offers to restart the
  check. The current size is no longer listed as an upgrade target.
- Scheduled jobs: the shared ui-switch with role="switch", aria-checked and a
  name, 44px to tap; test artifacts (isPublicTestArtifact) are not listed.
- Health check is not drawn where it cannot run; Recent problems lists only
  errors and warnings, names the source plainly, and offers "Ask Loki to fix
  this"; nothing wrong draws nothing.
- Builds and cost (was "Room for more work"): "How long work waited to start",
  "On Loki's servers", "started", and the longest wait in the warning colour
  only past 30 minutes.
- What Loki decided: what was asked, a plain status word (EXECUTOR_COPY
  .decision), project titles; the inject reason is EXECUTOR_COPY.inject
  .queuedForRunner, "Waiting for a computer to pick it up".
- RAM and disk bars warn from 85% and turn red from 95% (was 66/86): a disk
  two-thirds full is normal and made amber the page's accent.
- "More records" names only what is always there; the plan form's Days field
  stacks like the others; Pause/Carry on everywhere and the alarm's Details
  button reach 44px.

Test: scripts/test/box-alert-copy.ts.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(missions): runs say what they are and open to watch; one progress number

What the owner saw (2026-11-12): every mission row showed two progress numbers
that disagreed ("0 of 1 goals reported done" beside "25%", "4 of 14" beside
"54%"); "Recent runs" was five identical rows, "Running or queued 12.11.2026",
that could not be tapped, with a failed one reading "error" and a section
link called "Terminal"; "Next move" cut its sentence to one line under the
label "Next step" while the handoff further down gave a different next step;
the handoff printed agent notes (hashes, branches, paths) in full; the start
button said "Sending to the runner…".

What changed:
- goalsLine() is the one progress measure on the board and the detail page,
  pluralised ("0 of 1 goal reported done"); the averaged percentage is gone.
- lib/missions/run-row.ts: each run row names its task (its result, else its
  last step, else its kind), says "Working now" / "Waiting to start" /
  "Stopped with a problem" …, shows a relative time, and opens the run on
  Watch. The section link is "Watch live" to the project's Watch page.
- Next move is one wrapping sentence from one source (the handoff's next step,
  else the project's, else the first open goal). The handoff's own note shows
  only when it differs, labelled as the agent's note.
- Handoff text goes through plainWords() and is clamped to three lines with
  More/Less; an empty test report is not drawn.
- The start button says "Starting…" (EXECUTOR_COPY.honesty.starting).

Tests: scripts/test/missions-projection.ts, missions-attention-board.ts.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(packages): behind count first, install at latest, a way to update

What the owner saw (2026-11-12): on /packages the ellipsis took the one fact
worth opening a row for ("used by 22 projects, 20 beh…"); on a package page
the install command pinned v1.5.2 under "Latest version v1.7.1"; twenty
amber "2 minor versions behind" cards each repeated their raw version spec
and offered nothing to do, while five identical "Pause vX everywhere" buttons
were the page's only actions; a release with no version read "the last
release was released … its tag shows here on the next read"; the same action
was "Read again" on one page and "Refresh" on the other.

What changed:
- The list line leads with the behind count ("20 of 22 projects behind ·
  v1.7.1") and drops the warning dot.
- installCommand() rewrites a `<name>@<version>` install to the latest version.
- "Behind" is a neutral tag; only a breaking bump keeps the warning colour.
  behindLabel says "2 updates behind" / "1 major update behind".
- The raw spec is a hover on the version, not a line of its own.
- "Ask Loki to update the N behind" opens the chat with the package, version
  and projects written.
- Pause shows only on the latest version, a failing one, or one already
  paused.
- Release run copy lives in RELEASE_RUN_COPY; a finished run with no version
  reads "Last release finished 1d ago."
- One name for re-reading: "Check again"; its text-link form is 44px tall.

Tests: scripts/test/packages.ts, packages-pages.ts, package-releases.ts.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(studio): show the chosen request, one primary action, decisions that say what they do

What the owner saw on /feedback/studio on a phone (2026-11-12): tapping a
request card seemed to do nothing, because no style marked the chosen card
and the detail opened ~1,100px below the list; card titles were cut mid-word
by character count ("Checking the partner f"); the detail showed the
applicant's own status line to the reviewer; four solid primary buttons sat
on one request, and "Record builder decision" sat under a select pre-set to
"Approve this builder"; "Revoke guest access" had a 13px checkbox; history
dates were US-format with seconds.

What changed:
- .ui-card-shell[aria-pressed="true"] is raised and outlined; on narrow
  screens a tap scrolls the detail into view.
- Titles are whole, clamped to two lines, with the last update's relative
  time so identical websites can be told apart.
- STUDIO_REVIEW (config/studio.ts) gives the reviewer's next step per status.
- "Send reply" is the only primary; other forms are secondary. The partner
  decision is two buttons, "Approve builder" and "Decline application" (or
  "Withdraw approval"). Revoking is a danger button, "Stop their link", with
  its checkbox in ui-checkbox-hit.
- History times are relative, with the full date as a hover.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(fill): a link Loki does not know offers the way back to Loki

What the owner saw (2026-11-12): /fill without a known form said "Ask Loki
again — for example 'set up npm trusted publishing for my package'" with no
way to do it from the page. It is now an empty state with one button, "Ask
Loki to fill a form", and an example in plain words.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(settings): ask before disconnecting a computer

What the owner saw (2026-11-12, Settings → Agent on a phone): every
connected computer ("box-runner", "Fleet Runner (local file)") had a red
trash icon that revoked its key on one tap, with no question and no undo,
named only by a hover title "Revoke token" that a touch screen never shows.
One mis-tap disconnected the cloud runner and stopped every agent.

Now the icon is named "Disconnect <label>" and only asks: the row turns
into "Disconnect box-runner? Agents on it stop until you connect it again."
with Disconnect (danger) and Cancel. The icon uses ui-icon-action-danger,
which carries the 44px touch floor. Dates read "Added November 12, 2026 ·
last used 2h ago" instead of US-order numerals.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(settings): AI providers in plain words, raw output behind a disclosure

What the owner saw (2026-11-12, Settings → Agent → AI providers): env var
names, server paths, install commands, German shell errors, stack-trace
fragments and ANSI escape codes as each row's line ("add
OPENROUTER_API_KEY to the cloud runner's env (/opt/loki/runner/.env)",
"fix: ␛[91mError: ␛[0mInvalid API Key"), uninstalled providers listed as
long as working ones, and "This computer · checked 1 day ago" with seven
amber rows as if the failures were current.

Now the row line is derived from the measured facts in provider-words.ts
("Not set up on Loki's computer", "Signed out. Open it once on your
computer to sign in again.", "Its key was refused"), the runner's own
text is cleaned of colour codes and kept under a collapsed "Technical
details", providers that are not set up fold behind "Show N more not set
up", the runners are called "Loki's computer" and "Your computer", and a
runner that has not reported for an hour is one sentence saying when it
last checked in instead of a list of stale faults. The runner-side
nextActionFor is unchanged, so no runner redeploy is needed.

Test: scripts/test/provider-words.ts.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(settings): one fact once, a name for every section, plain words

What the owner saw on a phone (2026-11-12 audit of /settings):
- Projects: all 37 projects twice, under "Your projects" and again under
  "Team projects" (getOrgProjects includes the caller on purpose). Team
  now lists only other people's projects, and only when there are any.
- Account: "Connected accounts" and AccountKit's "Ways to sign in" both
  listed how you sign in, and disagreed (Google in one, not the other).
  On AccountKit the Loki list keeps only the links Loki acts through
  (GitHub for code, OrangeCat for publishing), titled "Accounts Loki
  works through"; sign-in lives in the panel. Its disconnect icon gets
  the 44px floor.
- Notifications: the Telegram card said "Connect here" with no connect
  button when the bot is not set up; it now says "Your messages go to
  your Telegram chat." and promises connecting only when the button is
  drawn. The six category toggles were solid primary buttons reading
  "On"; they are now the ui-switch every other on/off in Settings uses.
  "The last one went out 11/10/2026, 7:00:04 AM" is in the reader's own
  locale without seconds.
- Billing: the operator, who runs this Loki with no project limit, was
  told "You are on Free" and urged to "Get more room". They now read
  "You run this Loki. No limits apply." without the plan pitch, and the
  Bitcoin/renewal sentence is said once (PRICING_BILLING_NOTE), not twice.
- Every section: the top bar and the back control both said "Settings"
  and sections opened on a sub-heading ("What you have left", "Members").
  The open section's name is now its h2; the four sections that drew
  their own duplicate h2 no longer do.
- AI: "Add a provider" twice and "Upgrade plan" duplicating Billing; the
  button pair is gone (the store link stays in Your providers). The
  operator's spend list showed codebase slugs ("terminal-next-steps");
  config/ai-feature-labels.ts names them ("Next-step suggestions in
  Terminal"), with a test that every metered feature has a label.
- Agent: "Loki dispatches nothing. You type every prompt in /control",
  "Groq first (~2s, free), local Whisper", "~/.cache/huggingface/". The
  autopilot and transcription copy is rewritten in plain words, the two
  autopilot cards align the same way, and the row says the section also
  holds autopilot. Moving voice transcription to its own tab is deferred.
- Voice: "layers on top of the house style … Agents you dispatch" is now
  "How Loki writes to you. Agents building your projects don't use it."
  and the presets are one pick-one list with a check (like the digest
  choice) instead of a 2x2 wrapped grid.
- Location: the timezone starts from this device's when none is saved
  (marked "(this device's)"), the lede drops "scheduled jobs", and "Save
  current location" is "Save while traveling", which is what it does.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(private): one list of what the PIN protects, one PIN form

What the owner saw (2026-11-12): three screens gave three lists of what
the PIN protects. Privacy named Crew but not Robots, /unlock named Robots
and Commitments but not Crew, the no-PIN page Robots but not Crew. The
locked pages showed a different form ("Private Zone / Enter PIN / This
section is PIN-protected", nothing while loading, a bare "Network error")
from /unlock ("Enter your PIN", shield, lock icon), /unlock's top bar had
no name, and Privacy sent people to "Account → Danger zone", which does
not exist on AccountKit.

Now navigation.ts derives PRIVATE_NAV_ITEMS and PRIVATE_AREAS_PHRASE from
the "private" sidebar section, and Privacy, /unlock's list and the no-PIN
page all read it (Commitments fold into Money, where they live; counts
are plain nouns: "2,805 things", not "entities"). PrivatePinGate renders
UnlockForm, named for the page: "Memory is private / Enter your PIN to
open it." with a skeleton while loading, "Could not reach Loki. Check
your connection and try again." on a network failure, and a 44px "Get
help". /unlock's top bar reads "Private" (UNLISTED_PAGE_TITLES). Privacy
links "Delete account" in Account settings.

The top bar also stops naming the parent ("Home") on a child page that
draws its own h1 (/control/import, /control/new-from-scratch), where the
bar, the back link and the title were three competing names.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(control): workspace, import and new-project pages for a non-builder

What the owner saw (2026-11-12):
- /control/workspace: an amber warning box of server words ("Server-owned
  PTY workspaces", "control plane", "box-runner peek stream", "dispatch")
  for a switched-off feature, with three inline links in one sentence and
  "Back to Control". With server workspaces off the page now redirects to
  /terminal; otherwise it is a neutral callout (new ui-callout, amber is
  kept for real warnings) with one "Open Terminal" button. The API error
  strings in runtime.ts / workspace-access.ts are plain words too.
- /control/import: "Pick the repos … duplicates by name are silently
  skipped", a heading icon squashed to 6px, "No repos found" with no next
  step, a twice-dimmed disabled Import button and "Go to Control →". Now
  "Choose the code you want Loki to look after", shrink-0 on the icon,
  "Missing one? Give Loki access on GitHub" under the list and in the
  empty state, one dimming, 44px Select all / Clear, and Home named from
  NAV.control.
- /control/new-from-scratch: "Leave on Empty and the agent picks the
  stack" against "Empty — Just a README. Bring your own stack.", template
  descriptions with shell commands and "ms-scale cold starts", and "No
  technical decisions required" beside "GitHub repo" and "stack". The bare
  template is now "Let Loki choose" (recommended in the hint), each
  template says what it suits, the subtitle is "Loki makes a private place
  for the code and sets it up.", and native radios and checkboxes take
  the ink colour instead of the browser's blue.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(auth): offer GitHub once, and say continue on sign-up

What a newcomer saw on 2026-11-12: the first sign-in screen offered
"Continue with Google or GitHub" and then "Continue with GitHub", two doors
to the same place with no way to tell whether they lead to one account.
"Create an account" offered "Sign in with a Lightning wallet", telling
someone with no account to sign in. The "Create an account" and "Sign in"
links under the forms were 18px tall on a phone.

What changed: with Loki's own GitHub app mounted, the shared sign-in's
button names only the other providers (offerGithubOnce). Only the label
changes; the shared service's own chooser still offers GitHub, so no
account that came in that way is stranded, and when GitHub is all it
publishes nothing is hidden. The sign-up screen's Lightning button reads
"Continue with a Lightning wallet". The two hint links carry
ui-auth-hint-link, which the coarse-pointer floor sizes to 44px. The label
filter belongs in @bitbaum/accountkit's signInMethods for every product
that keeps its own GitHub app; it lives here until it moves there.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(public): theme-true download band, readable menus, one count on the roadmap, plain words

What a visitor saw on a phone (audit, 2026-11-12), and what changed:

- /download in Light: the band stayed black and the accent button (black
  in Light) vanished into it. Every ui-public-download-* rule now uses
  surface, text and border tokens; no white/black left in the band. The
  phone handoff, lede and comparison drop "control plane", "dispatch",
  "runner", "CLI" and "Open Home"; the desktop-only "After install" steps
  render only once the downloads are shown, and the edge-to-edge closing
  line that repeated the handoff is gone.
- Light-mode phones got a light status bar over a black page: the
  theme-color meta now starts dark (the default theme) and follows the
  resolved theme (ThemeColorSync, themeColorFor).
- The menu's Appearance button sat under the floating feedback button, so
  tapping it opened feedback: it now sits next to its label. Every menu
  description was cut off with an ellipsis: they wrap to two lines and are
  shorter ("Talk to Loki with your phone in your pocket").
- Links inside sentences ("whitepaper", "docs") looked like plain words:
  in prose they are underlined in a token colour.
- /roadmap gave 47% shipped, 22 of 59 steps (37%) and bare ring numbers on
  one screen. The headline is now "16 of 34 items shipped", the steps line
  says it is the work inside the open items, and rings carry no number
  (the card's "6/9 steps" is the count). Collapsed changelog months and
  roadmap step lists show the same rotating chevron as other disclosures.
  ROADMAP.md summaries say what a person gets instead of paths, class names
  and shell flags, and a bare address in a line is a link.
- /pricing: "Start free. Pay when you need more.", Loki's engine explained
  once, no "operators", "fleet" or internal screen names; Free no longer
  claims "nothing held back" above a Team plan with more.
- One public name for the machine: PUBLIC_WHERE in executor-copy.ts
  ("Loki's computers" / "your own computer"), used on the home page, /why,
  pricing and the whitepaper summary; "runs this week" reads "tasks".
- Signed in, the home page still offered "Create an account" and "Start a
  project" to /sign-up and the footer "Sign in": visitorLink turns those
  into "Open Loki"; /sign-in no longer links to itself.
- Build-path cards said each thing twice ("Do it yourself" / "Build it
  yourself"): the kicker is gone. The footer's version link duplicated
  "Fleet Runner releases"; the owner line reads "Loki, run by Cato" as the
  terms do; BiasLens has its own one-line blurb. "Notes in, fixes out"
  shows the year and no raw page path. bip-kit's Copy button gets the 44px
  coarse-pointer floor.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(search): the magnifier searches; asking an agent is last and never on Enter

What the owner saw (phone, 2026-11-12): the header magnifier opened a box
whose placeholder was cut off ("Type a command (e.g. “code re…"), and
anything typed became "Run: <text> / Resolve in natural language &
dispatch" as the first row and the Enter default, so a search plus Enter
sent the words to an agent as work. With nothing typed it listed 43
projects with their server folders ("/home/g/dev/bitbaum", "no local
path"), raw ids as names, then 17 "Switch X to Claude — quits current CLI"
rows; the 60-row limit was hit before a single page, so Activity, Prompts
and Settings never showed. The "esc" hint showed on a phone. The More
sheet and the search sheet also drew the widget's floating feedback
button over themselves, a second shape of the header's button.

What changed:
- Empty list: recents, then the pages in the sidebar's order, then
  projects named the way a person knows them (projectTitle, with the
  site's host instead of a folder), then prompts.
- Switch-agent rows are gone from search; the project's own screen keeps
  that control.
- Typed text finds first. "Ask Loki to do: “…”" is the last row, says
  what it does, and Enter only takes it if the arrow keys chose it
  (enterTarget, tested).
- Placeholder "Search projects and pages"; the desktop field no longer
  says "dispatch"; "esc" is shown from md up only.
- The palette panel and the More sheet carry data-fc-place="hidden", as
  <Modal> does, so the widget does not float its button over them.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(chrome): 44px for the page action and the search mic; tokens, not white

What the owner saw (phone, 2026-11-12): the filled page-action circle in
the top bar ("New project", "Write a report") was 40px beside 44px search
and bell buttons; the search sheet's microphone was 28px, and its
background was white at 4%, so on the light theme it had no visible edge.
The bell's count was hard-coded `color: white`. On /activity the page's
primary circle was a sparkle, where every other page puts "+", and
nothing on screen said it meant "Write a report".

What changed:
- .ui-page-action on a phone is 44px with a 2px transparent border the
  fill does not paint, so the circle still reads 40px like its
  neighbours' visible circles.
- .ui-palette-mic joins the coarse-pointer 44px floor and is raised with a
  hairline (tokens), as is the kbd hint; no oklch literal left.
- The bell badge uses text-text-inverted on status-negative (also better
  contrast on the dark theme's lighter red).
- "Write a report" uses a page icon (FileText).

Not changed: .ui-btn-icon (row "…", bell ×) and the theme button already
get 44px under `pointer: coarse`; the audit measured with a mouse pointer.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(bell): plain words, one row per thing, every row opens somewhere

What the owner saw (phone, 2026-11-12): the bell listed the server's raw
lines as titles: "🧟 STRANDED agent work in loki-wt-scope — unpushed
fc/1840a4dd-…", "🐳 NEW CONTAINER", "♻️ REBOOT PENDING for 7 days",
"bitbaum: ☠️ SUSPICIOUS PROCESS / pid 951241 running … Kill it: sudo
kill -9 951241". Half the rows opened nothing (the box's no-action lines
are recorded with no button), and nine near-identical SUSPICIOUS PROCESS
rows kept a red "9+" lit.

What changed:
- The bell leaves out `system_event` rows ("no action needed from you",
  already listed on /system) and links there in one counted line instead.
- Intrusion notices get a plain title ("An unexpected program ran on
  bitbaum", "Someone signed in to bitbaum with a password") and one
  sentence; the raw line stays in the body behind "Details"
  (lib/notify/intrusion-words). Rows recorded the old way read the same
  in the bell (bellWords).
- Rows with the same title fold into one ("9 times · …"), dismissed
  together; the badge counts the folded rows, and its spoken label says
  "More than 9" when the badge says "9+".
- A row with no link of its own opens /today, where it is listed.

Not changed: urgent alerts still never fold into Earlier (design reset
rule 11), and the delivery key is untouched, so a login from a second
address is still its own phone notice.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* test(widget): the palette and the More sheet may hide the launcher while open

The search palette and the More sheet are dialogs; since 285a975e they
carry data-fc-place="hidden" as <Modal> does, so the widget stops
floating its own button over them (it sat beside the More sheet's close
×, 2026-11-12). The reach check allowed only Modal and the sign-in wall;
it now names these two, with why.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(more): say what Unlock opens, mark the row that leaves Loki, show waiting feedback

What the owner saw in the More sheet (phone, 2026-11-12): "Private →
Unlock" with no hint of what is private; "Bots", which quietly opens
orangecat.ch; "Waiting for you → Approvals, Feedback" with no count,
while Home said "Feedback to triage 10"; and "Download" in the account
menu, which did not say what gets downloaded.

What changed:
- The lock row names what it opens: "Unlock Memory, People, Crew and 5
  more".
- A row whose page is on another site says so ("on OrangeCat" and an
  outside-link icon).
- Feedback carries the same new-feedback count the desktop sidebar shows
  (FeedbackNavCount). Approvals has no count: its list needs the private
  zone, so a locked phone could not read it.
- The download page is called "Desktop app" (NAV.download, the one name
  every menu reads).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(feedback): the owner gets his own panel inside Loki; one door to it

What the owner saw (phone, 2026-11-12): signed in to his own app, the
header's spiral opened the visitor's panel — "I own or build this site —
sign in with Loki →", "No account? You make one on the way", "Made with
Loki →", "Hide this button on this site". The widget knows the owner only
by a pass, and on Loki's own origin nothing handed it one. The account
menu also opened the same panel a second time ("Report a problem"), next
to "Hide feedback button" for a button nobody could point at, and its
Appearance control read "☀ Light" while a tap switched to Dark.

What changed:
- The app layout mints the owner pass for the signed-in person when they
  may act for Loki's own widget (lib/feedback/own-site-pass, same
  canActForSite check as /api/widget/owner), and OwnSitePass stores it
  where the widget reads it (widget/owner-pass storeOwnerPass). The
  widget then shows the owner's panel, without the sign-in door, "Made
  with Loki" or "Hide this button". Anyone else gets null, as before.
  The first time, Watch starts paused: nobody asked for it here, and it
  is one tap ("Watch again") in the panel.
- "Report a problem" is in the account menu only while the top bar has no
  spiral; the switch says what it switches ("Hide the spiral (feedback)
  from the top bar").
- Appearance is Light · Dark · Auto, the current one marked (Segmented),
  instead of a cycle button.

Test: scripts/test/own-site-pass.ts (the page and the widget agree on the
storage key; minting is gated on the owner; first pass starts paused);
phone-chrome.ts updated.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* feat(chrome): the top bar says when an agent is working, and opens it to watch

What the owner asked (2026-11-12): "I would like to know if anything is
actively running, and I would like to watch it". No icon, tab or More row
said whether anything was running; Terminal, the place to watch, was the
first row of the fourth More section.

What changed: while an agent is working, the top bar on every page shows a
screen icon with a green dot (one agent) or a count (several). It opens
that session in the terminal, or the terminal's list when there are
several; its label says "1 agent working now — watch it". Nothing working,
nothing drawn; on /terminal itself it is not shown. It reads
/api/sessions/snapshot (the Sessions drawer's DB-only list) once a minute;
"working" is the same rule the drawer and the terminal's tabs use
(lib/session-list workingNow, tested). Checked against production: the
list had one working (solon) and one waiting (orangecat) session, so the
bar would show one green dot to Solon.

Home's and Activity's own wording of the same question is being fixed in
the home and review branches.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(prompts): say what each prompt does in plain words; tell the twins apart

What the owner saw on /prompts (phone, 2026-11-12): "Next Best Step"
beside "Next best task", and "Test & Fix" beside "Test & fix", with
descriptions that did not say how they differ ("Autonomously determine and
execute the single highest-impact task right now" / "Autopilot loop —
read ground truth … Self-throttles"), and lines he could not judge before
tapping Run: "OWASP Top 10", "write a conventional commit, push to
origin", "Audit ~/.loki/sessions/<P>.roadmap.md", "Kill switch",
"N+1 queries", "prop drilling".

What changed: those descriptions say the outcome ("Check the site for the
ten most common security holes", "Check the finished work, then save and
publish it", "Stop the agent at once — it changes nothing more"), and the
two autopilot entries say they are "What autopilot runs on its own", so
each twin reads differently from its sibling.

Not changed: the names (task titles across the app read the library's
name for an autopilot intent, lib/task-title) and the templates
themselves (two of them drive the autopilot loop). Saved copies under
"Your prompts" are the owner's own rows; they already say "4 copies" and
offer "Remove extra copies".

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix: the combined phone audit passes the whole suite

Folding nine groups' fixes into one branch (2026-11-12):

- getLastRunEventTimes is gone: Activity and Home now share one rule for
  an unfinished run (lib/open-run-state), so the second lookup the review
  group added for the same question had no caller.
- terminal-clean-browser follows the watch page's new button names ('Pause
  after this' / 'Keep going on its own').
- widget-kit-browser: the chat chunk measures 41 KB gzipped on chatkit
  0.26 (agent mark, paperclip sources, dictation sign-in/busy, no mic where
  the policy refuses one); the budget moves from 40 to 42.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(voice): one name for talking to Loki, written on the button

The chat box had two unlabelled sound icons side by side: the mic, which
types your words, and a waveform that starts a spoken conversation. The More
menu had a third entry, 'Voice', for the same conversation with the screen
off. The owner could not tell them apart (2026-11-12).

- The chat's conversation button reads 'Talk' on the button itself.
- The /voice page is 'Talk to Loki' in the menu, its title and its start
  button ('Start talking'); its voice picker is 'Loki's voice'.
- The mic is unchanged: it dictates into the box.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(voice): the menu entry is 'Talk', the button's own word

'Talk to Loki' and its one-slip spellings collided with other pages in the
search palette (palette-entries: 'tak to loki' found Suggestions). The menu
entry is 'Talk', the word on the chat's button; the page title stays 'Talk to
Loki'. Suggestions' description no longer says 'takes', which 'tak' landed on.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* test: the Home browser test follows waiting agents into 'Needs you'

home-being-built-browser (from #1670) looked for the waiting row under
'Being built'. After the merge it sits in 'Needs you' with its question and
the reply field; the test now checks that list, that only the working row is
'Being built', and that the reply still reaches the project's agent.
runner-update-hold reads the queue label in this branch's words.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* style: format home-parts after the merge

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* fix(home): keep main's load-failure branch as written; shorten the waiting list call instead

home-load-failure pins the shape of Home's no-data branch. Home stays under
its 510-line limit by naming the reply handler once.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* chore(deps): @bitbaum/chatkit 0.29.0, the version kivvi and causius canaried

The fleet rollout gate held this PR: chatkit 0.26.0 was never deployed on
its canaries, which moved straight to 0.29.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

* chore(billing): early pass renewals wait for paykit's rollout gate; the rest of this PR lands now

@bitbaum/paykit 0.3.0 canaries through OrangeCat, whose live receipt only
matches while its newest main commit is the one deployed; OrangeCat's main
moves every few minutes, so the gate has held this PR through four sweeps.
The renewal change (extendEntitlement) comes back in its own PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 07:14:31 +01:00
CatoandClaude Opus 5.5 a506d80d78 feat(brand): the rotorelief disc replaces the stroked spiral (#1472)
* feat(brand): the rotorelief disc replaces the stroked spiral

After Duchamp's discs in Anémic Cinéma (1926): the coil is cut out of a
disc, its inner turns drift off centre and thin toward the middle, so a
plain rotation reads as a tunnel breathing in and out.

- src/config/brand-mark.ts: markPathD() draws the whole mark as one
  evenodd path (disc, coil cut, pupil cut); MARK_TURNS gives optical
  sizes so the disc still reads at 16px
- LokiMark renders it everywhere in-app (header, consult avatar,
  feedback launcher, voice) in currentColor
- voice: the disc fills the orb; clockwise (pouring inward) while
  listening and thinking, reversed while speaking; loudness sets depth
- generate:brand now also writes the PWA install icons, replacing
  generate-app-icons.mjs; favicon, desktop, tray and widget regenerated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmreRmsJkmf3AcYy6DS

* chore(desktop): 0.8.60 for the new app and tray icon

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmreRmsJkmf3AcYy6DS

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 09:53:59 +01:00
Catoandfleet-reconciler 37c35b4b05 chore(deps): raise shared package floors to published versions (#1436)
* chore(deps): raise shared package floors to published versions

Opened by bitbaum/fleet .github/workflows/internal-currency.yml.

The fleet's own packages ship features in MINORS, so
version-currency.mjs — which judges by major — reports nothing while
consumers drift. This is the instrument that sees it, and it opens
the fix rather than reporting it.

If this PR is red, that is the useful outcome: it names a repo that
cannot take the new version, which nothing else in the fleet would
have told us.

* fix(widget): keep ChatKit embed under size budget

* test: isolate prompt delivery Git fixtures from hook environment

---------

Co-authored-by: fleet-reconciler <fleet@bitbaum.invalid>
2026-10-28 13:45:19 +01:00
CatoandClaude 34bb66aba4 fix(widget): the panel's first look is whole on a phone (#1426)
Driven with a microphone in a real browser: the visitor's thread opened scrolled
to its bottom with the greeting's first line cut under the header; on a 320x640
phone the Talk hero was sliced and the owner's way in was gone. The thread now
opens at its top when nothing has been said, the hero and the sign-in line are
tighter, and on short screens the sheet is taller and the chips and long
explanations step aside. A browser test pins it at 320x640 and 390x800.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 14:15:24 +02:00
CatoandClaude 79e36832d8 fix(widget): the microphone is a segment of the launcher pill, never a second button (#1423)
On Loki's own pages the launcher is drawn by the top bar and the widget's pill
is visibility:hidden, but quick-talk measured it anyway and drew a loose
microphone over the tab bar that could not be moved. The microphone now lives
inside the pill (one outline, one footprint for the avoid pass, clamp and
drag), is grabbed like the pill, and exists only while the pill is drawn by
the widget as a button.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 10:24:55 +02:00
CatoandClaude 2610d16b1c feat(widget): Minimize — the launcher folds into the slim edge tab (#1420)
The owner's pill ("Watching", its microphone, its remark bubbles) sat over
the text being read on Substrata at 390px (2026-10-22): "when you press and
hold on that widget, something opens ... make it possible to minimize it so
it's how it was before ... otherwise it's kind of disturbing".

Long-press / right-click on the launcher now offers Minimize first (then
Hide, Reset position). Minimize folds the pill into the slim edge tab on the
side and at the height the person had left it: still one tap from Loki,
still showing the live dot and the unread count, with the microphone and the
remark bubbles gone. It is remembered per site, outranks every placement
heuristic, and the tab's own long-press menu offers Expand.

- visitor-placement.ts: readMinimized / writeMinimized (per token).
- placement.ts: chooseTabTop takes a height the person chose, tried first.
- launcher.ts: the menu item, and a minimized branch in reposition().
- scripts/test/widget-host-avoid-browser.ts 8d drives the real menu: Minimize,
  slim and flush right, remembered after a reload, Expand, remembered too.
  It fails on the pre-change bundle (6 failures). widget-placement.ts covers
  the preferred height. widget/README.md documents it under "Hiding it".


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 22:58:36 +02:00
CatoandClaude Opus 5.5 058a4a7dd8 Design reset: every page rebuilt to one calm bar (rows, one action, plain words) (#1406)
* docs(design): the reset brief, and a page audit that signs in and screenshots every page

The owner walked the app on a phone on 2026-10-21 and called it unusable.
design-reset-2026-10.md is the bar every page is now held to, written from
the apps he uses daily. scripts/audit-pages.mjs signs in (the public demo by
default), visits every page at phone and desktop width, saves screenshots and
writes down overflow, duplicate h1s, sticky blocks, cut-off text, small tap
targets, console errors and failed requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(scripts): seed:showcase, a local account that looks like the owner's

The public demo has three tidy projects, so most pages look empty on it and
their real problems never show. scripts/seed-showcase.ts creates
owner@loki.local / showcase-owner ("Cato", operator) with 42 projects under
the owner's own junk folder names and long task-text descriptions, mixed
states (live, site down, not connected, deploy failed, autopilot paused,
production / blueprint), 73 feedback items on one project and 8 on another,
73 runs over 60 days with the real failure texts and three running now,
bell alerts 8, 19 and 28 days old, four identical "Next Best Step" prompts
plus two near-copies, a dozen Loki threads, goals with milestones, habits
with history, people, crew assignments, approvals, package rows, scheduled
jobs, subscriptions, events and memory.

Idempotent through the demo reset's live-foreign-key wipe (now exported),
with timestamps relative to now. Refuses any non-localhost database URL,
the prod tunnel's port, and a database that already has an operator.
audit-pages.mjs documents the pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(audit): one slow screenshot no longer loses the whole report

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(widget): a host can draw the launcher itself (data-fc-place="host")

A rendered region marked data-fc-place="host" IS the launcher: the widget
draws no floating button while it is on screen and counts the owner's state
as shown, so watch mode adds no bar. When the region goes, the launcher comes
back on its own. The page opens the panel with Loki.open() and reads
Loki.status ({ owner, watching, unread }), announced as a loki:status event.
A hidden region still wins. Customer sites are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(design): primitives and a calm top bar for the design reset

The pieces the page rebuilds are made of (docs/development/design-reset-2026-10.md):
ListRow + List + ListSearch, Section/SectionHeading, a quiet EmptyState,
ChoiceMenu ("Sort: Priority" as a sheet on a phone, a popover from md up),
and PageAction — a page's one primary action, a round + in the phone top bar
and a pill in the header from md up (PageLayout action, ModalForm
trigger="page-action").

Chrome: the top bar names every page on a phone with 40px borderless icons;
exactly one h1 per page at every width (the page's own, read but not drawn on
a phone; the bar's name is the h1 only when the page has none). Loki's own
feedback launcher is a top-bar icon (data-fc-place="host"), not a tab over the
content. The Sessions drawer icon leaves the phone bar. The bottom bar is
exactly its token's height and the main column ends above it, so nothing
scrolls under it. ui-kicker and ui-micro-label stop shouting in capitals;
empty panels lose their box; the demo strip is one line on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(memory,robots): rebuild both pages to the design reset

The two worked examples the page rebuilds copy. Memory: the counts as a
sentence, then sections of rows — recently added (each with its own Forget
in a row menu), recent activity, by kind, context from other projects — and
"Forget everything" as the page's last row. No cards, tiles or badges.
Robots: the title is the top bar's, "Add robot" is the round + beside the
avatar, the search is the list's first row, each robot one row, and an empty
book is an icon, a line and one button.

Adds a "Primitives" section to the design brief: each primitive, its file,
and when to use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(alerts): stale notifications fold into Earlier; the bell counts what still needs you

The bell read a red 9+ over nudges 8, 19 and 28 days old. Root cause: event
alerts (studio requests, build requests, escalations) have no condition a
checker can see end, so nothing ever cleared them; insert-once producers
deduped against any open row, so one forgotten alert swallowed every later
occurrence; and the bell counted every open row however old.

- lib/alerts/relevance: an alert is current while younger than its type's
  window (alert-types freshForDays, default 7) or urgent; otherwise Earlier.
  /api/alerts marks each one; the bell counts only current ones, and Today's
  needs-you reads the same rule.
- insertActiveAlertOnce lets a stale open alert go instead of blocking new
  ones; refreshOrInsertActiveAlert can renew the date when things got worse
  (feedback summary renews when more items wait).
- The feedback summary says one plain sentence instead of
  '84 feedback items need you (stalled + check live)'.
- The panel is a ListRow sheet (bottom sheet on a phone): dot, title, one
  grey line, time, x to dismiss; Earlier below with Clear all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* style(labels): sentence case for the app's remaining capital-letter labels

Section labels in settings, Control, Today and the private unlock form
dropped their uppercase + letter-spacing (design reset rule 4). Small
tags (status pills, badges) keep theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(ui): DetailSheet, a ListRow control slot, quiet ModalForm triggers

DetailSheet opens one thing from its row (bottom sheet on a phone, dialog
from md up) with its actions as full-width rows. ListRow gains a leading
control that is its own action (a habit's check-off); ModalForm gains a
"secondary" trigger for an empty state's one button and "none" for a
form opened from a row's menu. Styles for the Life pages sit in one
design-reset block in globals.css; rules their old markup used are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(goals): rows on /goals, and a page of its own for every goal

/goals is one sentence ("4 goals, 48% done on average") and a list: a
progress ring, the title, one line (due, milestones, sub-goals, project)
and the percentage. Sort and project are menus, not chip rows cut at the
edge; finished and set-aside goals fold away. The old card — inline
title, description button, four menu actions, folded milestones, nested
sub-goal cards — is now /goals/[id]: where it stands, its fields as rows,
milestones and sub-goals as lists, the actions as rows at the end.
Deleting a goal now checks the answer instead of refreshing on failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(habits): check off from the row, open a habit in a sheet

/habits is one sentence ("3 of 5 done today") and a row per habit: the
circle on the left checks it off for today, the row opens the habit — its
month, how often (one even row of three), the goals it feeds, pause,
rename, ask Loki, delete. The card with a 35-cell heatmap, a frequency
select, five icon buttons and a stat-tile row above it is gone. A goal's
row line drops its milestone count, which pushed the project off a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(projects): rebuild the list, project page and Watch to the design reset

/projects is a search row, two menus on one line (Show / Sort) and ListRows:
an initial, projectTitle(), ONE plain-word state line ("Building now",
"Live · updated 2h ago", "Needs you: 3 notes") and the time since the last
run. Nothing sticks. Checks, stage and feedback counts moved to the project
page; earlier `-refresh-<hex>` copies and archived projects fold under
"Archived". The two black buttons became one `+` that asks "Build a site"
or "Add an existing project".

The project page has one title with the way back, one primary action (Ask
Loki, in the top bar on a phone), a section menu on a phone instead of a
pinned select, sections as plain headings without boxes, flags as "Needs
fixing" rows, and agent sentences said plainly (no URLs or HTTP codes).
Watch it work uses PageLayout and names the project with projectTitle().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* wip(work-tools): prompts, activity, feedback rebuilt as rows; tab-inject starts repo-only projects

Work in progress before merging main; gates run after the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(events): rows by date, a sheet per event; an event with no deadline can be added again

/events reads an event's date and place, not only its deadline: a meetup
with a day and a city sat under "No deadline" as if it had neither. Rows
go coming up, no date yet, already happened; a row opens the event in a
sheet (edit, ask Loki, archive, delete) and "New event" is the page's
one action, a form in a sheet.

Fix: the add form sent "" for an empty deadline and the API refused it
as "Invalid date", so no event without a deadline could be added. The
form now sends only what was filled in, and the API reads "" as none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(talk): Loki's empty chat, chat list, Sessions and More sheet as rows

- /loki: a greeting, recent chats and Build next as ListRows above the
  composer; no scrolling chip strip, no starter chips when there are
  projects, no "Auto your key" on the model chip; the chat list
  (ThreadRail) as Claude's list, pin and delete in each row's menu.
- Sessions: nothing open is one line and a Resume row per project; a
  missed deep link is one line and its row (and, on a phone, the open
  sessions); the session and more sheets are short rows; the Sessions
  drawer is a list with its search as the first row.
- More sheet: names only, no truncated descriptions.
- Voice: one line and Start, then titled sections of rows.
- Sidebar section labels and app-wide label classes in sentence case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* wip(public): calmer signed-out site — rows, one orange action, sentence case

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(design): Home, Today, Suggestions and Approvals as sections of rows

Design reset (docs/development/design-reset-2026-10.md) for the 'what needs
me' group:

- Home: three sections of ListRows — Needs you (failures with their fix on
  the row, escalations, the review inbox), Being built, Done — under the
  composer. Job cards that all read 'Next best step' became rows naming the
  project and the live step; the footer is two rows (builder, New project),
  so nothing pokes under the bottom bar. The status hero no longer repeats
  projects the rows already name. Builder-offline chip is a row.
- Today: a greeting, the day in one sentence (lib/today-brief todaySentence)
  with Plan my day / Log a conversation, then Needs you, weather in one
  line, Calendar, Habits, Commitments, Sticky note and More as sections of
  rows. Six recap cards that restated nav pages are gone.
- Suggestions: momentum as a sentence, Show: All menu instead of a cut-off
  chip row, each suggestion a ListRow (tap = do it, menu = Not now), and
  project names through projectTitle().
- Approvals: pending first, unboxed; Approve/Decline in words; event times
  in the reader's zone instead of a raw UTC ISO string; standing approvals
  as OptionRows at the end; quiet empty state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(money): one sentence, subscription rows, a sheet per subscription

"51.00 CHF and 329.60 USD a month across 9 subscriptions. Next: GitHub on
3 Nov." replaces three stat tiles. Each subscription is a row (how often,
when next, whether a receipt backs it; the amount on the right) that opens
a sheet with everything the row used to carry: mark paid, edit, check at
the vendor, ask Loki, free alternatives, cancel, delete. Cancelled ones
fold away; promised money and the founder's OrangeCat link are rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(people): contact rows with search and menus, a real page per person

/people is a list like a phone's contacts: initial, name, what they do and
where, how long since you talked. Search is the first row; Show and Sort
are menus instead of a chip row cut at the edge; the filled "Log talk"
button on every row moved into the row's menu. Importing and merging is
one row that opens a sheet. A person's page opens with the person on it
(it fetched the same row again behind a skeleton), in plain sections,
with rename, ask Loki and delete as rows at the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(crew): asks and crew as rows; an ask with nobody on it can be given to someone

One sentence ("1 ask needs you"), the open asks grouped by where they
stand, each a row that opens a sheet with its brief, link, payment and
the moves open to you; your crew as rows with "Give them work" in the
row's menu. Fix: an ask saved with nobody on it said "pick someone before
handing this over" and offered no way to pick; the sheet now does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(settings): a list of sections on a phone, flat sections inside

Below lg, /settings is a list of its twelve sections, each a row with
what is in it; one opens as its own page with a back row, and the phone's
back gesture returns to the list. The tab strip that ran off the screen
is gone. Inside, the bordered boxes and caps labels are flattened to
sections and rows; Appearance is one even row of three, the digest is a
list of choices, and the Agent tab says what it is for in plain words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(home,bell): failure rows give the reason the full width; Earlier rows carry no dot

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(today,home): In focus is one row; Home loads as its own shape

TodayWatch was a bordered card with an orange capitals eyebrow, the day's
counts a second time and two Loki buttons; it is now one row under 'In
focus' with Loki's nudge as a plain line, and says nothing when nothing
stands out. Home's loading state is the composer and three row lines
instead of three empty cards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(projects): plain sections on every project tab, one time per row

- A row's line no longer repeats its trailing time ("Worked on 1d ago … 1d"):
  it says Live / Not live yet / Not started yet, and the time is said once.
- A run waiting on a person (main's new "needs_you" build state) reads
  "Needs you: the agent is waiting" on the list and offers "See what it
  needs" on the project; the list query now reads the run's own record.
- Story: one rename (in the header), the stage drawn without colour, the
  profile score labelled in words, "The story" instead of "Agent context",
  three short fill buttons that fit a phone.
- Feedback: one heading and one "…" menu for list actions; the widget setup
  and auto-ship toggle on the page instead of boxes in boxes; plain labels
  ("Put it on the site", "Turn on only") kept in step with the API hints and
  the public docs.
- Activity: "What changed" as rows, newest first by date, no handoff chips.
- Plan: "Roadmap" is the section's heading; no accent icons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(prompts): one Run that works — repo-only projects start, Loki streams, no raw blanks

- Send to terminal on a project with only a repository (no folder) queued a
  bare inject that failed with "no running agent for 'substrata' on this
  runner"; tab-inject now hands such projects to the inject core, the same
  start-or-queue path /api/inject uses (in the previous commit).
- The Run sheet leads with the prompt's own worker (lib/prompt-run): the
  project's agent for project work, Loki for personal prompts; the other is
  one quiet line. A send ends in one sentence and "Watch it work".
- Run with Loki streams into the sheet through the chat's own thread
  (useSessionAsk + ChatThread): clock, Stop, retry, Continue in Loki.
- {{variables}} are never shown raw: blanks are named in words until filled.
- Pins all of it in scripts/test/prompts-page.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(activity): the answer as a sentence, failures and history as rows

/activity drew eight boxes before the first event: a hero card with a bar
chart and four coloured tiles, a red card of failures in the builder's own
words, project chips cut off at the edge, a time picker card, count chips and
a report card. Now: When and Project as two menus, the headline sentence,
"Runs need you" as rows with Run again, and "What happened" as rows under
day headings (Show: menu), each opening its run on Watch. The report is the
page's one action, in a sheet. Failures read in plain words (activity-words).
Fixes the double <h1> (page and view both drew PageLayout).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(feedback): decisions and reports as rows; each opens in a sheet

/feedback: "Do all" is the page's one action (confirmed in a sheet that
says what it spends); every decision is one row — the report in the
reporter's words, project and when — with its yes as the row's own button,
still one tap; the row opens the full decision (Loki's read, facts, every
move) in a sheet. Under way / Done / Filed away are rows with their state in
plain words. Keeps main's per-decision taken key (#1367).
/my-feedback: rows (your words, status and project, when), each opening the
shared ReporterFeedbackCard in a sheet; a quiet empty state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(system,packages): plain sections and rows; one design-reset block in globals.css

/system: nineteen bordered cards under three question headings become one
page of plain sections (SystemBlock: sentence-case heading, no box) with
words a person would say — Alarms, Server, Server size, Room for more work,
Health check, Recent errors, Agents keep going, Runs on a schedule — and the
records behind one "More records" row. Agents keep going is one sentence
and the one button that changes it.
/packages: each package one row (latest, who uses it, who is behind), the
read line ending in "Read again", and Publish to npm as two calm numbered
steps instead of a card.
globals.css: the work-tools block (prompts sheet, activity, feedback row
verb, steps, system) after the feedback classes; the dead activity, pulse,
needs-you and feedback-card rules deleted with the code that used them, and
ui-btn-overlay (its last users were the prompt cards). CLAUDE.md follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(talk): own class for the empty Sessions list, quieter dots, a voice note that fits

ui-term-empty already named another rule, which centred the new list;
a finished session no longer gets a green dot (rule 8); the 'Only what
needs me' line fits under its switch on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(public): reachable /fleet filters on desktop, essay body on the title's edge

The /fleet filters sat in a <details> whose summary was hidden from md up
on the belief that CSS forced it open; a closed <details> hides its
content at any width, so on a desktop the filters were gone with nothing
to press. The toggle now shows at every width and opens itself while a
filter is set. The footer's closed studio-sites list no longer lays out
invisibly, and an essay's body starts on the same left edge as its title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(feedback): projects by name, the age last, the night note in francs

- Every project on /feedback goes through projectTitle(): the inbox route
  attaches each row's projectTitle from the project entity, and the rows, the
  project menu and the sheet title read it.
- A decision row's one line is project · age (or the page, with one project
  in view); the repeated "Build it, one agent run" beside a "Build it" button
  is gone, and no trailing age squeezes the report's words.
- The morning note (nightNoteText, shared with /today) names projects through
  projectTitle, drops the "· 2 of 3 runs" ledger, and states the cost in
  francs (CHF_PER_USD): "… filed away 4 old reports. It cost CHF 1.70."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* chore: drop the dead recent-dispatches query; the build-row fade at every width

getRecentDispatches fed only the Today recap card the redesign removed. The
/loki build row hid its scrollbar at every width but faded its edge only on
a phone; the fade now applies wherever the row scrolls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(projects): a project with no title reads as a word, not its folder name

projectTitle passed an untitled project's folder name straight through, so
Home, Feedback and the bell listed "murphys-bar" and "aoz-housing". An
all-lowercase slug now reads as a word ("Murphys bar"); a name typed with
capitals is kept as typed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(public): headline visible before its animation, names through projectTitle, plain demo note

The hero rose in from opacity 0 with a 'both' fill, so until the
animation ran the headline was simply not there: a slow phone, a
screenshot or a page still loading showed a blank where the promise
should be. The rise is now movement only; content is visible by
default and reduced motion turns the movement off.

Every project name on the public site (the /fleet register, a project's
public page, a person's public profile, the landing hero) now goes
through projectTitle(). The sign-in demo note says what is switched off
in plain words, and /build's eyebrow is sentence case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* chore(terminal): drop terminalSourceHint, which nothing reads now

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(life): project titles, channel names and sheet rows after a look at the pages

A goal's project and an ask's project read the project's title when it
has one instead of its folder name; the ask's row drops the project so
the date fits on a phone. A person's ways to reach them and their
conversations say "WhatsApp", not "whatsapp", and the icon now matches
a conversation's channel (it looked the channel up without its prefix and
always fell back). Sheet action rows draw every icon at one size and start
at the left; "I cancelled it" is not red. A goal's progress and date are
body text. The responsive audit names /goals/[id] as needing an id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(work-tools): every project name through projectTitle()

With main's projectTitle() reading an untitled key as words (3bc9a395), the
remaining bare keys in this group go through it too: the decision card's
where-line and the full feedback row's project link, Activity's rows, menus
and retry label (one titleFor helper instead of three fallbacks to the raw
key), scheduled jobs grouped by project on /system, and the repositories and
dependents on /packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* test(projects): pin the rebuilt rows, flags and activity to the new rule

- getProjectsRunNow reads runs since a day ago with gte(), not raw SQL.
- The health panel can no longer be trapped by a row: it is not on a row.
- "Needs fixing" heads the flags; each row carries a red dot and no tint.
- Activity speaks plainly ("Working on …", "Nothing running", "last change").
- The project page's site link uses the widget's owner-pass helper, so the
  browser fixture bundles it.
- The chooser's two lines fit a phone; the dead ui-* rule baseline drops to 27.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* docs(projects): the Views row describes the rebuilt list and page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(home,today): project names in words, reasons that say what happened, one builder line

- Every project name on Home and Today goes through projectTitle().
- 'last run: needs attention' became what the run's record says, in words
  (lib/attention-words): 'Stopped: …', 'Stuck: …', 'The last run only got
  part of the way — next: …'.
- Home says the builder's state once: the row at the top. The foot is
  Settings and New project, and no longer contradicts it.
- Runs with no word from the agent sit under 'Gone quiet' and say what
  they wait on ('No word from the agent for 1d', 'Waiting for a builder to
  pick it up'); times are compact ('1d', '2h 5m').
- Today: Start my day is one row when no main projects are chosen; the
  headline names its parts ('4 urgent, 4 approvals, 42 reports to triage
  and 7 other things.'); an urgent item has one action (Fix with Loki), its
  title opens it; alerts show their first paragraph only. The repo-missing
  alert says "<Project>'s repository can't be found on GitHub", with no URL
  or status code in the words a person reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* docs: the Life pages and their primitives, as they now are

CLAUDE.md's component map and Views rows for People, Crew, Money, Goals,
Habits, Events and Settings described cards, chip filters and stat tiles
that are gone. The design-reset primitives table gains DetailSheet, the
ListRow control slot and ModalForm's quiet triggers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* chore(design): drop two rules the rebuilt pages no longer use

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(audit): a page that reloads or crashes no longer ends the audit

Each route gets its own page, measuring retries while a dev server reloads,
and a crashed page is recorded in the report instead of throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* docs(changelog): every page, calm

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(design): session names in words, and no "next: Nothing queued"

A session's name in Sessions was its folder ("derhochhinhousepartyrenner-ch-
refresh"); it now reads as every other surface names the project. Home no
longer appends an agent's "Nothing queued" as if it were a next step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* test: pin the rebuilt pages' names and rows

Project names now read as words in the night note and the Sessions drawer,
the ListRow link carries its own props, and the trailing-column check reads
the rule itself rather than a scoped override.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 10:51:18 +02:00
Catoandcatomean 320ab091d2 Widget launcher: drag to move, snaps to the nearest edge, remembered per site (#1399)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-22 00:21:25 +00:00
Catoandcatomean 83c257547b Widget launcher stays put: avoid pass only on load, resize, route change; never moves a chosen spot (#1398)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-22 00:09:07 +00:00
Catoandcatomean 8fae3cf1e9 Widget launcher is always solid and tappable (no scroll fade, no 70% tab) (#1396)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-22 00:00:36 +00:00
Cato 8ab96666d7 Use shared audio playback and describe Cat's real creative Studio (#1382)
* Play audio in Loki and ground Cat Studio capabilities in the working first version

* Minify shared widget CSS before inlining to retain the download budget
2026-10-22 00:41:03 +02:00
Cato 55141f4614 Send widget guided choices through the conversation handler (#1379) 2026-10-21 19:52:44 +02:00
Catoandcatomean 9901e004d8 Use the shared visual answer engine in AI chats (#1364)
* feat: adopt shared visual AI answers

* test: preserve all citations in one sources sheet per answer

* feat: negotiate visual answers with public chat clients

* fix: preserve complete visual widget answers and bounded history

* fix: keep visitors' literal messages in rich chat history

* style: normalize widget history formatting

* fix(widget): keep chatkit out of the panel bundle

The panel (public/widget.js) imported richAnswerText from @bitbaum/chatkit,
pulling a dependency into every customer page load and failing
widget-self-contained. Use a dependency-free copy in widget/rich-history.ts
with a parity test against chatkit.

* style: format widget visual answer test

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 15:53:00 +02:00
CatoandClaude Opus 5.5 3024426a65 fix: Voice says why studio voices are off, Watching says each thing once, Prompts in words (#1358)
* fix(prompts): one card per saved prompt, schedules in words, dialogs that say why

What the owner found on /prompts from an Android phone, item by item:

1. Saved prompts: saving the same name + words again no longer inserts a
   row — POST /api/prompts answers with the prompt already saved
   (existing: true); the form opens it, the default's save button says
   "Already in your prompts". A card that stands for identical copies says
   how many and offers "Remove N extra copies" — one explicit tap, the
   caller's own rows only, the same soft delete as Delete
   (DELETE /api/prompts/<id>/copies). Same name with different words says
   "2 versions with this name, worded differently".
2. Filters: the scope filter is a <Segmented> (All / Any project / One
   project) sitting with the category row on the list they both filter,
   under "Loki's prompts". Category counts follow the scope. Filter chip
   rows on a phone get a wider fade, snap to a chip's start and leave room
   after the last chip, so the edge reads as "more" rather than a cut word.
3. New prompt: Create stays disabled until there is a name and a prompt,
   and says what is missing beside it. Opening or closing the form never
   saved anything; the copy glyph on every default card did, in one tap
   with no label on a phone — it is now a labelled "save a copy" button.
4. Schedule: pick Every day / Weekdays / Every week / Every month, a day
   and a time; Loki writes the cron (lib/cron-words), with "Write it as a
   cron line instead" for experts. The schedule reads back in words with
   the time zone it runs in ("Every Monday at 10:00, Zurich time
   (Europe/Zurich)") and a link to change it; the zone is sent with the
   job. The API refuses a cron line the scheduler cannot read, in words.
   Create is the primary button and says why when it cannot be pressed.
5. Run: a prompt that names {{project_name}} asks for a project whatever
   its scope (a saved copy is global), defaulting to the project in use;
   the prompt is shown only once complete. Each action says in one line
   who does the work; Send to terminal works for any of your projects
   (tab-inject starts or queues the session) and says why when it cannot.
   Project pickers list projectTitle(), not folder keys.
6. Category chips are neutral (ui-tag-neutral); the ui-cat-* rainbow and
   the featured star's amber are gone. "control" was a second id for the
   fleet prompts — one category now, "Fleet control".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(voice): spoken sentences start with a capital and name a repeated project once

The briefing read "one run is waiting for a builder: loki ... three runs
failed: loki, loki and loki". Sentences now open with a capital, and the
runs' projects are said once each: "Three runs failed on loki.", "Four runs
failed: loki three times and heidi once." The same for runs waiting for a
builder, agents working, and the announcements between turns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(voice): say why the studio voice is off, with the link that fixes it

POST /api/voice/speak answered 502 with Groq's reason only in the server
console, and the phone fell back to its own voice in silence, so every voice
in the picker sounded the same. Groq's refusal is now classified
(lib/voice/tts-failure: terms gate, bad key, limit, model gone, vendor down,
no key) into one plain sentence and, where one exists, the link that fixes
it — for the Orpheus terms gate, Groq's voice page and "press Accept". The
route returns it in the 502/503 body and records it in debug_logs (once per
reason per half hour) so System shows it. The speaker reports the fallback
to the page; useStudioVoiceStatus keeps it for the tab's session and
StudioVoiceNotice shows it. The phone-voice fallback stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(voice): change Loki's voice by saying so, and answer questions about voice mode truthfully

"I don't like your voice, can I change your voice" was answered like a
generic chatbot ("in most voice-enabled AI chat apps... look in settings").
Now "use Troy", "change your voice to Diana", "other voice" and
"switch voice" are a spoken command (config/no-screen.ts, lib/voice/commands)
that the phone answers itself; with no name it lists the voices. A question
that does reach Loki carries voiceModeContext (lib/voice/self.ts), built from
the SSOT: the voices by name, how to change one, the three switches with the
same one-line notes the screen shows (NO_SCREEN_OPTIONS), every command, the
current settings and why studio voices are off, if they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(voice): a music bed a phone can actually play, and keep its sound awake

The bed sat at about -38 dBFS RMS alone and -50 under the voice, every note
98-370 Hz behind a 900 Hz low-pass: below what a phone speaker or many
earbuds reproduce, so "music bed on" was silence. It is now an octave
higher (196-740 Hz), about 12 dB louder, ducks by 10 dB instead of 11 more on
top, and earcons sit above it. The AudioContext is resumed inside the Start
tap, on every tap on the circle or headphone button, on return to the page,
and when the phone suspends it mid-session.

useSoundscape also returned a new object every render, so effects keyed on
it re-ran ~20 times a second while listening: the gain was re-ramped every
frame and the 20-second fleet poll was cleared before it could fire. It is
memoized now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(voice): one h1 per screen, End clear of the feedback launcher, voices as an even grid

- Speaking screen: an h1 below md, where the app top bar steps aside; the
  start screen's big "Voice" is no longer a second h1 beside the top bar's.
- The speaking screen sets data-fc-place="tab", so the feedback launcher
  and its Watching pill become the slim edge handle instead of sitting on
  End; End is larger, with room below it, and the stage scrolls rather than
  pushing End off a short screen.
- The voice picker is a <Segmented> grid of four columns (seven voices as
  4 + 3, the last two cells wide) instead of a chip row cut off at the edge;
  the setting groups have real headings.
- The unclear note under the switches is one short line under each switch,
  shared with what Loki is told about itself.
- The page wires the studio-voice notice (under the picker and under the
  circle, said aloud once), the spoken voice change, the page's state sent
  with each question, and the sound resume on every tap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(widget): one card per finding, settled page checks, honest fix status, a count that means what needs you

Watching on Loki's own /voice from an Android phone showed six problems in
one panel. Each is fixed where it starts:

- Notices no longer stack. A page's checks own ONE card (checksSlot), which
  each new reading replaces in place and a clean reading takes back
  (thread.ts pushNoticed / dropNoticed); a remark whose words are already on
  screen is not said again; a finding's signature ignores its count and its
  placeholder example (findingKind), and the card names its page.
- The heading miscount: the check counted headings inside aria-hidden and
  inert subtrees, and measured the page once, mid-swap — /voice's setup
  screen (top bar h1 + page h1) leaving for its speaking screen (immersive
  mode hides the top bar: no h1). Checks now count only rendered elements and
  run once the page has held still, twice, keeping only what both readings
  agree on (settledPageChecks / stableChecks). The Voice page itself now has
  one h1 on each screen.
- A fix Watch started that failed no longer promises it "goes live by
  itself": it says the fix did not finish, and "Open it in Loki to see why"
  is a real link to that run's Watch page (owner-view ownerTap; watch-fix
  now resolves a failed run's Watch page even without a live page).
- Self-watch: "I couldn't check on your changes just now" replaces the old
  sentence; a request that lived through the page being put away (a phone
  locking) is never a failure; background reads count only after three
  failures in a row; the changes route always answers with CORS headers and
  logs what failed.
- The header's one number is what waits on the owner's decision (failed
  attempts, saved notes, notes not started, changes said but not saved),
  counted by the server over ALL of the owner's rows, not inside the newest
  twelve; the open list shows every one of them first. Nothing waiting:
  just "Watching".
- The save receipt never quotes a cut sentence: several changes are listed
  one per line under it, clamped to whole lines with "Show all".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* docs(changelog): voice, Watching and Prompts fixes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-21 00:38:11 +02:00
CatoandClaude Opus 5.5 9031430125 feat(feedback): a client's seat on the site itself; visitors follow notes without an account (#1337)
* feat(feedback): a client's seat on the site itself; visitors follow notes without an account

Step 3 — the seat reaches the site:
- A member pass (#loki-member=) names the person, not the owner. Their
  project page's Open link and the widget's sign-in door give it to anyone
  on the project who does not build it. The widget stays the ordinary panel
  and sends it with each note; ingest files it through the same path as
  asking in Loki, so a client's note on the site builds on their allowance
  and goes live on their word. Membership is read when used.
- The owner's own link is no longer what a client is sent: the preview's
  share card offers Invite them as Client.
- An approved /change request seats its requester as the site's client
  (5 changes a month), and their request page says where to ask.

Step 4 — the way back without an account:
- The tracking link opens on the note's status (the My feedback card), for
  six months; an account is optional, below it.
- A visitor who leaves an email gets the link by mail (three a day per
  address), and again in the shipped mail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* chore(widget): keep the conversation within its length limit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* chore(widget): hand the passes on through one helper

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* test(feedback): the shared reporter card and the six-month link

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 00:00:21 +02:00
CatoandClaude 8e8ffa0b82 feat(change): see your own site changed in under a minute, before any account (#1328)
A stranger on /change now taps "Show it on my site" and gets their live
homepage, photographed by Loki's browser, then the same spot with what they
asked for drawn on it, compared with a slider. No account, no repository, no
build: the widget's "Show me" edits (same closed vocabulary, same sanitising)
applied in a headless page on the server, never in their site.

- widget/instant-page.ts bundles the widget's outline + applyPreview for that
  page (public/instant-page.js, built with the widget). It is evaluated, not
  injected, so a site's own CSP cannot block it.
- page-picture: withLivePage shares the picture's queue, private-network
  guard and patience with a caller that photographs more than once.
- POST /api/site-consult/preview streams NDJSON: their site the moment it
  exists (~5 s), then before/after. The address must pass the consultation
  first. It spends the owner's AI on purpose, behind a per-visitor and an
  everyone-per-hour limit and the owner's daily budget.
- The preview prompt drops its "was just changed for" line when nothing was.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 16:48:44 +02:00
CatoandClaude adfbdcfe07 fix(session): the builder updates, the sheet changes things, one box, a preview is the site (#1305)
The owner used Loki from a phone (2026-10-18) and could not tell whether
anything worked. Four separate faults, each passing every check:

The cloud builder ran code days behind the app. Its restart waits for
every agent to be idle, and autopilot refilled the queue the instant one
finished: ten consecutive deploys (23:38 → 09:12) found "2 agent(s)
working — deferring restart". Hence "Model: not known yet" of an answer
the screen was showing. Now, while the cloud runner's heartbeat version is
behind the deploy's, the commands route hands it no work-starting
commands (dispatch, launch_agent, auto_continue, browser_task) — a
person's own words into a session still go through — so the idle moment
comes, the restart lands, the queue resumes on the new code. Server-side
on purpose: a runner-side rule would have waited for the very restart it
was meant to allow. Control's builder line says "a newer version waits
for its agents to finish" meanwhile.

An agent renamed a preview site, committed, and reported "the work lives
only on this machine — tell Loki where this preview's remote should
live". The box contract says push or fail loudly; a preview folder is
served from disk and has no remote by design, so the change had been live
since the save and the owner read a failure and a chore. Every dispatch
to a preview folder now carries "Where this goes" (lib/previews/
delivery-note), and the contract has the same section.

The session sheet's Change and Set typed /model and /effort into the
terminal and closed; Claude Code drew its picker behind the conversation
and nothing on screen moved. Each row now lists its choices; a tap sends
the command with the choice named (/model sonnet, /effort high), the
sheet stays open and says what is changing, and settles when the log
names it. The sheet is built like the Settings sheet.

The session box had a 26px library button beside 44px round ones, a 36px
chip and a 34px Keys pill, the microphone second from the left in one
view and beside Send in the other, and "claude" on the tab beside
"Message Claude…". One row, one size, one order in both views; the
agent's name everywhere (terminal-strip-tabs badgeNames).

Widget: the owner's change list reads what needs them first (the line
counted nine, the list showed none); "9 needs you" → "9 need you"; a
failed call is named ("my call to Loki to save your note failed… Your
words are still here — press it again") instead of "one of my calls to
Loki failed — nothing for you to do".

Tests: runner-update-hold, preview-delivery-note, owner-changes-order,
session-sheet-browser (new); builder-presence, widget-changes,
widget-self-report, inject-context-boundaries extended.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 13:37:05 +02:00
CatoandClaude Opus 5.5 44def109a9 feat(widget): a spoken walk read as a list, whole sentences, talk from the launcher, per-page builds (#1302)
* feat(widget): one Talk bar, status header, read-back, per-page builds

- One Talk to Loki bar above a one-line message box; the box shows its
  tools only once used. The second Talk button in the thread is gone.
- The owner's header is the status (Watching / 2 to look at), Pause, close:
  no second logo, no page line. Opening on a phone no longer raises the
  keyboard.
- A spoken note is read back as a list per part of the page, with Read it
  back (speech) and Edit.
- Build all starts saved notes as one build per page (dispatchFeedbackBatch,
  shared with the project batch route).
- Regex literals use \u escapes; a test fails on non-ASCII in the bundle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E1qoQ9syUYXCRNbyrpqPGa

* feat(widget): a walk read as a list, whole sentences, talk from the launcher

- Loki's read of a spoken note is a list: one change or question per line,
  with where it applies, editable, ✕ to drop. The part on screen is
  background; a line names a part only when it was pointed at.
- Save files each change as its own note, with only the moments it came
  from, on the page it was said on. Questions stay on the card for Ask.
- Whisper's segments are joined into whole sentences before they are placed
  under a heading, so a sentence is never cut across two parts.
- The owner can start talking from a microphone beside the launcher without
  opening the panel (widget/quick-talk.ts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E1qoQ9syUYXCRNbyrpqPGa

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 10:34:38 +02:00
CatoandClaude Opus 5.5 da75cbd356 fix(phone): one row of widget header, room to type, the tab not the pill, one menu (#1297)
* fix(phone): one row of widget header, room to type, the tab not the pill, one menu

The owner on a phone, on Loki's own Control (2026-10-18): "this looks
disgusting… why is it so crowded?"

Widget panel (owner):
- The status line IS the header: the brand row and the page name above it
  are gone for the owner (a visitor keeps them). Close sits at its end.
- The line carries one number of one named thing: "11 changes need you",
  "2 being built", "noticed 2 things" — not "4 to look at · 11 needs you".
  It wraps to a second line on a narrow phone instead of cutting the noun.
- Typing is one state however the keyboard is drawn. Loki's pages shrink
  for the keyboard (interactive-widget=resizes-content), so the inset check
  never fired, the sheet stayed at 68% of a halved viewport and the thread
  was a one-pixel sliver. A focused box now fills what is visible and steps
  the extras aside; the sheet resets on close.

Launcher: the phone bottom bar asks for the edge tab (data-fc-place="tab"),
so the "Watching" pill no longer floats over Control's cards. An open dialog
still wins over a later region's tab (resolvePlaceDirective).

One menu on a phone: the Profile/Chat/Control/Terminal strip no longer
renders below md (the bottom bar is the menu there), nor on /control, where
it named one remembered project above a page about all of them.

Control: "Default agent and model" moved into the Settings sheet the foot
already opens, and the foot is the page's last line (shown with no projects
too). The sort and Select row of the project list is desk-only.

Tests: new widget-owner-phone-browser (fails on the old header and on the
old sheet); nav-surfaces and phone-chrome guards updated to the new rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(widget): keep buildShadowCSS within the function-length limit

The owner-header rules took buildShadowCSS to 516 lines (limit 510); the
same rules, compacted onto two lines in the file's own one-line style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* test(widget): wait for each state, not a clock, in the owner phone test

CI runs it beside every other unit test on two cores, where the owner's
changes arrive late; fixed half-second sleeps failed there (its own output
showed only a closing brace). It now waits for the status line, the typing
state and the edge tab, and prints a one-line reason last if it fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(widget): the keyboard, not the focus, decides the typing layout

CI's fonts left the thread 44px at 320px with the keyboard up: the composer's
"This page / Point to area" row cost the room. It steps aside while the
keyboard is up, with the starters. And the typing layout now follows the
keyboard (the visible area well below its tallest), not focus alone:
Android's back key drops the keyboard but keeps focus in the box, and the
extras then come back. The phone test checks both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* test(widget): the thread must show what it holds, not be 60px tall

CI's thread held 44px of text and showed all 44px — content-sized, not
squeezed. The check is now what the bug was: a thread showing less than
min(60px, what it holds). The original sliver (1px of 64px) still fails it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 08:48:33 +02:00
CatoandClaude 09e04ab4ed feat(widget): Loki reads a spoken note before it is saved (#1299)
The owner walked Petvity for 43 seconds on 2026-10-18 — the home page,
Features, the dashboard, Settings — saying the design was inconsistent
and asking Loki to look at it all and say what it thought, then asked
whether Loki had heard them at all. It had, and it had watched: every
page and part was noted. But the card was every word verbatim under each
part of the page, including "No, no, I'm just making a coffee", said
twice to someone in the room; it led with Save and Fix it now for what
was a question; it sat under three "Loki noticed" cards, one of them
repeating the same finding; and replaying the walk showed every sentence
filed one page early.

Loki reads it first (widget/walk-read.ts, POST /api/widget/understand,
guarded like /api/widget/advise):
- The card says what it heard: "Loki heard you · 0:43 across 4 pages".
- The box leads with the ask, editable; what was not meant for Loki is
  named as "Left out"; the words as spoken stay under "Word for word"
  with "Use my exact words instead". Whatever is saved, the words as
  spoken still travel with it in each moment's `said`.
- A question leads with Ask Loki, answered about every page of the walk
  (the walk is sent as the review session); a change leads with Save
  (owner, then Fix it now) or Save feedback (visitor).
- Nothing waits on the read: while it comes and when it fails, the card
  is the words as spoken with the buttons as before; words edited before
  it arrives are never replaced.
- The card is brought into view from its top when it appears and when
  the read redraws it, without throwing the phone keyboard up again.

Walk alignment: a page change is noted the moment the address changes
(a site's own links change it without an event; polled every 250 ms
while recording, popstate too). It used to wait for scrolling to settle,
so the first words on each new page landed under the page before.

A site-wide finding (the page's language) is said on the first page of a
visit, not on every page (onceSiteWide in watch-trail.ts).

Tests: widget-walk-read (rules, prompt, wiring), widget-walk-read-browser
(the owner's walk replayed at 390 and 320: question, change, and words
edited before the read), widget-browse-voice-browser updated for the new
header and the read-fails path.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 08:28:26 +02:00
CatoandClaude ee54011517 feat(widget): plain words, and talking as the way in (#1296)
The owner (2026-10-18): make it easy to understand, easy to use,
pleasant and exciting.

- What Loki notices is said in plain words. "2 tap target(s) are under
  24px and crowded… at 7×48" reads "2 buttons are small and close to
  others, so a thumb easily hits the wrong one"; "<html lang>" reads "the
  page does not say which language it is in". The exact finding stays
  the fix request a builder gets and the key a finding is recognised by
  (plain-checks.ts; widget-plain-checks pins both, and that every
  template page-checks writes has a rule).
- Before anything is said, the panel opens with one big, friendly
  "Talk to Loki" card: scroll around and say what you'd change. Talking
  was a small mic among the composer's tools.
- The owner's greeting is one short sentence; a change going live is
  announced with "Done —".


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 07:52:05 +02:00
CatoandClaude d079f972ab feat(widget): one widget everywhere, the state in every shape, record now and build later (#1295)
The owner (2026-10-18): the widget looked different on different pages
and sites, it should always be clear when Loki is watching, and they want
to record comments while it watches and implement them afterwards.

One widget, everywhere
- Loki's own site draws the same panel every customer site gets, not the
  chatkit view (data-fc-chat="kit" stays an opt-in).
- No Loki page hides the launcher any more: the project workspace, the
  agent conversation, inspection, the project loading state and an open
  /loki conversation were "hidden" — no launcher, or the watch top bar
  instead. They show the edge tab. feedback-widget-reach fails on any
  page that hides it, in either the literal or the expression form;
  only an open dialog and the sign-in wall may.

The state in every shape
- The owner's edge tab carries the same live dot and ring as the corner
  pill, at full weight.
- The owner's pill sits in a bottom corner or becomes the tab; it no
  longer climbs to the middle or top of the screen (Heidi at 390px).

Record now, build later
- After a voice note the owner's card leads with Save (then Fix it now,
  Ask). Saved notes lead the status line ("Watching · 3 notes saved"),
  and "Build all 3 saved notes" starts each as its own build, oldest
  first: POST /api/widget/owner/build, rule in lib/feedback/saved-notes.ts.
- The owner check for the widget's owner routes is one helper,
  lib/widget/owner-request.ts, used by owner/changes and owner/build.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 06:08:34 +02:00
CatoandClaude 5e7f1c1924 feat(projects): a Builder changes the site without the owner, and the invite says so (#1280)
The owner's words, 2026-10-17: Manu is a doctor; joining should take no
explaining, and when he is a Builder his feedback should go to Loki, not
to George. The machinery existed — a pass on the site's feedback button
makes a note build at once — but Loki handed the pass only to the owner,
recorded nobody as the reporter, told the owner nothing, and the invite
page named a role without explaining it.

- The invite page is the manual: what the project is (its description and
  site), how you change it in three lines, what happens to what you ask
  for, one button. The owner opening their own link reads the same page
  with "This is what the person you send it to will read".
- After joining, the project leads with the same three lines (MemberGuide)
  and an "Open <site>" button. For a Builder that link carries the pass.
- Who gets a pass is one rule, mayHoldPass (owner and every Builder); the
  project page issues it by that rule. A viewer's or a client's note, like
  a stranger's, waits for the owner.
- Ingest records the pass holder as the reporter, so the owner's inbox
  reads "Manu Rigner asked for this on your site" with "Manu Rigner ·
  Builder", and Manu's own list knows his notes. The owner is told by push
  and Telegram when a Builder's note starts (notifyBuilderAsked) — told,
  not asked.
- The site's sign-in door reads "I own or build this site", and ROLE_LABELS
  says in plain words what each role means for what you ask for.

Walked at 320, 390 and 1440 on a local stack with a stand-in Petvity site
carrying the widget: George makes a Builder link; Manu reads it signed
out, joins, lands on the guide, opens the site from Loki, asks for a change
in the widget — the row is his, source owner, and the build is attempted
at once; George's inbox names him. Eve joins as a Viewer, her note from
the site is a visitor's and waits for George. No overflow, no page errors.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 20:48:50 +02:00
CatoandClaude 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>
2026-10-17 20:44:42 +02:00
CatoandClaude afaf8c9b43 fix(widget): no dead-end notes, no "LOKI / Loki", no stacked assistants (#1266)
Three things the widget did wrong on production, found by using it:

- A visitor's note about Loki itself got a receipt with no link: only the
  owner's build had a way to follow. Self-reported notes now carry the same
  claim link api/feedback hands out, so the person can follow it in their
  own My feedback. The claim path has one spelling (feedbackClaimPath).
- On Loki's own site the header read "LOKI / Loki": the brand line, then
  document.title. pageLabel drops the brand segment and keeps the page's
  name, falling back to the path, then Home.
- A corner holding the host's own floating button (substrata's ASK,
  Heidi's pill) was climbed: two assistants stacked as one tower at 390px,
  and ours floated 300px up the edge at 1280px. That corner is now the
  host's: the launcher takes the other corner if it is clear, else the
  edge tab. Tab bars and composers are not floats and are stepped around
  as before; a side named by the host or the visitor is kept. The install
  prompt no longer tells builders to add data-fc-bottom to stack them.

Browser fixtures 4/4b fail against the current production bundle and pass
with this one.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 18:54:12 +02:00
CatoandClaude 6d40764c8a fix(widget): Send stays reachable on the real sites, not only the fixture (#1256)
#1251 went live and I re-measured production instead of trusting the tests.
Fixed on Substrata 390×760 and Loki's own site; still broken on orangecat.ch
at 390×667 and Solon at 360×640, where a tap on Send still hit "Made with
Loki" — and the footer I said would share one line still took two.

Two causes the test fixture could not show:

- The phone rule that makes the starters one swipe row lost to the base
  `.starters { flex-wrap: wrap }` rule, which comes later in the file with
  the same specificity. On the real sites the starters were still a 129px
  stack. Now `.convo > .starters`, which wins.
- "Made with Loki — build something of your own →" alone is wider than a
  phone, so the footer wrapped to two 39px rows. On a phone it reads
  "Made with Loki →"; the rest of the sentence stays on wider screens.

And a priority, so content can never again push the composer out: the
thread gives way first (flex-shrink 9999), then the starters (now allowed
to shrink, clipped), never the composer.

Verified by serving this build into the REAL production pages (orangecat,
Solon, Substrata at 390×667 / 360×640 / 390×760 / 320×568 / 390×844 /
1280×720): every tap on Send reaches Send. widget-embed-browser now also
asserts the causes on phones (starters one row, footer one line) and adds
320×568; it fails 4 times without this change and passes 78/78 with it.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 17:00:00 +02:00
CatoandClaude f309b23ae0 fix(widget): a tap on Send reaches Send, at every height (#1251)
Found in production on 2026-10-17 by driving the live widget the way a phone
visitor does, and filed through the widget itself ("Loki itself", feedback
ddf6e248):

- substrata.orangecat.ch at 390×760: the composer scrolled with the
  conversation and opened half below the fold, so a tap where Send is drawn
  hit "Made with Loki — build something of your own" — a new tab, the note
  unsent. After sending, the composer was gone below the footer entirely.
- loki.orangecat.ch at 1280×720/860 (the chatkit composer): Send sat below
  the panel's scroll box, under the footer.

Cause: .convo was itself a scroll box holding the thread (96px floor), the
starters and the composer; whenever they did not fit, the whole column
scrolled. In chatkit mode two plain block wrappers (.kit-host > .fc-kit-root)
took their content's height, so the thread never shrank at all.

- Only the thread scrolls; it may shrink to nothing, the composer may not.
- The chatkit wrappers pass the room down.
- On phones the starter chips are one row to swipe (they were a 140px stack
  on a 517px sheet), and the two footer links share one line.
- Self-watch now checks Send by what a tap HITS when the panel opens. It
  only checked sideways overflow, which passed while production was broken.
- Both browser suites check Send's reachability at 390×667, 360×640 and
  1280×720 (plus 390×760); every test used to open the panel 800px tall,
  which is how this hid. Reproduced first: classic failed at 390×667 and
  360×640 (hit: made-with), chatkit at 1280×720.

Also: CLAUDE.md said to attach the fleet kits with read access. For a public
repo that attaches nothing and codeload stays 403; the push attach is what
opens it (whenkit 403 → 200).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 16:14:44 +02:00
CatoandClaude 3e0fdffd28 fix(widget): a walk deep in a section names that section, not the page title (#1241)
Walking the live Petvity home page to its bottom with the live widget
(fake microphone, writes caught locally), the last moment was recorded as
"Petvity — The global platform for pet care": the "Free, forever" heading
had scrolled off the top and no heading was on screen, so inView fell back
to document.title. The person was still in that section, and the agent
was told nothing about where they were.

inView now picks the last heading that starts above the reading line,
on screen or scrolled past, then the first heading on screen, then the
title. The browser test scrolls the fixture down to its footer after Mark
and asserts the moment stays "Pricing" with the deeper scroll; the old
code fails it with the fixture's title.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 15:15:13 +02:00
CatoandClaude Fable 5.1 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>
2026-10-17 14:39:14 +02:00
CatoandClaude Opus 5.5 95383b92db Improve a live site as a private preview; consultation reads the whole site and talks (#1234)
* feat(change): improve a live site as a private preview, with a site tour and a consultation that talks

"Improve this site" created a GitHub repository per click and a kickoff that
told the agent to "treat the repository as possibly empty" — for a site that
already exists. Two clicks made two repos (center-com, center-com-2), and the
owner had nothing to show their client but a run log.

- /change builds a PREVIEW (lib/previews/from-website): folder + local git,
  <name>.orangecat.ch behind the access code, widget on it. No repository until
  the client says yes; servers without previews fall back to the repo path.
  Repeat submits resume the same preview. An access code is created when the
  operator has none.
- The brief starts from the live site and asks for improvements.html, a tour
  of what changed (live page vs new page), so the client SEES the improvement.
  "Watch it work" shows the link, code, tour and a copy-ready client message.
- The consultation reads the homepage AND the pages it links to
  (site-consult/crawl, bounded, same SSRF-guarded fetch), with site-wide checks:
  broken links, duplicate titles, thin pages.
- It is a conversation now: what Loki read, its advice on what to fix first,
  what already works, then two one-tap questions whose answers become brief
  lines from config.
- Loki chat's read_website reads up to five linked pages and returns the
  consultation as advice.

Fixes from the owner's screenshots:
- Owner launcher on phones drops the "Loki · watching" label and fades while
  scrolling — it was covering "It worked" and card buttons.
- Tapped labels no longer glue count badges on ("Feedback to triage11").
- The widget no longer files Loki's own app polls (/api/feedback/summary) or
  navigation-cut requests as its failures ("never answered after 0.3s").
- Live-check evidence speaks as Loki, not "The provided page text…".
- Watch: "Waiting to start · started just now / Queued" → "Next in line ·
  asked just now / Waiting for a builder to pick it up."
- Session box: an agent's "request access to the widget storage and dump
  submissions" suggestion is replaced by the Attach-feedback action.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016zCRuBPv8KpyTPkh6JsSYt

* fix(feedback): keep evidence wording pure so the inbox client bundle builds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016zCRuBPv8KpyTPkh6JsSYt

* test(widget): read the owner launcher's words, not its pixels

On phones the owner label is now hidden so it stops covering the page; the
accessible name still says Loki is watching.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016zCRuBPv8KpyTPkh6JsSYt

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-16 17:29:03 +00:00
CatoandClaude 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>
2026-10-16 01:05:23 -07:00
Cato 25ae3de0e5 Make the Loki site widget one clear conversation (#1229)
* Improve widget conversation and mobile feedback flow

* Update widget layout assertion for simplified header
2026-10-16 07:50:05 +00:00
CatoandClaude Opus 5.5 9d5d0c4694 feat(widget): Loki's own look, in Loki's light or dark mode, with one scroll (#1227)
* feat(widget): Loki's own look, in Loki's light or dark mode, with one scroll

The site widget took its colours from the fleet's shared tokens, whose
accent is OrangeCat's warm orange, and was dark only: on a client's light
site the owner saw an orange-ringed black panel and asked why Loki's widget
looked like OrangeCat.

- Themes are generated from Loki's own globals.css, light and dark. The
  accent is the ink; the warm colour is only the focus ring and a picked
  element's outline on the host page.
- Every widget stylesheet reads var(--lk-*), defined for both modes on the
  shadow host; widget/theme-mode.ts picks one. The owner gets the mode they
  chose in Loki (user_preferences.theme, saved by ThemeSync via
  PUT /api/me/theme, returned with their changes and remembered per site);
  everyone else gets their device's setting, followed live.
- The panel is one column with one scroll area (the thread) between a fixed
  header and composer. The whole card used to scroll too, which hid the
  composer below a laptop's fold and nested scrolls on phones.
- The desktop card no longer greys out the site it invites you to use; the
  phone sheet opens at two thirds of the screen with a lighter scrim.
- About is a segmented control that fits a 320px phone on one line.
- The walkthrough card follows the same mode; its ring uses the highlight
  so it reads on light and dark sites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LMe5Uv6mfWJibAiCaNbbk

* fix(widget): the launcher is findable — Loki's mark at full strength

On the owner's phone, signed out of the owner pass, AOZ showed a grey
pencil at 38% opacity and 85% size, and the owner said the widget was gone.
Without the launcher there is no way to the sign-in that brings owner mode
back. The resting launcher is now Loki's spiral at full strength with a
hairline and a soft lift off the page, on phones and desktop; it still
fades while the page scrolls.

Also: the user_theme migration is renumbered 0107 after main's 0106.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LMe5Uv6mfWJibAiCaNbbk

* fix(widget): keep the shared chat's thread bounded however chatkit nests it

CI's widget-kit-browser (needs @bitbaum/chatkit, so it only runs there)
failed one check: the chat thread no longer had a max-height once the panel
became a flex column. The flex layout bounds it only when the wrap is a
direct child, so the cap is back as a backstop, and the test now pins the
outcome — the thread scrolls and ends inside a card that fits the screen —
instead of the mechanism.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LMe5Uv6mfWJibAiCaNbbk

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 10:40:11 -07:00
CatoandClaude 1cdd92a8ad fix(widget): Loki on the site answers what was asked (#1222)
On a client's site the owner said a description field had no microphone
and asked, twice, whether the site used the fleet's packages. Loki gave
the same advice about one textarea twice, in German to an English
question, and its Review called the minutes spent talking to it "the
page never responded for 194 s" with an invented endpoint.

- The advisor now sees how the site is built: the packages its code
  uses, the kickoff's plan, and the owner's build conventions
  (src/config/build-conventions.ts, also carried by every dispatch).
- Naming a package is no longer treated as "explaining how to edit";
  a point about every form is answered as a rule across the site; no
  repeated answers; replies follow the language of the latest message.
- What the owner says to Loki is a `talk` step in Watch's trail, so a
  Review reads that time as conversation; Review may not name an
  endpoint the evidence does not show.
- Loki's unasked page read skips test data and replaces the previous
  read instead of stacking one per page.
- First build convention: fields where people describe something get a
  microphone from @bitbaum/chatkit; short fields never do.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 09:13:00 -07:00
Cato f2a9d47606 Show a labelled Speak action in the site widget (#1220)
* Make browse-and-speak visible in the widget header

* Keep widget header actions compatible with style checks
2026-10-15 07:00:16 -07:00
Cato 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
2026-10-15 06:29:46 -07:00
Cato dd097d147a Keep the mobile assistant off content and clarify project status (#1188)
* fix: keep mobile assistant clear of content and clarify project status

* test: prove owner target overlap independently of font widths
2026-10-14 04:56:36 -07:00
CatoandClaude 3ec983c94e fix(widget): the feedback button is always on screen unless someone switched it off (#1169)
The launcher could disappear in five different ways, and three of them were
side effects nobody chose:

- the phone's bottom nav carried data-fc-place="hidden", and that nav is on
  every app page, so on a phone the button was gone everywhere;
- /terminal hid it at every width, and the desktop terminal had no Feedback
  button of its own;
- /loki was excluded from the widget entirely;
- on a crowded page the avoid pass hid it for visitors whenever every corner
  slot was blocked, with no signal.

The rule is now one sentence: the launcher is on screen, as the corner button
or as a slim edge tab, unless someone switched it off on purpose.

- New shape, the edge tab: when no corner slot is clear it docks flush to the
  side edge (mid-height, or the nearest height that covers no control) instead
  of vanishing. Pages can ask for it with data-fc-place="tab".
- /terminal and /loki use the tab. /loki is back in the widget's routes.
  The phone nav no longer hides the launcher; it climbs above the nav.
- Off and on is one switch: Loki.hide() / Loki.show() / Loki.hidden plus a
  loki:visibility event. The account menu offers "Hide feedback button" /
  "Show feedback button", in step with the widget's own long-press menu.
  The operator's pause and a host's data-fc-place="hidden" still work.

Tests: widget-host-avoid-browser gains the tab (wall of controls, tab region
mounted/unmounted) and the hide/show switch; these fail on the old bundle and
pass on this one. widget-placement covers chooseTabTop and the new directive.
feedback-widget-reach and phone-chrome pin the new page rules.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-12 07:51:16 -07:00
CatoandClaude Opus 5.5 0dc521df93 feat(terminal): Loki tells you what to type, and typing it is one click (#1164)
* feat(terminal): Loki tells you what to type, and typing it is one click

A person looking at the terminal did not know what to do: the agent said
"Please run /login", or they wanted Opus instead of the current model, and
nothing on the page said the answer is a command. The summary offered prose
tasks, and a command sent through Inject was wrapped in project context, so
"/model opus" reached the agent as a sentence about a model.

- config/agent-commands.ts is the one list of each CLI's own commands
  (sign in, choose a model, free up memory, start fresh), in plain words.
- lib/terminal-commands.ts reads the screen: signed out, out of quota,
  memory nearly full, or a menu waiting on a choice. TerminalActions shows
  the sentence and a button that types the command or key into the session.
- The Loki panel knows the commands too. "What's going on?" and every Ask
  carry them with the screen, and a step that is a command ("→ /model opus")
  becomes a button that types it instead of an Inject draft.
- A draft that is exactly a known command is typed, never injected. "/" in
  the Prompt box lists the agent's commands above the prompt library, and
  the panel has the full list one click away.
- Clicking or tapping the read-only terminal switches to Type and puts the
  cursor where keys go, so the screen can be worked in directly.
- Copy no longer says "tap" to people on a computer: gesture-neutral wording
  where possible, usePressVerb() (and widget/press.ts) where the gesture is
  the instruction, "pressed" when narrating what someone did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* test(widget): the watch remark names the control as pressed, not tapped

The widget's narration now says "pressed", which is true on a phone and a
computer alike; this browser assertion still expected the old word.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-12 06:09:16 -07:00
CatoandClaude 58ee6e8c78 feat(widget): the conversation drawn by the shared chat (chatkit), on Loki's own widget first (#1162)
The widget's chat was the fleet's own hand-rolled chat; with
data-fc-chat="kit" it is now drawn by @bitbaum/chatkit, the thread and
composer Loki's own chat renders, over the same conversation model.

- widget/chat/: a separate lazy chunk (public/widget-chat.js, ~24 KB
  gzipped, Preact standing in for React), fetched on first open, carrying
  the tag's nonce. chatkit's CSS is rewritten for the shadow root (:root ->
  :host, rem -> px) and coloured from the boot theme.
- widget/conversation-kit.ts maps the model's snapshot to what chatkit
  draws; Fix this, the changes, the confirmation card, the About chips and
  Continue in Loki go into chatkit's slots as the widget's own nodes.
- A chunk that cannot load leaves the panel's own view: no dead end.
- /widget-chat.js is public in the auth proxy, like /widget.js.
- Tests: widget-kit-browser (34 checks: ask, card, screenshot, fallback,
  phone width, host hotkeys, weight budget), widget-chat-css, and
  widget-self-contained now guards the chunk/panel seam.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-12 05:13:25 -07:00
CatoandClaude Opus 5.5 3ff287e215 refactor(widget): the conversation's rules live in a model the next view can share (#1160)
* refactor(widget): the conversation's rules live in a model the next view can share

Step one of moving the widget's chat onto chatkit, the chat Loki itself uses.

- widget/conversation-model.ts: thread, pending, error, confirmation card,
  and every call (ask, build, deliver, self-report) — no DOM, snapshot() +
  subscribe(). conversation.ts now draws it, same markup and classes, so
  nothing on any site changes.
- main.ts: while the panel is open, keys stop at the shadow root on their way
  out instead of on document in the capture phase. The old stop kept every
  key from controls inside the panel that listen for themselves — fine for
  today's composer, which main.ts fed by hand; fatal for any real component
  (a composer's Enter, a dialog's Escape). Escape with focus behind the panel
  still closes it.

Tests: widget-conversation-model (new, 25), widget-embed-browser +4 (host
hotkeys never see panel typing; a control inside still gets its keys —
fails on the old handler; Enter asks; Escape closes), watch-browser 81/81,
host-avoid 24/24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck

* test: source checks follow the conversation's calls into the model

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-12 04:37:24 -07:00
CatoandClaude Opus 5.5 dffe839661 One chat across projects, and the Loki panel works with a phone keyboard (#1149)
* feat(loki): one chat across projects — the named project wins, and the switch shows

A Loki chat already moves between projects: name one and the next answer
works there, and the scope follows. Two edges remained.

- The fast paths (business plan, profile update, screenshot) put the
  selection before a project named in the message. The selection now
  follows whatever project the last answer used, so "write the business
  plan for orangecat" sent after a loki build went to loki.
  resolveFleetCommandProjectKey now lets the named project win, as
  resolveDispatchTargets already does.
- The switch was silent — only the thread header's label changed. The
  thread now draws a quiet "Now on X" rule above the message that moved
  the chat to another project (lib/loki/project-switches.ts, tested).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HsFC4ZgDDsMo61aFghG1xd

* fix(widget): on a phone, the panel stands on the keyboard; scope tabs on one row

Owner's phone, 2026-10-11: with the keyboard up, the Loki panel's "Build
it / Ask Loki" buttons were under the keys and the thread was a sliver.
Android Chrome lays the keyboard OVER the page (the layout viewport keeps
its height), so a sheet pinned to bottom:0 with a vh height sits behind it.

- sheet.ts follows the visual viewport: keyboardInset() says how much the
  keyboard covers (tested; <80px is a toolbar, not a keyboard), and the
  sheet then stands on the keyboard with its height capped to what is
  visible. While typing, the starters and the way into Loki step aside
  (.panel.kb) and come back when the keyboard goes.
- The "About · This page · Whole site · An element · Loki itself" row
  wrapped onto two lines with the label floating beside both. On phones it
  is one sideways-scrolling row; the label goes (the group keeps its
  aria-label). The rule sits after the base .seg rule, which it overrides.

Checked in Chromium at 390×800 with a simulated 330px keyboard: the panel
ends at the keyboard (470px) and Ask Loki sits at 367–399px, where it was
at 625px — under the keys — before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HsFC4ZgDDsMo61aFghG1xd

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-11 15:14:18 -07:00
CatoandClaude Fable 5.1 fca81031b0 feat(widget): the widget reports on itself, to Loki (#1142)
* feat(widget): the widget reports on itself, to Loki

Watch mode reads the host page and is careful never to blame the site for
Loki's own work: the widget's own requests, errors and layout were left out of
what it says — which meant dropped. Nobody heard about a panel that did not fit
a phone unless the operator was the one holding it.

- A fourth "About" chip, "Loki itself": a note about the panel goes to Loki's
  own project (FEEDBACK_WIDGET_TOKEN's), never to the site's builder, with the
  same screenshot attach. About bar extracted to widget/about-bar.ts.
- Self-watch (owner, while watching): the widget's own errors, its calls to
  Loki failing or over 20s, and a panel wider than the screen are filed to
  the same place automatically — once per kind per tab, said in one line in
  the conversation, and never looping through the report call itself. A 4xx
  is Loki answering on purpose, not a defect. Watch now hands own-requests
  over instead of discarding them.
- New public route /api/widget/self-report: host fcw_ token + origin
  allowlist, owner pass required for anything the widget noticed unasked,
  one row per kind per site via noticeKey.
- The owner's top bar steps aside while the site has a modal open: it sat on
  top of "Choose a model" on the operator's phone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E1qoQ9syUYXCRNbyrpqPGa

* feat(widget): Loki's own owner's self-reports start the fix on the spot

A self-report filed by Loki's OWN owner — using Loki's widget on one of their
sites — is the owner's word on their own product, and the owner's word is the
decision (api/feedback): a note, a crash or a panel that did not fit starts a
build into Loki there and then, and the receipt reads "On it … built into
Loki itself" with Follow the build →. A slow or failed call to Loki only
files; its duplicate count is the signal. Anyone else's waits in the inbox.

The receipt wording moves to widget/receipt.ts (pure, tested) — the thread
renderer was over the lint's line cap.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E1qoQ9syUYXCRNbyrpqPGa

* test(widget): the About row has four chips now

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E1qoQ9syUYXCRNbyrpqPGa

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-11 14:42:51 -07:00
CatoandClaude aad44a5333 feat(widget): Loki remembers what it noticed — no second commissioning (#1132)
Watch mode forgot its own remarks the moment the tab closed: the next visit
noticed the same missing heading or the same tiny text, offered "Fix this"
again, and pressing it commissioned the same work twice. The content hash
could not catch it — every filing carries the watched steps with "(Ns ago)"
on each line, so no two filings of one finding ever hashed the same.

- A remark carries its signature as a key (widget/watch-trail.ts:
  checksSignature / noticeSignature / the read's `${path}|read`). "Fix
  this" files it with the note (`noticeKey`), and so does a failure Watch
  files itself. Ingest honours the key only with a valid owner pass and
  dedupes by it BEFORE the content hash (bumpDuplicateFeedbackByNotice):
  a second press lands on the open row and is counted, not built again.
- Migration 0090: site_feedback.notice_key + index.
- /api/widget/owner/changes answers `known`: every keyed row, open or
  settled, with the owner's own status words — beyond the twelve the
  strip shows.
- widget/known-fixes.ts (pure): the row that answers for a key (the open
  one, else the newest — an old closed row cannot silence a live fix);
  the verdict: in flight or closed → silent, live → "again", unknown →
  say; the card's chip ("Being fixed · Building", "Needs you", "Fixed 3
  Oct"). Watch looks before it speaks (awaits the first read of the
  owner's fixes, 4 s at most) and skips the model read for a page whose
  read-fix is in flight.
- The noticed card shows where its fix is instead of a second button; a
  live fix that is back reads "Loki noticed — again … It is back" with
  "Fix again". Cards follow the fix as it moves while the panel is open.
- Tests: scripts/test/known-fixes.ts (6), widget-thread (key survives a
  reload), widget-changes (route shape), and two browser cases in
  widget-watch-browser (a fix in flight is not noticed again; a live one
  that recurs says so and files its key). Changelog.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-10 04:26:36 -07:00
CatoandClaude Fable 5.1 e2884193fb feat(autopilot,widget): the night asks first; one Loki on the owner's site (#1128)
* feat(autopilot): the night asks first — evening plan with its price, approve or allow

Nothing runs at night that the owner has not seen. Every evening (19:00 UTC,
crons/autopilot-plan) Loki makes tonight's plan with names and a price on it
— which fixes, which site, how many runs, what it would cost from the owner's
own last runs — and puts it in the approval queue as one autopilot_plan row:
Approve / Reject on Control (TonightCard), Telegram and /approvals. The night
(02:30 UTC) claims the approved plan and runs exactly that, re-checked;
undecided at 02:30 it expires and the morning note says nothing was built.

The one way a night runs unasked is an allowance set in Settings → Agent:
"Nights run without asking" for a week, a month or three months, optionally
under a dollar cap a night (beacon_settings.night_allow_until /
night_cost_cap_usd, migration 0087). Under it the row is approved on the
owner's behalf and they are told the evening before. A night over the cap
asks again.

Free things stay free: filing away stale reports and moving stuck rows to the
cloud spend nothing, undo in one tap, and happen with or without a yes. The
plan and the note are assembled from counts — no model call in a timer.

- src/config/autopilot-night.ts: NightProposal, estimateNightCost,
  nightProposalText, nightAllowance, NIGHT_APPROVAL, nightRunAt,
  upcomingNight, allowanceDaysLeft (all pure, tested)
- src/lib/autopilot-night.ts: proposeNightFor / proposeAutopilotNight;
  runNightFor now claims the approved plan (claimApprovedActionsByType) and
  retires late-approved plans for past nights
- AUTOPILOT_PLAN action type, deferred on approval; the Telegram card drops
  Edit for it (a plan is yes or no)
- GET /api/autopilot/tonight + TonightCard replace the late-night
  "go to sleep" strip (LateNightAutopilot, lib/late-night retired)
- docs: paths.md, telegram-notifications.md, CHANGELOG

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011L2dmcydDLYAiNQwK4XcF4

* feat(widget): one Loki on the owner's site — the launcher never hides, ◎ is its other half, "This screen" marks the view

Owner, 2026-10-10, on a phone: "when it says Loki is watching, and then
there is another widget … where the aim symbol is … I don't know when one
appears and when the other appears. Are they competing elements?" They
were: the owner's launcher ("Loki · watching" + a ◎ beside it) hid whenever
the avoid pass found every corner busy — on a phone, most scrolls — and a
"Loki is watching" bar took its place at the top, without the ◎.

Now the owner has exactly one of it:
- the owner's launcher is never hidden by the avoid pass (their site, their
  corner — long-press moves it) and never fades on scroll;
- the ◎ is the launcher's other half, flush against it with the shared edge
  squared, and present whether Loki watches or is paused;
- the top bar remains only for a page that hides the launcher outright
  (data-fc-place="hidden") and carries the same ◎.

Show Loki this screen: the pick bar offers "This screen" beside tapping an
element — it marks the blocks in the viewport (picker.ts visibleBlocks), the
way a screenshot would frame them, and the conversation opens with them
attached: say what to change, ask Loki, or build it.

Browser test (widget-watch-browser): the ◎ is flush, stays while paused, the
launcher stays with every corner blocked and no bar appears, This screen
marks and attaches. README, architecture doc and CHANGELOG say so.

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>
2026-10-10 03:17:05 -07:00
CatoandClaude 7e5b9e1506 feat(watch,feedback): Loki reads the page, and /feedback speaks one language (#1120)
Watch reads the page
- The page checks measure (type size, targets, labels). They cannot see
  that a page says nothing first, that two controls mean one thing, or
  that its parts were thrown together — the owner saw exactly that on
  their own pages and asked why Loki had not. Watch now also READS each
  page once per visit, unasked, as a first-time visitor on a phone:
  purpose, hierarchy, content, fit, function (READ_RUBRIC in
  widget-advise/advisor.ts; the server applies it, the widget only sets
  `read: true`). At most three findings, each quoting the page; silence
  when fine, said in the notes as "read it — nothing stands out". The
  findings land as a notice with the same "Fix this" as any other.
- The review starter reads "Review my last few minutes": it is the review
  of the taps trail, which the page read is not.

/feedback: one vocabulary
- Lenses: Needs you · Under way · Done (was "Shipped" — the rows in it
  said "Done").
- A deployed fix awaiting the owner's look is "Live — check it", in the
  warning tone, never green: a green "Shipped · confirm" chip under the
  "Needs you" heading beside the Done lens's green chips was the page
  saying two things with one colour. Badge colour now follows who acts,
  like the lenses: amber yours, red broke, green nothing waits on you.
- "41 done" in the metrics line, "Show all N done".

docs/paths.md
- Who comes, what they want, the fewest taps — six paths, each with what
  broke it and what is still owed, and the rules they impose. The product
  contract the screens are held to; user-flow-audit.md stays the
  route-by-route health matrix beneath it.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-10 00:21:35 -07:00
CatoandClaude 8757d532b6 feat(widget): fixes go as one change, watch sees what taps do, ◎ shows Loki (#1112)
The owner, on loki.orangecat.ch from a phone (2026-10-09): "if it proposes
five fixes and I click fix, where is it going? … how do I keep track?",
"I don't know when it's noticing something", "it should be easy to draw
its attention", and the panel still had a lot going on.

- Suggested changes are ONE decision (widget/suggestions.ts): every row
  ticked, a tap unticks, "Build these 3 as one change →" files one note —
  one agent, one PR, one row in Your changes. It used to be a Build per
  row: N runs queued in the project's one lane with nothing saying so.
  The owner's builds start without a confirmation card ("Edit first"
  opens it); a visitor's still confirm.
- Your changes: one summary line that opens ("1 building · 1 in line ·
  1 live"); each row is its own link. A change waiting behind another
  reads "In line" (owner-view.ts), not "Starting".
- Watch sees what a tap DID: for 1.5 s after a tap on a button or link it
  waits for the page to change, ask the server or navigate, notes which
  ("↳ It asked the server"), and says at once — after one tap, not three
  — when nothing visibly happened.
- ◎ beside the launcher while watching: point at anything on the page,
  the panel opens with it attached.
- Phone sheet (widget/sheet.ts): drag the top up for full screen, down to
  peek at the page, further to put it away.
- Shorter greeting.
- Tests: widget-suggestions, widget-sheet, widget-changes (summary, In
  line), widget-thoughts (results); watch-browser covers the tap results
  and the one-change build. Unit 360/360; watch/embed/host-avoid browser
  suites pass locally.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-09 05:33:56 -07:00
CatoandClaude Fable 5.1 5bc05bbef4 feat: the first day is the whole product — three ways in, /build, your website in onboarding, Loki on it, help when a build stalls, and the owner's phone fixes (#1110)
* feat(widget): the owner's way into Loki — Continue in Loki, an advisor that knows whose site it is, a header that fits a phone

On 2026-10-09 the owner of heidi.orangecat.ch opened the widget on their
phone and asked for one new page. The widget treated them as a stranger:
it told them which heading to insert and to "keep the structure in a data
file (JSON/YAML)", wrote five invented sentences in the site's own language,
and answered "switch to Loki so I can develop it there with either chat or
terminal" with the same advice a third time. The owner's sign-in lived only
behind "Watch". Once signed in, Review + Stop watching pushed ✕ off the
right edge of the screen.

- widget/continue.ts + src/lib/widget/continue.ts: the thread as one
  message (newest kept, ≤1800 chars) and where it lands in Loki.
- GET /api/widget/continue: signs the person in if needed, checks
  getProjectAccess on the widget's project, resolves the project key and
  redirects into /loki?project=&q= or /terminal?project=&view=terminal;
  a stranger goes back to the site with #loki-owner-denied.
- widget/conversation.ts: "Continue in Loki · Chat → · Terminal →" under
  the composer for the owner; one sign-in link for anyone else after their
  first message; "This is my site — sign in with Loki →" under Loki's
  greeting, on the first screen. The owner pass travels with each question.
- /api/widget/advise + advisor.ts: the pass is verified as ingest verifies
  it; with it the advisor knows the person OWNS the site and Build this
  builds. For everyone, four hands-off rules: never explain how to edit the
  site, never write its content, a build request becomes the one change to
  tap, and "take this into Loki" is answered with where that control is.
- widget/theme.ts: the header's text column shrinks before the actions do;
  Stop watching stays on one line; the continue row wraps on a phone.
- widget/main.ts: the owner is not offered to hide their own tool.
- scripts/test/widget-continue.ts (new), widget-advise.ts: pinned.
- docs/architecture/feedback-widget.md: the row and the route.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Yw4cCwXWRP2S5Hj62u2Z

* feat(widget): the loop closes on the site — Your changes, a live announcement, an honest Follow link

"On it — Loki tells you when" was the end of the widget's story, and on the
site Loki never told anyone: the telling went to push and Telegram, the page
the owner came back to said nothing, and "Follow the build" toured the
unchanged page with "let me show you what changed".

- widget/changes.ts: "Your changes" above the thread for the owner — the
  project's recent changes with one word each (Building · On its way · Live ·
  Needs you …), See it → once live, Open in Loki → when something needs them,
  asked for on arrival and every 30 s while something moves. A change this
  browser saw building that is now live is announced once: in the thread when
  the panel is open, beside the launcher (bubble + unread) when it is not.
- POST /api/widget/owner/changes: the one read with the owner pass. Same
  attachFeedbackWork the inbox uses, then src/lib/feedback/owner-view.ts
  writes the owner's words; the work view never leaves the server. No valid
  pass → no rows.
- /feedback/<id>/watch-fix lands on the inbox row while the change is still
  being built; the walkthrough only once it is live.
- The owner's repeated note keeps its follow link.
- widget/continue-row.ts, widget/greeting.ts: split out of createConversation
  (the lint rule caps it at 510 lines; CI caught it at 543).
- scripts/test/widget-changes.ts (new); widget-continue.ts updated.
- docs/architecture/feedback-widget.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Yw4cCwXWRP2S5Hj62u2Z

* fix(widget): the owner's door is not an .act — the embed test counts those

widget-embed-browser asserts exactly one "as written" link (.act) under the
visitor's last message; the sign-in door under the greeting shared the class
and made it two. Its own class, same look.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Yw4cCwXWRP2S5Hj62u2Z

* feat(public): three ways in — build it yourself, with a partner, or let the studio — and every stranger's door ends at /build

The ways to get something built were scattered: the landing page offered
only "Start a project", hiring the studio was a word in the nav, the partner
directory was reachable from OrangeCat's careers page and nowhere here, and
a stranger who watched a fix land on someone else's site was sent to a bare
homepage. "Start a project" at the bottom of six marketing pages went to
sign-IN, and so did a stranger arriving with a brief.

- src/config/build-paths.ts: the one list — yourself (sign-up), with a
  partner (bitbaum.orangecat.ch/partners/), the studio (the commission
  config's hire address) — plus buildPageHref/fromHost.
- /build (public, allowlisted): the invitation, naming the site the person
  came from (validated host only) and the three doors (BuildPaths cards).
- Landing: the "Three ways in" section after "Who it is for"; the closing
  line and FinalCta name the other two ways; FinalCta → sign-up.
- /change and /take send a signed-out person to sign-up with the brief kept.
- Widget: "Made with Loki — build something of your own →" as the last line
  for anyone who is not the owner (/build?from=<host>); the tour's "Get this
  for your site" lands on /build naming the site; the concierge gets the
  same door (appended last — the test addresses the others by index).
- scripts/test/build-paths.ts pins all of it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Yw4cCwXWRP2S5Hj62u2Z

* fix(widget): /api/widget/continue is public — it signs the person in itself

Live, the merged route answered a bare 401: the session middleware caught it
before the route could send the person to sign-in. Same list entry as
/api/widget/owner, pinned by widget-continue.ts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Yw4cCwXWRP2S5Hj62u2Z

* test(audit): /build is measured by the responsive audit

A new page has to be a decision — measured, or excluded with a reason.
Measured: it is a public page a stranger lands on from a phone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Yw4cCwXWRP2S5Hj62u2Z

* fix(widget): yours means yours, a review that picks three, the composer above the keyboard

From the owner's phone on 2026-10-09:
- "Your changes" listed a stranger's "so nice picture!" as the owner's own
  request. The strip now shows what the owner asked for and what Loki filed
  itself; visitors' notes are counted ("3 notes from visitors, in Loki →").
- Review answered with five nits (alt text, a renamed button, a table) and
  five identical buttons. The rubric now asks for at most three changes a
  visitor would notice or that fix something broken, and says none is fine.
- With the keyboard open the box being typed into sat half behind it; it
  scrolls into view once the keyboard has settled.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Yw4cCwXWRP2S5Hj62u2Z

* feat: the first day is the whole product — your website in onboarding, Loki on it, help doors when a build stalls, the terminal hand-off with its text, a launcher that stays in the corner

From the owner's phone on 2026-10-09, and the three follow-ups named then:

- Onboarding asks for the website (optional). A project created with one
  (`liveUrl` on POST /api/user-projects) gets its widget token at once, so
  the token's origin is the site's; the new step "Put Loki on your site"
  shows the one line to paste, lets an agent add it when there is a repo,
  and opens the site with the owner pass (`openSiteUrl` on the token
  route). Finishing lands on the project, not Control. A refused project
  no longer advances the step in silence.
- A stalled build and a failed kickoff offer the other two ways to get it
  built — find a partner, hire the studio — from the same list as the
  landing page (GetHelpLine), the studio with the brief.
- "Continue in Loki → Terminal" carries the thread: /terminal?q= prefills
  the rail's composer as an unsent draft, and opens the rail sheet on a
  phone (the same path ?explain=1 takes).
- The launcher stays in the corner: a near slot over plain text beats a
  free slot mid-page (heidi.orangecat.ch: the site's own bar took one
  corner and the launcher floated beside a heading). A near sheet still
  sends it climbing.
- Page checks: a small-caps label by design is not a defect, 11.84px is
  not under 12, and one kind of finding is one card (the signature drops
  counts and examples; "30 pieces" then "6 pieces" were two cards).

Tests: onboarding-site-step.ts (new), widget-placement.ts, widget-watch.ts,
widget-continue.ts, build-paths.ts; all widget browser suites pass locally.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Yw4cCwXWRP2S5Hj62u2Z

* refactor(widget): keepInViewOnFocus lives in dom.ts — createConversation back under the 510-line cap after the merge

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Yw4cCwXWRP2S5Hj62u2Z

* fix(widget): import keepInViewOnFocus — the panel threw at mount and boot swallowed it

An unimported identifier compiles fine with esbuild and fails at run time;
boot's catch hid it, so the launcher rendered and the panel never opened.
Caught by widget-embed-browser.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Yw4cCwXWRP2S5Hj62u2Z

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-09 05:10:30 -07:00
CatoandClaude Opus 5.5 be5752994c feat(widget): one integrated panel — watch says what it sees, in Loki's own spiral (#1111)
* feat(widget): watch says what it sees, in Loki's own spiral

From the owner's phone on heidi.orangecat.ch (2026-10-09): "It's not clear
what it thinks when it watches", and the logo is barely used.

- What Loki sees: one row under the panel header ("Watching · 2 pages,
  1 tap · nothing wrong so far") that opens into the trail worded as notes
  — pages opened, taps, what the page sent, what it noticed. Each settled
  page now records a `look` step even when clean, so "looked, all fine"
  is visible instead of silent. widget/thoughts.ts (pure) +
  thoughts-view.ts.
- The status light is the logo's spiral, generated from
  src/config/brand-mark.ts into widget/brand-mark.generated.ts (the widget
  may not import src/). It turns slowly while watching, spins while Loki
  thinks (header and the pending answer), and goes still and grey when
  paused — in the launcher, the panel header and the walkthrough card.
- Loki's answers render paragraphs, bullets, headings and bold
  (widget/rich-text.ts) from text nodes — "* The headline …" no longer
  shows its asterisks.
- Tests: widget-thoughts, widget-rich-text, widget-brand-mark (drift);
  watch/embed/host-avoid browser suites pass locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011L2dmcydDLYAiNQwK4XcF4

* feat(widget): one surface, not a stack of boxes and buttons

"No Frankenstein elements. Integrated experience. Not a bunch of big
unaligned buttons" (owner, 2026-10-09). The panel had grown one bordered
control at a time; this is a layout pass over all of it, with one rule:
at most one filled accent button per region, every other action is
quiet text aligned in its row.

- Header: who and where, and ✕. Review and Stop watching are gone from
  it — Review is the conversation's first suggestion, and watching is
  shown AND paused from the notes row (Pause / Resume), status and its
  control together. A visitor keeps one quiet "Watch".
- Notes and Your changes are hairline strips, not nested cards.
- Thread: Loki's words are prose on the panel; yours are a pill.
  Noticed/sent remarks carry a left rule instead of a box.
- Suggested changes: a hairline list, "Build this →" as accent text at
  each row's end (was five filled buttons down the right edge). "Fix
  this →" and "Why does it matter?" sit on one baseline.
- Composer: ONE card — About tabs (underlined when chosen), the words,
  screenshots, then tools left and Build it / Ask Loki right, compact.
- Starters and links share one pill style; buttons are compact; the
  ghost button has no frame.
- Tests follow the moved controls (watch-browser: Review via the
  starter, Pause/Resume via the notes row; theme test checks the new
  rules). watch/embed/host-avoid browser suites pass locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011L2dmcydDLYAiNQwK4XcF4

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-09 04:49:19 -07:00