* chore(chatkit): 0.14.2 — the broken-word audit runs in audit:responsive and the widget test
chatkit 0.14.2 exports `@bitbaum/chatkit/audit`: `findBrokenWords(root)` and
`BROKEN_WORDS_SOURCE`, every word drawn across two lines (words beside
- / . @ : _ and over 24 characters exempt). "Di / re / ct / or / y" is five
syllables nobody wrote, and reading the CSS never finds it — only laying the
words out does.
- `pnpm run audit:responsive` now fails a page/viewport on a cut word, listing
the page, the width and every word (the list names the cause: one word is a
narrow cell, all of them a `break-all` on an ancestor). Same retry path as
the overflow measure.
- scripts/test/widget-host-avoid-browser.ts serves the chat chunk
(public/widget-chat.js, built as build:widget builds it) from the mocked
origin, opens the panel with data-fc-chat="kit" at 390 and runs the same
measure on the panel. Mutation-proven: `word-break: break-all` on the panel
fails it with the greeting, starters and mode labels listed.
- No cut word found: the widget panel at 390, and / /sign-in /change /build
/fleet /pricing /sign-up /u/cato /docs/feedback-widget and two more public
pages at 320/390/768/1440 on the live site all pass.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE
* chore(chatkit): 0.15.0, and a variable read with its fallback has a default
chatkit 0.15.0 is additive over 0.14.2. Its stylesheet reads
var(--ck-n, 1), a per-element variable with the fallback at the point of
use, which widget-chat-css's "every other variable has chatkit's own
default" check counted as unset. It now counts a fallback as a default; the
colour check (every colour from the widget theme) is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE
---------
Co-authored-by: Claude <noreply@anthropic.com>
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>
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>
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>
* feat(terminal): the feedback tool on the Terminal page — no floating button over the PTY
From the operator, on a phone: "I don't see the button that allows me to
give feedback on elements and on the site" on the Terminal (loki#1037).
/terminal was excluded from the widget because a floating button over live
terminal output covers what you are reading — and nothing replaced it, so
the page used most on a phone had no way to report anything.
- /terminal is no longer excluded (config/feedback-widget.ts). The page
carries data-fc-place="hidden", so the widget loads with no launcher.
- A Feedback button in the terminal header opens the panel (report a
problem, point at an element, attach a screenshot) via Loki.report().
- lib/open-feedback: one helper for opening the panel from a control,
shared with the account menu's "Report a problem". It now checks
Loki.ready — the widget publishes a report() stub even when it will
never render, so a bare "is a function" check could click into nothing;
not ready → /support.
- Tests: feedback-widget-reach asserts the new contract; the widget's
browser test gains the Terminal fixture — hidden launcher, report()
opens the panel, closing it keeps the launcher hidden.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(phone-chrome): Report a problem opens through lib/open-feedback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Loki's own sign-in page at 390px: every slot on the bottom band is a
button, and the first slot up the edge that held no control was the
"or sign in" divider. The scan rated in-flow text as free, so the
launcher parked on the words (seen in a prod screenshot, 2026-09-29).
A new verdict, `text`, sits between free and surface: caret hit-testing
finds a non-blank text node whose own line box contains the probe point
(so the margin beside a paragraph is still free). The launcher prefers
an empty slot, still takes words over any control, and steps out of
hit-testing for the scan so it does not measure itself. README table
updated; a sign-in fixture in the browser test fails on the previous
bundle (launcher on the line) and passes now.
Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3
Co-authored-by: Claude <noreply@anthropic.com>
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>