2656 Commits
Author SHA1 Message Date
0ad5c96fc5 feat(planner): the morning gets you ready three days ahead; hand it all to a bot (#1817)
"Your day" now names the calendar's own entries three days ahead
("Get ready: Hackathon · Wednesday") with a link that opens the to-do
list on that entry (ReadyFromCat), one tap from the prepare to-dos. The
morning job never asks a model: the platform's free keys are spent only
when a person asks (no-background-ai.test.ts), so the tap is the asking.
The link format (prepare-shape.ts, browser-safe) can also carry to-dos
already made, for when they are written ahead on the person's own key.

Kept prepare to-dos can be handed to one of the person's bots together
("Hand these 3 to a bot"): taskAdd now resolves to the new task's id,
and HandOver moved to components/planner so the prepare block and the
list share it. The list's words and sectioning moved to my-list.ts to
keep MyListView under the component size limit.


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

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cato <cato@orangecat.ch>
2026-12-02 23:49:22 +01:00
CatoandClaude f92fd0b2d9 fix(cat): a failed confirm says so; create_service works; Cat says draft for a draft and keeps quoted text (#1846)
* fix(cat): a failed confirm says so; create_service works; Cat says draft for a draft and keeps quoted text

* fix(cat): satisfy eqeqeq in create_service's BTC-param check

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 23:27:44 +01:00
CatoandClaude 23ae40f58f fix(civic-split): sliders are 44px boxes that clear the bottom nav at 390 (#1868)
Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 22:29:35 +01:00
CatoandClaude e4f38d60e3 fix(timeline): a post written once is shown once (#1867)
Every feed answers through feedResponse, and load-more and the optimistic
merge concatenate pages. None of them removed a row seen twice, or the same
post under two ids, so Cato's posts showed twice on /timeline and in the
dashboard's Recent activity. dedupeTimelineEvents keeps the first of each.

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 22:00:01 +01:00
CatoandClaude 6b2291422f fix(settings,profile): tab strips never read as clipped at 390 (#1869)
A shared useScrollEdgeFades paints a fade only on an edge with more beyond
it; Settings had a trailing fade that never left. Both strips get min-w-0 /
max-w-full so a long tab row cannot widen the page.

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 21:03:06 +01:00
CatoandClaude Opus 5.5 5b521645de fix(profile,messages): your own page is one to send; a photo always shows; the Cat answers once (#1865)
* fix(messages): a photo is never drawn as an empty row; one message gets at most one Cat answer

Owner's phone, 2026-11-15, the conversation with Penguin:

- A photo sent at 01:16 showed as an empty row with only a time and a tick.
  The server writes the message and then links its uploads; the realtime
  INSERT made the thread re-read in between, the message came back without
  its files, replaced the sender's copy, and nothing re-read it (linking a
  file is not a change to the message). A message of files without them is
  now held back for up to a minute and re-read every 1.5s until its files
  are on it (`filesStillLinking`); past the window it is shown as it is.
- The Cat answered the same question twice in a row. The queue was already
  one row per message, but two queued messages (two tags, or a tag and a
  follow-up) each produced an answer written from the whole window, so both
  answered the newest question. An answer now records how far it read
  (`answered_through`); a queued message an answer had already read is done
  without writing.

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

* fix(profile): your own page is one to send; listings are rows; edit profile reads clean

Owner's phone, 2026-11-15:

Own profile
- No orange "Pay" aimed at yourself. The owner gets Edit profile and one
  primary action, "Share your page"; a visitor keeps Pay. "Pay Cato" on
  Overview is "Your pay link" (the code and link), not a button to pay
  yourself.
- "What I can offer": one shape. Skills, asked-for, assets and not taking on
  are the same small tags, six then "+N more"; the owner's one action is
  "Create a listing from a skill", a list of rows.
- Project and listing cards: the picture is a square at the start of a row,
  picture or not (the Discover phone shape), so a shelf without photos is a
  list, not a column of tall grey plates. A picture that fails shows the
  kind's icon. Category and status are words above the title. The owner's
  own card offers Edit, not Support.
- Tabs: four up front (Overview, Timeline, Projects, Wallets) and "..." on a
  phone; words only below sm. One row at 390px.
- Contact and Links on your own page say "Only you see this" when hidden
  from visitors.

Edit profile
- The location field leaves room for its pin; a place is shown and picked
  short ("Zurich, Switzerland"). Stored rows are not rewritten.
- Plain words for the location group ("a group name you share with others").
- The Save bar on a phone is pinned above the tab bar with a spacer of its
  height at the end of the form, and fills down behind the tab bar, so
  nothing shows through or hides under it. One bar.

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

* test(cat): answer-once test mocks the Cat's thinking step from main

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

* docs(changelog): own profile, edit profile, Messages

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

* fix(cat): a failed answer-once check never silences the Cat

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-12-02 20:38:52 +01:00
CatoandClaude 8922bdace9 feat(nav): Bots and Settings in the primary navigation (#1866)
Bots (the companions list) moves up from the collapsed More group; Settings
joins the main section with the account menu's name and icon. The primary
list cap in my-things.test.ts goes from nine to eleven, with the reason.

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 19:43:00 +01:00
e8dc1c87c2 feat(articles): cover pictures, charts and writing suggestions you accept or reject (#1780)
* fix(community): a QA run's posts and listings stay off the public shelves

Live after #1736, /community opened with "QA test post from A" by
"QA Grok A", and Discover's first product, "Old Road Bike", was that QA
account's too, its share card reading "by QA Grok A".

- The community feed drops posts whose author's display name is a fixture
  name (NOT_A_FIXTURE_AUTHOR, the People directory's rule on the view's
  actor_data); checked read-only against production.
- 20261113201500 marks the QA account's remaining products, services,
  projects and causes is_test (matched by id and its QA name; nothing
  deleted; rollback in the file).

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

* fix(timeline): sign every post author through one byline helper

A minted user_<hex> handle was still printed as name and @handle on
/community, in quotes, reposts, the reply placeholder and the post's
share text. postAuthor() (src/utils/byline.ts) is now the one rule:
chosen name, else chosen handle, else the neutral phrase; no @line for
a minted handle; the avatar plate shows a person glyph, not its letter.

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

* fix(companions): no bot face is orange; check:one-orange covers the pigments

orange and amber are replaced in place by two shared map-scale token
values (indigo, steel), so every other name keeps the face it had. A
stored face URL with hue=orange/amber resolves to its replacement.

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

* feat(cat): one face for the Cat, used everywhere it is drawn

CatAvatar draws the brand icon tile; CAT_AVATAR_PATH is the same drawing
for slots that only take a URL. Feed, quotes, the answering row, the
mention menu, the profile, follow lists, Messages (list, picker, thread)
and the profile share card all use it. The answering row's AI chip is
neutral like the post header's, not orange.

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

* feat(not-found): one not-found page for every kind

components/ui/NotFound.tsx is the only 404 design: 'This {kind} isn't
here', one sentence, a search that goes to Discover, the kind's own
shelf and Home. Every public detail route has a not-found.tsx naming
its kind (products, services, events and others fell through to 'Page
Not Found'), wallets no longer have their own layout, and tab titles
come from notFoundTitle() in sentence case with registry names.

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

* refactor(cat): name the Cat's picture a src, not a path

audit:routes reads a *_PATH string constant as a page link and failed on
the static icon. It is an image source.

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

* feat(legal): read the operator from one unset constant

LEGAL_OPERATOR (src/config/legal.ts) is null: the legal entity is not
known and is not guessed. While null, /terms and /privacy say what they
said before and stay marked Draft. Once filled in, the opening sentence
and Contact section of both carry the legal name, address and contact.

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

* style(projects): merge a duplicate import to stay inside the size limit

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

* test(ci): cover the bot-face check in the one-orange gate fixtures

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

* feat(cat): one real answer for a visitor, and a pay-link name check

POST /api/cat/first-answer answers a visitor's own sentence before they
have an account, on the visitor budget (general per-IP, then 3 an hour of
its own), for the page's own origin only. Nothing is stored.
GET /api/pay/name says whether a pay-link name is free to claim.
The door helpers carry a typed sentence through sign-up to the Cat.

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

* fix(faq): say about Cat Credits what the pricing card says

The FAQ offered credits as open while /pricing badged them "Not open
yet". Both sentences are now built in cat-plans.ts from
CAT_CREDITS_ON_SALE. The free plan no longer calls Gemini open-source.

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

* feat(home): the home page sells the outcome, in one promise

The hero is the promise and one action: claim orangecat.ch/pay/<name>,
with the page that name makes shown as it is typed. Under it, Discover's
own "Just listed" rows instead of the studio grid and the small counts,
then the Cat's door, which answers a visitor's sentence once and invites
them to sign up with the sentence kept (the account screen shows it).

The promise is written once in config/brand.ts and read by the hero, the
titles and descriptions, the share card, the sign-in panel, About and the
footer. /pricing opens on "0% to sell"; the Cat plans follow.
The start action is named for what you get: "Get your page".

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

* feat(entities): one cover picture for every kind, in every create and edit form

ENTITY_COVER (src/config/entity-cover.ts) names each kind's cover column
once. base-config-factory puts the same picture field under the description
of every form (and into the wizard step that shows the description), the
schemas accept it, creates write it through coverColumn and updates through
coverFieldMapping, which also lets a removed picture clear the column.

Five kinds had no column to keep a picture in (service, cause, asset, loan,
research): one migration adds a nullable cover_image_url to each and makes
public_documents() read every kind's cover first, so Discover and search
show it. Rollback is in the migration.

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

* feat(discover): the cover is the hero, the card and the share picture; no picture shows the kind's icon

The public page's hero, the Discover and search card, the dashboard card, a
profile's shelves and the share card all read the kind's cover through
entityCoverImages. Without a picture a listing shows its kind's icon on a
token surface (EntityCoverPlaceholder) on every list, replacing three
different letter plates; a bot wears the face its name picks and a person
keeps a round initial.

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

* docs(changelog): home sells the outcome, a picture for every kind, one byline

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

* fix(messages): the Cat answers every message in a conversation with only the Cat

A one-to-one with the Cat stayed silent unless the message tagged @cat: only
a tag queued a reply. Alone with it there is nobody else a message could be
for, so a message there is owed an answer without a tag. In company the Cat
still waits to be tagged.

- isAloneWithCat(): one person and the Cat, asked by the write path and by
  the reply.
- The reply is worded for it (nothing was tagged) and carries no
  requested_by: there is nobody else it answered for.
- A message of only files asks nothing.

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

* feat(messages): New opens on the Cat, your bots, recent people and people you follow

The New message sheet opened on the viewer's own bots only, so for anyone
without a bot it was empty until they typed. It now offers the Cat first, then
their bots, the people of their latest one-to-one conversations and the people
they follow (eight people at most, nobody twice, no unnamed placeholder
accounts). Typing still replaces the list with the search.

- The Cat found by search is shown as an agent, with its own face.
- Alone with the Cat, a sent message shows it writing and looks for its
  answer, as with a bot.

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

* feat(payments): one payment flow, purchases as orders, services booked first

One flow. Paying a person, supporting a page, investing, buying and paying a
booking now share /pay's words, steps and receipt:
- src/config/payment-flow.ts and pay-words.ts are the one vocabulary (the verb
  and the figure, "Waiting for the payment…", "Change amount", "Paid").
- PaySteps draws the code, the claim, expired and failed once; PayFlow, the
  support card, the purchase dialog, the ticket card and the booking use it.
- Every success is MoneyReceipt (To / For / When). "Tip" becomes "Support".

A purchase is an order. A signed-out buyer was shown the seller's bare address
and typed the price by hand; nothing recorded the sale. Now they give a name
and get a code for the price, minted on the seller's wallet, with an order row
(buyer_id NULL). Orders have a page (/dashboard/orders) for seller and buyer.

A service is booked first. The service page has no purchase; once the provider
accepts, the booking asks for the payment through the same flow, and settlement
marks the booking paid (orders.booking_id). No escrow: the money goes straight
to the provider's wallet.

Who is paid and what is charged are unchanged: resolveSellerWallet and
resolveAmount (the booking's own price_btc for a booking).

Migration 20261114091700: orders.buyer_id nullable, orders.booking_id.

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

* fix(bookings): a booking's money is server-written, paid once, and never "paid" by the customer's own hand

- Migration 20261114104100: clients lose INSERT and table-wide UPDATE on
  bookings and keep UPDATE on the five columns confirm/reject/complete/cancel
  write; the customer's policy only allows cancelling. createBooking inserts
  through the service role.
- Paying a booking reads the price with the service role and what is paid
  from the booking's paid orders, never from the client-visible row.
- One live invoice: an open request is checked against its rail and handed
  back instead of minting a second; nothing is minted while a claim or an
  on-chain confirmation is pending.
- Settlement recomputes total_paid_btc from the paid orders (no read-then-add).
  A payment landing on a cancelled, declined or no-show booking is recorded on
  the order, not applied to the booking, and both sides are told.
- An unpaid booking can still be paid after it is marked complete.

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

* fix(payments): a pass is not sold without an account

A Supporter or Loki pass is granted to the buyer's account at settlement; a
guest has none, so the money arrived and nothing was granted. The guest
purchase refuses such products before any invoice, and the page offers
sign-in in place of the guest panel, saying why.

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

* fix(payments): booked-first holds on the server; a guest buyer is named; a request never made is not a failed payment

- POST /api/payments refuses a service and points to the booking; so does
  /api/v1/payments for a person's session. A key or OIDC caller keeps it:
  Loki pays a builder booked on its own side through a service.
- The seller's email names a buyer without an account instead of looking a
  profile up by a null id; a claimed purchase is "a buyer", not "a supporter".
- An initiation error (no wallet, nothing left to pay) is titled "This could
  not be started", not "This payment did not go through".

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

* docs(changelog): one way to pay, guest orders, booked first, the Cat alone

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

* fix(migrations): say why dropping NOT NULL on orders.buyer_id is rollback-safe

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

* fix(messages): suggestions read the follow list through the shared reader

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

* fix(discover): a person's card never prints a minted handle

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

* fix(listings): the seller card never prints a minted handle

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

* feat(share): one look for an article everywhere it is shared

The same article looked two ways on the timeline: the publish post was an
ARTICLE card, the post made by "Post on OrangeCat" was its title above a
bare "orangecat.ch/articles/scythia-notes-towa...". Sharing that post to X
sent the post URL, not the article's, with "Cato: “...”" in front of Cato's
own words.

- Links to our own pages unfurl from our own data: /api/unfurl resolves
  articles, posts, profiles, pay links, projects, groups and every entity
  with a public page (sessionless read, each page's public rule) into one
  LinkCard. The publish post and any post linking to the article draw the
  same card; a post that only restates the title shows just the card.
  External links print as host + path, cut at a boundary.
- The share intent no longer types out the title of one of our pages above
  its link (the card shows it).
- Share on a post: an article post (or a post that is only a link to one of
  our pages) shares that page's URL with its title and one line; your own
  post goes out as your words, someone else's quoted and credited.
- /post/<id> of an article post previews as the article (title, dek,
  canonical, /api/og/article card); /api/og/post draws it as an article.
- The article share card carries the dek, the author's face and name, and
  the cover picture beside the words when the article has one.
- Share cards read the image format from the bytes: our storage serves
  avatars as application/octet-stream, which dropped every face from every
  card.
- ShareRow passes `text` through to @bitbaum/bip-kit (used from 0.10.0,
  ignored by the pinned 0.9.1).

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

* docs(changelog): one look for an article everywhere it is shared

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

* feat(articles): cover pictures up front, charts drawn by chartkit, and Cat's writing help as suggestions

- Editor: "Add a cover picture" sits under the title (search, generate or
  upload in one picker); picture and chart buttons lead the toolbar (one row
  that scrolls on a phone); inline pictures land as figures with their credit
- Charts: a ```chart block (writingkit's spec, JSON or CSV) is drawn by
  @bitbaum/chartkit on the article page and in Preview; the fence is renamed
  before bip-kit parses it, so a block a person typed can no longer throw and
  take the article page down; a broken block tells the writer why
- Ask Cat proposes, the writer decides: every answer (improve, tighten,
  clearer, grammar, tone, continue, outline, draft, title + summary) is a
  suggestion shown as what changes, with Use this / Keep mine; accepting
  after the text moved on is refused, not applied
- New: "Make it clearer", "Suggest a title and summary", "Suggest a picture
  or chart" (a chart only from the writer's own numbers, checked; otherwise
  an illustration with search terms and a generation prompt that seed the
  picker), "Outline it" from one sentence
- Share card: /api/og/article/<slug> draws the cover beside the title
  (fetched through the pinned public-only GET, cropped by sharp); the
  article's og:image is always that card
- deriveExcerpt skips a leading chart or lone picture
- src/lib/writing-next/ carries writingkit 0.3.0's new core until it is
  published (then delete it and import from @bitbaum/writingkit)

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

* docs(changelog): article pictures, charts and writing suggestions

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>
Co-authored-by: Cato <cato@orangecat.ch>
2026-12-02 07:03:00 +01:00
CatoandClaude f690f76bf4 fix(links): a link does not preload its target (#1864)
Next preloads every link that scrolls into view, and these pages are drawn on
request. Measured in a browser on 2026-11-29: one visit to orangecat.ch's home
page made 50 preload requests to the server. Solon, built the same way, made
91 to 778 a visit and stopped answering under a handful of readers
(solon#643).

src/components/ui/Link.tsx wraps next/link with prefetch={false}; the 169
files that imported next/link import it instead, and the existing
no-restricted-imports rule for components and app now names next/link.

type-check, lint (0 errors), test:unit (8,241 tests), check:duplication and
check:dead-labels pass.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-29 18:19:13 +01:00
9323db5e16 fix(cat): unify public search and recoverable failure handling (#1423)
* fix(cat): unify public search and recoverable failure handling

* fix(search): own items read the user id by selector; keyboard test stubs them

On main's merge this PR failed 7 palette keyboard tests: useOwnSearchThings
called useAuth(), which reads the whole store without a selector, while the
palette (and main's test) read auth through selectors; and the hook's query
needs a QueryClient the keyboard test never provides.

- useOwnSearchThings reads useAuthStore(state => state.user?.id) only
- search-query-safety mocks the store selector instead of useAuth
- the keyboard test stubs useOwnSearchThings (it is about the keyboard;
  search-query-safety covers the items)

Verified on this branch merged with main: 21 search + hook test files,
122 tests pass; tsc clean; eslint clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

---------

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Cato <cato@orangecat.ch>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:36:49 +01:00
b2da8561b7 refactor(brand): marks come from @bitbaum/design-tokens/marks (#1584)
* refactor(brand): marks come from @bitbaum/design-tokens/marks

Every product's mark now lives in the design-tokens package (1.6.0), so
a logo is replaced once and OrangeCat, Solon and Loki follow. The local
copies (loki, orangecat, solon) and the source writer are gone;
src/config/marks, mark-svg and svg-to-mark re-export the package, so no
call site changed. The cat generator stays here and the brand test holds
the package's cat equal to it. `brand:import` now prints where to import
a mark instead of writing a copy that would drift.

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

* docs(brand): name the package's import script without claiming it here

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cato <cato@orangecat.ch>
2026-11-28 22:56:37 +01:00
d75cbe5754 feat(fields): every text box is chatkit's DictationField — a microphone wherever people write (#1835)
* feat(fields): every text box is chatkit's DictationField

Textarea now renders @bitbaum/chatkit's DictationField (mic in the box,
via the app's /api/cat/transcribe route). The app's own DictationButton
is retired; feedback, AI fill, /raise, onboarding and studio boxes use
the field instead. The article body stays a plain markdown textarea
(writingkit's job).

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

* feat(fields): the remaining bare text areas carry the microphone

Notes, prompts, booking and task messages, memory import, routines and
rules (staff screens included) render the shared Textarea, so each one
is chatkit's DictationField with its microphone.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cato <cato@orangecat.ch>
2026-11-28 21:56:40 +01:00
CatoandClaude 3857c7ae79 docs(agents): one AGENTS.md — fold verified rules in, delete the rest (#1859)
AGENTS.md is now the only repo-specific instruction file. CLAUDE.md and
.claude/CLAUDE.md are one-line pointers. Deleted: .claude/rules/* (6
files), .cursor/rules/* (7), docs/api/AGENTS.md (its machine-buyer
walkthrough moved into src/app/api/v1/README.md), .claude/README.md
(described the deleted layout) and the archived
docs/archive/development/guides/AGENTS.md.

Every rule kept was checked against the code. The deploy and verify
sections no longer describe GitHub Actions (off since 2026-11-15):
forge/verify merges, forge-ops on Gitea deploys. Ownership and money
lines corrected: owner column from getUserIdField, entity prices in
their own currency.

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-28 20:56:48 +01:00
CatoandClaude Opus 5.5 7fa9f29010 perf(groups): load an organization's members, wallets and permission at once (#1857)
Signed in, an organization page sat blank ~4 s: members, wallets and two
permission checks ran one after another (~12 browser round trips), and the
canVote check was thrown away unused. They now run in parallel and canVote
is gone. Test proves all three start before any answers (fails on the old
code).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 21:33:06 +01:00
CatoandClaude 88b06e8adc Public pictures straight from R2; the box stops resizing them (#1861)
Public pictures still passed through the app box: storage-api answered
every supabase.orangecat.ch/storage/v1/object/public/... request, and
next/image fetched, resized and cached them there. orangecat-media holds
private files too, so it never gets a public domain; public pictures go
to the separate public bucket fleet-media under orangecat/<bucket>/<path>,
served from MEDIA_PUBLIC_BASE.

- src/lib/media/public-url.ts: the one URL helper. Direct address only
  for objects known to be copied (listing every 10 min + own writes),
  otherwise the Supabase address. Unset base: unchanged.
- New uploads: server-side ones are written to fleet-media as stored;
  browser uploads ask POST /api/media/mirror. Stored URL is the direct one
  or, on any failure, the Supabase one.
- Background copy from instrumentation: idempotent, throttled
  (MEDIA_BACKFILL_KBPS, 512), one process at a time under a lease taken
  with a Postgres advisory lock (new migration). Only buckets declared
  public in code AND marked public in storage.buckets. Removes copies of
  deleted originals after a complete scan, capped at a tenth per run.
- next/image: with the base set at build, a custom loader draws R2
  pictures unoptimized and sends Supabase public pictures to
  /api/media/object, which redirects to R2 once copied, else to the
  optimizer as before.
- Docs: STORAGE_R2_BACKEND.md (how, switch-on, rollback, the pre-move
  disk copy an operator may remove), .env.example; three docs that named
  the removed auto-merge.yml now name the forge merge check.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-26 20:49:44 +01:00
CatoandClaude c30236eb80 fix(weather): MET Norway and OpenStreetMap, free for a product that sells credits (#1862)
Open-Meteo's free API is for non-commercial use only, and OrangeCat sells
Cat credits; the owner wants no paid plans. The forecast now comes from
MET Norway's Locationforecast (NLOD 2.0 / CC BY 4.0, credited), places from
OpenStreetMap's Nominatim, each on its terms: an identifying User-Agent,
coordinates to 4 decimals, forecasts kept until their Expires, places
cached for good and looked up at most once a second. Today and tomorrow
are the person's own days; -0.3 °C reads 0°C.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-26 19:17:00 +01:00
29285fafe5 fix(cat): four fixes from the 15 Nov live retest, in one PR (#1858)
* feat(cat): add calendar_move to move or change an own calendar entry

The Cat could add and remove entries in the person's own calendar but not
move one, so live it told an owner it could not move calendar entries.

- calendar_move changes the start, and optionally the length, end, title
  or place, of one own entry (the calendar source: made by the person,
  the Cat or a bot). A new start with no end or length keeps the length.
- Times go through parseWhen in the person's zone, as calendar_add does.
- The write is filtered to the user's own rows on top of RLS, as
  calendar_remove is. An entry from a linked calendar, Google, a booking,
  an event or the to-do list is refused with a sentence saying where it
  is changed.
- Registered beside calendar_remove: cat-actions, summaries, action
  descriptions, companion labels and hands, planner hands and handlers,
  plus the "move" verb in the tool labels. Same permission level.

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

* fix(chat): Listen reads answers in a server voice, browser voice as fallback

Listen under a Cat answer (and under every bot answer) made no network
call: chatkit's useSpeech was given no speaker, so it used only the
browser's speechSynthesis. Reproduced live on /companions/talk?with=cat:
the press called speechSynthesis.speak("391") with 0 voices available and
the utterance ended with error "synthesis-failed"; the button flipped back
with no message. With a stubbed working engine the same press plays for
the full length, so the app wiring was fine: the voice was missing.

- POST /api/voice/speak: one piece of text -> audio/wav through Groq's
  speech endpoint on the platform GROQ_API_KEY (counted against the
  daily Groq cap); 503 / 502 carry the reason (no key, terms, bad key,
  limit, vendor down) and the vendor detail goes to the server log.
- createListenSpeaker: chatkit Speaker that cuts the answer into ~200
  character pieces, fetches one ahead, plays through an AudioContext made
  inside the tap, and hands the rest to the browser voice on any refusal
  (backing off two minutes). German text stays on the browser voice.
- Passed to the Cat (ChatApp thread.speaker) and ChatFrame (companions,
  fleet bots, rooms).
- rateLimitListen: 120 pieces / 10 min per person.

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

* fix(cat): page reads are cut to fit the free Groq link instead of losing it

Live, 2026-11-15: "What happened in the news today?" found six sources,
the page reads pushed the prompt past the free Groq per-minute cap, the
pre-flight skipped Groq, the free fallbacks were rate-limited, and the
person got "Cat couldn't reach an AI model". On the platform Groq link
the longest tool results are now shortened until the prompt fits, and
the pre-flight checks the shortened prompt.

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

* fix(ai): an OpenRouter refusal inside the stream is an error with its code

Production diagnostics after the live retest (2026-11-15) showed six
OpenRouter failures with no status. OpenRouter can refuse after the 200,
as an error object inside the stream; that chunk was skipped as
malformed, so a rate limit read as an empty answer. It now throws
OpenRouterAPIError with its code (429 is a rate limit), and the
diagnostics report the provider's error type next to its class.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cato <cato@orangecat.ch>
2026-11-26 17:40:44 +01:00
CatoandClaude d206bbe9b4 feat(cat): talk to the Cat from the linked Telegram chat (#1860)
Loki hands over a message (text and/or photo) from the person's linked
Telegram chat, signed with x-loki-signature + issuedAt on the shared
ORANGECAT_WEBHOOK_SECRET rail. It is stored as their message to the Cat
with the send path's own functions in its order (uploads, writeMessage,
attachToMessage, noteCatMention) and the mention worker runs right
after the 202. The message carries metadata.telegram (a server-only key);
when the Cat answers it, cat-reply posts the answer back to Loki
(best-effort) with a link to the conversation. No migration.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-26 14:50:53 +01:00
eb5c14ce1a feat(cat): the Cat keeps a routine (#1841)
"Every morning at 8, send me the weather in Zurich" made the Cat propose a
project (live, 2026-11-15): it had no recurring action. Now:

- cat_routines (new migration, RLS: a routine is its owner's): instruction,
  time of day, zone, days of the week, enabled, next/last run.
- Cat actions routine_add (confirmed), routine_list, routine_remove, with
  summaries, card descriptions, chip labels and handlers. routine_add says
  NOT create_project and create_project points back at it.
- A routine ask is recognised in code before the model (turn/in-code.ts):
  the model is told to propose routine_add, and the turn is not mailed,
  written to the calendar or answered now.
- The runner runs on the routines timer (every 15 minutes), once a day per
  routine in the owner's zone, never hours late. The answer is worked out in
  code first (weather, bitcoin price, sum, calendar, list); a model only on
  the owner's own key. Delivered as the Cat in Messages, and Telegram via Loki.
- Weather from Open-Meteo (keyless, timeout, CC BY 4.0 attribution), as a
  pre-read used by chat and routines.


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

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cato <cato@orangecat.ch>
2026-11-21 18:21:28 +01:00
CatoandClaude Opus 5.5 b4fe2fc932 fix(groups): an organization can be deleted, and edits save (#1853)
* fix(groups): an organization can be deleted, and edits save

The group route called updateGroup/deleteGroup without the request's
signed-in client, so the mutation used the browser client, which has no
session on the server: every edit and delete answered 500
"Authentication required". The only Delete button lived on a settings
page nothing linked to. The organization page now offers the same
DeleteEntityButton every other entity has, and the orphaned settings page
is gone.

Also: the place section said "optional" without saying a place is all
three levels, so a country and region without a locality was refused
after submit; and an article set to "Only me" was offered under a
"Publish" button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

* chore(sizes): drop the exception for the deleted group settings page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

* fix(groups): join the place-bound kinds without Intl

check:app-locale (on main since this branch was cut) forbids formatting
through Intl directly; the list is fixed English copy, so join it plainly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

---------

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 14:50:27 +01:00
CatoandClaude Opus 5.5 50bc343f48 fix(cat): no create card beside a tool that already made the thing (#1855)
A fallback model asked to set up a friend's page proposed the claimable page
(create_project_for_person) AND wrote a create_entity project card under it,
which would make a second project owned by the asker. A create_entity card is
dropped when a create_<kind> or create_<kind>_for_person tool in the same turn
completed or waits on confirmation; both the streamed and buffered turn.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 13:54:24 +01:00
CatoandClaude Opus 5.5 58d5d99546 fix(articles): the editor Preview shows Under the hood sections as the page does (#1856)
The composer Preview skipped toSegments, so every ```deep section previewed
as a raw code box while the published article shows a closed <details>.
Found while previewing an article before publishing it. The preview now
segments exactly like LongformBody; a jsdom test pins it (fails on the old
file, passes on this one).

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 16:39:59 +01:00
feea2fe743 fix(cron): the daily brief answers inside its timer's deadline (#1566)
orangecat-cron@cat-brief.service failed with `curl: (28) Operation timed
out after 120025 milliseconds with 0 bytes received`. runDailyBrief walked
up to 50 users one at a time with no time limit, so a stalled query held the
route past the timer's 120s curl cap. The unit then died with nothing to say:
no counts, no hint of which user it was on.

The run now has a 90s budget. Each user's step races the time left; when it
runs out, the run stops, counts the users it did not reach (`deferred`), names
the user it stalled on in the log, and the route answers 503 with those
counts. The unit still fails and pages, but in time and with the app's own
reason. Briefs already sent stay sent, and the per-day dedupe makes a re-run
safe.

The daily brief moves out of proactive.ts into daily-brief.ts (the budget
pushed proactive.ts past the 500-line service limit); watches stay where
they were.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cato <cato@orangecat.ch>
2026-11-20 16:17:37 +01:00
CatoandClaude Opus 5.5 22693ba4b0 fix(cat): "from my account" still sets the page up for the person; cards never show as JSON (#1854)
Dogfooded 2026-11-20: "set this up for my friend Kelly Goy, but from my
account" got a create_entity owned by the asker, so Kelly had nothing to
claim. "From my account" means the user does the setting up; that is
exactly what create_project_for_person does (asker stewards, person
claims). The prompt now says so, and the section also loads for a named
person or "from/under my account" without the word "friend".

The same turn showed its ```action block as raw JSON while streaming,
then failed mid-stream and was stored ending inside the fence. Card
fences are now hidden while streaming (closed, open, or still being
typed) and when a failed turn is reopened.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 11:12:49 +01:00
Cato 5321ec05b1 fix(routes): /calendar and /todo open your calendar and list; ?mode=signup opens Create account; Collaborate title (#1847)
- /calendar -> /dashboard/calendar; /todo, /to-do, /tasks -> /dashboard/tasks
  (temporary redirects; QA 2026-11-19 got 'This page isn't here').
- ?mode=signup and ?mode=signin are read like register and login.
- /collaborate's tab title said 'Community | OrangeCat'.
2026-11-20 02:37:31 +01:00
Cato be046c4f93 fix(todo): To-do at the top of the sidebar; send a task to your own bots (#1843)
* fix(todo): To-do at the top of the sidebar; send a task to your own bots

- Sidebar: To-do sits right after Calendar at the top level (it was folded
  inside 'Money and work'). 'What you can do' moves to More so the primary
  list stays at nine rows.
- Task page: 'Request' becomes 'Send to…'. On your own task it lists your own
  bots first (e.g. Hendlar), then people. Picking a bot hands the task over:
  it lands in that bot's chat, the bot works on it and reports back on the
  task, with a notification.
- Handing over no longer refuses without an own AI key: the turn runs like any
  chat with the bot, on the free daily allowance with its cap; a used-up
  allowance is named on the task.

* fix(todo): Send to… lists the Cat and your own bots, narrowed by what you type

Typing 'Cat' offers the Cat itself (not only the person @cato); typing a bot's
name narrows to it. Sending to the Cat opens the Cat with the task's title,
notes and address, sent once its chat is ready (askCatOnOpen +
usePendingCatAsk, the same send path as typing). Sending to an own bot hands
the task over into that bot's thread as before.
2026-11-20 00:25:29 +01:00
CatoandClaude fac8ea21e6 Accept client_secret_post/basic at DCR, register as public (#1849)
claude.ai custom connectors register with token_endpoint_auth_method
"client_secret_post"; /oauth/register refused anything but "none", so
adding the Loki connector with automatic registration failed.

Per RFC 7591 §3.2.1 the server may replace requested metadata: accept
none, client_secret_post and client_secret_basic, always register a
public client, answer token_endpoint_auth_method "none", issue no
secret. PKCE S256 stays required at /oauth/authorize. Other methods
(private_key_jwt, ...) are still refused.

/oauth/token now reads client credentials from a Basic header as well as
the form (moved to services/auth/tokenClientAuth.ts), and ignores a
secret a public client sends rather than refusing it. Confidential
clients still need theirs. Metadata advertises client_secret_basic.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-19 22:00:51 +01:00
Cato d57afbeec1 feat(planner): a reminder tells you when it is due (in-app notification, no model call) (#1845)
The Cat's set_reminder stored a task with is_reminder and a due date, and
nothing read it at its time. A job every 5 minutes (api/cron/task-reminders,
systemd orangecat-cron@task-reminders.timer) now sends the owner an in-app
notification once (tasks.reminded_at), linking to the task. No model call.
2026-11-19 20:29:17 +01:00
CatoandClaude Opus 5.5 3a952e3a3e feat(cat,apps): the Cat in Messages acts; Messages and Calendar open inside OrangeCat (#1842)
The Cat in Messages had no tools. "Reschedule to 7pm" was answered
"Done. Visit Anja is now at 7:00 PM Monday." and nothing moved. Asked
why, it said it had no live path into Loki or the calendar. Both were
true only of this path: the Cat chat has had these hands for months.

- cat-acts.ts: in a person's own conversation with the Cat, the newest
  message runs through a tool loop over the bots' hands
  (COMPANION_HANDS: calendar, to-do, Loki, mail and GitHub reads, own
  entities). Each call goes through CatActionExecutor as the sender,
  with permissions, confirmations and the action log as in the Cat
  chat. The reply is written from what happened. In rooms with other
  people it never acts, because a calendar read would be read out to
  everyone there.
- A reply that opens with "Done"/"Moved"/... when no tool completed is
  replaced. This applies to the tool-less fallback too.
- calendar_move: a new hand that moves an own entry and keeps its
  length (services/planner/calendar-move.ts). Before, there was add and
  remove only. Bots get it too.
- Separate apps open in OrangeCat: /messages, /dashboard/calendar,
  /dashboard/tasks and /studio wear OrangeCat's chrome unless the
  window was launched as the installed app. The manifest start_url
  carries ?app=<id>, which is remembered per window in sessionStorage
  (useLaunchedOwnApp).
- Prompt budget 8,110 -> 8,230 for calendar_move, recorded in the test.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 16:47:20 +01:00
CatoandClaude Opus 5.5 7f1dc4198d AI article writing: long text fitted, not refused; throw everything in and Cat writes it (#1838)
* fix(ai): fit long briefs instead of refusing them; actionable input errors

A pasted chat in Ask Cat's "What would you like to write about?" box hit a
300-character zod cap and answered "Invalid request". AI routes now fit free
text to the model budget (ai-kit fitPromptText) and explain real refusals
by field, limit and fix (ai-kit explainInputIssues).

Needs @bitbaum/ai-kit with the input module (bitbaum/ai-kit#119).

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

* feat(articles): AI-first writing — throw everything in, Cat writes it

An empty article now opens with "Write with Cat": thoughts, speech, a
pasted chat, links, notes and pictures go in; one button writes a cited,
illustrated article that opens in the editor for changes.

- POST /api/ai/writing/compose: thin route over services/cat/writing-compose,
  which binds writingkit's composeArticle to OrangeCat's adapters — ai-kit
  readPage (SSRF-checked), the platform serving chain, vision through the
  same chain (describePlatformImage), Openverse for illustrations, and the
  writer's recent posts for voice.
- ArticlePile: writingkit's PileComposer with OrangeCat's words, mic and
  picture storage.

Needs @bitbaum/ai-kit 1.31 and @bitbaum/writingkit 0.4.

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

* chore(deps): @bitbaum/ai-kit ^1.31.0 (fitPromptText, explainInputIssues)

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

* fix(types): AI input and compose pass strict exactOptionalPropertyTypes

Absent optional fields are left out instead of set to undefined
(toPileItems, labels, credit, voice, fetch signal).

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

* feat(articles): an empty article leads with Write with Cat

The article-writing browser test guarded "editor visible near the top" —
the title-first assumption the owner retired on 15 Nov 2026 (AI-first:
throw everything in, Cat writes it). It now guards the new rule: Write with
Cat near the top on a phone, the editor still on the page, and the Ask Cat
draft flow, overflow and 44px checks unchanged. The pile's one action is
ink, not the accent (One orange).

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-19 16:18:51 +01:00
CatoandClaude Opus 5.5 ea7d8a2ed1 feat: the Workshop (a room where all your names talk); Show text under voice messages; article (#1832)
* feat(identities): the Workshop, a private room where all your names talk

- identity_workshops (service role only) and a trigger that removes an
  identity from its holder's Workshop when its link is deleted (handed over)
  or it gets a way in of its own.
- domain/identities/workshop.ts: open (made from Writing as, synced with the
  circle), find, maySpeakAs; GET/POST /api/identities/workshop.
- Send: speakAs, allowed only in the caller's Workshop for a name in their
  circle; written as that account.
- Messages: a Speaking-as picker in the Workshop; Writing as opens it.
- ADR-0014 D11; roadmap; changelog.

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

* feat(messages): Show text under a voice message (transport.transcribe)

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

* docs(blog): Who Read It, Who Said It, and Which of You Is Talking

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

* chore(deps): @bitbaum/chatkit 0.44.0 (Show text under a voice message)

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

* chore(deps): @bitbaum/chatkit 0.44.1 (Info leaves agents out)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-19 14:53:52 +01:00
CatoandClaude 277c92597c fix(cat): when the person's own key fails, say what the provider did (#1830)
"Check your keys in Settings → AI" was said for every failure on an own
key, including a provider outage, a slow answer and a too-long request
(owner's xAI key, live 2026-11-15). ownKeyFailure names the provider and
the cause from the status class only, never the error's text.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 20:32:14 +01:00
CatoandClaude cb398d64ed fix(cat): mail and calendar reads get 12s each; failures are named (#1827)
The owner asked the Cat for their mail and next week and got "couldn't
generate a response", then a calendar read that "stopped before it
finished". The reads before the model had no time limit and swallowed
their errors, and the diagnostics counted 19 of 23 failures as
"unclassified". Each read now gets 12s and logs a failure by hand and
kind; the diagnostics report the failed step, provider, error kind and
key owner, from fixed labels only.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 20:13:30 +01:00
CatoandClaude Opus 5.5 2ec8760ea0 fix(cat): a model silent for 15s does not hold back an answer done in code (#1823)
* fix(cat): a model silent for 15s does not hold back an answer done in code

Live, the Cat sat 45s with the bitcoin price already read in code while a
slow free model said nothing, and the browser gave up at 60s with
"Response timed out". When the turn has an answer done in code, the Cat
now gives it after 15s without a first word, and a late model writes
nothing.

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

* fix(cat): the chat waits on silence, not on the whole answer

The browser cut every Cat turn at 60s in total, so a slow thinking model
(the owner's Grok) was dropped mid-answer, and on an own key the tool
step's 25s deadline left a reminder "not finished". The browser's limit
is now 60s of silence, reset by every frame; the server sends a small
"alive" frame every 15s while a turn runs; an own key's tool step gets
45s.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 19:56:47 +01:00
CatoandClaude 9b61a385de fix(cat): calendar answers are a list with what needs attention; memories only from the person (#1833)
Live, on the owner's account: the week came back as one paragraph, a
02:00 entry titled "p.m." and an event in California went by without a
word, the answer ended on what it could not do, the memory step stored
a subscribed hiking group as the owner's habit, and a translate request
quoting "the meeting" read the calendar.

- agendaText flags a start in the small hours and other calendars'
  entries (read-only here), in code
- every calendar read carries how to answer: a list by day, then only
  what needs attention, with the person's zone to judge distance
- Cat and bot memories are distilled from the person's words only when
  the reply carried a read; the distiller is told the reply is never a
  source
- connectorIntent ignores quoted text


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 19:28:10 +01:00
CatoandClaude f008be46cd fix(auth): sign-in keeps what was typed before the page loaded; feat(planner): hand a task to a bot from the calendar (#1825)
- The sign-in form is server-drawn; fields typed before React took over
  were reset to empty and the form sent with no address. They are read off
  the page during the first render and put back once mounted. Shown in
  Chromium with the scripts held back: without the fix the email comes
  back empty, with it both fields keep their value.
- A task's sheet in the calendar offers the person's bots (HandOver moved
  to components/planner so both pages share it).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 19:26:23 +01:00
CatoandClaude 80ce563277 feat(talk): the fleet bots are the front door to their products (#1831)
Diplodoctor and Causius answer here without an account and lead people to
their own products (owner, 2026-11-15). So:

- New bot: the fleet's specialists come first ("Specialists, ready now",
  no account needed), before the shelf and the blank bot.
- The create page no longer offers Health Advisor, Legal Assistant or
  Medical Information Advisor templates: a prompt-built copy is weaker
  and keeps people away from the real products.
- In a fleet chat the product's name in the footnote is a link for the
  whole chat (the opening's "Open" scrolls away with the first answer).
  Every link to a product carries utm_source=orangecat, utm_medium=bot,
  utm_campaign=<slug>, so the product can tell OrangeCat's visits apart.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 19:11:58 +01:00
CatoandClaude ae384fb48a feat(bookings): the booking dialog offers only the times a service is free (#1829)
The dialog used whenkit's picker, which draws every time inside opening
hours, and corrected a taken choice underneath it. For a service it now
uses ServiceSlotPicker: the same rows and classes, built from whenkit's
DayStrip and ChipGroup, with the start times asked from
/api/bookings/slots for the chosen day and length. A full day says so; an
unreadable answer says so and offers no invented times. Assets keep
whenkit's picker.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 18:55:26 +01:00
CatoandClaude bcd4c9bd43 feat(apps): Calendar with To-do, and Messages, become their own apps like the Studio (#1826)
OrangeCat's separate apps now share one system (config/own-apps.ts):
each owns its paths (ownAppIdFor in routes.ts), and AppShell gives
those pages the app's own bar (OwnAppBar) in place of the site
header, sidebar, footer and tab bar.

- Studio: /studio (moved onto the shared bar and registry).
- Calendar: /dashboard/calendar and /dashboard/tasks, with Calendar
  and To-do as tabs in the bar.
- Messages: /messages.

The bar is as tall as the site header and keeps its app-header class,
so the messages frame and the phone's immersive chat work unchanged.
With no tab bar, .oc-own-app points --mobile-nav-clearance at the home
indicator. Each app installs as itself: its own manifest and icon (the
cat head with the app's face: spark, calendar page, speech bubble),
written by scripts/generate-own-app-assets.mjs and checked by
own-apps.test.ts.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 18:54:20 +01:00
CatoandClaude dcdf4c3b15 feat(blog): topics as a vertical list, sidebar on desktop, sheet on phone (#1819)
The topic chips still scrolled sideways (the most used six plus a
toggle), which the owner rejected: a filter should read top to bottom.

- BlogTopicList: one vertical list ("All posts", then each topic with
  its count), used in both places below.
- Desktop (lg+): a sticky sidebar beside the search and the posts.
  The twelve most used topics show; "Show all 59 topics" opens the rest
  in place. Posts use a two-column grid beside it.
- Phone: one full-width "Topic: <current>" control under the search
  opens the same list in the shared BottomSheet.
- useBlogList exposes searchTotal for the "All posts" count.
- The chip row is gone, so nothing on /blog scrolls sideways.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 18:30:31 +01:00
CatoandClaude Opus 5.5 66fe9ded01 feat(messages): forward a message; pin and mute a conversation (#1816)
* feat(messages): forward a message; pin and mute a conversation

- conversation_participants.pinned_at and muted (the caller's own, never
  shown to others); get_total_unread_count leaves muted conversations out.
- PATCH /api/messages/[id]/settings; POST /api/messages/forward (up to five
  conversations, a copy per conversation marked forwarded; files share their
  stored object, and the sweep keeps an object while any row points at it).
- 'forwarded' is a server-owned metadata key.
- The thread loader now carries the delivery mark (opening a conversation
  dropped two ticks to one) and the viewer's pin and mute.
- Transport: pin, mute, forward. Needs @bitbaum/chatkit 0.42.

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

* chore(deps): @bitbaum/chatkit 0.42.0 (forward, pin, mute)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 18:29:18 +01:00
CatoandClaude df18aa4349 fix(planner): a to-do given a time shows once; "by Friday" leaves no "by" (#1812)
Found walking the free times live at 390px: the picked time appeared as
the calendar entry and again as "Task due" at the same minute, and a
to-do typed "... by Friday" kept a trailing "by" in its title.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 18:04:44 +01:00
CatoandClaude 77217ebf4e feat(talk): one lane for bots and their chats, folding to faces (#1824)
With the Cat open, /companions/talk showed three columns: the app sidebar,
the Bots list and chatkit's own Chats rail. Two lists took half the screen.

- The Cat's chats now sit under its row in the Bots list (newest five,
  "Show all N", searchable, the busy one spinning); chatkit draws no rail
  of its own on wide screens (`hostList`). On a phone the Cat keeps
  chatkit's drawer, since the list is not on screen there.
- The lane folds to a 72px column of faces (remembered on the device),
  each with its name for screen readers and on hover, the open one ringed.
- The "+" menu moved to NewMenu.tsx to keep TalkList small.

Needs @bitbaum/chatkit 0.40.0 (bitbaum/chatkit#107): the bump and the
lockfile follow once it is published.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 17:57:51 +01:00
CatoandClaude 76cad1ba7b chore(deps): chatkit 0.40.1; drop the planner's copy of its field fix (#1809)
chatkit 0.40.1 draws a framed composer's tools as bare icons and keeps
DictationField to one box inside a host's base styles, so OrangeCat's
`.oc-planner .ck-field-input:focus` patch is gone.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 17:30:05 +01:00
CatoandClaude 33602c2b93 feat(bots): every bot is a rotorelief in the Cat's family, with a picture its owner can change (#1818)
The default bot face (a shape with two eyes) read as Grok's bots. OrangeCat's
mark is a Duchamp rotorelief (off-centre rings in a cat's head) and Loki's
is the coil, so every other bot now gets a disc of its own in that family:

- Four figures after Duchamp's discs (rings, coil, corolla, lantern), each
  bot's figure, colour, count and drift drawn from its name
  (config/marks/generators/bot-rotorelief.ts). Twelve deep colours, none
  orange: the Cat stays the only orange one and the only one with ears.
- A bot is a rounded square, a person a circle; the initial sits in the
  disc's eye from 28px up, and the disc turns at the Cat's thinking speed
  while the bot answers (chat header; in a group chat, the one writing).
- Picture sheet with three tabs: Generated (its own disc, seven more,
  Shuffle), Upload (our storage), Describe (the person's own AI key, as in
  the Studio; without one it offers Upload). Used for a new bot, a group
  chat's picture, and a new "Change the picture" row on the owner's bot.
- The server takes a disc token or a picture in our own public storage,
  never another URL (lib/companions/picture.ts). A bot's picture is saved
  by its own route, since the bot's whole PUT fills defaults for what it
  is not sent.
- Faces stored before (?shape=&hue=) draw as the disc their old pair keys,
  so bots told apart then stay apart. Product bots keep their own marks.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 17:09:51 +01:00
CatoandClaude 1ff03d8b4e refactor(bots): one in-code pipeline for every bot turn (#1808)
The Cat, a person's own bots and the fleet bots each had their own copy
of what runs before the model (calendar write, "email me this", sum,
bitcoin price, reads) and after it (mail the answer), and the copies had
drifted: own bots got no calendar write and no zone, fleet bots got only
email. services/turn/in-code.ts is the one pipeline; each path says only
what that bot may reach. answerWithEmail (the fleet-only copy) is gone.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 16:52:41 +01:00
CatoandClaude 1e153fe6ff feat(blog): searchable index, a short topic row and one card shape (#1814)
/blog put all 59 topics in one sideways row, so most were off screen,
plus nine overlapping date filters, uneven cards and tag pills that
looked like buttons but did nothing. The article page used the old
share sheet instead of the ShareRow every other article uses.

- The list is a listkit query (blogList.ts): a topic facet, search over
  title, topics and summary, newest first. The URL codec, counts and
  matching rules come from the package, which replaces the
  hand-written URL and date code in useBlogFilters.
- BlogTopics: "All posts", a "Topics" toggle, then the six most used
  topics (and the chosen one). The full index is a grid list with
  counts. Chips and the search field reuse Discover's classes.
- BlogPostCard: one anatomy (topic, title, 3-line summary, date and
  length on the card's floor). The newest post leads at full width
  while nothing is filtered.
- Article: topic, title, summary and one byline line. The footer has
  topic links, the shared ShareRow, older/newer posts and
  BlogNewsletter, the same follow box as the index. Drops the
  Featured badge, BlogShareButton, getFeaturedPost and getAllTags.
- Fixes a doubled blockquote marker in governing-without-the-jargon.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 16:29:04 +01:00
CatoandClaude e59781da5a feat(studio): works saved to My things open in the Studio on every device (#1813)
Signed in, the Studio reads the person's Studio documents and adds the
ones this device lacks to Your works, so a poem saved on the phone is
there on the laptop. The document is read back into a work: the brief,
the revision note, and a music sketch's score (now written into the
file), so the sketch plays again. Edited documents come back as edited.

Removing a saved work from the Studio hides it on this device; the
document stays in My things, and the confirm says so.

The built-in example moved to morningSketch.ts (hook size limit).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 16:23:00 +01:00
CatoandClaude Opus 5.5 97a2766848 feat(planner): a to-do carries photos, text files and links (#1810)
* feat(planner): the to-do list prepares for what is in your calendar

A calendar says when; the list says what. Entries coming up in the next
two weeks now show under the to-do list, each with "What should I
prepare?": a few to-dos from the platform model, each dated before the
day, kept in a tap (or all at once) through the ordinary task add, so a
kept one can be handed to a bot. A calendar entry opened on the calendar
offers the same block (components/planner/PrepareFor.tsx, one copy).

Which calendars are shown is now one row on both pages: "Your entries",
then each linked calendar by its own name read from X-WR-CALNAME, with a
mark when it could not be read and Manage to link or remove. Calendars
linked earlier as "Google"/"Apple" take their own name on the next read.

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

* docs(blog): A Calendar That Gets You Ready

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

* fix(planner): use whenkit's addDays; keep the page off the model's module

The to-do page imported a day helper from the file that calls the model,
which the no-background-AI check rightly refused. The helper duplicated
@bitbaum/whenkit's addDays, so it is gone. Changelog lines carry their
roadmap ids.

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

* feat(planner): a to-do carries photos, text files and links

The to-do line now has chatkit's paperclip (0.41.0: DictationField takes
the composer's attach, one shared implementation). A photo or text file
travels in chatkit's own wire shape, is stored privately under the
owner's tasks folder in the documents bucket, all or nothing, and is
served only to its owner through a signed redirect
(/api/planner/tasks/files). A link typed in the line is read out before
the day is (so a dated path is never a due date), shows as a chip, and
is kept on the task out of its words; createTask does the same for the
Cat and bots. Calendar entries keep their links in their titles, having
nowhere else to keep them yet.

tasks.attachments: JSONB array, at most 8 (migration 20261115160000).
Pure shape and readers in task-attachment-shape.ts (browser-safe);
storing and signing in task-attachments.ts (server).

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

* fix(planner): linked-calendar chips are 44px on a touch screen

check:tap-targets caught the 36px chips; pointer-coarse:min-h-11 keeps
desktop compact and gives a finger the full target.

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

* fix(planner): attachment and link chips are 44px on a touch screen

Same check:tap-targets rule as the linked-calendar chips.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 15:33:24 +01:00
CatoandClaude Opus 5.5 66e5d44906 feat(planner): the to-do list prepares for what is in your calendar (#1807)
* feat(planner): the to-do list prepares for what is in your calendar

A calendar says when; the list says what. Entries coming up in the next
two weeks now show under the to-do list, each with "What should I
prepare?": a few to-dos from the platform model, each dated before the
day, kept in a tap (or all at once) through the ordinary task add, so a
kept one can be handed to a bot. A calendar entry opened on the calendar
offers the same block (components/planner/PrepareFor.tsx, one copy).

Which calendars are shown is now one row on both pages: "Your entries",
then each linked calendar by its own name read from X-WR-CALNAME, with a
mark when it could not be read and Manage to link or remove. Calendars
linked earlier as "Google"/"Apple" take their own name on the next read.

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

* docs(blog): A Calendar That Gets You Ready

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

* fix(planner): use whenkit's addDays; keep the page off the model's module

The to-do page imported a day helper from the file that calls the model,
which the no-background-AI check rightly refused. The helper duplicated
@bitbaum/whenkit's addDays, so it is gone. Changelog lines carry their
roadmap ids.

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

* fix(planner): linked-calendar chips are 44px on a touch screen

check:tap-targets caught the 36px chips; pointer-coarse:min-h-11 keeps
desktop compact and gives a finger the full target.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 15:23:14 +01:00