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>
58 KiB
Changelog
0.46.0 — ModelSheet and ModelChip; a failed turn can carry its way on
Owner, 2026-11-26: Heidi's model picker, its header button and the "Get a pass" link under a spent allowance were built in the app. A second product offering its own key or an allowance would have built them again.
ModelChip: the model button for a chat's header (headerEnd). There for everybody, not only once a key is connected: it sayslabel("Model") while the product's models answer and names the reader's own model when there is one.ModelSheet: the sheet that button opens. The product's vendor allowlist (ai-kit'sBYOK_VENDORShas the shape), a link to where a key is made, a password field checked as it is pasted through the product's owncheck(normally a route around ai-kit'sprobeByokKey), the models that key reaches with the strongest preselected, andfreeModels: what answers without a key, so the choice has two sides. It never sends a key anywhere itself and stores nothing;onSavehands the choice to the product. Every word is a label with an English default.ChatFailure.actionandChatFailure.retry:new ChatTurnError(message, { kind, action: { label, href }, retry: false })draws the way on (ack-actionlink, outlined) beside Retry, and leaves Retry out where it cannot help (an allowance that resets tomorrow). An action is kept only for a same-site path or anhttps:link.- Styles:
.ck-model-*and the outline of.ck-failure-actionare in the fullstyles.css(the embedded sheet is at its transfer budget; without it the link is still a full-sizeck-action). - For a consumer: nothing breaks; every addition is optional.
0.45.0 — DictationField with no state in the app: a native form, react-hook-form
Owner, 2026-11-15: anywhere a person types prose there is chatkit's microphone. Forms that post natively (server actions, name + defaultValue) or use react-hook-form could not take DictationField without becoming client state; most of the fleet's remaining hand-made textareas are such forms.
- Uncontrolled mode.
valueandonValueChangeare now optional; newdefaultValue?: string. Withoutvaluethe text box keeps its own words, posts them undernamewith a native<form>or server action (typed and said alike), and a form reset putsdefaultValueback. Something else writing the box (react-hook-form'sreset(), autofill) is read back when focus enters the field, so a take appends to what is there. - react-hook-form.
{...register("x")}and aController's{...field}spread straight on. NewonChange?(event: DictationFieldEvent)— the real event for a keystroke, the same shape (type,target,currentTarget, the box already holding the new words) for the microphone, Improve, Undo,handleRef.setTextand a form reset.onBlurnow receives a blur-shapedDictationFieldEvent(a() => voidhandler is unaffected).DictationFieldis aforwardRefcomponent:refis the text box, the same element asinputRef, on every React the peer range allows. - New exported types
DictationFieldElement,DictationFieldEvent. test/browser-field.mjsdrivesdemo/field-uncontrolled.html: a native form post and reset, and react-hook-form itself (register with validation on blur, Controller,reset()), each with words typed and said. react-hook-form is a dev dependency only.- For a consumer: nothing breaks; every addition is optional. A controlled field renders exactly as before.
0.44.1 — Messenger: Info tells the truth about agents and order
- Fix: Info no longer lists an agent as "Not delivered yet" (an agent has a message the moment it is stored), and shows a separate "Delivered" line only when it came before the read.
0.44.0 — Messenger: "Show text" under a voice message
- New
transport.transcribe(attachment): with it, every voice message has "Show text" under its player. The words appear under it on a tap and hide on the next; they are asked for once per page (anErrorwithuserMessageis shown as said, for a limit or a refusal).VoiceNoteandMessageAttachmentstaketranscribefor an app with its own arrangement. - Labels:
voiceTextShow,voiceTextHide,voiceTextLoading,voiceTextEmpty,voiceTextFailed. - Fix: the styles of Info, "This message was deleted", the "edited" link (0.39), Forward and the pin and mute marks (0.42) were written into
styles/messenger.css, which the build regenerates fromstyles.css, and so never shipped: those parts were drawn unstyled. They are instyles.cssnow, andtest/browser-messenger.mjschecks the Info and Forward sheets are styled. - For a consumer: nothing changes without
transcribe; the player's markup is the same.
0.43.0 — One box: Composer and DictationField are two shapes of one implementation
Owner, 2026-11-15: one way a person types across every fleet app — the same microphone, the same paperclip, the same look, one implementation, so an agent building an app never picks between two half-equal things. The four steps 0.41 left in the README are done.
- One frame. A
TypingBox(internal,src/react/typing.tsx) draws the voice bar, the box, the staged strip, the text, the tools row and the take's problem for both.Composerpasses its modes, header, footer and send slot;DictationFieldits label, error, Improve and hint. The DOM and class names of both are unchanged. - One look for the tools. The field's tools row is now the composer's (
ck-field-actions ck-tools). Visible change: in aDictationFieldthe paperclip and the microphone were bordered, filled circles; they are the composer's bare icons now (a recording microphone keeps its red). Nothing else moves.test/browser-field.mjsmeasures it at 390px, 320px dark and desktop. - One set of rules. The frame and the text share their rules in
styles.css(.ck-field, .ck-composer,.ck-field-input, .ck-input); the field's section keeps only its differences. The embedded sheet stays inside its 11,000-byte gzip budget (10,986). - One text hookup.
useTypingText(internal): the words, the latest-text ref and the microphone that appends to them (appendTranscript,clipToMaxLength), for both. - One submit key. New
submitKeyAction(event, { shape, busy, locked })→"submit" | "block" | "type"in@bitbaum/chatkit(typesTypingShape,SubmitKeyEvent,SubmitKeyAction). Both boxes use it. Two small changes in the composer, from the field's rule: an Enter that confirms an IME composition on a browser that reports onlykeyCode229 no longer sends, and Enter while a take is being recorded or transcribed no longer sends the half-typed draft (the take's words land first; press Enter again). - New
Composerattachments?: AttachmentsController— the staged files held by the app (useAttachments), as onDictationField. The composer still sends them withonSendand clears them after a send. - New
DictationFieldattachExtras?: readonly AttachExtra[]— the app's rows in the paperclip's sheet, as onComposer. Never on a read-only field. - New
DictationFieldhandleRef?: Ref<DictationFieldHandle>—setText(kept withinmaxLength),addFiles,focus,submit(runsonSubmitwith the submit key's checks).DictationFieldHandleis exported;ComposerHandleis now the same type. - README: "One box" — what is shared, and the rule:
Composersends a message in a conversation;DictationFieldis every other place a person types. - For a consumer: nothing breaks; every addition is optional. An app that themed the field's buttons through
.ck-field-actions .ck-icon-btnkeeps its override; drop it if it only copied the composer's look.
0.42.0 — Messenger: forward a message; pin and mute a conversation
- Forward. A message's actions offer Forward (new
transport.forward(message, conversationIds)): a sheet of the viewer's conversations, searchable, up to five (FORWARD_MAX), and one Send. The copy carriesforwarded: trueand the thread marks it "Forwarded" (ForwardSheet). - Pin. "Pin" / "Unpin" in a conversation's menu (new
transport.pin). Pinned conversations stay at the top of the list (sortByNewestnow orderspinnedfirst), with a pin on the row. - Mute. "Mute" / "Unmute" in the same menu (new
transport.mute). A muted conversation shows a muted bell on its row and draws its unread count quietly; the app decides what muting stops (notifications). - The conversation menu now appears when any of
leave,pin,muteexists. - Labels:
forward,forwardTitle,forwardSearch,forwardSend,forwardDone,forwardFailed,forwarded,pin,unpin,mute,unmute,pinned,muted,settingFailed. - For a consumer: nothing breaks; each feature appears when its transport method exists. Report
pinned/mutedon conversations for them to survive a reload.
0.41.0 — DictationField gets the composer's paperclip; one way a person types
Owner, 2026-11-15: one way a person types in the whole fleet — the same microphone, the same paperclip, the same paste — and a clear rule for which export to use. OrangeCat's to-do "Add a task" line had a microphone and no way to attach a photo, a file or a screenshot.
DictationFieldattach?: boolean | AttachOptions— the composer's paperclip: the Camera · Photos · Files sheet, a pasted screenshot staged, a dropped file, previews with Remove, the same limits and notes, a recording picked as a file transcribed into the words. Off by default; never on a read-only field.DictationFieldattachments?: AttachmentsController— the app holds the staged files (useAttachments), reads them at its own submit (toWire()) and clears them after (clear()).- New labels on
DictationFieldLabels:attach,attachMenu,remove,attachNotes(the composer's, with the same defaults). - One implementation. The paperclip's wiring (staging,
take, paste, drop, recordings to the microphone's server leg), the staged strip, the microphone button and the microphone's and paperclip's default words moved out ofComposerinto one internal module (src/react/typing.tsx) thatComposerandDictationFieldboth use.Composer's behaviour and public API are unchanged. What is still drawn twice, and the plan to make it one, is in the README ("One box, two shapes"). - README: which box —
Composersends a message in a conversation;DictationFieldis every other place a person types. test/browser-field.mjson a new fixture (demo/field-attach.html) at 390px, 320px dark and desktop: off by default, the paperclip when on, a picked photo and a text file staged, a pasted screenshot staged, Remove, the app's submit reading the files and clearing them, 44px targets, nothing scrolling sideways.test/render.test.js: the field's paperclip renders the same inputs as the composer's, with the app's sources and labels.- For a consumer: nothing changes until you pass
attach. A field whoseinputProps.onPasteis set keeps it; it runs before the paperclip's.
0.40.1 — one shape for a composer's tools; the one-line field keeps one box
Found on OrangeCat (owner's phone, 2026-11-15).
- Fix: in a framed
Composer, Attach and the microphone were filled, bordered circles while the model chip beside them was a bare icon. They are bare icons now, the same as in the inline composer, and the Messenger's header keeps its own bare icons. Send keeps its fill; a recording microphone keeps its red.test/browser.mjsmeasures that every tool in the framed composer is unfilled. - Fix:
DictationField, the bug 0.39.1 fixed in the composer. A product that rounds every textinputand rings every focused control drew a second box inside the field's frame. The field now has no rounding and no ring of its own.test/browser-field.mjsloads the field demo inside such a stylesheet (?host=hostile) and measures both fields. The shared hostile stylesheet now rounds text inputs too. - For a consumer: remove any local override that hid this (OrangeCat's
.oc-planner .ck-field-input:focus). Nothing else changes.
0.40.0 — ChatApp: the product can draw the chat list in its own sidebar
Asked for on OrangeCat (2026-11-15): with the Cat open, its Bots list and ChatApp's chat rail sat side by side, two lists taking half the screen. A product that already has a sidebar can now put the chats in it.
- New:
hostList— no rail, no drawer and no Chats button; the chat fills the space. Default false: nothing changes for anyone who does not set it. - New:
onListChange(list)—{ conversations, state, activeId, busyIds }on every change (with or withouthostList). Open and start chats through the handle (openConversation,newChat), which already existed. Rename and Delete stay in the header's "…" menu. busyIdsarrives as a fresh Set only when its members change, so a host that keeps the list in state does not render in a loop.- For a consumer: nothing to change.
0.39.1 — every Composer keeps one box inside a host's base styles
Found on OrangeCat (owner's phone, 2026-11-15), in the Cat chat.
- Fix: a product's stylesheet that rings every focused control (
*:focus-visible) and rounds everytextareadrew a second, rounded, ringed box inside the composer's own border. The Messenger was guarded; the plainComposerwas not. The guard now sits on every composer's field (.ck-input: no radius; focused, no ring and no outline) and the Messenger's own copy is gone.test/browser.mjsloads the chat demo inside such a stylesheet (?host=hostile, now one shared demo helper) and measures the focused field. - A redundant rule that gave the field an accent outline and then removed it is gone; the embedded sheet stays inside its 11,000-byte gzip budget (10,996).
- For a consumer: remove any local override that hid this (
.ck-msgr .ck-input,.ck-composer .ck-input); nothing else changes.
0.39.0 — Messenger: delivered, read and when; delete for me or for everyone; edit history
- Delivered is real. A second grey tick once every other person's device has the message, from
lastDeliveredAton participants and a newdeliveredevent. The Messenger reports the viewer's own deliveries throughtransport.markDelivered(conversationId, at): when the list loads, when a thread loads and when a message arrives, once per newer message. An app that reports no delivery keeps one tick until read, as before (deliveredToAll,withDelivered). - Info. A message's actions offer Info (new
transport.receipts): each person, when it reached their device and when they read it, with the date when it was not today (MessageInfo,receiptTime). For an edited message, tapping "edited" or Info shows what it said before (newtransport.edits). - Delete for me / for everyone. "Delete for everyone" (
transport.remove) now leaves the message's place in the thread, saying "You deleted this message" or "This message was deleted" (deletedAt,tombstoneOf), with nothing of what it said; it is not counted as new. "Delete for me" (newtransport.hide) is offered on any message and removes it from the viewer's view only. - Labels:
delivered,deleted,deletedByYou,hide,hideConfirm,info,infoTitle,readAt,deliveredAt,notDelivered,infoFailed,editHistory,editedUntil;removenow reads "Delete for everyone". - Fix: a sheet closed by the app (an action chosen) delivered its
closeevent a moment later, and that late event shut the next sheet if one had opened in between (found by CI: Delete, then a long press on another message). A close event that arrives while the sheet is open again is ignored. - For a consumer: nothing breaks. Each feature appears when its transport method exists. An app that removed a message from the thread on
removenow shows a marker in its place, and should return deleted messages withdeletedAt(and no words) so the marker survives a reload.
0.38.0 — Messenger: the Agent mark only under an agent; a message never drawn as nothing
Found on OrangeCat (owner's phone, 2026-11-15), a conversation with a person and the Cat.
- Fix: the top bar drew "Agent" and "Cat is in this conversation" under the PERSON's name, so it read "Penguin · Agent". The mark now appears only where the title is an agent (a conversation with only agents). With people here, the line says theirs first and the agent's presence in words: "@penguin · Cat is here" (
labels.agentHereis now "{name} is here": the old "{name} is in this conversation" was cut off at 390px).test/browser-messenger.mjschecks that the top bar marks nobody as an agent under a person's name. - Fix: a message with no words, no card and no files (its files never arrived, or are gone) was drawn as an empty row with only a time and a tick. It now says "This message could not be shown." (
labels.emptyMessage, new, with a default). - Demo: a photo whose size the sender's browser could not read is drawn in the 4:3 frame (measured: 288×216 at 390px).
- For a consumer: nothing to change. An app with its own full label set in another language adds
emptyMessage.
0.37.0 — Messenger: voice messages people find, and that play everywhere
Owner, 2026-11-15: "sending a voice message doesn't really work." It was in the "+" sheet, under the paperclip, where nobody looks for it; the microphone in the box is dictation (speech into words), and sending a voice was a different thing in a different place.
- The send slot records a voice message while the box is empty (
ComposeremptyAction): a waveform where the arrow would be, beside the dictation microphone; type a word and it is Send again. A file in the tray keeps it Send. - Recorded in the box's place (
VoiceBar): Delete, a red dot with the time in whole seconds, Send. One tap sends: it stops, uploads and sends; while it uploads it is in the tray with its progress, and a failed upload stays there with Try again. The "+" sheet's Voice message records in the same place. - A voice note on a message (
VoiceNote) instead of the browser's own audio control: play and pause, a seek bar with a full-height target, the length shown before it is played, 1×/1.5×/2×, one note playing at a time, nothing loaded until Play. In the bubble's own colours. - Every phone plays it: recorded as AAC in MP4 where the browser can (Chrome on Android, Safari), WebM/Opus otherwise (
voiceMimeType). A WebM voice from Android may not play on an older iPhone; MP4 first is what avoids that. - Its length travels with it (
uploads.add(files, { durationMs })): Chrome reads back a recording's length as Infinity, so the note showed none. - Fix: the timer rounded, showing "0:01" after half a second, and a take under 0.7 seconds was thrown away without a word, so a quick Send did nothing. The time counts whole seconds, the minimum is half a second, and a take too short to send says so.
useVoiceRecordingis the recording without markup;VoiceRecorder(the sheet) stays for apps with their own arrangement. The list calls a message of only a recording "Voice message".test/browser-messenger.mjs, with a fake microphone on a 390px phone: the slot's two roles, recording in place, one-tap send with its length, playback and speed, Delete and too-short, every microphone track closed, 44px targets, and the play button's contrast on both bubbles.
0.36.0 — Messenger: a message's actions by keyboard; alone with an agent
Found in OrangeCat's full-path review (2026-11-13): Edit and Delete could not be reached without a mouse, the Cat did not answer in a conversation with only the Cat, and such a conversation never showed "Read".
- Fix: the "…" beside a message was
display: noneuntil the message was hovered, so it could not take focus: Tab walked past every message. It is now hidden by opacity, takes focus, is a 44px target and stays on the screen at 390px. Enter opens the same sheet a long press and a right click open (Reply, Copy, Edit, Delete).test/browser-messenger.mjsdoes it with a keyboard alone, at 1280px and 390px. - Alone with an agent (
soleAgent(conversation, viewerId, agents): one person, one agent) every message is for the agent. The empty conversation says "{name} answers every message here." (labels.agentDirect) in place of "Type @cat to bring Cat in", "Ask Cat" is not offered in the "+", and a message starts "Cat is thinking…" for a named agent without naming it. Whether the agent answers is the app's server: an app must answer every message there, not only a mention. - Read, for a message only an agent could read (
receiptOf(conversation, message, agents)): read once the agent's ownlastReadAtis past the message. An app moves that mark when the agent answers (and sends thereadevent). Where a person can read the message, threadkit'sreadStatedecides as before. - An agent that is awaited ("is thinking…") is no longer also shown typing.
- For a consumer: nothing to change to get the keyboard fix and the label.
labels.agentDirectis new and has a default; an app with its own full label set in another language adds it.
0.35.0 — Messenger: search inside a conversation
transport.search(conversationId, query)puts a search in the top bar. The sheet lists what the server found (who, when, up to three lines; an agent's answer as words, not markdown). Tapping a match closes the sheet, loads earlier pages until that message is there (up to 20), leads to it and marks it. A match further back than that says so.- Fix: a search field (in "New", in the list, and here) took a host's focus ring on the input inside its pill, the same box inside a box as the composer had. Found by looking at the sheet under the hostile host stylesheet; measured there now.
test/browser-messenger.mjs: search for a message that is not loaded, nothing found, the jump, 44px targets.
0.34.0 — Messenger: voice messages
Owner, 2026-11-13: the Messenger has to stand beside WhatsApp, Telegram and Signal. Speaking a message was the feature most missed: the box could take dictation (speech to words) but not a voice.
- Voice message in the box's "+", wherever the app can upload and its policy takes audio: one button to start, the same one to stop, then listen, and "Add to message" or "Record again". The take goes into the tray as a file like any other, so it is uploaded, shown and sent by what already sends a photo, and words can go with it.
- The microphone is open only while recording and is closed on every way out: stop, the take reaching five minutes (
VOICE_MESSAGE_MAX_MS), the sheet closing. One request at a time, so a second tap cannot open a second microphone. - WebM/Opus where the browser records it, MP4 on Safari (
voiceMimeType); the file is calledvoice-2026-11-13-2004.webm(voiceFileName).VoiceRecorderandcanRecordVoiceare exported for an app with its own arrangement. test/browser-messenger.mjsrecords with a fake microphone on a 390px phone and counts every track opened: one while recording, none after stopping, none after closing the sheet mid-take.
0.33.0 — Messenger: "New" opens on suggestions, and an agent is offered as one
transport.suggestions(): who to offer in "New" before anything is typed (the viewer's own agents, the people they wrote to last). The sheet shows them at once; typing replaces them with the search. Without the method the sheet opens on its hint, as before. Suggestions that cannot be read leave the hint and never an error: nothing was asked for that failed.- A person of
kind: "agent"in "New" says "Agent" under its name where a person shows a handle, so nobody picks a bot believing it is a person.
0.32.0 — A queued message keeps its conversation; an unanswered question says so
Measured on Loki's own chat on 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, with no way to ask again.
- New, pure (
send-queue):takeQueuedFor(queue, conversationId)takes the next waiting message for the conversation whose turn just landed;queuedForlists one conversation's;storableQueue/serializeQueue/parseStoredQueuekeep the words across a reload (a message carrying files is not stored; a damaged store costs the queue, never the chat). For an app with its own chat state. - New:
unansweredTurn(messages, state)finds the person's last message when nothing is answering it. An optimistic or failed bubble is not one. ChatThreadtakesunanswered: it says "This was not answered…" (labels.unanswered) and, withonRetry, offers Try again.ChatApppasses it, so a reload mid-answer no longer leaves a dead end.
0.31.3 — Starters are one column at every width
- The empty chat's starters (
.ck-starters-list) wrapped into a row of pills of different widths, so on a phone two short ones shared a line and a long one sat alone. The fleet rule "One shape per kind" says a row of choices is never wrapping pills (found in OrangeCat's UX audit, 2026-11-12, auth-firstrun#5). The list is now one column at every width and each.ck-starteris a full-width row, text on the left, still 44px tall. Every product's chat changes with it. Checked intest/styles.test.jsand intest/browser-app.mjsat 390px and 1440px.
0.31.3 — The Messenger holds its shape inside a product's own styles
Owner, 2026-11-13, a phone screenshot of OrangeCat: "a Frankenstein element". The Messenger had been looked at in its own demo page, where no other stylesheet exists and every profile picture is square.
- Fix: a profile photo that is not square was drawn as a tall oval (36×60 in a 36px circle). A percentage height does not resolve inside the avatar's grid; the picture is now pinned to the circle.
- Fix: a host's focus ring (
*:focus-visible) landed on the message field, a box inside the composer. The field has no ring of its own; the composer's border shows the focus. - Fix: a host's minimum size for links (
a { min-height: 44px }) made the name in the top bar a 44px row and pushed it off its subtitle. Links in a sentence, and the name, are text. - Fix: a host's paragraph rules loosened an agent's answer against a person's. Paragraphs in a bubble take the bubble's line height.
demo/messenger.html?host=hostileloads such a stylesheet and a 300×500 photo;test/browser-messenger.mjsmeasures all four on a 390px phone. The test fails on 0.31.2 in each place.
0.31.2 — MessengerComposerAction is exported
- 0.31.0 took an app's actions in
MessengerPropsbut did not export their type from@bitbaum/chatkit/messenger, so an app could not type its own action list (found wiring OrangeCat's "Request money"). It is exported now.
0.31.1 — An action's amount sheet takes the app's note length
MessengerComposerAction.amount.noteMaxLength: how long a note the app can keep (140 when not given), so the sheet never lets a person type a note the server would then refuse.
0.31.0 — Messenger: replies, reactions, and things of value in a conversation
Owner, 2026-11-13: the Messenger has to stand beside WhatsApp, Telegram and Signal, and carry any exchange: information, with or without an agent, and value (money, gifts).
- Reply. Every message offers Reply (long press, right click or "…"). The box says whom is being answered, the sent message carries one line of the original above it (
MessengerMessage.replyTo,MessengerDraft.replyTo,quoteOf), and tapping that line leads to the original and marks it. - Reactions.
transport.react(message, emoji | null)switches them on: six emoji in the message's sheet, chips under the bubble with counts, a tap on a chip adds the same or takes yours off. One per person (withReaction,reactionOf). Shown at once, taken back if the server refuses; other people's arrive as areactionsevent. - Cards.
MessengerMessage.cardis something of value in the thread: a payment request, money sent, a gift, an offer. The app says what it is, for this reader (title, amount, note, status, the one thing they can do); the package draws every kind in one shape. - An app's own actions (
actions): "Request money", "Send a gift" in the box's "+", only in conversations they fit (available). An action withamountgets the package's one "how much?" sheet (a comma is a decimal point; no amount, no send) and then sends words, a card, or both. - Tests: 3 more in
test/messenger.test.js;test/browser-messenger.mjsdrives reply, reactions, a card and an action on a 390px phone, 44px targets included.
0.30.0 — VoiceMode: talking with a chat, and a microphone that cannot be opened twice
Owner, 2026-11-13: 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) andvoiceModeReducer(the rules, pure): listening → thinking → speaking → listening. One big button: while listening it ends the person's turn (where the browser's own recogniser runs, a pause ends it by itself); while the answer is read it cuts in. The app passesonTurn(text) => Promise<answer>and, if it has one, a studiospeaker; the microphone options are the composer's own.- The microphone and the voice follow the phase and nothing else (
voiceModeWants): never both open, neither open when the call is off. Two takes in a row with nothing in them close the call ("Nothing was heard"), and so do a failed transcription and an answer that never comes, each with its sentence and a "Talk again". - Fix,
useDictation: a secondstart()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 (a double tap on the mic could do it). One request at a time now, and a take cancelled while the microphone was still opening closes it where it arrives. test/voice-mode.test.js(8, the rules in Node) andtest/browser-voice.mjs(a real browser with a fake-device microphone, every opened track counted: the loop, cutting in, End, silence, no answer, a dead transcription, 390px and 320px).demo/voice.html.
0.29.0 — Messenger: people talking to people, and to the agents among them
Owner, 2026-11-12, looking at OrangeCat's direct messages on a phone: the Cat had answered in a conversation between two people and "it's hard to tell whether it was the cat or my friend"; nothing said an AI was taking part; "you scroll down and then the half screen is taken"; and nothing could be attached. That messenger was built in the app (about 8,700 lines), so none of it could be fixed for the next product either. This is the messenger as a package.
@bitbaum/chatkit/messenger:Messenger(the whole screen), and its partsuseMessenger,ConversationList,MessageThread,MessageAttachments. The app implementsMessengerTransport—conversations,messages,send, and whatever else it can do (upload,subscribe,markRead,typing,edit,remove,people,open,leave). No database, websocket or storage in the package.styles/messenger.cssis the embedded sheet plus the Messenger's section, without ChatApp.- An agent is told from a person three ways: the shape of its face, an "Agent" mark with whom it answered for, an outlined bubble; the top bar says it is in the conversation; a message naming it shows "… is thinking" until it answers, and says so if it never does.
- Files: Camera · Photos · Videos · Files, checked against
@bitbaum/threadkit's attachment policy before an upload starts, photos shrunk in the browser, progress and Try again per file, pictures and films in a full-screen viewer, a film drawn as its still. - The thread: runs, day lines, a "New" line, ticks from threadkit's
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"(one row: attach · words · microphone · send),attachmentsAlone(a message of only files needs no words),attach.take(the app takes the files; nothing is read into the page),attach.accept, a"videos"source, and files dropped onto the box. Defaults unchanged.- The Messenger's state is one pure function (
messengerReducer), so its rules are tests that run in Node (test/messenger.test.js, 35).test/browser-messenger.mjsdrivesdemo/messenger.htmlat 390px, 320px dark and 1280px: the box at the bottom with nothing under it, the thread filling the rest, 16px, 44px targets, no cut words, and every flow above. It found two defects before any product did: a read mark that cleared the badge on screen without telling the server, and a page of history that pulled the reader to the end of the thread. - New dependency:
@bitbaum/threadkit(the rules: who may write, how messages merge; it has no dependencies of its own). threadkit 0.1.2 adds the attachment policy, the mention matcher andreadState; it was merged and tagged on 2026-11-12 but its npm publish was refused (the workflow is not yet the package's trusted publisher), so those three are carried word for word insrc/thread-rules.ts, with threadkit's own tests (test/thread-rules.test.js) and a check against the installed threadkit wherever it already has them. The file says when it goes.
0.28.1 — Dictation and Improve respect a field's maxLength
A dictated take or an Improve rewrite never leaves the field past its maxLength. The attribute only stops typing and pasting; a value set in code went straight past it (found reviewing Loki's converted fields, which set 300 and 1000). clipToMaxLength(text, maxLength) cuts at the limit, back to a whole word when one is near, and is exported.
Unreleased — Your first message no longer pushes the composer off the screen
Found 2026-11-12 on bitbaum.orangecat.ch /hire/ at 390x844: the contact box is a card holding a ChatThread, a receipt link and the Composer, mid-page. The thread is short, so the document owns the scroll. Sending the first message pinned the end of the thread to the bottom of the viewport, which scrolled the page UP by about 300px (5310 to 5026) and pushed the receipt and the composer below the fold, with focus still in the hidden text area. Following exists to bring a new turn into view; here it took the box out of view.
- When the document owns the scroll, following only moves the page down: when the end of the thread is already on screen, nothing moves. A thread that scrolls itself, or inside a scrolling panel, 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): set on the thread's wrapper or any ancestor, it leaves that much room under the latest turn when the page follows, so a composer under the thread stays in view (--ck-follow-gap: 10rem). The browser resolves the length, so rem, em, px andcalc()all work; unset, negative or invalid is 0.- The rule from the previous fix holds: while the document owns the scroll and the reader has sent nothing, nothing moves.
- Checked in
test/browser-scroll.mjson a new fixture (demo/scroll.html?owner=page&greeting&below, the box between 3,000px of page and 1,500px more) 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 stops with the thread's end at the bottom of the viewport, or 160px above it with10rem, 120px with6emat 20px, 90px with90px, and at the bottom again with an invalid value. Both checks fail on the code before this fix (the page went up 397px at 390px; with10remthe end sat at the bottom). The existing page, panel, ancestor, greeting, screen and missing-root cases pass unchanged.
0.28.0 — A refused comment says why
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 now 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. commentFailure(error, fallback) is exported for apps that build their own box.
Unreleased — You can see where you are typing
Found 2026-11-12 on bitbaum.orangecat.ch (/, /hire/, /builders/, /loki/): with keyboard focus in the composer's text area there was nothing to see. The text area drops its outline, and the only sign was the composer's 1px border stepping from 90% to 82% grey, 1.5:1 against the composer in light and 1.35:1 in dark with the design tokens, and the same colour focused and unfocused in a consumer's theme. In ChatScreen's floating composer the border did not change at all. WCAG 2.4.7 asks for a visible focus indicator and 1.4.11 for 3:1 against what is next to it.
- While the composer holds focus its border takes
--ck-focus, which defaults to the secondary ink (--ck-fg-2) and so follows the theme: 5.7:1 on the composer in light, 7.0:1 in dark, in every composer shape (comfortable, compact andChatScreen's dock). Still a 1px border and no ring, so a click into the box looks as quiet as before; the composer keeps its size. - An app can set
--ck-focusto its own colour, as with every--ck-*variable. - Checked in
test/browser.mjson the demo and the full screen at 390 and 1280px, light and dark: Tab reaches the text area, the border changes, it contrasts at least 3:1 with the composer's own background (computed in the page), and the composer measures the same focused and unfocused. The test fails on 0.27.0.
0.27.0 — A form's text area can be DictationField: name, error, submit keys, a blur that waits for the words
Loki has 34 text areas made by hand, with no microphone, and they could not become DictationField because a form needs things the field did not pass through. Measured in Loki's source (36 text areas): onKeyDown 10 (Enter or Cmd+Enter submits, Escape cancels), maxLength 9, id 7, autoFocus 7, disabled 5, onBlur 2 and onFocus 1 (an inline editor saves when focus leaves), name 2 (a native form post), spellCheck 1, and forms that show a validation error on the field. All new props are optional; without them the markup and behaviour are unchanged, except that a hint is now linked to the field with aria-describedby and Enter in Improve's box applies the instruction (below).
name,autoFocusandreadOnly. A read-only field draws no microphone, no Improve and no Undo: nothing may change its text.invalidanderror:aria-invalid="true", the frame drawn in--ck-danger(light and dark), and the error in words under the field as<p class="ck-field-error" role="alert">, so colour is never the only sign.errorimpliesinvalid; an emptyerror("",0) is none, so a valid field is never drawn as invalid with nothing said. Error andhintare linked to the field witharia-describedby(<id>-error,<id>-hint).onSubmit: the submit keys belong to the package, so a person meets the same ones in every app. Cmd+Enter or Ctrl+Enter in a text area, Enter in a one-line field; never while an IME composition is open, never while disabled or read-only, never while a take is recorded or transcribed. WithonSubmitset, Enter in a one-line field never also runs the browser's form post (Shift+Enter, during a take, read-only), so a form is not sent mid-take without the words.onKeyDownruns first and canpreventDefault()to stop it.onFocusandonBlurare the whole field's: moving between the text box, the microphone, Improve and its panel is not a blur, so pressing the microphone does not close an inline editor under the person's finger. Leaving while a take is recorded or transcribed is reported after the take's words have gone throughonValueChange, so a host that unmounts on blur never loses what was said. Waiting for Improve, which disables its own box, is not a blur. A field the host unmounts while its blur is held reports none; its words still arrive. A tap on empty page is a blur; switching to another window or app is not.inputProps(DictationFieldInputProps):spellCheck,autoComplete,autoCapitalize,inputMode,enterKeyHint,minLength,aria-*,data-*, spread before the managed props so the field's own win.- Enter in Improve's "What should change?" box now applies the instruction, instead of sending whatever form the field sits in.
- Checked in
test/browser-field.mjson a new form fixture (demo/field-form.html, a development build under Strict Mode) at 390px and desktop, light and dark: the submit keys, a composing Enter, a suppressed Enter, the microphone and a whole take without a blur, one blur to another element and one to empty page, a blur held until the words land, Improve applied from the keyboard while it works, Enter while listening and Shift+Enter sending no native form, the native form post, and the error seen in both themes with no control under 44px and no sideways scroll at 390 and 320px.
Unreleased — A greeting on a page no longer takes the page
Found 2026-11-12 on bitbaum.orangecat.ch: /hire/ and /builders/ opened scrolled down to the contact box, past the headline and the prices (3,400px down at desktop width, 5,500px on a phone). The box is a ChatThread holding one greeting. A thread that short has no scroll of its own, so the document owned the scroll, and useStickToBottom pinned the document to the thread's end on mount.
- 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.
- Checked in
test/browser-scroll.mjson a new fixture (demo/scroll.html?owner=page&greeting, a greeting under 3,000px of page) at 390 and 1280px: the page opens at its top, a resize does not take it, the reader scrolls freely with no jump button, and the first message is followed. The test fails on 0.26.0.
Unreleased — No microphone on a page that may not use one
A host that sends Permissions-Policy: microphone=() (the fleet's starter template, and orangecat.ch for a while) made every take fail with "blocked", a problem 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, so the mic is not drawn. microphoneAllowedByPolicy(document) 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 this check.
Unreleased — Agents are members: an "Agent" mark and whom it works for
In a room where people and agents both answer, a reader has to know which is which and who answers for an agent's words. ChatSpeaker gains kind: "agent" | "person" (an agent gets a small "Agent" mark beside its name) and onBehalfOf (drawn as "Loki · for Georgy"). Both labels are translatable (labels.agent, labels.onBehalfOf with {name}), both optional, so existing apps are unchanged. The streaming turn shows the same line.
Unreleased — attach.sources: a paperclip that offers only what the backend reads
Solon's chats read words and text files, not pictures, and had to switch attachments off entirely because the paperclip always offered Camera and Photos. attach={{ sources: ["files"] }} (on Composer and ChatApp's composer.attach) draws only the listed sources, and a picture that arrives by paste or drop is refused with the wrongType note instead of being staged and dropped by the server. acceptsImages(sources) is exported. Default unchanged.
Unreleased — A server's English never reaches a person in another language
Found 2026-11-10 on Solon's Russian page: the mic failed with the localized "voice input is unavailable" followed by the route's own "Sign in to dictate." Any app whose transcribe route answers in English showed English in every locale.
DictationProblemgainssignIn(401/403) andbusy(429); 413 isfileTooLarge; everything elseunavailable. The problem comes from the HTTP status (problemForStatus,problemForTranscription), and a customtranscribemay throw an error with astatus. Each has an overridable label (labels.dictation.signIn,.busy; English defaults inDEFAULT_DICTATION_MESSAGES).busycan be retried likeunavailable.- The server's own sentence is no longer shown by default.
voice={{ showServerDetail: true }}brings it back for a server whose text is localized.
0.23.0 — Any text box has the microphone; a thread of comments
Owner, 2026-11-06: every product installs the chat package and the text boxes people actually type in are still made by hand, with no microphone. A package that is installed and not used is no package. This release gives the other two 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 shown with its timer and kept for a retry — appending to what is there; 16px text, 44px targets. Optionalimprove={{ run, suggestions }}: one tap on a suggestion, or say or type what to change; working, failure and Undo in words, the person's text untouched on failure. No model call and no prompt in chatkit:runis the app's.CommentThread: the conversation under anything. Oldest first, the box isComposer(mic, 16px, Enter sends), atransportthe app implements (post, optionalremove), optimistic removal rolled back with a message on failure, a refused post keeps the draft, comments shown as text with their line breaks, a sign-in link for a signed-out reader, times in a statedtimeZoneso server and browser markup agree.VoiceBarandVoiceProblemare now one implementation inside the package:ComposerandDictationFielddraw the same take and the same failure line.Composerbehaves as before (its existing browser checks pass unchanged).- Styles for both are in
styles.css, after the ChatApp boundary, so the embeddedstyles/chat.csskeeps its size budget (10,464 bytes gzipped, unchanged). test/browser-field.mjs, on a new fixture page: a mic in every field and in the comment box at 390/320/1280px light and dark, 16px, no control under 44px, no sideways scroll, mic words appended to typed text, Improve in one tap, Undo, an improve failure that keeps the text and the instruction, a comment posted, listed, removed, and a refused one that keeps its draft.
0.22.1 — Back at the bottom by hand, the jump button goes; chips answer the question
-
REPLIES_INSTRUCTION: when an answer ends on a question to the person, the replies are short answers to it, never the question repeated and not next steps. Found 2026-11-01 on Diplodoctor's live model: under four questions about a sore finger, the chips were "I have more info" and "Consult a doctor", and a tap answered nothing (2 of 9 chip sets were answers; 7 of 9 with this sentence added). -
A finger rocks back a pixel or two as it lifts.
useStickToBottomread that last touchmove as "scrolling up" and paused following, so a reader who scrolled back down to the latest message by hand was left with the jump button sitting over the reply chips, and a tap on it did nothing: there was nowhere to jump to. Found 2026-11-01 in OrangeCat's Diplodoctor chat on Android. Where the gesture ends now decides: a touch that lifts at the very bottom (isAtBottom, 16px — far tighter than the follow threshold, so a deliberate small scroll up still pauses), or any downward scroll that arrives there (a fling running on after the finger lifted), is following again. -
Checked in
test/browser-scroll.mjsonChatScreenat 390px with real touch input: read up, come back down by hand with a 2px lift-off wobble, the button is gone; read up again, a TAP (not a scripted click) on the button lands at the latest message. The test fails on 0.22.0.
0.22.0 — The microphone listens until you press done, in every product
- With a server leg (
transcribeortranscribeUrl) and noprefer, a press of the microphone now records until the person presses done, and the server transcribes. It used to start on the browser's recogniser, which on Android ends the take at the first pause whatevercontinuoussays. Found 2026-11-01 in OrangeCat's bot chats: the composer there passed noprefer, so a person speaking to Causius was cut off after one or two seconds, while the Cat's composer (prefer: "server") in the same app listened to the end. The same microphone now works the same way wherever it has a server leg.prefer: "browser"keeps the old order for an app that wants it; with no server leg nothing changes. dictationLeg({ prefer, hasServer, canRecord, hasRecogniser, recogniserDead })is the rule, exported and tested.
0.21.5 — A sheet taller than the screen scrolls inside it
Sheethad 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, its close button and its first row cut off above the viewport on a phone and on a 900px desktop (found 2026-10-31). The dialog and its panel are now capped at the viewport and the panel scrolls, with its head in view and the page behind it not scrolling along. Checked in the browser test with a sheet made 3,000px tall.
0.21.4 — Any product's source handle is a chip
- Citation handles were read only as
[F1]and[D1]. A product that numbers its sources by its own letter showed the bare handle in the answer, with no chip, no link and no sources row: Solon's law answers ([L1], every answer since the law chat shipped), found 2026-10-31. Substrata had met the same limit and rewrites its[W12]to[D12]before display (lib/chat/web-citations.ts); that rewrite is no longer needed. A handle is now one or two capital letters and a number, the same patternspeakableTextalready dropped for Listen. Without a citation map, an answer is not grounded and[A1]is just words, so it is shown as written; in a grounded answer an unknown handle is still dropped.
0.21.3 — A bare reply array, with no fence, is still the replies
extractRepliestook 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 instead (["Ask if notice was respected", "Consult a lawyer"]as the last paragraph; Causius's answers in OrangeCat's 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 of the text, once the answer is complete; while streaming it is left alone, since it may still be growing, and an array inside an answer (data, code) is never touched.
0.21.1 — The footnote is a div, not a p
ChatScreen'sfootnotewas wrapped in a<p>. A product that put a panel, a form or its own paragraph in it (Substrata's "Send evidence" and key panel) produced HTML a browser repairs while parsing, so React found a different tree in the browser than the server sent and threw hydration error #418 on every load of/chat(found 2026-10-27, reproduced in a development build: "In HTML,cannot be a descendant of
"). The wrapper is now a
<div class="ck-screen-footnote">; the class and its styles are unchanged, so a one-line footnote looks the same.
0.21.0 — attach.readFile: the app's own reading of a picked file
- The composer and
ChatAppread images and text and refused every other file, so an app that reads PDFs (@bitbaum/chatkit/pdf) could not use the paperclip, paste, drop orChatAppHandle.sendfor them without a bridge.attach.readFile(file, { limits, notes, images, room, progress })returns the attachments to stage (one file may become several), a note, orundefinedto leave the file to chatkit. - Files are read one at a time, so
imagesandroomcount a file before it.readAttachmentFilesis the same for code outside the box.
0.20.1 — Files opens the file browser on Brave for Android too
ATTACH_SOURCE_INPUT.filesasks for documents (FILES_ACCEPT: PDF and text) instead of nothing. An emptyacceptmeans "anything"; Brave on Android answered it with Camera, Recorder and "Photos & Videos" and no file browser, so a PDF could not be picked at all (OrangeCat, 2026-10-27).FILES_ACCEPTis exported from@bitbaum/chatkit/attach.
0.20.0 — PDFs a person attaches
@bitbaum/chatkit/pdf:readPdf(file, { maxSheets, assetsUrl })reads a PDF in the browser. A PDF with a text layer comes back as text with page markers; one without (slide images, scans) as pictures of its pages, four to a sheet. Found on OrangeCat 2026-10-27: a 17-slide investor deck with no text layer could not be shared with the Cat at all.chatkit-copy-pdf-assets <dir>: copies pdf.js's worker and decoders where the app serves static files. Without it, JPEG 2000 pages (macOS's compressed PDF export) draw blank.- Pure helpers for tests and an app's own wording:
isPdfFile,isTextRich,joinPageTexts,planSheets,sheetName. - New dependency:
pdfjs-dist(loaded only when a PDF is read).
0.19.0 — ChatApp: what the first four products could not do with it
From the adoption PRs' own lists (bitbaum/heidi#226, bitbaum/orangecat#1447, bitbaum/solon#309, bitbaum/substrata#262). All additive; 0.18 props behave as before.
ChatApptakes a ref:ChatAppHandle—send(text, attachments?, { newChat?, chips? }),fill(text, files?),focus(),newChat(),openConversation(id).sendreadsFiles like the paperclip and, if one cannot attach, sends nothing and fills the box with the reason instead.initialMessage(sent once, in a new chat, after the list loads; StrictMode-safe) anddeepLinkParam(fills a new chat's box from?q=and takes it off the address; sent only withdeepLinkAutoSend). The chat from before the reload is not reopened over either.- Retry re-sends the failed turn's pictures and files, not only its words.
- A failure is per turn: throw
ChatTurnError(message, { kind }); the bubble shows its message and keepsChatMessageData.failure. Other errors still show thefailedlabel, never their raw message, unlessfailureMessagemaps them.chatTurnFailureis the rule, exported. stopKeepsPartial(default true) and, per turn,turn.stopKeepsPartial(keep).Startermay be{ text, label?, lang? }, and every object starter takeslang(set on the button).starterPartsexported.historySlot(under the chat list's search box) andhistoryEmpty(instead of "No chats yet").Composer attachExtras/AttachMenu rows: the product's rows under Camera · Photos · Files, one anatomy; withattach: falsethe sheet holds only them.ChatMessageData.chipson the person's message, fromchipsFor(orsend(…, { chips })), shown at once and kept with the message.onTemporaryEnd(chatId)when a temporary chat is left, the page is hidden or ChatApp unmounts;turn.chatIdis the same id.renderFooter(m, { isLatest, index })inChatThread; in ChatApp alsosendandfill.thread.after: content after the last turn, inside the thread.Composer handleRef(ComposerHandle:setText,addFiles,focus,submit), andreadAttachmentFile— the one file reader the composer andsendshare.- The live answer's Stop button is a 44px target (it was 36px).
Left to products, on purpose:
- Translated sets of ChatApp's own words (Solon): every label is a prop; a product owns its language files, and chatkit shipping five locales would be a second copy of each product's dictionary.
- Replies as
{ label, say }(Heidi): chips whose label differs from their sentence are product UI;renderFooter'ssendmakes them one tap without changing the reply format every model is told to emit. - The hidden server row for a temporary chat (OrangeCat): ChatApp says when the chat ends; what the product stored and how it deletes it stays the product's.
- Pinned chats, by-project lists, hands-free voice (Loki): not asked for by these four; still tracked in "Moving a product onto ChatApp".
Earlier
-
The scroll owner now handles DOM environments without
document.scrollingElement; when a previously scrollable thread loses its scroll container, the stale listener is cleaned up safely instead of crashing. A browser regression fixture covers the transition after a prior owner was selected. -
ChatApp(@bitbaum/chatkit/react): the whole chat app — header, chat list (drawer on a phone, rail when wide), New chat, Temporary chat, titles, rename and delete, the open chat restored on reload, turns that keep running in the background, the queue, attachments on by default. Additive:ChatScreen,ComposerandChatThreadare unchanged. -
ConversationStorewithlocalConversationStore(device, versioned, never throws) andhttpConversationStore(REST);deriveTitle,groupConversations,filterConversations,formatConversationDate,pickRestored,copyConversations. -
ChatMessageData.attachmentsdraws what the person sent above their bubble;Composer stagedPosition="above"stages pictures above the text. -
docs/fleet-chat-matrix.md: every product's chat, side by side. -
Embedded conversations now let scroll gestures reach the actual page or ancestor scroller. Reading an older answer stays stable through status updates, arriving assistant turns and resizing; a new user message or the return-to-latest action resumes following. The same behavior is covered in page, panel and nested browser fixtures.
-
Release verification installs the browser required by the package's own checks.