mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-06 10:19:09 +01:00
feat/shared-knowledge-map
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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>
|
||
|
|
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 (
|
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
2105d3e358 |
fix(widget): the launcher finds a free slot on every host page, with a host contract for the rest (#918)
The launcher knew its corner, an offset, a global data-fc-bottom and one foreign fixed launcher. Everything else it could miss: any layer wider than 90% of the viewport was ignored, so on substrata /atlas at 390px it parked on the country bottom sheet; and it re-measured only on load, resize, window scroll and URL change, so a sheet mounted later was never seen. One engine now, for every width and obstacle: - placement.slotOrder: preferred corner up its near band, the mirrored corner, then the rest of each edge (pure, unit-tested). - host-scan: hit-tests each slot (launcher + 12px gap) with elementsFromPoint and judges free / surface / layer / blocked. Controls (incl. [tabindex], iframes, cursor:pointer) block; fixed/sticky bars and inner scroll panels are layers; a control >=25% of the viewport (a pannable map) is a surface. - placement.chooseSlot: first free, else least-bad, else HIDE - never sit on a control. - Re-measures on DOM mutation (throttled 1/s) and on inner-panel scroll. - Host contract: data-fc-avoid (never overlap), data-fc-place= left|right|hidden on <html> or a page region. Documented in widget/README.md. Also fixes a latent bug the browser test caught: clearing inline edges to "" let the shadow stylesheet's right:16px survive a move to a LEFT corner, so "Move to other corner" stretched the launcher across the page. Tests: widget-placement.ts (pure) and widget-host-avoid-browser.ts (real Chromium, 9 fixtures). Against the pre-fix bundle 7 assertions fail; each new rule (layer, surface) fails its fixture when mutated out. CI installs chromium-headless-shell so the browser test runs rather than skips. Signed-off-by: Cato <41178744+catomean@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
9b893bbe61 |
fix(widget): never sit on the host page's own controls at desktop width (#882)
The interactive-control hit-test only ran at <=480px. On OrangeCat /messages the launcher stepped over the Cat FAB (a fixed element, correctly avoided) and landed exactly on the composer's Send button: clicking Send opened the feedback panel and no message went out, from Sep 6 until now. - stepOffControls: pure, bounded, tested; runs at every viewport width. - Re-run placement after client-side navigation (URL poll), since SPA route changes emit neither load nor resize. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
1260cab156 |
fix(widget): auto-avoid did nothing in production — DOMRect does not spread (#467)
Shipped in #466, verified green by 38 assertions, and completely inert on a real page. Found by probing the deployed bundle rather than trusting the suite. avoidOffsetY cloned its input with `{...own}`. At runtime `own` is a DOMRect from getBoundingClientRect(), and DOMRect exposes left/top/right/ bottom as GETTERS ON THE PROTOTYPE, not own enumerable properties. So the spread produced `{}`; every comparison became `undefined < number`, which is false; and the function concluded, silently and without error, that nothing was ever in the way. The launcher stayed at bottom:16 on top of whatever it was covering. Every existing assertion passed because their fixtures are object literals, and those spread perfectly. The suite could not have caught this — it was testing a shape the browser never produces. Fixed by reading the four fields explicitly (toRect) at every boundary rather than relying on the source object's shape: in avoidOffsetY, in the loop's box arithmetic, and in probeCorner. The regression test builds its fixture with Object.create over prototype getters and NO own properties — the actual DOMRect shape. A class with fields would not have reproduced it, since TypeScript compiles those to own properties and the spread survives. Proven by mutation: restoring the spread turns exactly that one assertion red. Diagnosis path, since it was not obvious: reposition() WAS running (it reset a vandalised inline style), probeCorner's filters all passed when replicated by hand in the page, no exception was thrown, and boot served autoAvoid:true. The only remaining suspect was the data crossing between them. Also: w-25 on the position preview was the only use of that utility in the repo; w-24 is on the conventional scale. Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> |
||
|
|
7449bb7093 |
feat(widget): stop the launcher covering other people's buttons (#466)
Every mainstream chat/support widget — Intercom, Crisp, Tawk, Drift, and
most in-house AI assistants — defaults to the bottom-right corner. So did
ours, with a z-index near the 32-bit maximum, so on any site running both
we won and hid THEIR control. Reported on kivvi; it is structural, not
specific to that site.
The only escape was `data-fc-bottom` on the script tag, which means
editing the customer's HTML: not one click, and impossible on a site we
do not deploy.
Three layers now, because none is sufficient alone:
1. AUTO-AVOID, any viewport. The launcher measures its corner and steps
up past foreign fixed/sticky elements, re-checking on resize and at
800ms/2.5s to catch chat scripts that boot late. Matching is by
rectangle, so it works against a vendor we have never heard of.
Replaces a dodge() that only ran at ≤480px and RESET to the base
offset above it — which is exactly why desktop collisions survived.
Full-width bars are skipped (stepping over a cookie banner just lands
on the next one) and a shift larger than MAX_AVOID_SHIFT is abandoned
rather than chasing the launcher off-screen.
2. REMOTE PLACEMENT. Corner + nudge + an auto-avoid switch live on the
token and are served by /api/widget-boot, so moving a launcher on a
live customer site is a dashboard action that lands within the boot
cache window. The snippet stays a pointer — the same design idea as
the pause switch. Placement rides along with the render verdict, so
there is no window where the launcher paints in one corner and jumps.
3. VISITOR ESCAPE HATCH. Long-press (touch) or right-click (pointer) on
the launcher offers move / hide / reset, kept in localStorage per
token. For the case the other two missed, decided by the one person it
is actually blocking. The operator's kill switch still outranks it.
Also fixes a real bug found while reading the ingest path: PAUSE DID NOT
PAUSE. The boot call stopped the widget rendering, but the token is
public and sits in the customer's page source, so a paused project kept
accepting POSTs from anyone holding a copy — and the operator, seeing no
widget on the site, had no reason to suspect it. Ingest now rejects a
non-active token.
Operator surface, per the two places it is actually needed:
• project page: a position picker with a live preview box, because
"bottom-left, 16, 16" is not something anyone can picture
• Control inbox: Pause/Resume directly on the widget row, so the list
that told you it was off is where you turn it back on
38 assertions cover the geometry, including that the widget's normalizer
and the server's agree — the logic exists twice because widget/ cannot
import from src/, and drift there would make the dashboard preview lie
about where the launcher lands. One of those assertions caught a real
defect: after clearing one obstacle the launcher landed exactly flush
against the next, so the avoid test now runs against a gap-inflated box.
Migration 0062 adds a nullable placement column; NULL means the default.
Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
|