* feat(field): DictationField with no state in the app — native forms and react-hook-form (0.44.0)
- Uncontrolled mode: value/onValueChange optional, new defaultValue; the real
text box carries name, so a native form or server action posts typed and
said words, and a form reset restores defaultValue.
- react-hook-form: forwardRef (ref is the text box), onChange(event) for
every change including microphone/Improve/Undo/setText, onBlur(event).
- Browser test drives react-hook-form itself (register, Controller, reset)
and a native form; docs/roadmap.md records the remaining typing gaps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtoej4Vu1mYafzzcLc
* docs(field): say the ref works across the peer React range, not a version
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtoej4Vu1mYafzzcLc
---------
Co-authored-by: Claude <noreply@anthropic.com>
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>
DictationField takes `attach?: boolean | AttachOptions` and an app-owned
`attachments?: AttachmentsController`: the same paperclip sheet, paste,
drop, staged previews with Remove and limits as Composer. Off by default.
The paperclip wiring, staged strip, mic button and the shared voice and
attach labels move into one internal module (src/react/typing.tsx) used by
both Composer and DictationField. Composer's behaviour and API unchanged.
README gains the Composer-vs-DictationField rule and the plan for the rest
of the unification.
Claude-Session: https://claude.ai/code/session_019MDtmv1SAs6YZn4FrewbXR
Co-authored-by: Claude <noreply@anthropic.com>
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>
* 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>
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>
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>
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>
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.
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>
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>
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>
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>
* 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>
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>
* 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>
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>
- `@bitbaum/chatkit/attach`: AttachMenu, ATTACH_SOURCE_INPUT, isTextFile,
acceptFamilies and shrinkImage without the composer, so an app with no chat
(avatars, product photos, receipts) uses the same picker instead of
re-rolling a file input. AttachMenu takes `sources` (an image uploader offers
Camera + Photos; one source skips the sheet) and a `trigger`.
- `chatkit-check-file-inputs` (bin): fails CI on a literal accept that mixes
file families — the shape that hid screenshots on Android in loki, orangecat
and evig. Same rule as the package (acceptFamilies), so there is one
definition; a justified exception is marked on the line.
- shrinkImage moves out of the composer hook into src/image.ts (unchanged).
- README: install releases from npm, never a commit — heidi and substrata
stayed on the broken paperclip because they pinned old versions.
Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck
Co-authored-by: Claude <noreply@anthropic.com>
* feat(composer): Camera / Photos / Files sheet instead of one mixed file input
On Android the paperclip opened a chooser of capture apps (Camera, Camera,
Recorder, "Photos & Videos") with no way to the file browser: one input with
a mixed accept (image/*,text/*,audio/*) is answered that way. Attaching a
screenshot to Loki was effectively impossible from a phone.
- AttachMenu: on a touch screen the paperclip opens a bottom sheet with three
sources, each its own input (ATTACH_SOURCE_INPUT is the SSOT): Camera
captures, Photos opens the system photo picker, Files has no accept and
opens the real document browser. With a mouse it opens the dialog directly.
- isTextFile: Files takes anything, so what can be read inline is decided
after the pick. A PDF gets a sentence instead of being pasted as bytes.
- The sheet is portalled to <body> so a composer inside a transformed or
clipped panel still gets a full-screen sheet. react-dom becomes a peer.
- Tests: unit (sources, text detection), SSR (one input per source), browser
(sheet on a phone, 44px targets, Escape, Photos picker accept, PDF note,
direct dialog with a mouse). CHROMIUM_PATH lets the browser suite run
against a preinstalled Chromium.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck
* refactor(attach): the sheet is a native <dialog>, not a portal
showModal() renders in the top layer, so a composer inside a transformed or
clipped panel still gets a full-screen sheet without react-dom, and the
browser supplies Escape, the focus trap and focus restore. react-dom is no
longer a peer. A tap on the backdrop closes it (browser-tested).
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>
* feat: chatkit v0.1 — one chat for every product
The fleet had 13 chats in 10 repos, each written fresh, each missing what
another had fixed. This extracts loki /loki (composer, thread, messages,
markdown, attachments) and adds heidi's microphone and orangecat's keyboard fix:
- Composer: auto-growing 16px textarea, Enter/Shift+Enter/IME, Send and Stop
in one slot, attachments with paste, mic always present, every label
translatable, app-specific controls in slots.
- useDictation: browser recogniser first; missing or SILENT (4 s watchdog,
bounded permission wait) -> record and transcribe on the server; a dead
recogniser remembered 30 days; every failure shown in words.
- ChatThread/ChatMessage: stick-to-bottom + jump button, speaker names once two
agents speak, Copy on answers, Retry on the last one, failed turns visible.
- Markdown with no HTML path; javascript: links stay text.
- styles.css: --ck-* variables defaulting to @bitbaum/design-tokens.
- verify = format, lint, types, build, 18 unit/render tests and 21 browser
checks (390px + desktop, light + dark, a sentence through a fake mic past a
silent recogniser). Browser checks mutation-tested (14px input, 60 s
watchdog) — both fail as they should.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(styles): --ck-* defaults at zero specificity on :root, so an app's own values win
Declared on the chat's elements they overrode any app setting --ck-* at the
root — the opposite of what the README promised. Found preparing loki, whose
colour variables are full OKLCH colours under the design-token names and so
must map them. New browser check: a :root --ck-accent reaches the chat.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>