57 Commits
Author SHA1 Message Date
CatoandClaude 5930ec6425 Messenger: export MessengerComposerAction (0.31.2) (#92)
* feat(messenger): replies, reactions, and things of value in a conversation (0.31.0)

Reply to any message (the answer carries one line of the original, which
leads back to it); emoji reactions, one per person, shown at once; cards for
value in a thread (a payment request, money sent, a gift), written by the app
for this reader and drawn in one shape; the app's own actions in the box's
"+", with one "how much?" sheet for those that need an amount.

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

* feat(messenger): an action's amount sheet takes the app's note length

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

* feat(messenger): an action's amount sheet takes the app's note length

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

* chore(release): 0.31.1

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

* fix(messenger): export MessengerComposerAction

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

* fix(messenger): export MessengerComposerAction (0.31.2)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 10:34:39 +01:00
CatoandClaude bc078bfcd5 feat(messenger): replies, reactions, and things of value in a conversation (0.31.0) (#90)
Reply to any message (the answer carries one line of the original, which
leads back to it); emoji reactions, one per person, shown at once; cards for
value in a thread (a payment request, money sent, a gift), written by the app
for this reader and drawn in one shape; the app's own actions in the box's
"+", with one "how much?" sheet for those that need an amount.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 10:03:10 +01:00
CatoandClaude 8452fb12ab VoiceMode: talking with a chat, and a microphone that cannot be opened twice (0.30.0) (#89)
Cat Bot has to be a complete equivalent of Grok Bot, which has a voice mode.
The chat could take dictation and read an answer aloud, but not hold a
spoken conversation.

- VoiceMode (the screen), useVoiceMode (the loop), voiceModeReducer (the
  rules, pure): listening -> thinking -> speaking -> listening. One big
  button ends the person's turn (a pause ends it by itself where the
  browser's recogniser runs) and cuts in while the answer is read. The app
  passes onTurn(text) => Promise<answer> and, if it has one, a studio
  speaker.
- The microphone and the voice follow the phase and nothing else
  (voiceModeWants): never both open, neither open when the call is off. Two
  empty takes, a failed transcription or an answer that never comes each end
  the call in words, with "Talk again".
- Fix, useDictation: a second start() before the browser had handed the
  microphone over opened a second microphone and orphaned the first, whose
  track stayed live with nothing left to stop it. One request at a time now,
  and a take cancelled while the microphone was still opening closes it
  where it arrives. Found by this change's browser test.
- Its styles are their own section and styles/voice.css, so the embedded
  chat sheet stays inside its 11 KB budget.

test/voice-mode.test.js (8) and test/browser-voice.mjs (a real browser, a
fake-device microphone, every opened track counted). pnpm run verify passes.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 08:18:12 +01:00
CatoandClaude e690b2254a Messenger: people talking to people, and to the agents among them (0.29.0) (#82)
* Messenger: people talking to people, and to the agents among them (0.26.0)

OrangeCat's direct messages were built in the app, so what was wrong with
them could not be fixed for the next product: an agent's answer in a
conversation between two people looked like the other person's, nothing
said an agent was taking part, top bar and a two-row box took half a
phone, and nothing could be attached. This is the messenger as a package.

@bitbaum/chatkit/messenger: Messenger (the whole screen) and its parts
useMessenger, ConversationList, MessageThread, MessageAttachments. The app
implements MessengerTransport; the package has no database, websocket or
storage. styles/messenger.css is the embedded sheet plus the Messenger's
section, without ChatApp.

- An agent is told from a person by the shape of its face, an Agent mark
  with whom it answered for, and an outlined bubble; the top bar says it
  is in the conversation; naming it shows that it is thinking, and says
  so if it never answers.
- Files: Camera, Photos, Videos, Files, checked against the attachment
  policy before an upload starts, photos shrunk in the browser, progress
  and Try again per file, a full-screen viewer, a film drawn as its still.
- The thread: runs, day lines, a New line, ticks from readState, a failed
  message kept with Try again, earlier messages loaded above with the
  reader's place kept, one bubble per message however often it arrives.
- Composer: layout="inline", attachmentsAlone, attach.take, attach.accept,
  a "videos" source, files dropped onto the box. Defaults unchanged.

The state is one pure function (messengerReducer), tested in Node.
test/browser-messenger.mjs drives demo/messenger.html at 390px, 320px
dark and 1280px. It found two defects before any product did: a read mark
that cleared the badge without telling the server, and a page of history
that pulled the reader to the end of the thread.

threadkit 0.1.2 (attachment policy, mention matcher, readState) is merged
and tagged but not on npm, so those rules are carried word for word in
src/thread-rules.ts with threadkit's own tests; the file says when it goes.

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

* test(messenger): wait for the opened conversation before reading its thread

Side by side, the conversation that was open can still be on screen with a
"New" line of its own, so the check read the old thread on a slow runner.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 16:26:03 +01:00
CatoandClaude ea5963c80e fix(field): a dictated take or a rewrite never passes the field's maxLength (0.28.1) (#87)
* feat(field): DictationField in a form — name, error, submit keys, field-level focus (0.27.0)

Loki's 36 hand-made text areas could not become DictationField because a
form needs props the field did not pass through (measured: onKeyDown 10,
maxLength 9, id 7, autoFocus 7, disabled 5, onBlur 2, onFocus 1, name 2,
spellCheck 1, plus validation errors on the field).

- name, autoFocus, readOnly (no mic, no Improve, no Undo)
- invalid / error: aria-invalid, the frame in --ck-danger, the error under
  the field as role=alert, error and hint linked with aria-describedby
- onKeyDown, and onSubmit owned by the package: Cmd/Ctrl+Enter in a text
  area, Enter in one line; never while composing, disabled, read-only or
  during a take
- onFocus / onBlur for the whole field: the mic is not a blur, and a blur
  during a take is held until its words reach onValueChange
- inputProps for spellCheck, autoComplete, inputMode, aria-*, data-*;
  managed props win
- Enter in Improve's instruction box applies it

Tests: server markup in render.test.js; a Strict Mode form fixture in
browser-field.mjs at 390px and desktop, light and dark, and 320px with an
error shown. Version 0.27.0 (0.26.0 is already on npm).

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

* fix(field): Improve at work is not a blur; Enter never sends the native form mid-take

Review findings on the 0.27.0 DictationField form props:
- Improve disables its own box and button while it works, so focus fell off
  with nowhere to go and the field reported a blur. Improve at work now
  counts as busy, like a take.
- With onSubmit, Enter in a one-line field (Shift+Enter, during a take,
  read-only) no longer runs the browser's implicit form post.
- error="" or 0 is no error: no danger frame, no aria-invalid with nothing said.
- inputProps.style no longer reaches the box (16px text is the package's).
- The form fixture loads a development bundle, so Strict Mode is exercised.
- README and CHANGELOG: a held blur is not reported if the host unmounts
  the field; the hint's aria-describedby is the one markup change.

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

* fix(field): a dictated take or a rewrite never passes the field's maxLength

The attribute stops typing and pasting at the limit and nothing else: text
the field sets itself went straight past it, and the form then refused or
cut what the person had said. Found reviewing Loki's converted fields, which
set 300 and 1000.

clipToMaxLength cuts at the limit, back to a whole word when one is within
24 characters, and is exported. Unit test in core.test.js.

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

* release 0.27.1: dictation and Improve respect a field's maxLength

The fix was pushed after #85 had merged, so 0.27.0 went out without it.
It gets its own patch release and changelog entry.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 11:15:16 +01:00
CatoandClaude b53f8e615a fix(thread): following never scrolls the page up, and --ck-follow-gap (#88)
On bitbaum /hire/ at 390x844 the contact box (a ChatThread, a receipt link
and the Composer) sits mid-page and the document owns the scroll. The
reader's first message pinned the end of the thread to the bottom of the
viewport, which scrolled the page UP by about 300px and pushed the composer
they were typing in below the fold.

What a consumer gets:
- When the document owns the scroll, following only moves the page down:
  with the end of the thread already on screen, nothing moves. A thread or
  panel that scrolls itself is unchanged, and the jump button still goes to
  the latest turn in either direction, because the reader asked.
- --ck-follow-gap (a length, default 0) on the thread's wrapper or any
  ancestor leaves that much room under the latest turn when the page
  follows, so a composer under the thread stays in view. The browser
  resolves it (rem, em, px, calc); unset, negative or invalid is 0.
- While the reader has sent nothing on a page, nothing moves, as before.

How it is checked: test/browser-scroll.mjs gains a mid-page fixture
(demo/scroll.html?owner=page&greeting&below) at 390 and 1280px. With the
composer mid-screen the first message does not scroll the page up and the
composer stays on screen; as the thread grows past the foot of the screen
the page follows and leaves the end at 0px, 10rem, 6em, 90px and (invalid)
0px above the bottom of the viewport, within 2px. Both checks fail on the
previous code; every existing scroll case passes unchanged.

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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 10:30:35 +01:00
CatoandClaude 53b889531a feat(comments): a refused comment says why (CommentRefused, 0.26.0) (#83)
CommentThread always said "The comment could not be posted... try again"
whatever the server answered, so a comment that was too short or over a
rate limit was retried forever (seen on Substrata, 2026-11-12).

A transport may throw new CommentRefused(words) from post or remove; the
thread shows those words. Any other error still shows postFailed /
removeFailed, so a raw error or a server's English never reaches a reader
by accident (the ChatTurnError rule). commentFailure(error, fallback) is
exported for apps that build their own box.

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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 10:20:28 +01:00
CatoandClaude c33ffa32b3 fix(composer): a visible border while the composer has keyboard focus (#86)
The composer's text area drops its outline, and the only sign of focus
was a 1px border stepping from 90% to 82% grey: 1.5:1 against the
composer in light, 1.35:1 in dark, and no change at all in ChatScreen's
floating composer (measured on bitbaum.orangecat.ch, 2026-11-12).

While the composer holds focus its border now takes --ck-focus, a new
overridable variable that defaults to the secondary ink (--ck-fg-2):
5.7:1 in light and 7.0:1 in dark with the design tokens, in every
composer shape including ChatScreen's dock. Still a 1px border with no
ring, so the box keeps its quiet look and its size. An app can set
--ck-focus to its own colour.

test/browser.mjs tabs to the composer on the demo and the full screen
at 390 and 1280px, light and dark, and checks that the border changes,
that it contrasts at least 3:1 with the composer's own background
(computed in the page), and that the composer measures the same focused
and unfocused. The contrast and dock checks fail without this change.

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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 10:00:18 +01:00
CatoandClaude 3a3384c5b8 feat(field): DictationField can stand in for a form's text area (0.27.0) (#85)
* feat(field): DictationField in a form — name, error, submit keys, field-level focus (0.27.0)

Loki's 36 hand-made text areas could not become DictationField because a
form needs props the field did not pass through (measured: onKeyDown 10,
maxLength 9, id 7, autoFocus 7, disabled 5, onBlur 2, onFocus 1, name 2,
spellCheck 1, plus validation errors on the field).

- name, autoFocus, readOnly (no mic, no Improve, no Undo)
- invalid / error: aria-invalid, the frame in --ck-danger, the error under
  the field as role=alert, error and hint linked with aria-describedby
- onKeyDown, and onSubmit owned by the package: Cmd/Ctrl+Enter in a text
  area, Enter in one line; never while composing, disabled, read-only or
  during a take
- onFocus / onBlur for the whole field: the mic is not a blur, and a blur
  during a take is held until its words reach onValueChange
- inputProps for spellCheck, autoComplete, inputMode, aria-*, data-*;
  managed props win
- Enter in Improve's instruction box applies it

Tests: server markup in render.test.js; a Strict Mode form fixture in
browser-field.mjs at 390px and desktop, light and dark, and 320px with an
error shown. Version 0.27.0 (0.26.0 is already on npm).

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

* fix(field): Improve at work is not a blur; Enter never sends the native form mid-take

Review findings on the 0.27.0 DictationField form props:
- Improve disables its own box and button while it works, so focus fell off
  with nowhere to go and the field reported a blur. Improve at work now
  counts as busy, like a take.
- With onSubmit, Enter in a one-line field (Shift+Enter, during a take,
  read-only) no longer runs the browser's implicit form post.
- error="" or 0 is no error: no danger frame, no aria-invalid with nothing said.
- inputProps.style no longer reaches the box (16px text is the package's).
- The form fixture loads a development bundle, so Strict Mode is exercised.
- README and CHANGELOG: a held blur is not reported if the host unmounts
  the field; the hint's aria-describedby is the one markup change.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 08:58:49 +01:00
CatoandClaude 29db16250a fix(thread): a greeting on a page no longer takes the page (#84)
A ChatThread holding one greeting, at the foot of a long page, has no
scroll of its own, so the document owned the scroll and useStickToBottom
pinned the document to the thread's end on mount. bitbaum.orangecat.ch
/hire/ and /builders/ opened on the contact box, past the headline and
the prices.

While the document owns the scroll and the reader has sent nothing, the
thread does not move the page and shows no jump button. The reader's
first message starts the following, as before; a conversation that
already holds a turn from the reader still opens at its latest turn.

test/browser-scroll.mjs covers it on a new fixture
(demo/scroll.html?owner=page&greeting) at 390 and 1280px and fails on
0.25.0.

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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 08:47:23 +01:00
CatoandClaude f6c26f054c fix(dictation): no microphone on a page whose policy refuses one (#81)
A host that sends Permissions-Policy: microphone=() (the fleet's starter
template, and orangecat.ch for a while) made every take fail with
'blocked', which the person cannot fix, while every Composer and
DictationField still drew the mic. useDictation's supported is now false
when the page's policy refuses the microphone; microphoneAllowedByPolicy is
exported for apps that draw their own. A browser without the policy API
behaves as before. Found by the package audit of 2026-11-12; Loki's widget
hand-rolled the same check.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 08:02:41 +01:00
CatoandClaude ab1708b1bd Agents are members: an Agent mark and whom it works for (#80)
ChatSpeaker gains kind (agent | person) and onBehalfOf, drawn as
'Loki [Agent] · for Georgy' in the thread and on the streaming turn.
Labels translatable and optional; existing apps unchanged.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-11 13:07:05 +01:00
Cato a9dca01b11 feat(attach): sources option, so a text-only app offers no Camera or Photos and refuses pasted pictures (#79)
Claude-Session: https://claude.ai/code/session_019MDtmvGASoUtc3fejF7Lsy
2026-11-10 12:07:53 +01:00
Cato 35d5dc73ae fix(dictation): localized signIn/busy problems from the HTTP status; never show a server's sentence by default (#78)
Claude-Session: https://claude.ai/code/session_019MDtmvGASoUtc3fejF7Lsy
2026-11-10 11:42:19 +01:00
CatoandClaude 6451d3b9d0 feat(react): DictationField and CommentThread — any text box has the microphone (#73)
The owner's finding, 2026-11-06: every product installs the shared packages
and the text boxes people type in are still made by hand, with no microphone;
two comment systems were written in one week. This gives the two remaining
shapes of "a person types words" a component, so there is nothing to build
locally.

- DictationField: a labelled text area (or one line) with the composer's
  microphone — Web Speech, the recording fallback, the take with its timer,
  kept for a retry — appending to what is there; 16px, 44px targets.
  Optional improve={{ run, suggestions }}: one tap or say/type what to change;
  working, failure and Undo in words, the text untouched on failure. No model
  call or prompt here; run is the app's.
- CommentThread: oldest first, the box is Composer, a transport the app
  implements (post, optional remove), optimistic removal rolled back with a
  message, a refused post keeps the draft, text not markup, a sign-in link
  for a signed-out reader, times in a stated timeZone.
- VoiceBar/VoiceProblem are one implementation shared by Composer and the
  field; Composer behaves as before.
- Styles after the ChatApp boundary: the embedded sheet keeps its budget.
- test/browser-field.mjs + fixture page; render tests; README; 0.23.0.

verify: format, lint, typecheck, build, 142 unit tests, and all five browser
suites (the four existing ones unchanged) pass.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-06 09:22:19 +01:00
CatoandClaude Opus 5.5 01253d8a23 fix(scroll): back at the bottom by hand, the jump button goes; chips answer the question (0.22.1) (#62)
* fix(scroll): back at the bottom by hand, the jump button goes (0.22.1)

A finger rocks back a pixel or two as it lifts; that last touchmove read
as scrolling up and paused following at the bottom, so the jump button
stayed over the reply chips with nowhere to jump to (OrangeCat's
Diplodoctor chat on Android, 2026-11-01). A touch that ends at the very
bottom, or a downward scroll that arrives there, resumes following.

Browser test on ChatScreen at 390px with real touch: fails on 0.22.0,
passes now; a real tap on the button still lands at the latest message.

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

* feat(replies): when an answer ends on a question, the chips answer it

Under four questions about a sore finger, Diplodoctor's chips were "I have
more info" and "Consult a doctor": a tap answered nothing. On its live
model, 2 of 9 chip sets answered the question; 7 of 9 with this sentence.
In REPLIES_INSTRUCTION, every fleet chat gets it.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 21:09:02 +01:00
CatoandClaude 2acd94e60c feat(dictation): with a server leg, the mic records until you press done (#60)
With `transcribe`/`transcribeUrl` and no `prefer`, a press used to start on
the browser recogniser, which on Android ends the take at the first pause
whatever `continuous` says. OrangeCat's bot chats passed no `prefer`, so a
person speaking to Causius was cut off after one or two seconds while the
Cat's composer in the same app (`prefer: "server"`) listened to the end.

- New default: server first whenever there is a server leg; browser first
  only without one, or with an explicit `prefer: "browser"`.
- `dictationLeg()` is the rule, pure and tested; `start()` uses it.
- Browser test: the take outlasts a 5.5 s pause; the Android recogniser test
  asks for the browser leg through the demo's `?prefer=browser`.
- browser-scroll.mjs: read the file before writing the head, so a 404 no
  longer crashes the run with "headers already sent" (failed on main too).
- 0.22.0.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 07:09:30 +01:00
CatoandClaude Fable 5.1 5cf792198b fix(sheet): a sheet taller than the screen stays on it and scrolls (0.21.5) (#58)
* fix(replies): a bare reply array with no fence is still the replies

extractReplies took the replies only from the fenced block the
instruction asks for. A model that forgets the fence and ends its answer
on the bare JSON array (Causius in OrangeCat\x27s companions home,
2026-10-30) showed that array as text in the bubble. A complete array of
two to six short strings as the last paragraph is now read as the
replies and taken out, once the answer is complete; while streaming it is
left alone, and an array inside an answer is never touched. 0.21.3.

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

* fix(sheet): a sheet taller than the screen stays on it and scrolls

Sheet had no height cap (the native dialog cap is overridden so a bottom
sheet can reach the edge), so a panel taller than the viewport grew past
the top of the screen: OrangeCat's New bot sheet, a shelf of five bots over
the name, shape and colour form, opened with its title, close button and
first row cut off on a phone and on a 900px desktop (2026-10-31).

The dialog and its panel are capped at the viewport and the panel scrolls,
head in view, page behind it still. The browser test makes a sheet 3,000px
tall and measures it. 0.21.5.

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

* chore(styles): regenerate the embedded chat stylesheet for 0.21.5

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 20:01:34 +01:00
CatoandClaude 3cfe0bdadd fix(markdown): any product's source handle is a chip, [L1] and [W12] as [F1] (#57)
Citation handles were read only as [F1] and [D1], so Solon's law answers
([L1]) and Substrata's web sources ([W12]) showed the bare handle with no chip,
link or sources row. A handle is now one or two capital letters and a number,
the pattern speakableText already used. With no citation map the answer is
not grounded and [A1] is shown as written; in a grounded answer an unknown
handle is still dropped. 0.21.4.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 15:04:54 +01:00
CatoandClaude 9f578f17bd fix(replies): a bare reply array with no fence is still the replies (#56)
extractReplies took the replies only from the fenced block the
instruction asks for. A model that forgets the fence and ends its answer
on the bare JSON array (Causius in OrangeCat\x27s companions home,
2026-10-30) showed that array as text in the bubble. A complete array of
two to six short strings as the last paragraph is now read as the
replies and taken out, once the answer is complete; while streaming it is
left alone, and an array inside an answer is never touched. 0.21.3.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 11:20:11 +01:00
Cato 0ea37b13d9 feat(styles): add a compact stylesheet for embedded chats (#54) 2026-10-28 11:12:41 +01:00
Cato d67555246e fix(screen): the footnote is a div, so a panel or form in it does not break hydration (#49)
ChatScreen wrapped the footnote in a <p>. Substrata puts a key panel, a paragraph and a form in it; browsers close the <p> while parsing the server HTML, React hydrates a different tree and throws error #418 on /chat. Reproduced in a Substrata dev build (In HTML, <p> cannot be a descendant of <p>) and confirmed gone with a div. Class and styles unchanged.
2026-10-27 23:30:47 +01:00
CatoandClaude dd4e295d70 feat(attach): readFile — the app's own reading of a picked file, so a PDF reaches the box (#48)
The composer and ChatApp read images and text and refuse every other file, so
an app that reads PDFs (@bitbaum/chatkit/pdf) could not use the paperclip,
paste, drop or ChatAppHandle.send for them without a bridge. attach.readFile
(file, { limits, notes, images, room, progress }) returns the attachments to
stage (one file may become several), a note, or undefined to leave the file to
chatkit. Files are now read one at a time so images/room count the file
before. readAttachmentFiles is the same for code outside the box.

Found moving OrangeCat's Cat onto ChatApp: its PDF reading (live since
2026-10-27) had no place to plug in.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 22:04:36 +01:00
CatoandClaude e69585230c fix(attach): Files asks for documents, so Brave on Android opens the file browser (#47)
An empty `accept` means "anything", and Brave on Android answered the Files
input with Camera, Camera, Recorder and "Photos & Videos" — no file browser,
so a PDF could not be picked at all (OrangeCat, 2026-10-27, from a phone).
Files now asks for PDF and text only (FILES_ACCEPT, one "document" family),
which takes every capture app off the table; the type is still decided
after the pick. Release 0.20.1.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 21:33:43 +01:00
CatoandClaude Opus 5.5 58cb5c691f feat(pdf): read a PDF someone attaches, as text or as pictures of its pages (0.20.0) (#46)
* feat(pdf): read a PDF someone attaches, as text or as pictures of its pages

No model on a free chain reads a PDF file, so a PDF never leaves the device
as one. @bitbaum/chatkit/pdf reads it in the browser with pdf.js:

- a PDF with a text layer comes back as text, page markers kept;
- one without (slides exported as pictures, a scan) comes back as its pages,
  four to a sheet at 784px a page, for a model that can see.

chatkit-copy-pdf-assets copies pdf.js's worker and decoders into the app's
static folder; readPdf takes their URL. Without the decoders, JPEG 2000
pages (macOS's "reduce file size" export) draw blank. The legacy build is
used so older iPhones read PDFs too; pdf.js loads only on the first PDF.

Found on OrangeCat 2026-10-27: a 17-slide investor deck (no text layer,
JPEG 2000 images) could not be shared with the Cat at all. Checked in
Chromium against that deck: 5 sheets, every slide legible.

Release 0.20.0.

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

* docs(pdf): describe the app's static folder without naming it as a chatkit path; chain the copy into build (pnpm skips prebuild)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 17:00:54 +01:00
CatoandClaude d8fe1df86f feat(app): send handle, per-turn failures and the slots ChatApp adopters asked for (#45)
The first four products to move onto ChatApp (heidi#226, orangecat#1447,
solon#309, substrata#262) each listed what it could not do and wrote a
workaround. This closes those gaps, additively:

- ChatApp ref (ChatAppHandle: send, fill, focus, newChat, openConversation),
  initialMessage (once, StrictMode-safe) and deepLinkParam (fills, never
  sends unless deepLinkAutoSend)
- Retry re-sends the failed turn's pictures
- ChatTurnError: the failure reason travels with its own turn
- stopKeepsPartial, per ChatApp and per turn
- starters with lang, historySlot/historyEmpty, attachExtras rows in the
  attach sheet, chips on the sent message (chipsFor), onTemporaryEnd with
  turn.chatId, renderFooter(m, { isLatest, index, send, fill }), thread.after
- the live Stop button is a 44px target


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 12:33:31 +01:00
Cato f7d72b9e1d fix: tolerate absent document scroll roots (#44) 2026-10-27 12:17:36 +01:00
CatoandClaude Opus 5.5 652e04a149 feat(app): ChatApp — the whole chat app every product shares (#43)
* docs: the fleet's chats side by side

Every product renders chatkit's Composer, most render ChatScreen and
ChatThread, but the app around them — chat list, New chat, Temporary chat,
titles, rename/delete, restore on reload, the queue, attachment defaults —
is written again in each product. One table, read from each repo's main
on 2026-10-27, with the file each cell comes from.

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

* feat(app): ChatApp, the whole chat app every product shares

The pieces were shared; the app was not. ChatApp composes ChatScreen,
Composer and ChatThread and owns what each product re-implemented:

- the header (Chats · title · New chat · More with Temporary chat, Share,
  Rename, Delete) as frosted pills, with headerStart/headerEnd slots;
- the chat list: a <dialog> drawer on a phone (Escape, focus trap and
  restore from the browser; opens on its close button, not the search
  box), a rail when wide; search, Today/Yesterday/Earlier, one row
  anatomy (title, date, one "…" → Rename · Delete as equal cells);
- New chat; Temporary chat that writes nothing and ends on leaving;
- titles from the first message (Heidi's rule) or makeTitle();
- the open chat restored on reload (or driven by conversationId);
- turns per conversation that keep running in the background, Stop that
  keeps what arrived, Retry on a failure, a queue behind a running answer;
- attachments on by default, staged above the text, shown in the turn.

Storage is an adapter: ConversationStore (list/get/create/append/rename/
remove) with localConversationStore (versioned, never throws, quota drops
the oldest) and httpConversationStore (Heidi's REST shape,
serverWritesTurns for routes that store turns themselves). The product
supplies the transport and its words.

Additive: ChatScreen, Composer and ChatThread behave as before;
ChatMessageData gains optional attachments and Composer an optional
stagedPosition. Unit tests cover grouping, titles, search, dates, restore
and both stores (with storage that throws and a quota); test/browser-app.mjs
drives demo/app.html at 390px and 1440px.

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>
2026-10-27 10:16:21 +01:00
Cato 4e11709348 fix(scroll): let readers scroll up in embedded and streaming chats (#38)
* fix(scroll): preserve reading in page and nested conversations

* fix(scroll): distinguish reading gestures from layout-driven scrolling

* fix(ci): reuse the actual browser revision through release verification
2026-10-27 04:21:16 +01:00
CatoandClaude 6d67e87982 feat(thread): the callout's word through ChatThread's labels (#41)
0.16.0 let Markdown take alertLabels, but products render answers
through ChatThread, which did not pass them on: a German product would
have shown 'Caution' over 'Versuchen Sie nicht…'. ThreadLabels gains an
optional alerts map, passed to both the settled and the streaming answer.
Optional, so no product's labels object stops compiling.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-26 22:50:00 +01:00
CatoandClaude 5e606a84e2 feat(markdown): callouts for [!CAUTION] and friends; header-less tables (#39)
A model writing GitHub's '> [!CAUTION]' got the marker printed inside a
grey quote (causius, 2026-10-26). The five GitHub callouts (note, tip,
important, warning, caution) now parse to an 'alert' block, quoted or
bare, and render as one panel with the word above it; Markdown takes
alertLabels for the product's language. Only warning and caution take a
status colour, on the rule and the word.

A table whose header row was lost upstream opened on its rule and printed
as '| :--- | :--- |' prose (substrata, same day). The rule now opens a
table with no head, and rows render as many cells as the widest row.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-26 21:23:51 +01:00
Cato 2f71aa4265 fix(audit): recognize legal international word boundaries (#34) 2026-10-25 19:26:20 +01:00
CatoandClaude 3508d7ad95 fix(dictation): cumulative recogniser results no longer repeat the words (#30)
Android's Chrome-family recognisers (Chrome, Brave, Samsung Internet), with
continuous + interimResults, report one utterance CUMULATIVELY: "why",
"why exactly", "why exactly is", ... - either one result re-reported with
resultIndex 0 on every event, or a new result per event at the next index -
and often every one flagged isFinal. Both the browser leg (listen) and the
preview beside a server recording (startPreview) pushed every final from
resultIndex onwards into an array kept across events, so Substrata's Ask box
on Brave/Android typed the sentence once per word: "why why exactly why
exactly is ...". Desktop Chrome reports stable finals at rising indices, so
it never showed.

heardFromResults (core, pure) now rebuilds the transcript from the WHOLE
results list on every event and collapses a growing chain to its last link:
a result that begins with the previous one's words and adds more replaces it;
once a list has shown that growth, a late shorter/identical re-report is
dropped and a near-identical revision ("is is so" -> "is it so hard")
replaces too. Only the tail may be interim; ending mid-revision delivers the
settled words. Both hooks call it; nothing accumulates between events.

Desktop behaviour is unchanged: different phrases stay, and a word repeated
as separate results ("no", "no", "no") stays repeated. Documented limitation:
"no" then "no no" as two separate results reads as one growing utterance.

Unit fixtures in test/dictation.test.js; test/browser.mjs drives the real
composer with a fake cumulative recogniser (fails on the old hook with the
owner's exact stutter). Released as 0.15.2.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-25 07:58:00 +01:00
CatoandClaude e669991a4f fix(replies): a heading the model writes over the reply buttons is never drawn (0.15.1) (#29)
Models end answers with their own "**Quick follow-up options**" (or
"Suggested replies", "Mögliche Rückfragen:", ...) right above the
quick_replies block; drawn over chatkit's buttons it reads as an empty
section (live on substrata.orangecat.ch).

- extractReplies drops the last block before the replies when it is a
  heading or a bold/italic-only line of at most six words with no sentence
  punctuation but a closing colon, plus an adjacent --- rule. Shape and
  position, no word list, so every language. A bold sentence stays.
- Streaming ({ streaming: true }, passed by ChatThread) holds back a last
  line that could still become such a label, so it never flashes.
- dropReplyLabel is exported; ChatThread applies it to app-supplied replies.
- REPLIES_INSTRUCTION: no heading or label before the block.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 13:28:57 +02:00
CatoandClaude Fable 5.1 b37c3d65ce feat(rich): chart blocks in answers, drawn by an injected renderer (0.15) (#28)
"Who produces gallium?" now carries a ranked bar chart, not a list. chatkit
stays dependency-free: it defines the data contract (`ChartBlock`, mirroring
@bitbaum/chartkit's props for line, bars, share, timeline, tiles) and a
renderer slot (`renderers={{ chart }}` on ChatScreen, ChatThread, ChatMessage,
Markdown and RichAnswerBlock); the app injects the drawing.

- Parser: each kind validated field by field (bounded lists, finite numbers,
  safe links). A malformed block is rejected by the parser and degrades to
  its caption and a table of the safe rows; without a renderer, or when one
  returns null, chatkit draws that table itself. A chart is never a blank.
- Instruction: when to draw (ranked 3+ rows -> bars, shares -> share, 3+
  points over time -> line, 3+ dated events -> timeline, 2-4 figures ->
  tiles), figures only from tool results, hrefs copied from the result.
- Copy and Listen read the figures as lines, never the wire JSON.
- Tests: node tests per kind, the fallback and the renderer paths; the
  browser test renders a bars block through a stub renderer and a line block
  through the fallback in demo/screen.html at 320/390/1280, with the
  broken-word scan and no horizontal overflow.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-23 11:09:15 +02:00
CatoandClaude Sonnet 5.5 ae14b9fee0 feat(audit): findBrokenWords, exported for every product's browser checks (0.14.2) (#27)
* feat(feedback): thumbs under every answer, and the chat-review contract (0.14.0)

The feedback loop between a chat and the people improving it, as a package:

- Under every answer a thumb up and a thumb down (`onFeedback` on ChatThread,
  or `messageId` + `onFeedback` on AnswerActions). A thumb down opens a sheet
  that asks why — one tap on a reason from FEEDBACK_REASONS, words optional,
  then Send — so the product learns what the person wanted, not only that
  it failed. Nothing is sent until they send it. Every label is translatable.
- The nightly judge's contract in core: CHAT_REVIEW_INSTRUCTION, the
  ChatTranscript a product exports (turns with the assistant's steps, plus
  the thumbs), reviewPrompt(scope, transcript), and parseChatReview reading
  the verdicts back strictly (score 1–5, gaps from REVIEW_GAPS — dead_end,
  wrong_tool, no_web, misread, vague, no_next_step… — and one concrete fix).
  Loki runs the judge and files each gap into its feedback inbox.
- Icon-only actions are a full 44px wide, not only tall.

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

* fix(thread): the "Thought for" summary is a 44px target on a phone

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

* fix(table): words are never cut — tables and stack tiles keep every word whole (0.14.1)

Substrata's answer table at 390px read "Te / rm" and "Di / re / ct / or / y"
(2026-10-22): .ck-md sets overflow-wrap: anywhere so a long URL cannot push
the thread wider, but `anywhere` also lowers a table cell's minimum width to
one letter, so a three-column table squeezed its first column to nothing.

- Tables: overflow-wrap normal inside the table, so a word is the smallest a
  column can be; columns share the width by wrapping at spaces; when even
  the words do not fit the wrapper scrolls, with a shadow on the edge that
  has more.
- Stack figure: tiles are a wrapping flex row that asks for its share of the
  width but never less than its longest word, so "three across" becomes "two
  and one" on a narrow screen instead of cutting "Manufacture" (320px).
- test/browser.mjs: every word of every answer is measured in a Range at 320,
  390 and 1280px and must sit on one line. The demo carries the table from
  the screenshot; the check fails on the old stylesheet (Term, Directory,
  Finding, Humans, Engineers, specialists, Manufacture).
- The "thumb down asks why" check measured a button mid-way through the sheet's
  opening animation (43.9px); it now waits for the animations to finish.

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

* feat(audit): findBrokenWords, exported for every product's browser checks

The check that caught "Te / rm" and "Di / re / ct / or / y" is now
@bitbaum/chatkit/audit: findBrokenWords(root) lays every word out in a Range
and reports any drawn across two lines, and BROKEN_WORDS_SOURCE is its source
for page.evaluate. The browser test uses the exported function over the whole
page and proves it can fail (a squeezed word is reported, a wrapped sentence
is not).

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

* chore(release): 0.14.2

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 10:16:54 +02:00
CatoandClaude Sonnet 5.5 88451af7db fix(table): words are never cut — tables and stack tiles keep every word whole (0.14.1) (#26)
* feat(feedback): thumbs under every answer, and the chat-review contract (0.14.0)

The feedback loop between a chat and the people improving it, as a package:

- Under every answer a thumb up and a thumb down (`onFeedback` on ChatThread,
  or `messageId` + `onFeedback` on AnswerActions). A thumb down opens a sheet
  that asks why — one tap on a reason from FEEDBACK_REASONS, words optional,
  then Send — so the product learns what the person wanted, not only that
  it failed. Nothing is sent until they send it. Every label is translatable.
- The nightly judge's contract in core: CHAT_REVIEW_INSTRUCTION, the
  ChatTranscript a product exports (turns with the assistant's steps, plus
  the thumbs), reviewPrompt(scope, transcript), and parseChatReview reading
  the verdicts back strictly (score 1–5, gaps from REVIEW_GAPS — dead_end,
  wrong_tool, no_web, misread, vague, no_next_step… — and one concrete fix).
  Loki runs the judge and files each gap into its feedback inbox.
- Icon-only actions are a full 44px wide, not only tall.

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

* fix(thread): the "Thought for" summary is a 44px target on a phone

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

* fix(table): words are never cut — tables and stack tiles keep every word whole (0.14.1)

Substrata's answer table at 390px read "Te / rm" and "Di / re / ct / or / y"
(2026-10-22): .ck-md sets overflow-wrap: anywhere so a long URL cannot push
the thread wider, but `anywhere` also lowers a table cell's minimum width to
one letter, so a three-column table squeezed its first column to nothing.

- Tables: overflow-wrap normal inside the table, so a word is the smallest a
  column can be; columns share the width by wrapping at spaces; when even
  the words do not fit the wrapper scrolls, with a shadow on the edge that
  has more.
- Stack figure: tiles are a wrapping flex row that asks for its share of the
  width but never less than its longest word, so "three across" becomes "two
  and one" on a narrow screen instead of cutting "Manufacture" (320px).
- test/browser.mjs: every word of every answer is measured in a Range at 320,
  390 and 1280px and must sit on one line. The demo carries the table from
  the screenshot; the check fails on the old stylesheet (Term, Directory,
  Finding, Humans, Engineers, specialists, Manufacture).
- The "thumb down asks why" check measured a button mid-way through the sheet's
  opening animation (43.9px); it now waits for the animations to finish.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 22:49:22 +02:00
CatoandClaude 2724c26158 feat(feedback): thumbs under every answer, and the chat-review contract (0.14.0) (#25)
The feedback loop between a chat and the people improving it, as a package:

- Under every answer a thumb up and a thumb down (`onFeedback` on ChatThread,
  or `messageId` + `onFeedback` on AnswerActions). A thumb down opens a sheet
  that asks why — one tap on a reason from FEEDBACK_REASONS, words optional,
  then Send — so the product learns what the person wanted, not only that
  it failed. Nothing is sent until they send it. Every label is translatable.
- The nightly judge's contract in core: CHAT_REVIEW_INSTRUCTION, the
  ChatTranscript a product exports (turns with the assistant's steps, plus
  the thumbs), reviewPrompt(scope, transcript), and parseChatReview reading
  the verdicts back strictly (score 1–5, gaps from REVIEW_GAPS — dead_end,
  wrong_tool, no_web, misread, vague, no_next_step… — and one concrete fix).
  Loki runs the judge and files each gap into its feedback inbox.
- Icon-only actions are a full 44px wide, not only tall.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 18:25:21 +02:00
CatoandClaude Fable 5.1 3fe57d0559 feat(answers): answers that read like the ChatGPT app's (0.13.0) (#24)
* feat(answers): answers that read like the ChatGPT app's (0.13.0)

Measured screen by screen against the ChatGPT app on a phone, and closed
in the package so every product gets it:

- Headings are signposts: a size up, with air above them, so a long answer
  can be scanned and found again.
- Options are cards: a numbered list whose items open with a bold name gets
  a tile badge, the name a size up, a hairline between cards, and a pill
  for a short tag written right after the name (`[Recommended]`). The
  instruction asks the model to mark the option it recommends that way.
- Sources are chips: a `[F2, F1]` handle is drawn after the sentence as
  "Fleet AGENTS.md +1", linked when the record has a link, and moved after
  the full stop when the model wrote it before.
- Links in the words that leave the site say so: dotted underline, arrow.
- A layered figure, `{"type":"stack"}`: full-width boxes top to bottom, a
  row of tiles where a layer has parts (icons from a closed list, never
  markup), the words that cross each arrow, an accent tone, a caption.
  `diagram` stays for an arbitrary graph.
- "Thought for 3m 38s ›" above an answer from `message.thinking`, closed by
  default; `live.steps` shows the same row open while a turn runs, with
  the newest step marked. `ThinkingRow` and `formatThinkingDuration` are
  exported; `thoughtFor`, `thought`, `thinking` join the thread labels.

Tests: tag and citation placement (core), stack validation and text form
(core), the whole answer rendered on the server (render), and the stack
fitting six tiles on a 390px phone with the thought line above (browser).

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

* fix(markdown): no space before the full stop when a citation chip moves after it

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 11:19:18 +02:00
CatoandClaude 3f1c299c9d fix(thread): 44px answer actions on one line; replies as one row on a phone (0.12.1) (#23)
Found while evig's public assistant moved onto chatkit, and fixed here so
every product gets it:

- The Copy · Listen · Share · Retry row sat at 36px while every other
  control in the chat is 44, and "Nochmals versuchen" broke across two
  lines at 390px. Each action is now a full-size target with its words on
  one line; the row wraps between buttons when it must.
- Below 40rem the suggested replies are ONE row that scrolls sideways with
  a fade where it runs on, the lead reply first and always on screen —
  never a wrapping box of pills that breaks into "two and an orphan"
  wherever the words run out. Wider, they still wrap.
- The browser test now counts .ck-action among the controls that must be
  44px.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 09:02:41 +02:00
Cato a18b573938 Add explicit audio playback to shared rich answers (0.12.0) (#22) 2026-10-21 20:09:47 +02:00
Cato 3f0ce27029 feat: visual answers with galleries, diagrams and guided choices (0.11.0) (#21) 2026-10-21 12:39:04 +02:00
CatoandClaude 04dd6f86b8 feat: under every answer — Copy, Listen, Share; sources as a sheet; replies that lead (0.10.0) (#20)
The pieces of the ChatGPT app the owner put beside ours (2026-10-21), done
once here so Loki, OrangeCat and every chat in the fleet get them:

- `AnswerActions`: the row under an answer. Copy; Listen, reading the answer
  as prose (`plainTextForSpeech`, from loki) with the browser's voice or the
  `speaker` an app passes (loki's studio voice), with a small player — Stop
  and the time so far — while it reads; Share through the system sheet
  where one exists. `ChatThread` renders it under every answer.
- Sources on a touch screen are ONE "Sources · n" button that opens a sheet
  with every record (label, detail, link); chips stay on a mouse. `Sheet`
  (the attach sheet's <dialog>, extracted) and `SourcesRow` are exported.
- `AttachMenu` takes `extra` rows under Camera · Photos · Files, and then
  opens the sheet on a mouse too — an app's "one of my things" has no file
  dialog to live in.
- The replies instruction makes the model lead: 2–4 replies on every answer,
  the recommended next step first, drawn as the lead (`ck-reply-lead`).
- An empty box is one row on the narrowest phone: the placeholder is cut at
  the edge, never wrapped into a clipped second line.

Browser checks cover the player, the sources sheet on a touch screen and
chips on a mouse, and the one-row placeholder at 320px.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-21 06:21:21 +02:00
CatoandClaude Fable 5.1 fc87000ed7 feat(markdown): answers that read like the ChatGPT app's (0.9.0) (#19)
* feat(markdown): answers that read like the ChatGPT app's (0.9.0)

Tables (sideways scroll on a phone, never a broken page), headings with
their level, nested and task lists, rules, web images. A list of named
things — every item opening with a bold lead — renders as cards: a badge
(the number, or the emoji the lead opens with), the name, the body. The
sources an answer cites are listed once under it as chips, from the
citations map; renderCitation lets an app keep its own source sheet.

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

* feat(markdown): renderSources slot for an app's own sources row

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 23:37:06 +02:00
CatoandClaude a9dede4719 feat(screen): ChatScreen — the conversation fills the display (0.8.0) (#16)
Header and composer float over the thread, like the ChatGPT and Claude
apps: words scroll under both and fade, header buttons are frosted pills
(ck-glass), the composer is a see-through pill. The scroller is padded by
the measured heights (--ck-top-inset / --ck-bottom-inset), so the last
answer rests above the composer. useStickToBottom now stays pinned
through size changes (a growing composer, insets measured after paint).
The user's bubble is neutral (--ck-bubble), not the accent.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 22:40:17 +02:00
CatoandClaude b8b613d0c8 feat(dictation): the words as they are heard, while the take is live (0.7.0) (#15)
A take was a pulsing dot, a wave and a timer for as long as the person
spoke, with nothing to show for it until the server answered. Now the
browser's recogniser runs beside the recording as a PREVIEW: finals then
the current guess, one line whose end is always in view (`liveText` on the
controller, `.ck-voice-live` in the bar), dimmed while the server
transcribes, replaced by the server's words when they land. On the browser
leg the same words show as interim results, and only the finals are
delivered.

The preview is never load-bearing: a recogniser that is missing, refuses
or says nothing leaves the wave on screen and the recording untouched, and
its failures are not fed to the problem line — the person is being
recorded fine, and "mic" or "unavailable" would be a lie about that.

`liveWords(finals, interim)` is the pure combiner, tested.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-10 01:24:18 -07:00
CatoandClaude 699e49d179 fix(composer): an empty box is one line, at any width it was measured (0.6.1) (#14)
Chromium counts a textarea's placeholder in scrollHeight. A composer
emptied while it was narrow (a sheet still opening, a layout settling)
read its wrapped placeholder as content and grew to its 240px maximum
with nothing typed, and it stayed that way because the height was keyed
only on the value. On Loki's phone chat that was half the screen of
blank composer after a send.

- An empty box takes its natural one-line height.
- The box re-measures when its width changes (width only, so the
  height it sets cannot loop the observer).
- Browser check: empty the composer while it is 60px wide, widen it, and
  it is one line again (fails at 240px before this change).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-09 06:59:06 -07:00
CatoandClaude 163c879163 feat(thread): suggested replies — one tap sends the likely next message (0.6.0) (#13)
OrangeCat's Cat ends an answer with two to four tappable replies; it was the
most convenient control in any of the fleet's chats and existed nowhere else.
It now lives here so every product gets it from one place.

- REPLIES_INSTRUCTION: the prompt text that asks the model for a
  ```quick_replies block in the same turn (no second call, no latency)
- extractReplies(): parses it back out, deduplicated and capped, and hides
  an unfinished block while streaming so no one watches JSON appear
- ChatThread onReply: buttons under the latest answer only, never while a
  turn runs; the block is stripped from every answer even without onReply
- ChatReplies: the same buttons for apps that render their own thread


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-09 05:26:52 -07:00
CatoandClaude Opus 5.5 0a82ec831e feat(composer): heldAttachments — an attachment the app holds can be sent alone (0.5.0) (#12)
An app with its own attachment model (orangecat: references to the person's
own listings, photos it shrinks and stages itself) shows them in `header`,
but the composer only counted its OWN attachments toward "may this send?".
A message that was only such an attachment could not be sent, which blocked
orangecat from adopting the Composer at all. heldAttachments adds the app's
count to the composer's wherever that is decided; attachmentOnlyText still
says what such a message means.

Render test covers it (mutation: ignoring the prop fails it). verify green,
browser checks included.


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

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 07:43:03 -07:00
CatoandClaude Opus 5.5 70824785e8 fix(check): comments are not inputs (0.4.1) (#11)
* ci(publish): a merged version bump releases itself

Publishing waited for someone to push a v* tag after the merge. That step
is easy to forget and impossible from an agent session (the git proxy
refuses tag pushes), so 0.4.0 sat merged and unpublished — exactly the
"fix merged, nobody has it" gap the release was meant to close.

publish.yml now also runs on pushes to main and on dispatch; the existing
registry check makes every merge that did not change the version a green
no-op. A release from main tags the commit v<version> itself, so versions
stay traceable. The auto-merge sweep re-arms publish.yml after a
GITHUB_TOKEN merge, which starts no push workflow on its own.

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

* fix(check): comments are not inputs; 0.4.1

The first run across the fleet flagged one line in loki — a comment
recording the old bug (`<input accept="image/*,text/*…">`). Comment lines,
block comments and trailing comments are skipped now. "/*" counts as a
comment only after space, "{" or "(", because inside an accept value it
follows a letter ("image/*") — a test pins that a trailing comment cannot
hide the real input before it.

0.4.0 was never published; this ships as 0.4.1.

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-07 04:52:55 -07:00