20 Commits
Author SHA1 Message Date
CatoandClaude 4a1af07415 ModelSheet and ModelChip; a failed turn can carry its way on (0.46.0) (#118)
The model button, the bring-your-own-key sheet and the link under a failed
turn ("Get a pass") were built in Heidi. They are the chat's experience, so
they belong here: ModelChip for the header, ModelSheet driven by the
product's vendor allowlist and key check, and ChatFailure.action/retry so a
transport can say what the reader can do next and when Retry cannot help.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-26 09:39:11 +01:00
CatoandClaude 7902b8afeb feat(messenger): Show text under a voice message; ship the styles 0.39 and 0.42 lost (0.44.0) (#113)
Claude-Session: https://claude.ai/code/session_019MDtmsmMXvM981mcszxEA6

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 17:53:18 +01:00
CatoandClaude fd7031ea04 feat(composer, field): one box — Composer and DictationField are two shapes of one implementation (0.43.0) (#111)
The four steps 0.41 left in the README are done:
- One frame: TypingBox (typing.tsx) draws the voice bar, box, strip, text,
  tools row and the take's problem for both. The field's tools row is the
  composer's ck-tools, so its paperclip and microphone are bare icons like
  the composer's (they were bordered circles). Frame and text share one set
  of rules in styles.css; each shape keeps only its differences.
- One text hookup: useTypingText (dictation + appendTranscript +
  clipToMaxLength + the latest-text ref).
- One submit-key rule: submitKeyAction in composer.ts, exported.
- Same controls on both: Composer `attachments`; DictationField
  `handleRef` (DictationFieldHandle) and `attachExtras`.

Public APIs are additive. All existing tests unchanged; new unit, render
and browser checks (390px, 320px dark, desktop).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 16:50:56 +01:00
CatoandClaude e770b4597b fix(composer, field): one shape for a composer's tools; the one-line field keeps one box (v0.40.1) (#108)
A framed Composer drew Attach and the microphone as filled circles next
to a bare model chip; they are bare icons now, as in the inline composer.
DictationField had the double box 0.39.1 removed from the composer: a
host's input rounding and focus ring drew inside its frame. Both are
measured inside the hostile-host demo.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 14:11:03 +01:00
CatoandClaude 3cfa412350 fix(composer): every Composer keeps one box inside a host's base styles (#105)
Found on OrangeCat (owner's phone, 2026-11-15) in the Cat chat: the site's
*:focus-visible ring and rounded textarea rule drew a second box inside the
composer. The Messenger was guarded; the plain Composer was not. The guard
now sits on every composer's field and the Messenger's copy is gone.
test/browser.mjs measures the focused field inside a hostile host
stylesheet (one shared demo helper, demo/hostile-host.ts): FAIL before
(ring + 6px radius), PASS after. Embedded sheet 10,996 B gzipped (budget
11,000), by dropping a rule that set an outline only to remove it.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 13:01:38 +01:00
CatoandClaude Opus 5.5 ae88db6c0b fix(messenger): the Agent mark only under an agent; a message is never drawn as nothing (0.38.0) (#103)
* fix(styles): starters are one column at every width (0.31.3)

The empty chat's starters wrapped into a row of pills. A row of choices is
never wrapping pills (fleet AGENTS.md, "One shape per kind"; OrangeCat UX
audit 2026-11-12, auth-firstrun#5). .ck-starters-list is now a column and
each .ck-starter a full-width, left-aligned, 44px row. Checked in
test/styles.test.js and test/browser-app.mjs at 390px and 1440px.

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

* fix(messenger): a message's actions by keyboard; alone with an agent every message is for it, and its answer reads it

- The actions button of a message was display:none until hovered, so Tab
  never reached it and Edit and Delete had no way in without a mouse. It is
  hidden by opacity now, takes focus, is 44px, and stays on the screen on a
  phone. Long press and right click are unchanged.
- soleAgent(): one person and one agent. There the empty conversation says
  the agent answers every message, Ask <agent> is not offered, and a message
  starts the wait for a named agent without naming it.
- receiptOf(): where only agents could read a message, it is read once an
  agent's own read mark is past it. A conversation with only an agent stayed
  at Sent for ever.
- An awaited agent is not also shown typing.

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

* chore(release): 0.35.0

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

* test(app): a 44px control measured mid-slide is not a small target

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

* fix(messenger): the Agent mark only under an agent; a message is never drawn as nothing (0.37.0)

Found on OrangeCat (owner's phone, 2026-11-15), a conversation with a
person and the Cat:

- The top bar drew "Agent · Cat is in this conversation" under the
  person's name, so it read as "Penguin is an agent". The mark is now drawn
  only where the title is an agent; with people here the line reads
  "@penguin · Cat is here". `agentHere` is now "{name} is here" (the old
  wording was cut off at 390px).
- A message with no words, card or files was an empty row with a time and
  a tick. It now says "This message could not be shown."
  (`labels.emptyMessage`).

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

* test: drop tests duplicated by the branch merge

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 02:36:32 +01:00
CatoandClaude be943e2647 feat(messenger): voice messages people find, and that play everywhere (0.37.0) (#102)
The empty box's send slot records a voice message in the box's place; one
tap sends it. A voice note plays in the thread in the bubble's own colours.
AAC in MP4 first, so every phone plays it. Its length travels with it.

Fix: the timer rounded to 0:01 at half a second and a short take was
dropped without a word.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 01:41:03 +01:00
CatoandClaude ca1a15844b fix(messenger): a message's actions by keyboard; alone with an agent every message is for it (0.36.0) (#101)
* fix(styles): starters are one column at every width (0.31.3)

The empty chat's starters wrapped into a row of pills. A row of choices is
never wrapping pills (fleet AGENTS.md, "One shape per kind"; OrangeCat UX
audit 2026-11-12, auth-firstrun#5). .ck-starters-list is now a column and
each .ck-starter a full-width, left-aligned, 44px row. Checked in
test/styles.test.js and test/browser-app.mjs at 390px and 1440px.

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

* fix(messenger): a message's actions by keyboard; alone with an agent every message is for it, and its answer reads it

- The actions button of a message was display:none until hovered, so Tab
  never reached it and Edit and Delete had no way in without a mouse. It is
  hidden by opacity now, takes focus, is 44px, and stays on the screen on a
  phone. Long press and right click are unchanged.
- soleAgent(): one person and one agent. There the empty conversation says
  the agent answers every message, Ask <agent> is not offered, and a message
  starts the wait for a named agent without naming it.
- receiptOf(): where only agents could read a message, it is read once an
  agent's own read mark is past it. A conversation with only an agent stayed
  at Sent for ever.
- An awaited agent is not also shown typing.

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

* chore(release): 0.35.0

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

* test(app): a 44px control measured mid-slide is not a small target

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-14 11:13:26 +01:00
CatoandClaude af38830544 feat(messenger): search inside a conversation (0.35.0) (#99)
transport.search puts a search in the top bar; a match is led to, loading
earlier pages until it is there. A search field takes no host focus ring
inside its pill.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-14 09:52:15 +01:00
CatoandClaude aa5fba7351 feat(messenger): voice messages (0.34.0) (#98)
Record in the box's +, listen, add to the message. The take is a file like
any other. The microphone is open only while recording and is closed on every
way out.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 21:51:00 +01:00
CatoandClaude dc53be7893 feat(send-queue): a queued message keeps its conversation; an unanswered question says so (0.32.0) (#96)
Measured on Loki's chat, 2026-11-13: three quick messages in a new chat
became three conversations, two queued messages vanished on reload, and a
question whose answer died with the page showed nothing under it, forever.

- send-queue (pure): takeQueuedFor, queuedFor, storableQueue,
  serializeQueue, parseStoredQueue, unansweredTurn.
- ChatThread takes `unanswered` and says so, with Try again when onRetry
  is given; ChatApp passes it.

test/send-queue.test.js; verify (format, lint, typecheck, build, tests,
browser tests) passes.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 16:42:49 +01:00
CatoandClaude 320db4ebd2 fix(messenger): hold its shape inside a product's own styles (0.31.3) (#95)
A photo that is not square was a tall oval; a host's focus ring drew a box
inside the composer; a host's 44px minimum for links pushed the name off its
subtitle; a host's paragraph rules loosened an agent's answer. The browser
suite now loads a hostile host stylesheet and a 300x500 photo and measures.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 13:22:27 +01:00
CatoandClaude b4d7ac6a54 fix(styles): starters are one column at every width (0.31.3) (#94)
The empty chat's starters wrapped into a row of pills. A row of choices is
never wrapping pills (fleet AGENTS.md, "One shape per kind"; OrangeCat UX
audit 2026-11-12, auth-firstrun#5). .ck-starters-list is now a column and
each .ck-starter a full-width, left-aligned, 44px row. Checked in
test/styles.test.js and test/browser-app.mjs at 390px and 1440px.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 12:07:47 +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 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 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
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
Cato 0ea37b13d9 feat(styles): add a compact stylesheet for embedded chats (#54) 2026-10-28 11:12:41 +01:00