128 Commits
Author SHA1 Message Date
CatoandClaude Fable 5.2 50533f52a2 feat(home): six screens, one thing each, over the mark's horizon (#1872)
* feat(home): six screens, one thing each, over the mark's horizon

The first screen was a form asking a stranger for a pay-link name above a
mock of the page it would make. It is now the promise, the start action and
a way down to the Cat, over the mark's rotorelief drawn at the size of a
horizon (SVG and CSS only, no script). Under it: the Cat's door in a frame
of its own, how a payment moves with the fee in figures read from config,
what it solves, what people have listed, and the start action again.

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

* Home: the last screen stands on the studio's chevron floor

The construction is bitbaum's own (four gradients a tile, laid back in
perspective, bone on ink in both themes), so the family reads as one.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-04 07:43:17 +01:00
CatoandClaude f1e5fbadcd test(planner): the planner is checked signed in on the live site; the E2E sign-in waits for the form (#1822)
* test(planner): the planner is checked signed in, on the live site

Linking a calendar was off in production for a day while unit tests stayed
green. This spec signs in as the E2E account and does what a person does:
a task due today shows in the calendar with its actions, an entry is added,
the account's own feed is linked by its iCal address and read, a public
service says when it is free, and a task is handed to a bot (or the reason
it cannot be is said). It removes what it made. Run by the daily E2E Auth
workflow and on dispatch.

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

* ci(diag): temporary sign-in probe for the live E2E account

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

* test(planner): the live check hands a task to a bot it makes for the purpose; sign-in waits long enough

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

* test(e2e): a sign-in that does not land says what it was answered

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

* test(e2e): sign in only once the form has been taken over by React

All three attempts of the 16:20 UTC run stayed on /auth with 'Enter your
email address.' and no sign-in call: the fields were filled before
hydration and wiped by it, so the form was sent empty. The daily E2E Auth
run failed the same way at 12:07.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 17:43:03 +01:00
CatoandClaude ad012dfaf5 feat(home): the home page sells the outcome; a picture for every kind; one byline, one Cat face, one not-found (#1751)
* 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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-14 11:38:41 +01:00
CatoandClaude Opus 5.5 a772acefdf fix(ux): close the UX audit and the UI/UX handoff — Studio drafts in every form, pay, sharing, groups, events (#1722)
* feat(ux): chatkit 0.31.3 and accountkit 0.30.0 — starters in one column, the Appearance row only on phones

- chatkit 0.31.3: the Cat's empty-state starters are one column at every
  width, not a wrapping row of pills (auth-firstrun#5).
- accountkit 0.30.0: the account menu's Appearance row is `shown: 'narrow'`,
  hidden by the package stylesheet from 768px up where the header carries
  its own theme toggle. The useMediaQuery width read, wrong on the server
  render and flashing on load, is gone.

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

* docs(audit): the package fixes are released — starters, the Appearance row and the feedback tab

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

* docs(audit): close the audit — triage of the eight findings left partly fixed

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

* fix(pay): paying someone on-chain shows their address and the BTC that must arrive, and Copy copies the address

On production, /pay/Penguin (receive-info says on-chain) at 390px, dark and
light, and at 1366px: after choosing CHF 10 the code screen read only
"CHF 9.98 / On-chain Bitcoin · no deadline / Open in wallet / Copy invoice".
No BTC figure and no address anywhere in the text; on a phone the only place
the address exists is the QR, behind a second tap. "Copy invoice" put
`bitcoin:bc1q…?amount=0.00016314&label=Tip+for+Penguin` on the clipboard, which
an exchange's or a bare-address wallet's send field does not take. On-chain
detection needs the full amount to arrive (mempool.ts), so a payer who converts
the CHF headline and rounds down is never seen. (The invoice request was
answered in the browser, so nothing was minted.)

PaymentQRCode, the one code screen behind /pay, the support panel and the
payment dialog, now reads the BIP21 URI with @bitbaum/paykit's settledRail.
When it is on-chain it says "0.00016314 BTC must arrive in full" under the
headline (displayBTC), shows the address in mono under the buttons, and the
button is "Copy address" and copies the bare address. Open in wallet keeps the
whole URI. Lightning is unchanged.

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

* fix(notifications): on a phone the item actions show and the words get the full width

Each notification held Ask the Cat, Mark as read and Delete at opacity 0.
Tailwind keeps group-hover behind @media (hover: hover), so a phone never
showed them, yet each was a live 44px target beside the unread dot, and their
140px squeezed the title and message into a narrow column.

The actions now sit on the time's line under the message, so the words use
the card's full width. They are hidden only for a fine pointer, shown on hover
there and while one has keyboard focus. The filter row was already fixed on
main; the test pins both.

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

* fix(events): an event that is over says so and sells no more tickets

Measured on orangecat.ch on 2026-11-12 (390px, light and dark, signed out
and signed in): the one public event, dated Sunday, September 13, 2026,
still showed "Free entry", a name field and "Get a free ticket", and
nothing on the page said it was over. The ticket box, the sticky "Buy a
ticket" bar and the pay panel decided from status alone, and nothing ever
moves a past event to 'completed'. claim_free_ticket and
claim_guest_ticket checked status alone too, and checkout for a paid
ticket never looked at the date.

- eventHasEnded (src/domain/events/time.ts): over once its end has
  passed (its start when it has none; an all-day event at midnight after
  its last day on the venue's clock), or once marked completed.
- Event page: the ticket box says "This event has ended." and offers no
  free or paid ticket; visitors see an "Ended" badge; no pay panel and no
  sticky "Buy a ticket". A ticket someone holds stays, without "show this
  at the door" or give-it-back. The organizer is told nobody can get a
  ticket instead of being handed the invite link.
- Checkout (initiatePayment, initiateGuestTicketPurchase) refuses an
  ended event before an invoice exists; the payment routes answer "This
  event has ended." instead of a generic failure.
- Migration 20261113163700: public.event_has_ended(event) holds the same
  rule; claim_free_ticket and claim_guest_ticket refuse with P0002. The
  paid issuers are left alone on purpose: they run at settlement, after
  the money has moved. Applied twice to a scratch Postgres 16 after the
  three ticket migrations and exercised as anon, authenticated and
  service_role.

Re-applied on current main; the migration is re-timestamped after the
newest one there.

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

* fix(assets): a rental's minimum and maximum period read "1 day", not "1 Per Day"

On orangecat.ch, the Availability card of a studio rented by the day read
"Minimum Period 1 Per Day" (390px and 1366px, dark and light). The rows
glued the count to the form select's cadence label, so a two-day maximum
would have read "2 Per Days", and the price row read "/ Per Day".

RENTAL_PERIODS now carries the unit each cadence is counted in (hour, day,
week, month) next to its select label. The asset page counts periods in
that unit ("1 day", "2 days", "3 weeks") and prices "/ day". An unknown
cadence still reads "period".

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

* fix(pay): the pay button says what it does; invoices say "Payment to"

Measured on orangecat.ch (2026-11-12, iPhone 13 390px, light and dark):
the button beside "Pay from my wallet" read "Show the code" and the
article Tip dialog's "Show tip QR", while a phone is shown Open in wallet
first and the code behind a second tap; /pay said the link and
your-name@orangecat.ch "are the same door", though the address refuses an
on-chain-only wallet; the article Tip button was 34px tall; every payment
from /pay, the Tip dialog and Receive was minted as "Tip for <name>".

Now:
- "Pay with a Bitcoin wallet" / "Tip with a Bitcoin wallet", and
  "Pay/Tip from another wallet" beside "Pay from my wallet". /pay's single
  action keeps main's "Pay CHF 20" / "Enter an amount".
- /pay's first point is "Two ways in".
- TipButton is min-h-11.
- The description is "Payment to <name>", plus ": <note>" when the payment
  answers an open request; a Lightning-address callback gets a comment no
  longer than the provider's commentAllowed.

Already on main, so not repeated here: both actions disabled outside
TIP_MIN/MAX (PayFlow amountReady), and the tertiary-text contrast
(--text-tertiary is now 42% light, 5.3:1 on white).

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

* fix(pay): your own pay page without a wallet shows where to add one, not a message to yourself

On orangecat.ch (2026-11-12, iPhone 13 390px, dark and light), signed in
as an account with no wallet, /pay/<own handle> showed the payer's dead
end: "<handle> hasn't added a Bitcoin wallet yet, so a payment has nowhere
to land. Nothing was charged." and one link, "Message <handle> to suggest
adding one", whose href was /messages?to=<the viewer's own profile
id>&draft=add-wallet. Nothing led to /receive, where a wallet is added.

PayPageClient now reads the viewer with useAuth(). When the viewer is the
recipient and the page has no way to pay, it shows an owner line ("This is
your pay page. Nobody can pay you here yet. Add a wallet and payments land
in it.") with an "Add a wallet" button to /receive. Every other visitor,
signed in or out, still gets the nudge. The words live in PAY_COPY.

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

* fix(share): a shared page says its own title, shows an image, and X says the same

The root layout's openGraph/twitter carried the homepage's title,
description and URL, so pages without their own shared as the homepage;
pages that set an openGraph dropped the root card image; descriptions of
entities, profiles, groups, articles and posts went out untrimmed.

- root layout keeps only type/locale/siteName and card; the homepage sets
  its own title, og:url and canonical
- pageMetadata() in src/lib/seo/metadata.ts: canonical, feed link, og and
  twitter in one shape, with the root card unless a page names one and
  descriptions cut by metaDescription(); generateEntityMetadata uses it
- /pay, /pay/<name>, /blog, /steal, /ecosystem, /community use it;
  profile, group, article and post descriptions are trimmed and X uses the
  same title as og:title

Re-applied from claude/orangecat-page-share-metadata (#1649) on current
main; /technology is now a redirect to /docs, so it needs no metadata.

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

* fix(groups): Discover counts the groups it lists; dashboard shows real member counts

Re-applies the closed #1675 on current main:
- fixture group names live once (FIXTURE_GROUP_NAME_PATTERNS) and travel to
  search_public / public_counts / public_search_text as p_exclude_group_names
  (new migration 20261113160000, rollback note inside), so count, total and
  rows agree;
- browse "Show more" only when rows lie past what the page asked for;
- the dashboard's groups queries drop fixture groups (imatch) and embed
  member_count; GroupCard says "1 member"/"N members", never "0 members".

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

* fix(profile): the Cat's profile leads to its chat, not a direct message it would not answer

/profiles/cat showed "Message", linked to /messages?to=<the Cat's id>. A
direct message to the Cat's account is answered only when it tags @cat, so an
ordinary question there got no reply and no error. The button now reads
"Talk to Cat" and opens the Cat's own chat, until a one-to-one with a bot
answers every message (ADR-0015 D3).

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

* fix(design): Bitcoin-orange words clear 4.5:1 in light (text-bitcoin-text)

#f7931a as text measured 2.01-2.30:1 on every light surface and
1.95-2.12:1 on the bitcoinOrange/10 chips, so BTC amounts, "Primary"
chips and Bitcoin labels were unreadable in the light theme.

- globals.css mirrors @bitbaum/design-tokens --bitcoin-orange-text
  (Unreleased, after 1.7.1): #9d5906 in light (4.75-5.43:1 on surfaces,
  4.61-5.01:1 on the orange/10 chip), the true orange in dark (6.14-8.17:1).
- tailwind maps it as `bitcoin-text`, the package preset's name.
- The 15 places that draw orange WORDS switch to text-bitcoin-text;
  icons, fills and borders keep bitcoinOrange.
- check:token-contrast measures the new token on all six surfaces and on
  the orange/10 chip in both themes (142 pairs, was 124), and requires
  .dark to set it.

Positive green already passes (light 145 60% 29%: 4.91-5.61:1; dark
145 55% 50%: 6.36-8.46:1), so it is unchanged.

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

* fix(a11y): Discover's focus rings show whole; the unread badge carries no label of its own

Re-applies the part of the closed Discover/badge contrast fix that main
still lacks. The chip counts (no more opacity-60) and the badge's ink
(text-fg-inverted) already shipped with the UX audit.

Measured on orangecat.ch, 2026-11-13: tabbing Discover, every chip and
every rail card had its 4px focus ring cut by the row that scrolls (54
of 54 at 390px, 13 of 13 at 1280px, light and dark); overflow-x: auto
clips overflow-y too, and since the chips now scroll at every width the
first chip lost its left edge from sm as well.

- .oc-discover-chips keeps 4px of padding on every side the ring reaches
  and gives it back in margin (-mb-1 mt-4 py-1, sm:-mx-1 sm:px-1); the
  mouse scrollbar's bottom padding keeps its old net spacing.
- .oc-discover-rail-track keeps 4px above its cards on a phone (-mt-1
  pt-1); from sm it is a grid and clips nothing.
- NotificationBadge drops aria-label: not allowed on a plain span, and
  the bell and tab already say "(3 unread)" in their own names.

With this branch's compiled CSS swapped into production /discover: 0
rings clipped at 390px and 1280px in both themes; the first chip and
first card sit at the same y as before.

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

* fix(cat): Cat settings checks for local runtimes only when asked

Re-applies the closed fix on current main. LocalRuntimePanel probed
http://localhost:11434 and http://localhost:1234 on mount, so every visit
to Cat settings (every phone included) made two refused connections and
logged two console errors, and a public site reaching for localhost is
what Chrome gates behind a local-network permission prompt.

- Nothing is probed until "Check this computer" is pressed; until then
  each runtime shows its install link and start command. After a check
  the button reads "Check again" and the result line is announced
  (aria-live). The check and Copy buttons are 44px on touch.
- The Cat page already has its h1 on main; it now takes the name from
  CAT_HUB_COPY.title instead of a literal.

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

* fix(groups): a public group's Events and Activity tabs answer a signed-out visitor

Re-applies the closed #1678 on current main. GET events and activities use
withOptionalAuth (row policies decide what is listed); activities tells a
non-member membersOnly: true without reading the table, and the feed says
"Activity is visible to members", with a Sign in link back to the group
when signed out, instead of "Could not load" or a false "No activity yet".

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

* fix(share): share cards only say what is true, and X fits one post

- project card draws "Back it in Bitcoin" only when the page's own wallet
  check (resolveSellerReceiveInfo) finds somewhere to receive; on no
  wallet or a failed lookup the line is left off
- profile and group cards use shareLine() instead of .slice(0, 180), so
  bios no longer stop mid-word
- a profile or group name with no row gets brandOnlyCard(), not a branded
  card built from the URL; the group card drops the "/<slug>" pill that
  pointed at a 404 (StatPill had no other user)
- xPostText() builds title + shareLine() + hashtags and drops hashtags,
  then the line, until the post fits 280 next to the link, counting CJK
  and emoji as X does; the X share target uses it

Re-applied from claude/orangecat-share-cards-and-sheet (#1650) on current
main. The sheet's dark-theme contrast and double close button were
already fixed on main (GRADIENTS ink fills carry text-fg-inverted; the
card hides its close inside the Dialog); the sheet test now guards them.

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

* fix(community): the footer's Community feed opens for signed-out visitors

The footer links "Community" from every public page, but signed out
/community showed only "Please sign in / You need to be signed in to view
this page" (orangecat.ch, 390px and 1440px, 2026-11-13). The feed's view,
community_timeline_no_duplicates, holds public posts only
(visibility = 'public') and is granted to anon: the data was public, only
the page refused to read it.

The community feed now loads signed out, and the composer's place shows the
"Sign in to post" prompt that profile and project timelines already use,
extracted into SignInToPost so it is one shape. Its sign-in returns to the
page (/auth?from=/community). The reader's own feeds (timeline, following)
still need a reader.

Re-applied from claude/orangecat-community-feed-signed-out onto current main.

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

* fix(public-copy): say which settings and payments are really public

- /faq ("Who can see my activity?") and /docs ("Visibility control") said
  every entity has a public / followers-only / private setting. Listings
  have "Show on Public Profile"; that three-way choice exists for posts and
  articles. Both pages now show one wording, ENTITY_VISIBILITY_SUMMARY in
  src/config/public-visibility.ts (faq.md takes it as a placeholder).
- /how-it-works and /security said every transaction is publicly
  verifiable on the Bitcoin blockchain. Lightning settles off-chain (the
  privacy policy in legal-content.ts says so). Both now show
  SETTLEMENT_TRANSPARENCY_CLAIM, kept next to FEE_CLAIMS.

The step-mark contrast half of the original branch is already fixed on
main (#1634 moved the steps to oc-icon-tile and a token pill; 7.8:1 in
both themes on orangecat.ch), and /technology is now a redirect to /docs,
so neither is carried over.

Re-applied from claude/orangecat-public-copy-truth onto current main.

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

* fix(groups,circles): no multisig promise; an empty kind says what it is

Re-applies what is still open from the closed #1680 on current main (the
Discover zero state, singular counts and the dashboard create button
already landed in #1716):
- the create panel no longer offers "multi-signature Bitcoin wallets";
  the treasury is the organization's own addresses, shown to its members,
  and multisig stays only as advice; the panel names the kind from
  ENTITY_REGISTRY ("Why organizations?") instead of "Group";
- Discover's empty kind adds the kind's plain verb and definition;
- the circles empty state says what a circle is;
- the dashboard adds its create button to the empty state only while the
  header's Create is hidden, so a screen never shows two.

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

* fix(ux): Loki on a phone, the model menu inside the panel, Bitcoin icons coloured; bip-kit 0.8.2; record the handoff

- The Loki chip shows on phones as its hammer alone (44px, named "Loki").
- The model menu opened upward hangs from the trigger's right edge.
- Five icons used text-bitcoin-orange, which is no class; they now use
  text-bitcoinOrange.
- @bitbaum/bip-kit ^0.8.2: readable Mermaid labels and a gutter that counts
  from the screen edge.
- The audit records the handoff of 19 closed PRs, item by item.

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

* docs(changelog): claim only the community feed

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

* fix(migrations): one version per migration — the groups count and the timeline view move off 20261113160000

Three files shared 20261113160000, which the Supabase ledger keys on. Both
renamed migrations are safe to run again (a guarded constraint drop / a view
option with its own check), and the deploy ledger keys on filename.

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

* fix(studio): every form drafts, not only music; visitors can create

On production every Studio form but music failed with "could not finish"
in about 350ms: the prompt shows a score example, so a poem came back with
"score": null and the strict schema discarded the whole draft. The route now
reads a draft the way the Studio means it (readCreativeDraft: a score for
music only, lines joined, the work under its form's name) and tries once
more on an unusable answer.

A visitor's draft no longer ends at a sign-in wall in a new tab: drafts run
on the per-IP budgets (general, then 6 per 10 minutes), the same shape as
dictation, now shared as visitorOrUserBudget.

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

* test(studio): the route test mocks the optional sign-in and the visitor budgets

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

* refactor(studio): the one retry is a bounded loop, not a repeated expression

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

* chore(deps): keep chatkit 0.31.2 and bip-kit 0.6.1 until the rollout gate clears them

The fleet's shared-package rollout gate holds a PR that moves to a package
version not yet proven in its canary product (bitbaum/kivvi), and it held
this one on chatkit 0.31.3 and bip-kit 0.8.2. The Studio, pay, sharing,
groups and event fixes here do not depend on either; the two bumps follow
on their own once the gate clears them. accountkit 0.30.0 is not held.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 17:58:09 +01:00
CatoandClaude Opus 5.5 142f21eb1b fix(ux): the rest of the UX/UI audit — sign-up, phone navigation, money, listings, settings, create, public pages (#1716)
* fix(design): the rest of the orange; a gate keeps it to Bitcoin and the sign-up action

The orange was still decoration and words across signed-in screens: Save
buttons in the room, deck and money-route editors, the AI key and onboarding
steps, passkeys, the profile wizard, Create Group, Cat memory import; focus
rings and borders on inputs, hover colour on article titles, drag-over and
selected outlines, AI sparkles and integration icons, the "Your plan" badge.
As text it is 2.0-2.3:1 on light surfaces.

Those in-app buttons are now variant="primary"; orange ink, borders and rings
are ink tokens (text-fg-primary/-secondary, border-fg-primary, ring-ring);
hover on titles underlines. Orange stays on Bitcoin (Pay, Fund, invoice,
ticket payment) and on the public sign-up / sign-in-to-act buttons.

New scripts/check-one-orange.mjs ratchets variant="accent" under
src/app/(authenticated) and (text|border|ring)-accent-warm anywhere in src,
both at a baseline of 0; registered as check:one-orange in package.json and
both verify lists, with a fixture test.

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

* fix(create): open every create page on the form, templates behind a button

Ten create pages opened on a template gallery with "Start from scratch"
pre-ticked and no Continue, and on a phone that was up to 50 full-height
cards before the first field. The project wizard had a template step of its
own with Previous, Skip and Next (two of them doing the same thing).

Now the form is always first. Where a type has templates, the page header
offers "Start from a template", which opens the picker in a dialog; picking
one fills only the fields not typed into yet and closes it. The picker
shows a check only for a template someone picked, and below sm it is one
bordered list of rows instead of cards. The project wizard loses its
template step.

The create header (single form and wizard alike) is now FormHeader, drawn
by PageHeader: breadcrumb, title, subtitle, owner picker and template
offer as actions. The palette-coloured type icon and the wizard's own
Cancel + h1 row are gone. The wizard's card header that repeated each
step's group heading is gone, and the AI prefill bar shows on the first
wizard step only instead of above every step.

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

* fix(chrome): one name per public page; Product and About split in the header

The header's "Product" menu held the company pages (about, roadmap, docs,
governance) and the top-level "Support" opened the page where people fund
OrangeCat, not where they get help. The header and footer labelled the same
routes independently, so Pricing was "Cat plans" in the footer and Docs was
"Documentation".

PUBLIC_PAGES in src/config/navigation.ts now holds each public page's name
and one-line description, keyed by route, and the header, the visitor menu
and the footer are all built from it. Product = How it works, What you can do,
Discover, Get paid; Pricing and Blog are top level; About = About & mission,
Roadmap, Changelog, Docs, Whitepaper, Governance, Support OrangeCat.

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

* fix(chrome): the search palette finds public pages and stops sending visitors to sign-in

buildPages() indexed only the sidebar and the entity lists, so "Pricing" or
"Docs" found nothing, and a signed-out visitor's default rows (Cat, Home, My
things...) and the Create group all ended at the sign-in form.

The palette now also indexes every public page (PUBLIC_PAGES, with keywords
such as "plans" for Pricing). Signed out, public pages lead, nothing behind
sign-in is offered, the Create group is hidden, and "Search Discover for ..."
replaces "Ask your Cat". The empty line reads "No page or listing matches".

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

* fix(cat-settings): permission rows speak to the person, and say what is really on

What was wrong:
- Each permission row rendered CatAction.description, which is the tool
  prompt the model reads: other tool ids, NOT/STARTED in capitals, "the user".
- Risk tiles used raw palette classes with no dark value.
- A brand-new account (Connect Wallet and Explain Transaction on by default)
  saw Payments switched on under "Send Bitcoin and fund projects", a bare
  "2/8", and a warning that something high-risk was enabled.
- Presets applied on one tap, replaced every individual choice without
  asking, never showed which one was active, and the fourth was a ghost link.

What it does now:
- src/config/cat-action-summaries.ts holds one plain sentence per action;
  the permissions API sends it instead of the model description. A test
  fails when an action has no summary or a summary reads like a prompt.
- RISK_COLORS use the status tokens.
- Categories read "2 of 8 on"; a partly-on category names what is on and
  starts open. Category names: "My things", "Memory and notes"; Payments is
  "Wallets, bookings and payments".
- The high-risk note names the actions that are on; it is a plain note
  unless an action that spends Bitcoin (send_payment, fund_project) is on.
- Turning on a whole category that would let Cat spend asks first; turning
  anything off never does. What a permission allows is unchanged.
- Presets are one radiogroup of four equal cells (Off, Minimal, Creator,
  Power) marking the active one ("Custom" otherwise); switching asks first
  and confirms with a toast.

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

* fix(cat-settings): spending caps are entered in the person's own currency

The two caps were raw number inputs labelled '(BTC)' with an eight-decimal
step, so people who see every other amount in CHF had to type a Bitcoin
decimal. They now use the shared AmountField (entry in the display currency,
the BTC figure always shown, value still stored in BTC), labelled 'Most Cat
may pay at once' and 'Most Cat may pay in a day', each with the saved value
under it and a 'No cap' button. 'Save caps' stays the card's one button.

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

* fix(sharing): the share sheet on a phone has one frame and one close button

On a phone the share card was rendered, with its own border, shadow and X,
inside a dialog that brings its own frame and X: two close buttons, one
inside the other. In the dialog the card now drops its frame and its X, so
the dialog's are the only ones; as a desktop dropdown it keeps both. The
platform grid is four equal cells for the four platforms (a fifth column
sat empty from sm up), and the labels are sentence case: 'Copy link',
'Share profile'. The 'Share via…' ink was already fixed in #1634.

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

* fix(content): placeholder and duplicate pages lead somewhere real; Builders says it leaves

/pages sent a visitor to the signed-in project dashboard, which only bounced
them to sign-in; it now redirects to Discover. /technology was an unlinked
copy of the Technology Stack section on /docs and now redirects there.
/company/about was a second About page; it redirects to /about, which now
links its one unique door, the ways in (/company/careers).

/channel keeps its waitlist, but Discover People went to the signed-in people
dashboard and Share My Profile opened a share sheet for an empty username for
a visitor. Discover People now opens Discover's people list, sharing shows
only for someone with a profile (as an outline button, not the orange), and
"Bitcoin tipping" reads "Bitcoin payments".

The footer's Builders link pointed at /builders, which only redirects off-site
to bitbaum; it now links there directly, marked external. The e2e route
contract lists the three new redirects.

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

* fix(chrome): the header stays put on desktop and comes back for keyboard focus

useHeaderScroll hid the header on scroll-down at every width, while from lg up
the sidebar is pinned at the header's height, so a hidden header left a 64px
empty band above the sidebar. The header now hides only below lg
(useIsDesktop). Focus that moves into .app-header also clears the hidden
state, so sticky bars pinned below the header move back with it (the CSS
already kept a focused header on screen).

useMediaQuery returns early where window.matchMedia does not exist (jsdom),
so the shell tests that render the header still run.

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

* fix(chrome): the phone drawer's close row is named "Close menu"

The close row at the bottom of the signed-in drawer reused the desktop
"Collapse sidebar" label as its aria-label, so a screen reader announced a
different action than the row shows. It now carries only its visible text,
"Close menu". (The drawer already ends above the tab bar via
.app-sidebar[data-above-mobile-nav].)

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

* fix(create): one create list for /create, the phone sheet and the header menu

The three create choosers had three anatomies (a list, a name-only grid,
a flat menu), none of them used the registry's plain copy, and they
grouped by an internal category. The phone's Create tab opened the
name-only grid.

CREATE_OPTIONS now reads each entity's plain.verb and plain.example, keeps
the type name as a small trailing label, and groups by plain.intent under
the intents' own titles. One CreateOptionList renders the rows; /create,
MobileCreateSheet and HeaderCreateButton all use it (the header wraps each
row in a menu item so arrow keys still work). "Need money for something?"
is the first row and "Not sure which one?" the last in all three.

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

* fix(chrome): closing search, notifications or the Cat returns focus to its button

Each overlay is opened from outside state rather than a Radix Dialog.Trigger,
so on close Radix had nothing to focus and keyboard focus fell to the top of
the page.

- palette-store remembers what had focus when the palette opened and gives
  it back once the dialog lets go (unless something else has taken focus or
  the element is gone).
- The header hands the bell to NotificationCenter (returnFocusRef), which
  refocuses it in onCloseAutoFocus, as MobileCreateSheet already does.
- GlobalCatLauncher keeps its button mounted (invisible) while the panel is
  open and wraps the panel in FocusLock with returnFocus; the panel is now
  aria-modal.

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

* fix(content): links in running text look like links, and the legal pages end with a way to ask

Links inside sentences were styled four ways: the paragraph's own grey with
an underline only on hover (roadmap goal records), grey with an underline
(changelog, roadmap), a bare underline, or an underline in ink (governance).
One class, .oc-text-link in globals.css (ink, underline in border-strong,
darker on hover), now styles every one of them.

/privacy and /terms rendered every paragraph as a plain string, so the
contact address in their Contact sections could not be tapped. Paragraphs
and bullets now go through linkify(), which turns email and web addresses
into links (unit-tested), and both documents close with "A question about
this? Ask the Cat, or write to" the contact address.

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

* fix(pay): the pay page shows who is paid — face, name and @handle

The pay page named the payee by display name alone; the avatar never
reached it because the recipient lookup did not select avatar_url, and
the face + name + handle block was private to ReceiveCode. A payer could
not tell one "Anna" from another on the page that sends her money.

The block is now PayeeIdentity, drawn by Receive above the code and by
the pay page under its "Pay" eyebrow (the name as the h1, the @handle a
44px link to the public profile). resolveLnurlRecipient selects and
returns avatarUrl on both the current-handle and renamed-handle paths.

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

* fix(money): pay waits for an amount it can pay, says "Pay CHF 20", and owns the one orange

- An amount outside the limits showed a red line but left the committing
  button live: every action tested only `amount <= 0`. One predicate,
  isAmountInRange (next to the amount field), now gates Pay, "Pay from my
  wallet", "Show the code", Send's Review and Request's Send request.
- The pay page's one action read "Show the code" and sat as a dimmed
  orange slab under a brighter header "Get Started". It now reads "Pay
  CHF 20" once an amount is in range and "Enter an amount" before, is
  accent only when it can act (monochrome disabled otherwise), and
  getRouteChrome().quietHeaderSignup turns the header's sign-up to outline
  on /pay/<username> (not on the /pay landing).
- The amount plate drew the global focus rectangle around its digits. The
  input cancels the ring; the plate carries it at AA strength.
- In BTC entry the four suggestions read "0.0001 B…": the rung now shows
  the number alone, with "0.0001 BTC" as its accessible name.

Also adds ROUTES.DASHBOARD.WALLETS_FOR_SEND, used by the next commit.

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

* fix(money): one frame on all three tabs; Send leads to the field it needs; Ask works signed out

- Frame: Receive's first run built its own column with a raw h1, Send's
  no-wallet state put its headline in the page title, and all three
  loading states returned a bare spinner, so title and tabs jumped. Every
  state now renders inside MoneyPage with the tab's own title; first run
  and no-wallet use MoneyPrompt (question as an h2, one sentence). Send's
  subtitle is one line at 390px.
- Send with no wallet linked to /dashboard/wallets with no context, in
  protocol words the page never repeated, to a form titled "Get paid in
  Bitcoin" with the connection field under "Other ways to get paid
  (advanced)". It now links to ?for=send, says "connect a Lightning
  wallet with a wallet connection link", and the wallet form opens with
  that field visible and focused under "Connect a wallet to send".
- Wallet form: toggles read "Add an on-chain address or a wallet
  connection" and "Name and details" (no "(optional)"/"(advanced)"); a
  `bare` prop drops the card when /receive hosts it; two actions are two
  equal cells ("Save wallet" / "Not now" on first run).
- Requests: two actions beside the text squeezed the note to "Dinn…";
  Pay and Decline now sit under it as two equal cells. The status line
  lost its stray paragraph margin, and Send request sits in
  MoneyActionBar like Send's button. Both gate on isAmountInRange.
- "Ask" on a way to pay shared on request: signed out, the row says
  asking needs a free account and the button goes to registration with
  `from` set; the conversation opens with an 'ask-payment-details' draft
  instead of an empty composer.

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

* fix(finances): empty cards lead somewhere; "Add a wallet" opens the wallets page

"Add a wallet" pointed at a hardcoded '/wallets' — the public directory,
where no wallet can be added. It now goes to ROUTES.DASHBOARD.WALLETS.
The "Came in" empty state named its actions as prose; it now has one
link, "Get paid by link" to Receive, and the tax card repeats "Declare
it" where the estimate needs a place. Stacked paragraphs get mb-0, the
section label is the money surface's (text-sm tracking-caps), and the
two totals are MoneyFigures.

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

* fix(wallets): the wallets page reads like the money tabs it is linked from

- Header: PageHeading instead of an icon and a raw h1; "Receive" is
  outline, a way out rather than the page's action.
- Empty state: "Add a wallet" is the primary action (was outline, Title
  Case), body "Add a Bitcoin wallet so people can pay you.", an arrow
  instead of the external-link glyph on an internal link, and the invalid
  `bg-surface-raised/40/50` class fixed.
- With no wallets the outer card is gone, so the empty state or the add
  form is the only surface.
- Reads ?for=send (from Send's "Connect a wallet") and opens the add form
  on the wallet connection field.

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

* fix(settings): split Account into named frames, move preferences out, and recognise an account with no email

What was wrong:
- Settings → Account was one card titled "Account & Security" holding
  thirteen sections and three save behaviours, thousands of pixels long.
  Currency and date format shared one "Save preferences" button; the theme
  was three large cards; currency was editable in the profile editor too.
- An account with no email (anonymous) read "the email address associated
  with your account" above an empty field, was offered a password it could
  never sign in with, saw an empty list of ways to sign in, and its profile
  said "Unknown" and "Not verified".

What it does now:
- Account is five frames with one header shape: Sign-in (email, password,
  two-factor, passkeys, ways to sign in, Nostr behind "Connect Nostr"),
  Devices, Identities, Your data, Delete account. Buttons are 44px and none
  is filled among peers; section text is max-w-prose.
- New Settings → Preferences (/settings/preferences, in SETTINGS_SECTIONS):
  currency and date format save on change with the notifications page's
  status line; the theme is a SegmentedControl. The profile editor links to
  it instead of carrying a second currency picker.
- With no email: "Add an email" with the page's one primary button, the
  password form waits until there is an email, the sign-in list says "This
  browser only" with a warning that names the fix, the profile shows
  "None yet" with an "Add an email" link and omits "Email Verified".
- "Memories … managed under Memory" (was "in AI settings").

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

* fix(content): the changelog shows each entry's headline and folds older months

Every entry is written "**Lead.** The rest." but the fleet map drops the bold,
so /changelog printed each one as a single grey paragraph: about fifty phone
screens with nothing to scan. Each line now leads with its first sentence as
a heading (ink, semibold) and the rest beneath in secondary ink.

The rail dot was offset by the wrong amount (it landed 19-23px inside the
rail) and was orange as decoration; it now sits on the rail in fg-tertiary.
The per-line bullet used bg-strong, which is not a utility, so it rendered
only as an indent; it is removed and every line shares one left edge.

The newest 30 days stay open; older days are grouped per month in a
<details> ("October 2026, 14 changes"). splitLead and groupChangelog live in
src/lib/development/changelog-view.ts with unit tests.

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

* fix(chrome): a visitor on Discover gets the site's navigation and footer, not Create

On app surfaces (Discover, events, public listings) the header turned the
marketing nav off even for nobody signed in, showed the "+" Create button
without checking auth, the visitor tab bar raised Create as its loudest slot,
and the footer was limited to public surfaces. A visitor had no way to the
rest of the site and every loud control led to the sign-in form.

- Header: the marketing nav and visitor menu show whenever nobody is signed
  in (on app surfaces once auth has settled, so it never flashes for a
  signed-in person); the "+" needs a signed-in user.
- Visitor tab bar: Home, Explore, How it works, Sign in; no raised slot.
- Footer: also on app surfaces for visitors (showsSiteFooter); the tab-bar
  clearance moves from main to below the footer there.
- A signed-out visitor bounced from a create form lands on the register tab
  (signInModeFor in the middleware).

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

* fix(funnel): a first-time visitor who taps Start sees the register form

The hero's "Meet your Cat" linked /auth with no mode, and the auth form
defaults to sign-in, so a newcomer was greeted with "Welcome back". Every
other public Start points at a protected path, and the middleware sent
every signed-out visit there to mode=login as well.

The hero now links /auth?mode=register (the header's target). The
middleware picks the form from the browser: no Supabase cookie means this
device has never signed in, so it gets the register form (which offers
"Already have an account?"); a browser with one, an expired session, gets
sign-in. from= is kept as before.

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

* fix(profile, civic-split): orange only for Bitcoin and top-of-funnel

Profile progress bars used GRADIENTS.progressBitcoin (Bitcoin orange) and
the civic split coloured the locality share and the slider thumbs with the
warm accent, under a comment saying 'nothing chromatic'. They are ink
(bg-fg-primary, accent-fg-primary) now. The settings tab and theme tick
were already fixed in #1634.

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

* fix(funnel): the studio grid shows products, not every entry in the fleet map

Home: the "Live now" grid listed every live studio project, the three
pillars again included, about 4,100px on a phone. It now shows six
products that are not pillars (homeFleetPreview) and links to
"All N live products" on /ecosystem.

/ecosystem: "Everything built on it" rendered the whole fleet map,
prospects, demos and "next" ideas named by sentence-casing their slug,
some with no description and no link. It now shows live projects in the
studio and client layers that the map describes; the sentence above it
says so. The home selection and the hero's live count drop undescribed
entries too, so the count still matches what is shown.

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

* fix(funnel): pricing's one warm action is on the free plan

The orange "Add your key" sat on Bring your own key, and the founding
band was an orange-tinted card with an orange icon and an orange button,
so the page had several warm actions and none on the plan that brings a
newcomer in. Free's "Start chatting" is now the accent; every paid or
set-up action is outline; the founding band is a neutral surface with a
primary button. "Available now" badges get a positive dot. The prose said
"two honest ways" over a list of three; it says three. From lg up each
card is a four-row subgrid so name, price, bullets and button line up.

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

* fix(settings): one shape for on/off rows, named by their words

On/off rows came in five shapes: a bare checkbox with 'On'/'Off' beside it
(notifications), a card around one switch (Cat proactivity, civic split),
and privacy rows labelled 'Website' where on meant hidden. A shared
SettingToggleRow (src/components/ui) now holds them all: name and one line
of detail on the left, the switch on the right, the whole row a 44px label,
the switch named by the visible words and described by the detail. Privacy
rows say the action: 'Hide website', 'Hide phone number'.

Also:
- Civic split: 'Declare my split' is the in-app primary (was the warm
  accent), and while it is disabled a line says what is missing.
- Profile tabs: panels claimed role=tabpanel labelled by tab ids nothing
  had; they are named regions now, matching the nav + aria-current strip.

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

* fix(create): one filled button per create form, and an equal action pair

The wallet box inside an entity form rendered a full-width filled "Save"
right above "Create Product": two primary buttons, the wider one not the
one that finishes the form. Its heading was derived from the button label
(`submitLabel === 'Save'`), so the label could not change without changing
the heading.

WalletForm now takes `title` (default "Get paid in Bitcoin") and
`submitVariant`. Inside an entity form the box says "Use this wallet" in
an outline button, so the form keeps one filled button. The wallet edit
card titles itself "Edit wallet" instead of "Save Changes".

FormActions lays Create/Cancel and the wizard's Previous/Next out as a
two-column grid of full-width 44px buttons (commit first); Skip is a
full-width ghost button under them.

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

* fix(tasks): say whose tasks these are and give the empty list a way forward

The visibility leak itself was closed by the RLS migration
20261113120000 (a task is seen by its creator and whoever is asked). The
page still described itself as "Manage and complete team tasks", showed
four zero stat cards on an empty list, and its empty state said "Create
your first task" with no button.

The subtitle now names the scope ("Tasks you made, and tasks someone
asked of you"), the stat cards show only when there are tasks, and the
empty list is the shared EmptyState with a Create Task action, or Clear
filters when filters hide everything.

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

* fix(funnel): one Cat door with a microphone, and capability cards a thumb can use

The public map's "What do you want to do?" was a hand-rolled text input
with no microphone, while the signed-in door (DashboardIntent) was
chatkit's Composer. TheDoor is now that composer, used on the dashboard,
My things and the public map; DashboardIntent is retired. The transcribe
route needs a session, so a signed-out visitor's microphone is the
browser's recogniser (SIGNED_OUT_VOICE; ChatInput takes a voice prop),
and chatkit says in words when a browser has none.

Capability cards: "Start" was a 36px text link; it is a 44px outline
button. "See yours" was offered to visitors with no account and nothing
to see; it now renders only for a signed-in user. The compact variant is
gone with its only caller.

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

* fix(forms): tag input keeps its Add button, task actions in order, ink radios

The task form's tag input was flex-1 without min-w-0, so on a phone it
kept its intrinsic width and pushed "Add" out of the row. Task actions
were Cancel then Save, content-width; they are now the create forms'
equal 44px pair with the commit first. Radios and checkboxes in create
forms were 13px browser-blue natives; they are 20px with accent-color
bound to the ink token, on 44px label rows.

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

* fix(funnel): one way to end a public page; How it works says how; About says who

One action had six names ("Meet your Cat", "Create Free Account", "Get
Started Free", "Get Started", ...) and every page closed differently: a
gradient card, a near-black band, and /what-you-can-do ended on a link
to another product. PublicStartBand is the home band, shared: one
sentence, the warm action CTA_LABELS.primaryAction to the register form.
Home, How it works, What you can do and About end on it; the header's
sign-up button uses the same label and target. CTA_LABELS.createAccount
and the "Get Started Free" literal are gone.

How it works: the title was "Meet Your Cat" with a hardcoded lede; it is
"How it works" with the configured subtitle. Step titles say what the
person does, in sentence case. The compact copy of the capability cards
is one row per intent, each a link into that section of What you can do
(PublicLinkList). Cards that were not links lose their hover styling,
and the "Need more help?" buttons are gone.

What you can do: the on-page index was a second row of wrapping pills
that looked like the example sentences; it is plain text links in one
row that scrolls.

About: it stated values and stopped. "Who builds it" lists the studio
(/company/about, now ROUTES.COMPANY_ABOUT), the MIT source on GitHub
(SOURCE_REPO_URL, also used by the footer), the stack and the contact
address, rows of one anatomy. The identity value's icon is Lock, as on
the home page, not a tree.

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

* fix(content): the say-it-in-one-box pages take a voice, and /raise's disabled button is not a faded orange

/raise, /feedback and /studio each open on one box to say what you need, and
none had a microphone. Each now shows the shared DictationButton beside the
box for a signed-in person (the transcription endpoint is signed-in only, so
a visitor types, as before); what is said is appended to what is written.

/raise's Price it pill faded to 40% orange while empty; it is now a neutral
raised pill with tertiary ink until there is a sentence, then the orange.
The helper line under the box and the character count on /feedback are in
secondary ink. /feedback's Send is primary (with the one-orange sweep).

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

* fix(profile): edit profile opens on the form on a phone, and Save stays in reach

What was wrong (390px):
- A completion checklist printed every missing field above a hand-built
  header, so no field was in the first screen; the bar was Bitcoin orange.
- Save sat at the very end of the form, about 3,800px down, not pinned.
- The form paid for three nested paddings, so four of the eight 'How can
  others help?' options were truncated mid-word.
- The handle was silently written into Name while completion still counted
  Name as missing, and the percentage ignored its declared weights.
- The avatar picker was a round User icon; the profile shows a rounded
  square with the cat mark.

What it does now:
- The page uses EntityListShell ('Edit profile', 'Back to profile').
  Completion moves below the form on phones, closed until wanted
  ('Profile N% complete — see what is missing').
- Cancel / Save profile are two equal 44px cells in a bar that sticks above
  the mobile tab bar and settles in place from lg up.
- The form padding is p-3 on phones; help options wrap to two lines in
  equal-height cells (still two columns).
- Name stays empty until given; completion is weighted.
- The avatar picker is a rounded square with DefaultAvatar and a visible
  'Add photo' button. DefaultAvatar (shared) sets an inline size only when
  'size' is passed, so responsive classes work; every caller passes one.

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

* fix(chrome): hover, open and selected states are visible in light theme; buttons have a pressed state

Every chrome state painted bg-surface-raised on the page surface. In light
theme that is 96% on a 97% page, so hovering a header button, opening a nav
dropdown or moving through the search palette showed nothing; and no button
variant had a pressed state.

States that sit on the page now use the existing surface-overlay token (94%
light, 17% dark): the header rail (HeaderIconButton), header nav and its
dropdowns, the visitor menu, the footer buttons, the search trigger and
palette rows, the tab bar's press, and the sidebar's hover/active constants
and rows. In design-system.ts the ghost, outline and secondary button
variants hover to surface-overlay, and every button and icon-button variant
has an active: state (overlay for ghost/outline/secondary, muted-strong for
primary, accent-warm-hover for accent).

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

* fix(chrome): the notifications panel shows one state, and its filters fit a phone

A failed first load drew the raw error message above the filter row and "No
notifications found" below it, so the panel said both. The five filters were
a hand-built row of flex-1 pills that ran off a 390px screen.

A failed load with nothing loaded is now one state: "Could not load your
notifications." with an outline "Try again", no filters, no empty state. A
failed refresh keeps the list with a short notice. The filters are the shared
SegmentedControl (44px segments) in one line that scrolls sideways when five
labels do not fit.

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

* fix(dashboards): every empty list ends in its create action, first

Wishlists, circles and documents said "create your first one" with no way
to do it: their configs had no empty-state action, and each config that
did brought its own button with its own colour class. Bookings said "No
bookings found" and stopped there. On My Projects the "Open Loki" card sat
above an empty list, so on a phone it was the only button on arrival.

- emptyStateWithCreate: the dashboard shell adds `Create <name>` (or the
  page's createButtonLabel) to any entity empty state without its own
  action; the per-config buttons and their GRADIENTS classes are gone. A
  tab's own empty state (Favorites) is left as written.
- EntityDashboardPage renders headerContent after the list while the list
  is empty, above it otherwise.
- Loans (its own page) uses the same empty state, hides the header Create
  while "My loans" is empty so the screen has one Create, gives each tab
  one label at every width, and makes the tabs 44px.
- Bookings: each empty tab says bookings appear when someone books one of
  your services, with "Create a service"; the first tab is "Requests".

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

* fix(content): the blog's filters are two rows, not a wall of 71 pills; choice-rows sees them

From md up the blog showed every tag and every month as a wrapping pill
(about 71) before the first post. The time filter is now a SegmentedControl
of four ranges (all time, this year, last 6 months, this month) and the
per-month pills are gone; topics are one line that scrolls sideways, limited
to topics two or more posts share (sharedTopics, unit-tested; the selected
one always stays), each pill 44px tall with aria-pressed. Both rows show at
every width, so the phone's "Filter posts" toggle is gone.

The /study-bitcoin level filter is a SegmentedControl; the /studio forms are
an even two-column grid of radio cells.

check:choice-rows only looked for aria-pressed, role="radio" and role="tab",
so none of these counted. It now also catches native radios and buttons that
set a selection (onClick={() => setSelectedX(...)}), with a fixture test.

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

* fix(discover): public listing pages give every visitor one way forward

What was wrong:
- A priced listing whose owner has no wallet showed a price and stock, then a
  bare "hasn't connected a wallet yet" and no sticky bar on a phone.
- Product and service pages kept price and action below the first phone
  screen; a product had a second, orange "Buy now" beside the pay panel; a
  service's sticky "Book this service" scrolled to the pay panel; fixed-price
  listings appended a full support form under the purchase.
- PriceDisplay appended "/ hr" after the BTC equivalent, so it wrapped away.
- The breadcrumb started at "Home" (the dashboard), which sends a signed-out
  visitor to the sign-in form.
- Descriptions were titled three ways and the raw "active" status was shown
  to buyers.

What it does now:
- The no-wallet card says who cannot be paid and offers "Ask how to pay", a
  message to the owner about the listing through sign-in; the sticky bar
  becomes that action instead of disappearing. One link builder
  (lib/navigation/inquiryHref) serves it and the owner card.
- Price (and stock / the Book button) lead product and service pages via
  renderLead; the extra "Buy now" is gone; the service bar leads to #book;
  the pay bar reads "Buy now · CHF 20.00"; BookEntityButton is primary.
- On fixed-price listings support sits behind "Add extra support".
- PriceDisplay keeps amount and unit together, the equivalent on its own line.
- Breadcrumb takes a root; public listing pages start at Discover.
- "About this <kind>" comes from the registry name; product, service and
  cause show their status to the owner only.

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

* fix(groups): Join where a visitor lands; the overview is not the owner's settings

What was wrong: a group page offered Join only inside the Members tab, so a
visitor on the Overview tab had no way in; the Overview and sidebar showed
the owner's "Suggested Features", label, visibility and listing flags to
everyone; one tab carried an icon; "1 Members"; and the page had no way back
to the list it came from.

What it does now: GroupJoinButton (one component, used in the header and the
Members tab) offers "Join group" to a signed-in non-member of an open group
and "Sign in to join" (back to the group) when signed out. Suggested
features and the label/visibility/listed rows are owner-only; counts are
singular for one; the Events tab has no icon. The header starts with a
Discover > <groups> breadcrumb (PageHeader and EntityDetailLayout pass a
breadcrumb root through).

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

* fix(projects): one way back, no "be the first" when nobody can pay, sign-in links that return

What was wrong: the project page opened with a Back button (which leaves the
site for anyone arriving from a shared link) where every other listing has
a breadcrumb; "Created by" took the global paragraph margin; the summary
rail said "No contributions yet — be the first." on a project with no wallet;
the timeline told a visitor to sign in with nothing to tap; and the project
room, deck and own-profile redirects sent `redirect=`, which /auth never
reads, so people landed on the dashboard.

What it does now: a Discover > Projects breadcrumb; mb-0 on "Created by";
the rail says "Not open for funding yet." when the project is not payable;
the timeline's "Sign in" is a link back to the project; the redirects send
`from=`.

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

* fix(discover): a kind's page says which kind, never ends in a wall, and links into it work

What was wrong:
- /events was an organiser sales page at the events address (accent "Near
  me", icon-only search, `redirect=` sign-in, an overridden final button).
- Cards without a picture were a big letter on a grey plate half the card's
  height; on a phone two listings fit a screen. Stacked <p>/<h3> kept the
  global margins.
- "QA test…" listings and the "QA Grok A" profile led the live shelf.
- A kind's page was headed "Discover"; "1 products"; an empty kind showed
  nothing; the chosen chip could sit off screen; a failed search call was
  cached for two minutes as an empty shelf.
- /projects and three dashboard buttons sent `?section=`, which Discover
  ignored; category tiles searched display names that match nothing.
- From sm up rails hide cards five to eight, but "See all" only appeared when
  more existed than were fetched.
- The row of kinds wrapped (10 + 3) on desktop.
- Card prices were grey mono text, unlike the detail page.
- /jobs ended with no link or button, its second line below AA contrast.

What it does now:
- /events redirects to Discover's events, with "What's on near you" above
  the grid (outline button, visible "Search" label).
- The media plate is 2:1 with a 48px bordered monogram tile; in the phone
  grid a card is a row with a 96px square face. Card text has mb-0.
- QA title patterns and display names are fixtures (SQL filter and
  isFixtureHit share the list).
- Browse mode heads with the kind under a "Discover" link and titles the
  page "<Kinds> — Discover"; singular counts; "No <kinds> listed yet." with
  "List the first one" and Just listed; the current chip scrolls into view;
  the shelf and browse reads are strict, so a failure reaches the error page.
- `section` is read as `type`; links use ROUTES.DISCOVER_TYPE; each category
  group has a searchTerm.
- DISCOVER_RAIL_VISIBLE = 4 (mirrors the CSS) decides "See all".
- The chip row is one sideways line at every width, thin scrollbar for mice.
- Card prices are a MoneyFigure in the listing's own currency.
- /jobs offers "Start a group" and "See groups".

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

* fix(create): form copy that does not leak the implementation

The product form asked for "-1 for unlimited" stock and had a second
"Default Currency" select under the Price field's own currency selector.
The project form's hints began "Optional:" and one explained "Currency
selector is included in this field". Investment amounts had
Bitcoin-scale placeholders (1.0, 0.01, 0.5) in fields that default to
francs.

- FieldConfig.emptyValue: a number field shows its sentinel as empty and
  sends it when cleared. Inventory uses it (-1 = unlimited) with the
  placeholder "Unlimited" and "Leave empty if you can always make more."
  The product guidance panel says the same.
- The product's separate currency select is removed; the selector on
  Price sets `currency`.
- Project hints lose "Optional:" and the selector note; the funding goal
  says "Leave empty if there is no target."
- Investment placeholders are 50000 / 500 / 10000.

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

* fix(create): a failed submit scrolls to and focuses the first field in error

Field errors were set and nothing moved: on a phone form thousands of
pixels long the person stayed at the button, far from the red. Now the
first failing field, in the form's own order and on screen, is scrolled
to the middle and focused, both on a wizard step and on the final submit.

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

* fix(profile): a new owner's profile shows first steps, not a blank panel

What was wrong:
- Overview always pushed the owner's support card into its list; an element
  is truthy, so the empty state could never render, while the card itself
  rendered nothing until a wallet could receive: a blank panel.
- The offerings block's filled 'Make offerings public' button published an
  empty card; the way to fill it was a text-xs link.
- The owner saw every tab, empty ones too, with zero passed as a badge; Info
  carried a second Edit button and inline editor beside the header's.
- With no banner the banner area kept its full photo height.

What it does now:
- The support card is included only when the wallet can receive. An empty
  owner Overview offers three list rows of one anatomy: add a wallet, add a
  photo and a bio, create your first project.
- With nothing to share, the offerings block shows the empty card with
  'Ask Cat to help me figure this out' as the primary button.
- Owners get the visitor's has-content tab filter (Overview, Timeline and
  Info always stay); a zero is not a badge. Info's duplicate editor is gone;
  editing is the header's 'Edit profile'.
- No banner: h-20 sm:h-24; the default avatar sizes by class.

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

* fix(content): a blog post reads in the same frame as a community article

A blog post put its header in a 4xl column and its text in bip-kit's
.bp-article, which centres itself at 70ch and adds 1rem of padding on
phones, so the title and the first line of text sat on different left
edges. It now uses the article frame (/articles/[slug]): one 680px column
holds the back link, the header and the body, with the TOC on a rail to the
right on xl; both readers drop .bp-article's extra padding so title, byline
and text share one edge at 390. The community article title takes the
heading face, like the blog's.

The end of a post had two buttons to /blog ("Back to Blog" and "Read More
Articles") on an orange gradient; it now offers the previous and next posts
and one Join button. Dates: the post card printed the raw string and the
post used toLocaleDateString; both go through FormattedDate now.

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

* fix(chrome): one name per signed-in destination; the avatar menu follows the sidebar

ROUTES.RECEIVE was "Money" in the sidebar and "Receive" in the tab bar; the
tab bar's create slot relabelled itself "Post" on Messages; and the avatar
menu hard-coded "Dashboard", "My projects", "Your page" and "Edit profile"
for places the sidebar calls Home, My things and Profile.

- The tab bar's money slot is "Money", and every slot prints its own name;
  only where Create leads stays contextual.
- The avatar menu is Home, My things, Profile, Settings, taken from the
  sidebar's entries (getAccountMenuPlaces) with their names and icons.
- Its Appearance row is hidden from md up, where the header has its own
  theme toggle.

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

* fix(auth): one orange button per side, the mode switch under the title, errors under their fields

Sign-in showed two orange buttons, and the first one ("Start instantly")
created a new anonymous account for someone who came back to sign in. The
switch between signing in and creating an account was a 24px text link
below the provider buttons, and every failure, an empty field included,
landed in one banner with a "Try Again" that could only fail the same way.

Now:
- One accent per side. Signing in: only "Sign in"; the no-email way in sits
  at the foot as an outline "Try it without an account". Creating an
  account: only "Start instantly"; "Create account", the emailed-code
  buttons and "Send reset email" are primary. The anonymous button has its
  own loading flag, so the spinner shows on the button that was pressed.
- A SegmentedControl ("Sign in" / "Create account") under the title, kept in
  step with ?mode=; the bottom switch is gone.
- Provider buttons keep their names unless four share the row, take the
  default border, and are labelled only when they are icons alone.
- The form is noValidate: each field says what is wrong under itself
  (authErrors.ts). The banner offers "Try again" only for timeouts and
  server or connection failures; credentials, unconfirmed email, an existing
  account and callback errors do not. Timeout copy is plain; the loader says
  "Opening OrangeCat…" instead of "Welcome back!" to a new account.
- The auth column is bg-surface-page in both themes (it was a 40% raised
  tint in light); the anonymous help line is text-fg-secondary.
- Password and anonymous sign-in decide where to land through one rule
  (lib/auth/landing.ts): an own-origin `from`, else the Cat welcome for a new
  account and the dashboard for a returning one.

Findings auth-firstrun #0, #1 (client half), #4, #7 (auth half), #8, #9, #10.

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

* fix(auth): every way in lands on the same first screen

A new person's first screen depended on which button they used: password
and anonymous sign-in went to /dashboard, Google/GitHub and the email
confirmation to the Cat welcome, and "/" sent anyone not yet onboarded to
the onboarding form, on every visit, logo included. The callback and the
confirmation also greeted a returning person as new, because "new" was read
from the URL.

Now the Google/GitHub callback and the email confirmation decide through
the same rule as the sign-in form (landingForSession → landingAfterSignIn):
an own-origin `next`, else the Cat welcome for an anonymous or not-yet-
onboarded account and the dashboard for a returning one. "/" sends a
not-yet-onboarded person to the Cat welcome; the onboarding form is linked
from there (next commit), not forced.

Finding auth-firstrun #1.

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

* fix(auth): password recovery in the sign-in page's own frame

The three recovery screens each had their own frame: a Card with an icon
tile, Title Case headings ("Enter Your Reset Code", "Reset Link Invalid",
"Password Updated Successfully"), buttons at a different height from /auth,
an unpadded "Back to Login" next to the sign-in page's "Sign in", and the
tab title "Account".

Now every step uses the same AuthTitle block and centred column as /auth
(AuthStepPage): no card, no icon tile, sentence case ("Enter your reset
code", "Choose a new password", "Password updated"), 48px fields and
buttons, "Send a new reset email", and one 44px "Back to sign in" link
(BackToSignIn). The reset page has its own title, "Reset password". The
MFA step says "Back to sign in" as well.

Finding auth-firstrun #13 (the field labels were already added by #1656).

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

* fix(onboarding): a full-width description field, whole examples, no orange on in-app actions

The onboarding description field was 241px wide in a 462px column:
Textarea wraps itself in a block div, which sat in a flex row without
flex-1 and shrink-wrapped to the browser's default 20 columns. The examples
were six wrapping pills clamped to two lines, under a grey "Examples" label
below AA. The main button was the warm accent, disabled orange on arrival,
and so were each offer's button, the pay step's retry and "Create" on My
things.

Now the field's wrapper is `min-w-0 flex-1`; three examples show as whole
sentences, one full-width 44px row each, under a text-fg-secondary label.
In-app actions are primary: "See what Cat suggests", the pay retry, "Create"
on My things (the shared Button), and the first offer (the others are
outline, one primary per screen). A unit test keeps `variant="accent"` and
the solid accent fill out of the signed-in pages and onboarding.

Findings auth-firstrun #2 and #7.

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

* fix(dashboard): first-run copy and a setup checklist with one row per destination

The first dashboard spoke to someone who already had things: "No pending
Cat approvals." under the greeting, a feed titled "Recent activity" that was
mostly other people's, and a filled "Share" inviting friends to a profile
still called "User". The setup checklist showed three rows that opened the
same profile form, sorted the Cat's "Set me up" row last (out of the two
shown), drew a border per row inside its card, and its row titles, as bare
h4s, outranked the card's own title.

Now:
- The status line says nothing to a named account with nothing waiting; to
  a person not yet named it says "Say what you want to do. Your Cat drafts
  it and asks before anything goes live."
- The feed is titled "From people on OrangeCat".
- The invite card is hidden while the name is a placeholder, and its Share
  is outline.
- "Let your Cat set you up" leads the high rows; bio and photo are one row,
  "Add a bio and a photo" → "Edit profile", held back while the name row
  (same form) shows. Titles and labels are sentence case.
- Rows are a divide-y list, titles text-sm.

The percentage the finding also named was already replaced by a count
(#1653). Findings auth-firstrun #3 and #6.

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

* fix(cat): a new person is offered the door's own sentences, and told what to say

The Cat's first-run starters were built from entity-registry nouns ("Help me
create my first product"), and the dashboard door showed no examples at all,
so a new person met a greeting, an empty box and the names of tables.

Now getStarterChips() returns the first three DOOR_EXAMPLES, the same
sentences the "What do you want to do?" box offers; the dashboard door shows
them while the person has no projects or drafts; and the Cat's welcome adds
one line under its title ("Say it in a sentence. Cat drafts it and asks
before anything goes live.") and a 44px link to the "who are you" form,
which "/" no longer forces on anyone.

Finding auth-firstrun #5. Not done here: the starter list's wrapping layout
lives in @bitbaum/chatkit (.ck-starters-list) and needs a package release.

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

* fix(what-you-can-do): keep the app shell and the app's door for a signed-in person

"What you can do" is in the app's navigation, but its route is public, so a
signed-in person who opened it lost the sidebar and the tab bar, and met the
native signed-out door with no microphone. Its section pills were 30px tall
in a wrapping box.

Now getShellSurface(pathname, signedIn) (src/config/routes.ts) treats that
page as 'app' for a signed-in person; AppShell and MobileBottomNav read it.
The page's door is DashboardIntent (chatkit composer, dictation) when signed
in and TheDoor's no-JavaScript GET form otherwise (WhatYouCanDoDoor). The
section links are 44px and one row that scrolls sideways.

Finding auth-firstrun #12. The shared DoorExamples component and 44px chips
had already landed. Not done: a microphone on the signed-out door, since
transcription is behind sign-in.

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

* fix(app-shell): sidebar drawer, collapsed rail and one name per place

The phone drawer stayed open after picking a destination (AppShell never
passed onNavigate) and was saved to localStorage, so it reopened over the
page after every reload. It now closes on navigation and on any path
change, and is never persisted; a value written by an older build is
cleared on load. Only the desktop collapse is a saved preference.

Visiting the Cat wrote "collapsed" into that saved preference, so one
visit collapsed the sidebar everywhere and hid the People, Work and More
groups. A focus route now shows the rail collapsed without writing
anything (expanding there lasts until the next page), and a collapsed
rail that hides groups ends with a "More" button that expands it.

Navigation vocabulary: Profile, Settings and Help leave the sidebar for
the account menu (config/navigation accountNavItems, also read by the
palette so "setings" still finds Settings); the account menu drops
Dashboard and My projects, which the sidebar calls Home and My things.
The sidebar regroups as People (People, Timeline, Community, Collaborate,
Set up for someone), Money and work (Finances, Deals, Civic split, Tasks,
Bookings, Analytics) and More (Bots, Discover, About); Deals no longer
wears Collaborate's handshake, Explore is named Discover after its page,
and each row is one line without the description under it.

Active state: a nav item can own other paths (activeFor). Money is lit on
Receive, Send and Requests in the sidebar and the tab bar, whose slot is
now called Money too; My things is lit on every type's own list.

Signed in, the logo leads to the dashboard rather than "/", which only
redirects a member to the Cat. The context switcher's chevron and menu
rows are 44px; the search shortcut hint uses secondary text.

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

* fix(app-shell): one Create, in plain verbs, on every page

The header's plus and the phone's sheet listed seventeen entity nouns
("Product", "Organization") while the command palette said the same
things in plain verbs. Create options now take the registry's plain copy
(verb and one line); the noun stays as `kind`, which the Cat's editor
links match on. Both surfaces draw one row shape (CreateOptionRow: icon
tile, verb, one line, 44px), grouped under the existing category labels,
and both end with the link to "What you can do". The sheet is no longer
a grid of bare nouns.

The tab bar's plus changed its name and behaviour from page to page: it
read "Product" on the store and jumped to a form, and on Messages it
opened the public post composer. It is now always "Create" and always
opens the sheet; the page's own kind (a group, on Groups) is the first,
highlighted row inside it. contextual-create now only answers which kind
a page is about, matching a base path and its sub-paths, not a prefix.

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

* fix(manage): one header frame and one name per type on create and list pages

Project Analytics hand-built its breadcrumb and a smaller title in all
three of its states; it now renders through EntityListShell (PageHeader),
with the time range as a SegmentedControl and a 44px project select in
the header actions. My Companions now says what a companion is ("Beings
with their own voice that remember whoever talks to them") instead of
"Build and monetize autonomous AI services".

The organisation form took the name "Group" while the chooser and the
registry say "Organization"; it now reads the registry's name and plain
description, and the organisations list (GroupsDashboard) says the same
word, with its in-app Create as the primary button instead of the orange
accent. The loan form is "Create Loan", not "Create Loan Listing".

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

* fix(dashboard): first run leads with the door, not a checklist

A new account's dashboard opened on "No pending Cat approvals." and two
profile chores in Title Case, with an empty "Your projects" box that
singled out one of the many kinds. Now:

- with no projects, the door shows its examples (as My things does) and
  the line under the greeting explains it: "Say what you want to do. Your
  Cat drafts it and asks before anything goes out." With nothing waiting
  and something owned, the line is simply absent;
- the empty "Your projects" section is gone; the door covers starting one;
- "Let your Cat set you up" leads the recommended tasks (a `leads` flag
  sorted ahead of priority), so the visible pair is not two chores;
- every task title is sentence case.

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

* fix(app-shell): social surfaces share one frame, one primary, honest states

Feeds: "Home", "My Timeline" and "Community" were three pages showing the
same feed under different names, and /home was linked from nowhere.
Signed in, each now carries one pick-one row (All · Following · Everyone,
the shared SegmentedControl) under one title, "Timeline"; each view keeps
its own address. An empty Following feed says "Nobody you follow has
posted yet." with one primary "Find people". The Timeline header's second
"Share Update" is gone; the composer is the first thing on the page.

One primary per screen, never orange inside the app:
- My things and Collaborate use the shared PageHeader with a primary
  action, in the dashboard's single column (Collaborate's title had its
  own size, typeface and an icon);
- Groups' header action is primary and appears only once the list has
  something; the empty state owns the one button;
- Messages keeps the header's New as its one primary: the list's "Start
  New Conversation" became a line, the empty pane's two buttons are
  outline and say "New";
- People keeps "Discover people" in the header only.
- A search match is underlined in ink, not the warm accent.

People at 390px: the invite card is two equal cells, Copy link and Share
(the third button ran "Copy Link" off the screen), and the three tabs are
the shared SegmentedControl, the count under it. A failed load now reads
"People could not be loaded." with Try again (fetchFollowListOrNull tells
a failure from an empty list) instead of "No connections yet".

Notifications: the five filters are five equal 44px cells that fit a
phone, and a failed load shows only the error and Retry, not the error
over "No notifications found". Discover's shelf with nothing in it says
nothing could be loaded, with Try again, instead of "That's everything".

PageHeading's page size now matches .oc-page-title (no md:text-4xl), so a
signed-in page's name is one size everywhere. The feed's end line and
Collaborate's helper text use secondary text, not the tertiary token.

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

* test(create): match the phone sheet's Article and Post rows by their start

The rows now carry a one-line description, so their accessible names are
"Article…" and "Post…" rather than the bare word.

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

* refactor: six components back under the 300-line limit

Merging the audit fixes pushed six components a few lines over the component
size limit. Each now moves one cohesive piece into a sibling file (task header
actions, the select and choice fields, the signed-out purchase card, two send
states, the share platform list, the wallet goal block). No behaviour, markup
or copy changes.

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

* test(nav): the account menu test names the places it now holds

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

* fix(discover, a11y): a failed count no longer takes Discover down; two controls named and sized

- Discover's chip counts are read strictly so a failure is not cached as
  zero, then caught: the page draws without numbers instead of falling to the
  error page. The listings themselves still go to the error page with Try
  again. Test: view-counts-degrade.test.ts.
- The currency picker beside a price has an accessible name (axe
  select-name on the create form).
- The xpub help toggle on Wallets is a 44px target (it was 16px tall).
- Docs: the audit gains the fourth batch, every finding's status, and the
  remaining work; CHANGELOG has 2026-11-13.

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

* fix(create, cat): keep the product form's fixes after merging main; summaries for the two new Cat actions

Main brought the product form's separate currency field back on purpose (so
Fill with AI can set a price in BTC); it stays, and the test that asked for
one currency control is dropped. The inventory field still shows unlimited as
empty, and the hints no longer explain the implementation.

walk_site and use_browser arrived on main without the plain-language summary
the permissions page now shows for every action.

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

* test(search): palette tests fit main's palette

- The visitor check skips pages the public footer also links (Community).
- "Settings is found from the palette" asks as a signed-in person.
- The store-focus test of the replaced palette store is dropped; main's
  command-palette-keyboard test covers returning focus.

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

* test(create): spell out the hint checks instead of a mis-anchored regex

CodeQL (js/regex/missing-regexp-anchor): in /^Optional:|-1|selector is
included/ the ^ anchors only the first alternative. The test meant exactly
that, but three explicit checks say it without the ambiguity.

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

* fix(auth): a protected page asks a signed-out visitor to sign in; only the Cat and create forms start on sign-up

The merged rule sent any browser without a session cookie to the sign-up
form, so /dashboard, /settings or /messages opened on a new device showed
"Create account" to a returning person, and the route contract
(tests/e2e/route-contract.spec.ts) failed on all five protected pages.

Sign-up is now the default only where a newcomer is the likely visitor: a
create form, and the Cat (where the public "What do you want to do?" box
sends its sentence) when this browser has never held a session. Everything
else asks to sign in. A middleware test pins the five-page case.

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

* test(e2e): sign in through the form's own button, not the Sign in / Create account switch

The sign-in page now has a segmented switch whose first option is also
named "Sign in", so a role lookup for that button matched the switch and
the form was never submitted.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 11:28:01 +01:00
CatoandClaude 13bc6a90b4 fix(entities): the Assets breadcrumb opens public assets, and a wishlist's button says what it does (#1711)
* fix(entities): the Assets breadcrumb opens public assets, and a wishlist's button says what it does

Measured on orangecat.ch (2026-11-12):
- On a public asset page, the breadcrumb "Assets" led a stranger to a sign-in
  wall (/auth?from=/dashboard/assets) and a signed-in visitor to their own,
  empty "My Assets". /assets redirected to the dashboard, while loans,
  products, services, causes, investments, groups and wishlists all redirect
  their list route to Discover.
- A wishlist's sticky phone button said "Gift an item" but scrolled to the
  plain "Support with Bitcoin" card, where no item can be chosen. That
  wishlist had no items. Per-item gifting does not exist.

Now /assets redirects to Discover's assets list (the slug comes from
DISCOVER_TYPE_SLUGS), and the owner's list stays at /dashboard/assets. The
wishlist's primary action reads "Send a gift" until per-item gifting exists.

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

* test(e2e): /assets is a Discover tab in the route contract, like /loans and /circles

The contract expected signed-out /assets to ask for a sign-in and return to
/dashboard/assets. This branch makes /assets open public assets on Discover,
so CI landed on /discover (build-and-smoke, job 131735090890). /assets now
sits with the other Discover redirects, and the owner's /dashboard/assets
keeps its sign-in check.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 09:44:59 +01:00
CatoandClaude f45342b35c fix(projects): a funding goal can be 0.5 BTC or CHF 2500.50, not only a whole number (#1676)
* style(tests): format the legacy project-validation test, no change in what it checks

The file predates lint-staged and was never formatted. The next commit
changes one of its tests; formatting it here keeps that diff readable.
Prettier only: semicolons, trailing commas and line wraps.

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

* fix(projects): a funding goal can be 0.5 BTC or CHF 2500.50, not only a whole number

On orangecat.ch (iPhone 13, dark and light) the project wizard's Funding
step answered "Funding goal must be a whole number" to 0.5 BTC, to
10000 CHF switched to BTC (0.16498655 BTC), and to CHF 2500.50. Measured
with Next only; no request was sent. The same schema guards
POST /api/projects and PUT /api/projects/[id], so the API refused them
too, and anyone whose currency is BTC could not set a realistic goal.

The cause was a sats-era .int() on goal_amount, the same leftover the
wishlist schema already dropped. It is gone; the goal stays positive and
is capped at 1,000,000,000 like the wallet goal. The column
projects.goal_amount is numeric(20,8) (baseline, never altered), so no
migration is needed.

Two places followed the old rule: the raise flow dropped a BTC goal
(a project goal "cannot be" below 1) and now keeps it, and the MCP
create-project tool told agents the goal is a whole number. A legacy
test that expected Number.MAX_SAFE_INTEGER to pass now expects the cap's
message: that number would have overflowed the column.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 08:36:01 +01:00
CatoandClaude Fable 5.2 d0b9c8dc96 feat(companions): model picker, your own rules, memory you can write and correct, and a library, for every bot (#1706)
* fix(migrations): the vendor daily cap takes its own version, 20261112202000

#1672 and the members-only groups migration landed on main with the same
version, 20261112200000. schema_migrations.version is a primary key, so
check:migration-versions and Migration Replay failed on main and the deploy
did not run. The cap's migration had not been applied anywhere (its deploy was
the one that stopped), so it takes an unused version; nothing else changes.

Unit suite locally: 718 files, 5841 tests passed.

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

* feat(companions): walk_site, a QA hand that opens a live site in Loki's browser and says what is wrong

Cat Bot's first missing row against Grok Bot (docs/PARITY.md, plan step 1):
headless browser testing. A bot proposes walk_site with one to three full
addresses and, optionally, phrases each page must show. Loki opens each page
at phone size in its own guarded browser (bitbaum/loki #1696) and answers
per page: it loads, shows what it must, does not scroll sideways, has no
broken picture. The thread keeps Loki's own sentences; nothing is filed, and
a problem is filed with file_loki_finding.

- services/loki/site-walk.ts: the call over the signed rail, the parsing of
  what a bot names, and the lines the thread keeps. Nothing is opened
  without a full address or for more than three pages; a refusal is Loki's
  sentence; an answer that cannot be read is never reported as a walk.
- One body in LOKI_HANDS, so the Cat's card and a bot's own work loop run
  the same thing; read-only, so it can be switched to "on its own".
- Registered in cat-actions, the Loki connection, the bot's hands and their
  labels, and the chat's progress words.
- The prompt budget is raised 7,080 -> 7,230 for one clause and two
  parameter names, with the reason beside it.
- docs/PARITY.md: the row is in progress, and step 1 says what is still to
  do (the picture in the thread; a walk that clicks through a flow).

__tests__/unit/cat/loki-site-walk.test.ts. Unit suite: 730 files, 5924 tests.

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

* feat(companions): use_browser, a browser of its own for every bot; a failed page's picture in the thread

Cat Bot's computer use against Grok Bot's (docs/PARITY.md, plan step 2),
OrangeCat's half; Loki's is bitbaum/loki #1697.

A bot proposes one step at a time: open, click, type, press, scroll, back,
look, close. Loki takes the step in that bot's own Chromium (its own
cookies, kept out of the private network) and answers with what the page
now shows. The thread keeps the picture, the address, what the page says,
and what can be clicked or typed into, numbered, so a model that cannot see
pictures drives by number. Loki never types a password or a card: that step
stops and says the owner does it.

- services/loki/browser.ts: the step a bot wrote becomes the step Loki is
  asked for, or a sentence saying what is missing; nothing is sent for a
  step that cannot be one. A stopped or failed step is its sentence, never
  a success; an unreadable answer is never a page.
- Whose browser is the server's to say: hands-server stamps bot_id from the
  bot whose turn it is and drops whatever a model wrote there. The Cat,
  which is no bot, uses the person's own.
- One body in LOKI_HANDS, so a card and a bot working on its own run the
  same thing.
- walk_site now shows the picture of a page that failed.
- Prompt budget 7,230 -> 7,440, with the reason beside it. PARITY rows
  updated.

__tests__/unit/cat/loki-browser.test.ts. Unit suite: 731 files, 5935 tests.

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

* feat(companions): a model picker for a bot's chat, from the person's own key

Grok Bot has a model picker. A Cat Bot's turn used one fixed model per
provider on a person's own key and nobody could change it.

- services/ai/own-models.ts: the choices are the provider's own answer for
  that key (GET /models, which every provider this app calls directly
  serves), not a table of other companies' model names kept here. Reading
  it calls no model. An OpenRouter key lists this app's routed table; the
  shared pool has nothing to choose and says so.
- GET /api/ai-assistants/models.
- "Model" in a bot's details (ModelRow): chosen per bot on this device and
  sent with each message; a name that is not a model id never reaches a
  provider (chosenModel), and a name the provider refuses is its error.
- The own-key turn uses the chosen model; "auto" and nothing mean the
  provider's default, as before.

__tests__/unit/ai/own-models.test.ts. Unit suite: 732 files, 5942 tests.

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

* feat(companions): a person can add and correct what a bot remembers about them

The memory page could only forget. Now a person tells a bot something to
remember, and corrects a line it got wrong.

- memory.ts writeCompanionMemory: the new words are stored first (embedded
  like any other, marked source "owner", never deduplicated), and only then
  is the line they replace forgotten, so a failed save loses nothing.
- POST and PATCH on /api/ai-assistants/[id]/memories, scoped to the caller
  like the rest of the route.
- MemoryList: a field to add one, Edit beside Forget, 44px targets.

__tests__/unit/companions/memory.test.ts (three new cases).

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

* feat(companions): a bot's library: the photos, files and links from your chats with it

Grok Bot keeps a Library per chat. Nothing new is stored for this one: a
stored message already says what went with it (the attachment tags the
thread draws its chips from) and a link is in the words.

- services/companions/library.ts libraryFrom: pure; photos and files from
  the person's own lines, links from both sides (each once, its latest), a
  picture the bot's browser took shown as a picture. A tag in a bot's line
  is never read.
- GET /api/ai-assistants/[id]/library: the caller's own conversations with
  that bot; a stored photo comes back as a ten-minute link, only from the
  caller's own folder.
- /companions/[id]/library, and "Library" in the bot's details.

__tests__/unit/companions/library.test.ts.

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

* feat(companions): your own rules for your bots, checked before a bot acts on its own; your time zone

Grok Bot reviews a bot's risky actions against rules the person wrote.

- user_ai_preferences gains bot_rules and time_zone (migration
  20261113130000), one set per person.
- services/companions/rules.ts: the rules are in a bot's prompt on its
  owner's turn, with the owner's hour. A step a bot would run ON ITS OWN is
  checked against them first: one short model call that answers ALLOW or
  ASK. Only a clear ALLOW runs; ASK, anything else, or silence turns the
  step into the ordinary card with the reason in the thread. A rule can
  only add a tap. Reads and looks are not checked.
- GET/PUT /api/ai-assistants/rules; "Your rules for your bots" in a bot's
  details (RulesRow), shown to the owner.
- Memory writes moved to /memories/write (POST, PATCH): storing a memory
  embeds its words, and a file a GET lives in may not import that.

__tests__/unit/companions/rules.test.ts. Unit suite: 734 files, 5958 tests.

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

* test(live): the rehearsal sets a model, rules, a memory and reads the library on the live site

Case 8 of bots-rehearsal.live.spec.ts, as a brand-new person: the shared
pool says it picks the model; rules save as written and a time zone nobody
knows is refused; a memory is added, corrected and forgotten; the library
answers a list.

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

* fix(migrations): the bot rules constraints are added only when missing, and nothing is dropped

safety-lint refused the DROP CONSTRAINT IF EXISTS that made the two ADDs
repeatable. A DO block that adds each constraint when it is not there is
repeatable too, and drops nothing.

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

* fix(companions): the library's dates and the owner's hour are written in the app's locale

check:app-locale refused a browser-locale date in LibraryList and two
hard-coded 'en-GB' formats in rules.ts. The date is formatDate, and the
hour uses APP_LOCALE. The whole of scripts/verify.mjs passes locally.

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

* fix(diagnostics): a bot turn's failed links tell our own daily cap apart from a vendor's 429

2026-11-13 06:24 UTC, first hand on the live site: a new person's bot got
502 in 0.7 s. cat-diagnostics showed google 403, groq 429 and openrouter 429
for the hour, and could not say whether those 429s were the vendors' own
limits or OrangeCat's daily spending cap, which refuses a call as a 429 so
the chain moves on. The summary now marks a cap refusal (cap: true) and the
public report prints it as "cap".

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 08:15:13 +01:00
CatoandClaude 26c35499d6 feat(messages): the packaged Messenger — files on messages, and a Cat nobody mistakes for a person (#1688)
* feat(messages): the packaged Messenger, with files and a Cat nobody mistakes for a person

/messages is now @bitbaum/chatkit/messenger: OrangeCat keeps the transport
(routes, storage, realtime) and the words; the screen is the package's.

- The Cat is marked as an agent, with whom it answered for; the top bar says
  it is in the conversation.
- The conversation fills the phone screen: no blank band under the box.
- Photos, videos and files on a message: private bucket on R2, signed upload
  and read URLs, one policy (config/message-attachments.ts) checked in the
  browser, the route and the bucket; 1 GB a person; unsent uploads and the
  files of deleted messages are swept daily.
- Unread counts are real, and the badge follows them.

The chatkit dependency moves to the published release in the next commit,
once the package is out.

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

* chore(type-scale): hold the ground the Messenger took (7 arbitrary sizes)

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

* fix(migrations): messages_can_carry_files takes an unused timestamp

Main's identity-handover migration took 20261112120000 first.

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

* fix(migrations): messages_can_carry_files moves to 20261112235900

Main's members-only-groups migration took 20261112200000.

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

* fix: leave main's members-only references on their own migration

The timestamp rename caught two files that name main's migration
20261112200000_members_only_groups_hide_their_members.

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

* test(messages): a link to an old conversation keeps the inbox, on the Messenger's reducer

main's #1682 test drove useConversations, which this branch deletes. The same
rule is checked where it now lives: the package's reducer adds the linked
conversation and keeps the list.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 07:01:30 +01:00
CatoandClaude 2f5346cac5 fix(tasks, cat, home): the five owner decisions from the UX/UI audit (#1695)
The owner handed the audit's five decisions over on 2026-11-12. Each is
decided here, except the token values, which go to the package itself
(bitbaum/design-tokens#64).

- Tasks are seen and changed by their creator and by the person a request
  names. Any signed-in account could read and update every non-archived task,
  read every completion and flag, and read requests sent to "everyone".
  Migration 20261113120000 scopes tasks, completions, flags and requests;
  SECURITY DEFINER helpers keep the two tables' policies from recursing.
  Tested against Postgres 16 as creator, person asked and stranger.
- A request names one person, picked with the money screens' people picker.
  The request and flag routes no longer notify every account on the platform;
  the broadcast helper is removed. PeoplePicker passes the person as a second
  argument to onPick.
- Saving a Cat spending cap keeps the payments row's on/off state (or the
  category default, off). It wrote granted: true, so Send Payment and five
  more moved from Off to "Ask first" on accounts that never chose. The new
  test fails on the old code.
- Migration 20261113121000 marks the three hand-made QA listings as test data
  by id; nothing is deleted.
- The home page shows "What it solves" before the studio.

Docs: the audit's decisions section records what was decided; CHANGELOG.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 00:20:28 +01:00
CatoandClaude Opus 5.5 a343b91af2 feat(identities): shared account menu, hand-over, unread counts, person tags, operator circle (#1609)
* refactor(menu): the account menu is accountkit's AccountMenu

OrangeCat ran its own account menu (UserProfileDropdown, its panel, a
dropdown hook) while every other product uses @bitbaum/accountkit's
AccountMenu. The identity switcher was then added to the local one, which
is the copy the fleet rules say not to write. The switcher now lives in
accountkit 0.28.0, and OrangeCat mounts the shared menu.

- AccountMenuControl supplies what is OrangeCat's: the person, the places,
  the other identities (ADR-0014) and what a tap does. Layout, keyboard
  handling and the sign-out and switch failure states are the package's.
- A failed sign-out or switch is passed on as a rejection, which is how the
  menu knows to stay open and say so. The toasts are gone.
- Appearance stays reachable from the menu, for phones.
- --acct-line maps to the default border: the subtle border is the same
  shade as the overlay the menu sits on, so in light mode its groups ran
  together.
- Removed: UserProfileDropdown, UserProfileDropdownPanel,
  IdentitySwitcherRows, ThemeModeRow, useDropdown.

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

* feat(identities): an identity can be handed over (ADR-0014 D9)

The holder creates a hand-over link for one identity. Whoever opens it gives
an email address and accepts; the identity is then an ordinary account on
that address, with everything it owns, and that browser is signed in to it.
The former holder can no longer switch to it.

- The link is the credential, as a claim link is (ADR-0004). It is shown
  once and only the SHA-256 of its token is stored (identity_handovers,
  service-role only). One open offer per identity, seven days, withdrawable.
- Reading the accept page spends nothing; only the form's submit accepts.
- The order of acceptance is the safety property: the link to the holder is
  deleted BEFORE the identity is given its address. If the address is taken,
  the link and the offer are put back and nothing has changed.
- The former holder's sessions in the identity are ended on acceptance.
- The accept endpoint is public by design (the person accepting has no
  session in the account yet), rate limited per IP, and recorded with its
  reason in the route-guard allowlist.
- The link is built from the site's public address, not the request's.

Also: the consent screen no longer promises an app 'Read your email
address' for an identity, which has none to share.

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

* feat(identities): one person is one tag to an app (ADR-0014 D7)

An app that gives every account a say (Solon) gives a person with several
identities several. To refuse the second seat it must learn that two
accounts are one person, and nothing else.

POST /oauth/person-tags answers a confidential client OrangeCat trusts
with a tag per account: two accounts share a tag exactly when one person
holds both. The tag is HMAC-SHA256(key, client || scope || holder), so it
differs per app and per scope the app names, and cannot be computed or
reversed without the key.

- The key is generated by the database when the migration is applied. It
  is never in the repository or an environment file, no API role can read
  it (not the service role either), and it does not leave the database:
  identity_person_tags() does the keyed step. One row, written once,
  because changing it would unmatch every tag an app has stored.
- A self-registered app cannot ask at all.
- An account with no tag could not be told apart; it is not someone else.

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

* feat(identities): see what waits in your other identities; an operator can resolve a circle

D8. GET /api/identities gives each other member the unread count the bell
shows, read on the service role and only ever for the caller's own circle.
The menu shows it on that identity's row and as a dot on the avatar
(@bitbaum/accountkit 0.29.0, waiting on an account); Settings shows it on
the row. A count that cannot be read is left out, not shown as zero.

D10a. identity_circle_of(handle) returns the holder and every identity it
holds, for any handle in the circle. Service role only, so it adds no way
for one user to learn another's identities. It reads; it does not act.
OrangeCat has no suspension mechanism today, so a circle-wide ban has
nothing to switch on yet; when it does, it starts here.

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

* test(identities): the person-tags route decides who may ask

POST /oauth/person-tags had tests for the function it calls and for the
database function behind it, but none for the route, which is where the
decision about who may ask is made. Pinned here:

- a trusted confidential client gets its tags, with no-store, and the
  registered client id is what is passed on;
- an unknown app, a public app and a wrong secret get one identical 401,
  and none of them reaches a lookup;
- a client that authenticates but is not trusted gets 403 before a lookup;
- rate limited before anything is read;
- a failed lookup is 503 and never an empty set of tags.

The suite-wide next/server mock stubs NextResponse.json to return nothing,
so this file gives it a real one.

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

* fix(identities): close the boundaries an adversarial review found

Critical: an identity entered with a way in of its own (a password or
passkey given in its own settings, its login handed to someone) could
regain the whole circle. Its withheld circle still listed itself, and no
switch path but the API route refused a switch to yourself: calling the
consent screen's 'Continue as' with its own id minted a fresh one-time-code
session, which the gate then read as a switch. mintSwitchCode now refuses a
withheld caller and a switch to yourself, in the one function every switch
goes through.

- Losing the circle is permanent: the first change to an identity's email
  or password stamps identity_links.lost_circle_at (trigger on auth.users),
  and a stamped identity never has its circle again. Before, setting an
  unreachable address back let it in.
- A handed-over identity keeps no way in. Acceptance now spends the offer
  atomically (two people opening one link: one gets through; a withdrawn
  link finds nothing), cuts the link, removes every way in the former
  holder could have put on it (identity_strip_ways_in: every GoTrue table
  tied to the user, found from the catalog, plus linked providers; the
  connected apps' tokens and consents; the password, replaced by one nobody
  knows), and sets the new address last. Any failure before that puts the
  link and the offer back. An address error the auth server applied anyway
  is counted as done, not relinked.
- Person tags are answered only for accounts that granted the asking app:
  a trusted app could otherwise map every circle on the platform.
- getCircle throws on a failed read instead of reading it as 'no
  identities' (which let account deletion orphan identities).
- The handle check escapes LIKE wildcards ('_' is allowed in a handle).
- The identity limit holds when creates race: a create past the limit in
  creation order gives way.
- Switching moved to src/domain/identities/switching.ts (the service passed
  the 500-line limit).

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

* fix(identities): interface and mail after review

- Mail for an identity reaches the person: one recipient rule
  (recipientEmail.ts) for the email service, dispatcher and seller
  notification; an identity's mail goes to the account that holds it,
  never to its undeliverable address.
- Wishlist proofs accept any actor the caller holds (userHoldsActor).
- The account menu reloads identities when they change (event + tab focus)
  and reports a failed switch; settings show a retry when the list fails,
  and say plainly when an identity cannot manage the circle.
- Hand-over: "Not now", a new link for an open offer, and an accept page
  that ends on "It is yours" with sign-in instead of a silent redirect.
- Settings for an identity explain it has no email or password of its own;
  the delete dialog says what deleting removes.
- Consent "Continue as" says when the switch did not happen.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 13:44:24 +01:00
CatoandClaude 67fb153499 fix(privacy): no owner email, password or email-derived handle in public pages or the repo (#1621)
This repository is public, and it carried the owner's sign-in email in
nine ad-hoc test scripts, an e2e spec and three docs, with the account
password beside it in most of them. The scripts and the spec now read
E2E_USER_EMAIL / E2E_USER_PASSWORD (the names the CI secrets already
use); the browser-console script prompts; the docs say where the
credentials live instead of what they are. Removing them from the tree
does not remove them from history: the password has to be changed.

Two old handles that were plus-addressed aliases of the owner's email
were also quoted in code comments and test fixtures (now neutral
examples), and in the text of a public project update on the OrangeCat
project, where the mention renderer linked one to a profile that 404s.
A migration rewrites any `<local part>+ocauth<N>` alias in timeline
titles and descriptions to "an old test account". It matches the
shape, never a name; run twice against a scratch Postgres 16 it changed
only those rows, left ordinary plus-addresses alone, and was a no-op
the second time.

Applied migrations and .mailmap are untouched: migrations are immutable
once applied, and .mailmap is what makes git show those commit emails
as Cato.

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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 07:29:52 +01:00
Cato 154e6cdebf feat: use PayKit 0.3.0 for wallet input handling (canary for heidi#294) (#1430)
* feat: adopt PayKit for wallet input handling

* test: add browser smoke for shared Cat chat composer

* chore: use verified PayKit 0.1.1 artifact
2026-11-11 14:44:27 +01:00
Catoandcatomean 49290ffe92 feat(messages): Ask Cat button + @cat hint in the conversation composer (#1551)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-11-04 13:23:52 +01:00
Catoandcatomean 60abf17efd fix(messages): New message picker hides placeholder accounts, offers Talk to Cat; explanatory empty state (#1548)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-11-04 12:46:44 +01:00
Catoandcatomean 1b64f443b9 fix(profile): uploads work, Cat on the profile editor, sidebar name opens your profile (#1544)
* fix(profile): avatar/banner uploads, Cat on profile editor, sidebar name opens your profile

* fix(profile): avatar/banner uploads, Cat on profile editor, sidebar name opens your profile

* test: sidebar avatar links to profile; ci: supabase CLI renamed [inbucket] to [local_smtp]

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-11-04 12:22:49 +01:00
Cato 8172121e7d Enable Cat to manage project investor rooms (#1538) 2026-11-03 08:54:30 +01:00
Cato f65d12a23e fix(cat): preserve live-data answers and expose investor-room navigation (#1530)
* fix(cat): ground investor-room navigation and exercise real conversations

* fix(cat): ground replies in completed live-data tool results
2026-11-02 10:56:15 +01:00
CatoandClaude Fable 5.1 39bf29f158 test(bots): the rehearsal retries a gateway error once (#1516)
* feat(bots): a bot writes first, on the person's own key

A person can tell one of their bots to write first, every day at a time
they pick, with a prompt they wrote. The run happens on the person's own
OpenRouter key only; without a key the routine is kept, shown as waiting,
and skipped with the reason, so no platform key is ever spent by a timer
(fleet standing rule 2026-09-25).

- companion_routines table (one per person per bot, owner-only RLS),
  routines-store (time validation, next run in the person's zone) and the
  runner behind a cron route + 15-minute systemd timer, registered as a
  person-asked timer in the no-background-ai gate with a marker check.
- GET/PUT/DELETE /api/ai-assistants/[id]/routine for the owner.
- RoutineRow in a bot's own chat: "Writes first, every day", time and
  prompt inline, a line to Settings when a key is missing.
- Hands: the proposal line names what will be set up, never only "Sure";
  a created event's outcome carries its link.

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

* feat(bots): a bot can ask Loki, as the person — the first connector

ask_loki: a Cat action (communication, low risk, confirmed) in the hands
launch set. The bot relays a question over the signed OrangeCat → Loki rail
to Loki's POST /api/orangecat/ask, which runs a read-only turn as the Loki
user linked to the actor; Loki's own sentence is the outcome the person
reads, and a refusal (no linked account, a spent budget) is relayed as
written. A relayed question can never dispatch, approve or spend: that stays
with send_task_to_loki, and the two verbs name each other so a question is
never dispatched as a task.

ADR-0013: D6 first connector and D7 recorded as shipped.

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

* fix(bots): the routine's day-in-zone comes from the timezone helper

check:app-locale (new on main) refuses a literal locale handed to Intl; the
routine's next-run computation now takes the day in the person's zone from
instantToWallTime, the one rendering the app already trusts.

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

* fix(bots): the chip knows the verb of ask_loki

The tool-label table of leading verbs gains ask → Asking / Asked, so the
chip for a bot's question to Loki never falls back to the generic label.

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

* fix(cat): a failed "Do it?" card shows the server's sentence, not [object Object]

The confirm and reject hook handed the API's error envelope (an object) to
new Error(), so every failed action read "[object Object]". Seen live the
first time a bot asked Loki for an account not linked to Loki: Loki's
sentence naming the one step was on the action row and lost on the card.
The hook, the memory import and the interests list now read the message
through apiErrorMessage, the reader written for exactly this.

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

* fix(companions): a bot keeps offering its hands on a repeat ask

Live on 2026-11-01 the second "Ask Loki" in one thread came back as
"I can ask Loki for you." with no fence and no "Do it?" card. The
proposal fence is taken off a reply before it is stored, so the model
saw its own earlier offers as plain sentences and copied them.

- The queued proposal is kept in the assistant message's metadata.
- The history given to the model writes the fence back onto those
  turns (withProposal), so a proposal in the history looks like one.
- proposeFromReply returns the proposal as queued; hands tests cover
  the round trip and metadata reading.

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

* fix(companions): a proposal is a worked example, and a bare block still becomes a card

Live on 2026-11-01 a fresh bot's first "Ask Loki" came back as "Here's the
query I'll send to Loki:" over a json fence holding {"question": "..."}:
the free-tier model copied the template's inner half and left out the
action, so the person saw code and no card.

- The hands section ends with a complete block for a real offered action,
  required fields filled with their own names, instead of a template with
  <id> and {...}; it says the block is the proposal itself and to write no
  other code block.
- extractProposal reads a propose, json or untagged fence at the end; a
  block with fields but no "action" names the one offered action that owns
  every field and has its required ones present; a propose fence that said
  nothing usable comes off so it is never shown as code.
- Tests for the example, the lenient read, the inference and its refusals.

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

* fix(bots): a failed "Do it?" card is finished, a second card starts clean, no empty bubble

Seen live on 2026-11-01 (fresh thread, two asks of Loki):
- a card whose action ran and failed kept Confirm/Reject under the reason;
  the reason is now the outcome line, as a success would be
- the second card in the thread showed the first card's failure line inside
  it: the card is keyed by its action
- a model that wrote only the block left an empty bubble above the card:
  the card's description stands in for the words, and ask_loki is described
  as the question ("Ask Loki: ...") rather than "Execute Ask Loki"

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

* test(bots): the five demos as one live rehearsal, run by a person

tests/e2e/bots-rehearsal.live.spec.ts walks the live site as a brand-new
person (a pseudonymous account minted at the start, no fixture secret): one
door, the shelf and a real letter, a group with two specialists in their
lanes, an event proposed and created from a "Do it?" card, Loki asked twice
with an honest outcome and a clean second card, a routine set and stopped,
and the API edges. Every assertion names the value it protects.

The Live rehearsal workflow runs it on workflow_dispatch only and keeps the
screenshots; it has no schedule, because a free-tier key is spent only when
a person asks (fleet rule 2026-09-25). docs/testing/live-rehearsal.md.

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

* feat(bots): what a bot did stays in the thread

A "Do it?" card's outcome lived only in the slot above the composer: it left
the screen when a second card arrived and was gone on reload (seen live
2026-11-01). The confirm route now records the outcome as a line of the bot
conversation the card came from (services/companions/outcomes.ts): the
handler's own sentence with its page, or the reason it failed. The chat
re-reads the thread after the tap, so the line shows where it was asked
for, and the bot's next turn knows what happened.

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

* test(bots): the rehearsal retries a gateway error once

Seen 2026-11-01 at 16:50Z: the first post-deploy rehearsal passed six of
seven and failed the routine step on one PUT that answered 502, because
another merge (#1515) was rolling out at that second; the same call
answered 400 a minute later. An API call in the rehearsal now retries once
after five seconds on 502/503/504 and logs that it did; two in a row stay a
failure. Documented in docs/testing/live-rehearsal.md.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 18:13:29 +01:00
CatoandClaude Fable 5.1 dc62ac87df feat(bots): what a bot did stays in the thread; the five demos as one live rehearsal (#1514)
* feat(bots): a bot writes first, on the person's own key

A person can tell one of their bots to write first, every day at a time
they pick, with a prompt they wrote. The run happens on the person's own
OpenRouter key only; without a key the routine is kept, shown as waiting,
and skipped with the reason, so no platform key is ever spent by a timer
(fleet standing rule 2026-09-25).

- companion_routines table (one per person per bot, owner-only RLS),
  routines-store (time validation, next run in the person's zone) and the
  runner behind a cron route + 15-minute systemd timer, registered as a
  person-asked timer in the no-background-ai gate with a marker check.
- GET/PUT/DELETE /api/ai-assistants/[id]/routine for the owner.
- RoutineRow in a bot's own chat: "Writes first, every day", time and
  prompt inline, a line to Settings when a key is missing.
- Hands: the proposal line names what will be set up, never only "Sure";
  a created event's outcome carries its link.

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

* feat(bots): a bot can ask Loki, as the person — the first connector

ask_loki: a Cat action (communication, low risk, confirmed) in the hands
launch set. The bot relays a question over the signed OrangeCat → Loki rail
to Loki's POST /api/orangecat/ask, which runs a read-only turn as the Loki
user linked to the actor; Loki's own sentence is the outcome the person
reads, and a refusal (no linked account, a spent budget) is relayed as
written. A relayed question can never dispatch, approve or spend: that stays
with send_task_to_loki, and the two verbs name each other so a question is
never dispatched as a task.

ADR-0013: D6 first connector and D7 recorded as shipped.

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

* fix(bots): the routine's day-in-zone comes from the timezone helper

check:app-locale (new on main) refuses a literal locale handed to Intl; the
routine's next-run computation now takes the day in the person's zone from
instantToWallTime, the one rendering the app already trusts.

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

* fix(bots): the chip knows the verb of ask_loki

The tool-label table of leading verbs gains ask → Asking / Asked, so the
chip for a bot's question to Loki never falls back to the generic label.

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

* fix(cat): a failed "Do it?" card shows the server's sentence, not [object Object]

The confirm and reject hook handed the API's error envelope (an object) to
new Error(), so every failed action read "[object Object]". Seen live the
first time a bot asked Loki for an account not linked to Loki: Loki's
sentence naming the one step was on the action row and lost on the card.
The hook, the memory import and the interests list now read the message
through apiErrorMessage, the reader written for exactly this.

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

* fix(companions): a bot keeps offering its hands on a repeat ask

Live on 2026-11-01 the second "Ask Loki" in one thread came back as
"I can ask Loki for you." with no fence and no "Do it?" card. The
proposal fence is taken off a reply before it is stored, so the model
saw its own earlier offers as plain sentences and copied them.

- The queued proposal is kept in the assistant message's metadata.
- The history given to the model writes the fence back onto those
  turns (withProposal), so a proposal in the history looks like one.
- proposeFromReply returns the proposal as queued; hands tests cover
  the round trip and metadata reading.

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

* fix(companions): a proposal is a worked example, and a bare block still becomes a card

Live on 2026-11-01 a fresh bot's first "Ask Loki" came back as "Here's the
query I'll send to Loki:" over a json fence holding {"question": "..."}:
the free-tier model copied the template's inner half and left out the
action, so the person saw code and no card.

- The hands section ends with a complete block for a real offered action,
  required fields filled with their own names, instead of a template with
  <id> and {...}; it says the block is the proposal itself and to write no
  other code block.
- extractProposal reads a propose, json or untagged fence at the end; a
  block with fields but no "action" names the one offered action that owns
  every field and has its required ones present; a propose fence that said
  nothing usable comes off so it is never shown as code.
- Tests for the example, the lenient read, the inference and its refusals.

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

* fix(bots): a failed "Do it?" card is finished, a second card starts clean, no empty bubble

Seen live on 2026-11-01 (fresh thread, two asks of Loki):
- a card whose action ran and failed kept Confirm/Reject under the reason;
  the reason is now the outcome line, as a success would be
- the second card in the thread showed the first card's failure line inside
  it: the card is keyed by its action
- a model that wrote only the block left an empty bubble above the card:
  the card's description stands in for the words, and ask_loki is described
  as the question ("Ask Loki: ...") rather than "Execute Ask Loki"

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

* test(bots): the five demos as one live rehearsal, run by a person

tests/e2e/bots-rehearsal.live.spec.ts walks the live site as a brand-new
person (a pseudonymous account minted at the start, no fixture secret): one
door, the shelf and a real letter, a group with two specialists in their
lanes, an event proposed and created from a "Do it?" card, Loki asked twice
with an honest outcome and a clean second card, a routine set and stopped,
and the API edges. Every assertion names the value it protects.

The Live rehearsal workflow runs it on workflow_dispatch only and keeps the
screenshots; it has no schedule, because a free-tier key is spent only when
a person asks (fleet rule 2026-09-25). docs/testing/live-rehearsal.md.

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

* feat(bots): what a bot did stays in the thread

A "Do it?" card's outcome lived only in the slot above the composer: it left
the screen when a second card arrived and was gone on reload (seen live
2026-11-01). The confirm route now records the outcome as a line of the bot
conversation the card came from (services/companions/outcomes.ts): the
handler's own sentence with its page, or the reason it failed. The chat
re-reads the thread after the tap, so the line shows where it was asked
for, and the bot's next turn knows what happened.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 17:27:00 +01:00
CatoandClaude 1008d635f6 fix(e2e): global-setup signs in on the visible form, three tries, and says so when it cannot (#1458)
The sign-in page can hold two email inputs for a moment around hydration (one
hidden). global-setup's bare locator('input[type="email"]') threw a
strict-mode violation, the setup swallowed it ('Proceeding without
storageState'), and every signed-in spec then ran signed out and failed with
'bounced to sign-in' - on one run and not the next (PR #1447/#1448 runs
2026-10-27 22:28 and 22:42). Take the visible input, try three times, and in CI
fail the setup with the real reason instead of a misleading downstream error.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-28 00:05:00 +01:00
CatoandClaude Sonnet 5.5 398463e70a feat(cat): the Cat chat is chatkit's ChatApp (#1447)
* feat(cat): the Cat chat is chatkit's ChatApp

The Cat chat now renders @bitbaum/chatkit 0.18's ChatApp: its header, chat
list (drawer on a phone, rail from 64rem) with search and Today/Yesterday/
Earlier, rename and delete, New chat, Temporary chat, reopening the open chat
after a reload, Camera · Photos · Files with thumbnails, the queue, Stop and
Retry. The Cat keeps only its transport and its words.

- useCatTransport: the Cat's stream (and the local-model loop) as ChatApp's
  transport; tool calls stream as steps; a temporary chat runs in an unlisted
  ephemeral row deleted when it is left.
- catConversationStore: chatkit's ConversationStore over API_ROUTES.CAT;
  the chat route still writes every turn (append is a no-op), nothing is
  kept on the device but the open chat's id.
- API: PATCH /api/cat/conversations/[id] renames; GET is a 404 for a chat
  that is not the person's (it returned the default thread); POST takes a title.
- CatAnswerFooter under each answer: tool chips, destinations, actions,
  action results, drafts, provenance, fallback, upgrade nudge, failure fixes.
- Deleted: ConversationRail, useConversations (incl. its temporary chat),
  useChatHistory, useChatMessages, ChatHeader, MessageBubble,
  MessageAttachments, ErrorDisplay; TalkRoom draws chatkit's ChatMessage.

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

* fix(cat): 44px targets in the chat's composer and header

The model picker, Loki and tool chips sat under 44px beside ChatApp's own
controls; the model's name hides on a phone so the composer's tools stay
one row.

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

* feat(cat): PDF reading through ChatApp — chatkit 0.21's attach.readFile

Moving the Cat onto ChatApp dropped the PDF reading main's #1449 added to the
old composer (chatkit's attach refused every PDF). chatkit 0.21.0 adds
attach.readFile; the Cat's reader (readCatFile) calls the same attachPdf as
before: same size limit, same sentences, same pictures-per-message (5, shared
with staged photos), same text-or-sheets result. The live PDF spec now reads
chatkit's staged strip.

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

* ci(cat): browser-smoke.yml — the real-browser check the rollout gate asks of a chat consumer

The fleet's shared-package gate holds a chatkit consumer PR until
browser-smoke.yml has passed on its commit; OrangeCat had no such workflow on
main (only on the unmerged PayKit branch), so every chatkit PR here waited
forever. This one builds the standalone app, signs in as the E2E account and
opens the Cat at 390 and 1280 (composer, Send, Files input, no sideways
scroll), then runs the live PDF-attach spec against it. No model call.

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

* test(cat): the smoke spec says what the page showed when the composer is missing

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 23:51:36 +01:00
CatoandClaude 68160ba203 test(e2e): the live PDF check, as it was meant to merge — plus the Files picker (#1455)
#1451 auto-merged after its first two commits, so the corrections made after
it never reached main and the daily run kept failing on them: it reuses
global-setup's signed-in session (the login is rate limited) and checks the
composer's own error line, not Next's route announcer. It now also checks
that the live Files input asks for documents (PDF and text) and never for
media, the thing that broke picking a PDF in Brave on Android.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 22:37:41 +01:00
CatoandClaude Opus 5.5 ea27dfbec8 test(e2e): prove on the live site that the Cat reads PDFs (#1451)
* test(e2e): prove on the live site that the Cat reads PDFs

Added to the production E2E run (Chromium, Firefox, WebKit), signed in as
the E2E account. It checks that pdf.js's worker and JPEG 2000 decoder are
served from /pdfjs/, that a PDF of slide pictures (JPEG 2000, no text layer
— the shape of the deck that started this) attaches as page sheets that are
actually drawn, and that a text PDF attaches as a file. Nothing is sent to
the Cat, so a run costs no model call.

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

* ci(e2e): report live failures as annotations, readable without the log

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 20:57:02 +01:00
CatoandClaude 0c56355f80 test(e2e): one route contract that CI runs, in place of six that ran nowhere (#1445)
CI ran only workflow-matrix.spec.ts. Six other read-only specs sat beside
it, ran in no job, and drifted:
- they expected /loans, /circles and /assets to ask for sign-in, but
  /loans and /circles became Discover tabs and /assets moved under the
  dashboard;
- three messaging tests were skip(true) and never ran (the matrix covers
  messaging);
- the page checks asked only for a visible <body>, which a 404 also has,
  so /fundraising, /fund-us, /donate and /browse turned into 404s with
  every check green.

route-contract.spec.ts reads the HTTP status of every page and covers:
- public pages render;
- the legacy redirects land on Discover;
- signed-in pages send a signed-out visitor to /auth?mode=login with the
  right return address;
- /api/health answers.

It starts with no session, because global setup may have saved one. CI
runs it against the local standalone server on every build; it needs no
test account. Run against https://orangecat.ch: 19 passed.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 05:35:28 +01:00
Cato 4ad63c1187 Enforce authenticated author identity in the legacy post writer (#1396) 2026-10-22 20:30:32 +02:00
Cato 372e4ebba8 Repair messaging interactions, mobile submit taps and session hydration (#1389)
* Refactor dashboard and activity layout and correct derived state

* Repair messaging interactions, session hydration and shared form controls

* Preserve mobile submit taps and isolate release login sessions
2026-10-22 18:48:12 +02:00
Cato f4877dd41b Start with a feeling: music, writing and artwork in the Studio (#1378)
* Create from a feeling in the Studio, with playable original sketches

* Explain public image storage at the Studio generation action
2026-10-21 20:31:53 +02:00
CatoandClaude Fable 5.1 dbe9caaa49 feat(cat): temporary chat — never listed, never remembered, gone when you leave (#1374)
* feat(cat): temporary chat — never listed, never remembered, gone when you leave

"Temporary chat" in the conversations rail: the row the first send creates
is `ephemeral` (cat_conversations.ephemeral, migration 20261021120000). It is
never in the list, the Cat learns no memories from it, and it is deleted the
moment the person leaves it — a new chat, another thread, a closed tab (the
delete goes with keepalive). The daily cleanup cron sweeps any left behind
by a dead phone. The toolbar says "Temporary chat" while one is open or
armed. src/lib/chat/temporary-chat.ts holds the leave rule, pure and tested.

The cleanup cron's tasks moved to services/maintenance/cleanup-tasks.ts to
keep the route under its size limit.

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

* test(cron): the cleanup test knows the temporary-chat sweep; unique migration timestamp

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

* fix(cat): the answer row sits under the answer, not inside the provenance line

It was inserted inside the provider · model span (#1373); CodeQL flagged
the guard that misplacement made always-true. Now it follows the
provenance block, on every assistant answer with content.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-21 07:23:34 +02:00
CatoandClaude Opus 5.5 24c3d140ae docs: archive point-in-time records, fix live docs against the tree (#1349)
* docs: archive point-in-time records, drop broken guide symlinks

Status reports, progress trackers, audits, session summaries, completed
migration plans and the 2025 roadmap move to docs/archive/ (same relative
path), with a README saying they describe the day they were written.
.ai-guides/ held only symlinks into a docs/guides/ai/ that no longer
exists, tests/unit/docs/ held a stray copy of an old getting-started page,
and docs/operations/PORT_MANAGEMENT_README.md duplicated port-management.md;
all three are deleted.

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

* docs: correct drifted paths, links and versions in current docs

Fix in place the reference docs agents use: point paths at where the code
lives now (src/stores/auth.ts, src/lib/supabase/*, scripts/dev/*,
docs/reference/api/CONVENTIONS.md, the squashed baseline migration),
rewrite the development, features, operations and API index pages to list
documents that exist, say plainly where something is gone (/api/metrics,
the CSP report route, .envrc in the repo, Loki's `migrate` script), and
correct the Next.js major. docs-truth findings: 468 -> 2 (both "Next 30/90
Days" headings in the legal overview, a checker false positive).

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 14:09:06 +02:00
CatoandClaude 095b963ccd design: one mark, a cinematic fold, and the studio on every page (#1314)
The mark is now a coil that is a cat: one continuous stroke wound inward
with two ears on its outer turn — Loki's spiral wearing the cat. Its
geometry lives once, in src/config/brand-mark.ts; BrandMarkIcon, the share
cards, favicon.svg, orange-cat-logo.svg, a real favicon.ico (16/32/48
PNG-ICO), apple-icon.png and the PWA icons are all rendered or generated
from it (pnpm run generate:brand), and a unit test fails on any drift.

Why: three different marks were live — a cat face in the header, a
"window with ears" on every share card, and where favicon.ico should
have been, a 155 KB fav.farm HTML page served as image/x-icon, so the tab
icon was broken in every browser that prefers .ico. The 144px PWA icon
was one byte. Nothing generated those files, so nothing could notice.

The home fold is rebuilt to Loki's and Solon's standard: centred,
viewport-relative two-tone display type, the mark drawing itself in above
the headline, a radial-glow + dot-grid backdrop (tokens only, survives
light mode), one warm action, and real numbers underneath (HomePulse: the
same public-only counts /discover uses, plus the studio's live count from
Loki's fleet map). The three-card row that repeated the hero's own actions
is gone, with its FIRST_MOVES config.

The studio is on the front page (StudioSection: the three pillars with
their real marks, then every live studio product as a tile, each a door),
closes /ecosystem grouped by layer, and a studio project's own page wears
its face (StudioProjectBanner: mark, live door, last moved, siblings). The
list is Loki's fleet map, never a copy; when the map is unreachable the
pillars stand and the grids are absent, and no page fails. Selection and
ordering are pure and tested (studio-fleet.ts).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-11 16:15:02 -07:00
CatoandClaude Opus 5.5 b6f2deeb95 feat(home): "What it solves" — concrete problems for one person and for society (#1242)
* feat(home): "What it solves" — concrete problems for one person and for society

The homepage said what OrangeCat is, but not what it is for. Add a section
under the first moves with twelve concrete problems — six a single person
runs into (getting paid for a skill, a short month, a laptop for school,
idle things, a shared purse, being locked out of banking) and six a
community has (public goods, a school roof, unasked questions, small-business
capital, shared decisions, events that fold) — each with what happens here
and a link to the entity that does it.

Copy lives in src/config/problems-we-solve.ts; icon, verb and link come
from ENTITY_REGISTRY so a card cannot point at a feature that does not
exist. A test pins every entry to a registered type and keeps roadmap
claims (encryption, other payment rails) off the list.

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

* test(home): the homepage test mocks the new "What it solves" section

HomePublic.test mocked the hero and first moves but rendered
ProblemsSection for real, so its closing "Meet your Cat" link made the
single-link assertion find two. Mock it like its siblings and assert it
is composed into the page.

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

* fix(deps): clear two high advisories; fetch our GitHub packages over git

`pnpm audit --audit-level=high --prod` started failing every PR on two
advisories published this week:
- sharp < 0.35.5 (librsvg, GHSA-wq5f-xc86-pv6w): ^0.35.4 → ^0.35.5, in
  package.json and the matching override in pnpm-workspace.yaml.
- @modelcontextprotocol/sdk < 1.31.0 (OAuth credentials could go to an
  MCP-chosen auth server, GHSA-6qxp-vccf-f47h): ^1.30.0 → ^1.31.0
  (resolves 1.32.1).

listkit and @bitbaum/geo-kit are now pinned as
git+https://github.com/bitbaum/<repo>.git#<same commit> instead of the
github: shorthand. Same commits, same content; pnpm clones them over git
rather than downloading a codeload.github.com tarball, which agent
sandboxes cannot reach — the lockfile could not be regenerated there at
all. The listkit allowBuilds key follows the new spec.

Audit (high, prod) passes; tsc clean; 4402 tests pass; frozen install ok.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-07 00:39:19 -07:00
Cato 47f916ad71 feat(profile): validate private location coordinates (#1192) 2026-09-30 10:11:58 -07:00
CatoandClaude Fable 5.1 b5ea104f6e feat(oauth): sweep self-registered clients nobody consented to (#1189)
* feat(oauth,mcp): connect AI apps to OrangeCat and Loki with one OrangeCat sign-in

OrangeCat becomes a full MCP-grade authorization server, and gets its own
MCP server.

Authorization server
- RFC 8707 resource indicators: OAUTH_RESOURCES (config.ts) names OrangeCat's
  MCP server (${OAUTH_ISSUER}/api/mcp) and Loki's (LOKI_MCP_RESOURCE, default
  https://loki.orangecat.ch/api/mcp), each with the scopes it honours.
  /oauth/authorize takes `resource` (unknown -> invalid_target), binds it to
  the code and refresh token, and the access token's aud becomes it. No scope
  + a resource defaults to that resource's scopes; always intersected with the
  client's ceiling. /oauth/token accepts a repeated `resource` and answers
  invalid_target on mismatch before a code is burned or a refresh token
  revoked. Access tokens now carry a client_id claim.
- New scopes loki.chat and loki.act (minted here, honoured by Loki).
- RFC 7591 Dynamic Client Registration at POST /oauth/register: public
  clients only, PKCE, https or loopback redirects, <= 5, no fragments or
  userinfo, cleaned name <= 80 chars, dcr_ client ids, never trusted, rate
  limited 10/hour per IP. The consent screen says a self-registered app is
  unverified and names the host it returns to.
- RFC 8414 /.well-known/oauth-authorization-server serves the same document
  as the OIDC discovery route (one builder), now with registration_endpoint.
- RFC 9728 protected-resource metadata at /.well-known/oauth-protected-resource
  (and the /api/mcp path-suffixed form).
- /api/v1 now refuses OrangeCat tokens whose aud is Loki's resource, so a token
  handed to Loki cannot be replayed here. Other tokens are unaffected.
- Migration: resource on oauth_auth_codes and oauth_refresh_tokens,
  registered_via (admin | dcr) on oauth_clients.

MCP server (POST /api/mcp, stateless Streamable HTTP, JSON responses)
- Accepts an OrangeCat token whose aud is this server (audience checked) or
  an ock_ integration key; otherwise 401 with WWW-Authenticate
  resource_metadata=... (plus error="invalid_token" for a refused token).
- Tools: orangecat_whoami, orangecat_search, orangecat_my_entities,
  orangecat_create_project, orangecat_post_update. Writes run the /api/v1
  handlers in-process with the caller's own bearer, so scope, rate limit,
  validation, idempotency, audit and webhooks are the same code. A missing
  scope is a tool error naming the scope. Per-person limit of 120 req/min.
- CORS on the MCP, metadata, register and token endpoints.

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

* fix(oauth): say on the consent screen that approving through Loki runs the action

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

* feat(oauth): sweep self-registered clients nobody consented to

Anyone can register a client at /oauth/register, so rows accumulated from
probes and from connector sign-ins that were started and never finished,
and nothing removed them. The daily cleanup cron now deletes self-registered
clients older than a day that hold no grant and no live refresh token. A
client in use is kept at any age; an operator-registered client is never
touched — the DELETE itself is fenced to registered_via = 'dcr'.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-29 08:32:06 -07:00
CatoandClaude Opus 5 4ef3758cd4 feat(ai): wire Anthropic direct, kill the blind spot in model rot (#1095)
* feat(ai): wire Anthropic direct, kill the blind spot in model rot

Follow-up to #1094, from the settings review.

BRING YOUR OWN KEY

Anthropic was in the provider registry, with the correct console URL, and
was still unreachable: the add-key form renders `wiredProviders`, and
`WIRED_PROVIDER_IDS` did not include it. So the provider people ask for by
name could not be selected, and the form told them direct Anthropic support
was "on the roadmap" while pointing them at OpenRouter.

It is wired now because it can be. Anthropic serves an OpenAI-compatible
surface — POST /v1/chat/completions with `Authorization: Bearer`, and
GET /v1/models for key validation — which is exactly what
OpenAICompatibleService speaks and what PROVIDER_AUTH_ENDPOINTS derives from
WIRED_PROVIDER_IDS. Verified live against both endpoints on 2026-09-20: each
answers 401 `authentication_error` on a bad key, the same shape as Groq. The
only edits needed were a base URL, a default model and one array entry;
validation, routing and quota priority all followed on their own.

Google AI Studio serves the same kind of endpoint and is deliberately NOT
wired: it validates the key before the model, so I could not confirm a
current Gemini id without one, and guessing a model id in the commit that
fixes model rot would be absurd.

The key link was also in the wrong place — four words of grey text under the
password field, below the fold on a phone, so "where do I get a key" was
answered after the box demanding one. It is now the first thing after
choosing a provider, and it names the host it opens (console.anthropic.com),
so the link says where it is about to send you.

MODEL ROT, THE HALF THAT WAS INVISIBLE

`checkModelRot` asks whether a pinned id has gone MISSING from the vendor's
catalogue. Fable 5.1 shipped while we pinned Fable 5; Fable 5 kept being
listed and kept answering, so `missing` stayed empty and every signal stayed
green. The registry sat a version behind indefinitely and a human reading a
dropdown is what caught it. A check that only detects death cannot detect
age.

`findSupersededPins` adds the other direction, reading `verdict.live` that
checkCatalog already fetched, so it costs no extra request. It is a nudge,
never a failure — these models still serve, and being a version behind should
be a decision rather than an oversight.

The hard part is silence. A version checker that cries wolf gets muted, so
the version must parse as purely numeric: `gpt-oss-120b` is not a successor
to `gpt-oss-20b`, it is a different model at a different size, and six tests
pin that it stays quiet.

WHAT WE TELL PEOPLE ABOUT THEIR MONEY

- CatCreditsPanel understated the markup in a hardcoded sentence while
  /settings/usage quoted the real figure from CREDIT_USAGE_MARKUP — two
  adjacent screens, two claims, one of them wrong. It now uses the derived
  label, which existed precisely so this could not happen.
- "Image generation is free and doesn't count" was true about the daily
  message budget and false about money: it is billed to Cat Credits.
- The BYOK plan bullet read "Six providers wired direct:" immediately before
  a DERIVED list of them, so wiring a seventh made the sentence contradict
  its own next clause. The count is derived now too.
- Supporter is badged "Planned", not "Activating". SUPPORTER_PRICE_CHF is
  null and the checkout URL is unset; "Activating" reads as "any moment now"
  for something nobody can buy. The price itself remains a business decision.

SEPARATION

/settings/ai was eleven components answering three unrelated questions.
Memory moved to /settings/memory — not for tidiness: billing is a setup
surface configured once, while memory is a data surface you return to in
order to read, correct and delete. Nobody expects to audit what a product
knows about them by scrolling past their credit balance.

ONE PLACE IT IS EXPLAINED

/docs/how-cat-runs covers the four routes — free pool, credits, your own key,
your own machine — with what each costs, where your words go, what each is
good at and what each is BAD at. Local models get the honest version: they
are weak at tool calling, which is most of what makes Cat useful, so Cat will
chat well and then struggle to actually do the thing. Every figure on the
page is derived from the config that governs it; the surfaces that used to
restate this now link to it, which is the same rule this repo applies to
entity lists and the rule the markup copy broke.

41 new tests (409 files, 3819 passing). pnpm run verify green; production
build compiles and generates 267 static pages.

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

* fix(test): the BTC round-trip assertion excluded the boundary it can hit

`build-and-smoke` went red on #1095 in a file this PR does not touch:

  expected 9.42411171 to be close to 9.424111705,
  received difference is 5.000000413701855e-9, but expected 5e-9

Not a flake, and not this PR's change — a real defect in the assertion,
which has been failing PRs at random and will keep doing so.

A satoshi is the smallest unit there is, so `bitcoinToSats` QUANTISES:
anything past the 8th decimal is rounded to the nearest sat, and the most
a round trip can lose is therefore HALF a satoshi — exactly 5e-9.
`toBeCloseTo(x, 8)` passes only when the difference is strictly BELOW 5e-9.
So the tolerance was precisely the largest error the code is permitted to
produce, with the boundary excluded, and any value landing on a half-sat
(…5 at the ninth decimal) was a correct result the test called a failure.
The fuzz draws 10 000 random values per run, so it found one eventually,
on somebody's unrelated PR.

Measured rather than guessed. Across 400 000 samples — uniform random plus
exact half-sat boundaries — the worst excess over half a satoshi was
4.14e-16, or 0.69 × EPSILON×|btc|: the written value is not exactly
representable as a double before the multiply/round/divide chain adds its
own. The tolerance allows 4 × EPSILON×|btc|, 5.8× that worst case, and
still ~1.9e-6 of ONE satoshi — an off-by-one-sat regression is five million
times larger, so nothing real can hide inside it.

Loosening to `toBeCloseTo(btc, 7)` would have been the easy fix and the
wrong one: it permits a full satoshi of drift, which is the only failure
here anybody would care about.

Two tests added beside the fuzz, because a property that only holds
sometimes is not pinned by a random draw:
  - exact equality for values already on the sat grid (nothing to quantise,
    so nothing may be lost — the stronger claim)
  - the four boundary values, including the 9.424111705 CI actually hit

Verified with eight consecutive runs of the file and a full verify pass
(409 files, 3821 tests).

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-20 06:02:44 -07:00
CatoandClaude Fable 5.1 9a352d3646 refactor: rename FleetCrown to Loki across the integration (#1016)
The sibling product was renamed on 2026-09-14. Every reference follows:
service and route paths (src/services/loki, /api/integrations/loki),
env keys (LOKI_*), the build-intent audience and timeline source ('loki'),
ecosystem config, docs, tests, and 13 file names.

Tool labels keep "Loki" capitalised: the old name had an internal capital
and passed the "looks like a name" shape test for free; a one-word name
needs listing, so softLower now carries a small PROPER_NOUNS set.

Box and data were moved ahead of this: LOKI_* keys sit beside the old ones
in the app env, the OAuth client is `loki` with the new callback host, and
timeline/metadata rows carrying the old name were rewritten.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 16:40:27 -07:00
CatoandClaude Opus 5 ebc9dadb24 perf(test): stop building a browser for tests that never touch one (#917)
The suite ran EVERY file in a jsdom environment. Its own numbers:

  Duration 1257s — environment 2285s, setup 465s, import 318s, tests 166s

Actual test execution was 166 seconds. The dominant term was constructing a
fake DOM for API-route, service and domain tests that never use one — 240 of
291 files.

Now node by default; the 51 files that need a DOM declare it per-file with
`// @vitest-environment jsdom`. Full suite after: 291 files, 2719 tests, 0
failures, environment 2285s -> 307s. A controlled A/B on one unchanged
directory (23 files, 177 tests) isolates the effect from machine load:
environment 178s -> 0.03s, wall 120s -> 84s.

This runs on every push (the pre-push hook) and in CI, so it is paid
constantly.

NOT environmentMatchGlobs, which is the obvious one-line version: Vitest 4
ignores it SILENTLY — no warning, no error. It ran every component test under
node and failed 20 of them, and the only reason that was caught is that a .tsx
test was checked afterwards rather than trusting the clean config load. The
config now says so, so the next person does not spend the same hour.

vitest.setup.ts already guarded its DOM access behind IS_JSDOM, which is what
made this safe to do at all.

One file needed jsdom for a non-obvious reason and the full run is what caught
it: rate-failure-cooldown.test.ts pins browser behaviour of rates.ts, which
gates its fetch on `typeof window` — the test never mentions `window`, only
the module under test does. Grepping the tests for DOM usage cannot see that;
running them can.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 05:37:30 -07:00
CatoandClaude Opus 5 c5ff39bf04 chore(identity): one name — Cato (#894)
* chore(identity): one name — Cato

The retired name and a personal contact address were still in the repo,
including in the documents where a name is load-bearing.

- "Mao Nakamoto" -> "Cato" across 18 files: README, CLAUDE.md, two blog posts,
  config, support page, tests, and legal/ (PRIVACY_POLICY, TERMS_OF_SERVICE,
  IP_ASSIGNMENT_MEMO plus the legal-content.ts that renders them).
- mao@orangecat.ch -> hello@orangecat.ch in 12 files. The old address is the
  GDPR Data Controller contact and the ToS operator contact, so it could not
  simply be deleted; hello@ is already published on the public FAQ, which
  makes it a route known to work rather than a guess. A role address is also
  the better answer here than any personal one.
- Test fixtures using a real first name -> Cato.

**Deliberately NOT swept: the legacy handles `butaeff` and `georgy.butaev`.**
A first pass replaced them and had to be reverted. They are production data,
not name mentions: `.mailmap` uses them to map historical commits onto the
canonical identity, and the mention/lnurl tests carry comments stating those
handles are real rows. Renaming the references does not rename the rows — it
points code at handles that do not exist and turns true comments into false
ones. Retiring them is a data migration, not a find-and-replace.

Also reverted from that first pass: an edit to an applied migration's comment.
Migrations are immutable once applied, and rewriting a bug report to name a
handle that was never involved would have falsified the record. The example in
username-history.ts is now a neutral `legacy+handle` instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G2LBioUzJP4oBL9LeH9qAe

* chore(identity): the mailmap was rewriting Cato back into the retired name

Missed by the sweep in the previous commit, which globbed *.md/*.mdx/*.ts/*.tsx
— and .mailmap has no extension.

The effect was worse than a stale file. The raw commit author was already
correct after the git config fix, and the mailmap converted it back on display:

    raw:        Cato <41178744+catomean@users.noreply.github.com>
    mailmapped: Mao Nakamoto <41178744+catomean@users.noreply.github.com>

Every new commit would have kept arriving as Cato and kept being shown as the
old name, which is the least debuggable version of this problem — the config is
right, the commit is right, and the output is wrong.

Canonical name is now Cato, and a name+email rule was added for commits
authored as "G": those carry the canonical email already, so the email-only
rules cannot reach them.

Verified over the last 400 commits: 322 Cato, 78 dependabot, nothing else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G2LBioUzJP4oBL9LeH9qAe

* fix(identity): the rename notice legitimately names the OLD handle

CI caught the sweep breaking a correct test, in exactly the way the butaeff
handles would have been broken had they not been reverted.

services/cat/handlers/context.ts builds the notice as

    `…and ${oldUsername}@orangecat.ch still reaches you.`

The address is derived from the handle the user is renaming AWAY from — that is
the whole point of the sentence, which promises their old Lightning address
keeps working. The sweep rewrote the test's expectation to hello@ and left the
source producing the old-handle address, so a correct implementation began
failing a now-incorrect assertion.

Fixed by neutralising the fixture rather than the assertion: the old handle is
now 'oldhandle', so the test asserts oldhandle@orangecat.ch and no retired name
appears. The behaviour under test is unchanged.

The rule this keeps proving: a literal that REFERS to the old identity is data,
not a stale reference, and a find-and-replace cannot tell the two apart.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G2LBioUzJP4oBL9LeH9qAe

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-06 20:35:25 +00:00
GandMao Nakamoto b3eae6ebf4 chore(tests): remove orphaned jest-era custom matchers file (#876)
The jest -> vitest migration already completed in an earlier PR (see
vitest.setup.ts's own header: "Ported from jest.setup.ts when the
runner moved from jest 30 + ts-jest (CJS) to Vitest"). One file was
never cleaned up: tests/setup/custom-matchers.ts imported `expect`
from `@jest/globals`, a package that is not even installed anymore
(confirmed: not in package.json, not in node_modules). It also was
never wired into vitest.setup.ts's setupFiles and no test imported it
directly, so it was fully dead -- it would only ever have thrown
MODULE_NOT_FOUND if something had tried to load it.

Deleted rather than ported: none of its matchers
(toBeValidBitcoinAddress, toBeValidUUID, toBeSanitized, etc.) are
referenced by any test, so porting it forward would be adding new,
unused surface rather than fixing something broken.

Full local vitest run confirms this repo's test suite was already
green before this change: 279/279 test files, 2631/2631 tests passing.

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
2026-09-01 13:17:53 +00:00
bae4be1aa3 refactor(test): migrate the unit suite from Jest 30 to Vitest 4 (#859)
Full parity: 282 test files / 2645 tests green before and after.

- vitest.config.ts mirrors the old moduleNameMapper as ordered resolve.alias
  entries; jsdom env, globals, 30s timeout, v8 coverage with the same ratchet.
- vitest.setup.ts ports jest.setup.ts; lucide-react is now a vi.mock Proxy
  (any icon resolves — the old CJS-alias Proxy surfaced no named exports and
  every unlisted icon crashed renders as "Element type is invalid").
- Codemod jest.* -> vi.* across tests; @jest-environment -> @vitest-environment.
- Constructor mocks use function expressions (vitest news the implementation;
  arrows are not constructable).
- Factories returning a bare component now return { default: ... };
  one TDZ factory moved under vi.hoisted; one require() -> await import().
- jest.isolateModulesAsync dropped in the auth smoke test (resetModules +
  doMock per test covers it).
- Scripts ported (positional path filters replace --testPathPatterns);
  verify's --watchAll flag removed; ci.yml comment updated.
- Deleted jest.config.js, jest.setup.ts, __mocks__/vitest.js,
  tsconfig.test.json, tests/jest-dom.d.ts, and the unimported jest-era
  tests/utils.ts; uninstalled jest, ts-jest, jest-environment-jsdom,
  @types/jest; dropped the dead mcp:jest script.
- Snapshot file rewritten in Vitest format (content byte-identical).


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

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-31 16:14:36 +00:00
4b4ac98231 fix(nav): the sidebar section label was not a control (#840)
* fix(nav): the sidebar section label was not a control

Clicking "Fund" / "Coordinate" / "Finance" did nothing — the label was an
<h3> in a <div> and only the small chevron beside it carried the onClick.
Three defects in the same family, all of them "the click did nothing":

1. The whole header row is now one <button>. A word that looks like a
   control but isn't reads as a dead click, and the arrow alone was a 44px
   target inside a full-width row of affordance. Second time this class
   landed in this sidebar (see ContextSwitcher, "not a dead pixel"), so it
   gets a guard rather than a third fix.

2. Collapsing the section holding the active page was a visual no-op: the
   render gate was `!isCollapsed || hasActiveItem`, so the chevron flipped
   to > while the list stayed open. An explicit toggle now wins.

3. Expanding every section silently reverted on reload — an empty saved set
   was read as "nothing was ever saved" and replaced by the defaults. Key
   presence, not set size, now decides.

Also removes an SSOT violation found next door: buildInitialCollapsedSections
branched on viewport (`isMobile ? section.priority > 3 : ...`), so on a phone
the declared `defaultExpanded` was ignored in favour of a bare magic number
and the same account saw different sections open on phone than on laptop.
`defaultExpanded` is now the only input — which does mean Create and Fund
start collapsed on mobile, matching the generator's documented intent.

5 tests, each verified by reverting the source and confirming it fails.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeELB8b3N4JrT2asYL9WvE

* chore(ci): gate the dead-label shape instead of fixing it a third time

A heading sitting BESIDE a chevron-only toggle is a dead click: the visitor
aims at the word and nothing happens, while the only real target is a small
arrow in a full-width row of apparent affordance.

This shape has now been reported twice in this one sidebar — on the
ContextSwitcher avatar (two separate visitors, see its test's header) and on
the Fund / Coordinate / Finance section headers, fixed in the previous
commit. Per the never-twice rule the third occurrence should be impossible,
not cheap, so the class gets a check rather than another sweep.

check:dead-labels scans src/components for a heading followed within 12 lines
by a <button> containing a Chevron, with no heading inside that button. The
correct shape — label INSIDE the control, which HeaderNavigation already
does — does not trip it. Zero hits across src/components today, so the
sidebar was the last one.

Mutation-proven both ways: restoring the pre-fix SidebarNavigation makes it
exit 1 naming that exact line, and the current tree exits 0. A gate that has
never been shown to fail is not a gate.

Note for the fleet: this covers AUTHED surfaces, which the central
ui-defect-audit.mjs structurally cannot reach — it renders public entry pages
only. The two are complementary, not duplicates.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeELB8b3N4JrT2asYL9WvE

---------

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-29 11:42:37 +02:00
d08c182994 fix(wallets): an extended public key is not an address — stop publishing it (#743)
`GET /api/wallets?profile_id=<any>` served `address_or_xpub` to anonymous
callers through the admin client. One active wallet on production had a real
111-character zpub in that column, and it was readable without logging in — I
read it from the live site before fixing this.

A zpub is not an address. It is the key addresses are derived FROM, so
publishing one hands a visitor every past and future receiving address of that
wallet and its entire balance history, forever and irrevocably. On a platform
whose first principle is "pseudonymous by default", that is the whole game. It
also negates the feature it came from: users supply a zpub so the payments
domain can derive a FRESH address per invoice (#519) precisely to avoid address
reuse — and then the profile published the master key beside it.

The payments domain already held the right invariant; walletResolutionService
says an extended key "must never be handed to a payer verbatim". The public
wallet listing was the one surface that disagreed, and it is the only non-owner
read path for that column, so redacting there closes the class.

Redaction classifies by VALUE, not by the `wallet_type` label — a key pasted
into a row the user typed 'onchain' is still a key. Plain addresses pass through
untouched; withholding those would break the one thing the public list is for.
The public card for a withheld key now says "A fresh address is generated when
you pay" instead of falling through to the connection branch and claiming a
Bitcoin wallet "Receives Lightning payments".

Verified against the real leaking wallet: production returns the 111-char zpub
to an anonymous caller, this build returns null. Both branches proven on one
wallet — owner keeps the key intact, anonymous gets null, the wallet still lists
so payers know it exists. The temporary wallet used for that test was deleted.

Finding 6 of #563. npm run verify: exit 0 — tsc clean, lint 0 errors,
224 suites / 2244 tests.

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 21:29:33 +00:00
3a6376ddc2 fix(projects): show the activity a project actually has, and say when it is hidden (#742)
Dogfooding report on a project profile, three findings, one root cause between
the first two.

1. "No recent activity yet" on a project with a week of work behind it. The
   FleetCrown→OrangeCat link was never broken: timeline_events held 17
   published updates for that project. The card read project_updates — a table
   with zero rows platform-wide, no writer anywhere in the codebase, and no
   migration. Every project on the platform read as idle. Recent Activity now
   reads timeline_events, the one store activity lands in, and renders the
   publish-bus attribution ("via FleetCrown") with its deep link back.

2. Fourteen days in Draft with nothing on the page saying so. Projects were the
   only entity type without the owner bar; products and services have shown
   "only visible to you — publish it to go live" all along. Reused that
   component rather than adding a second banner.

   The status rule behind both — public iff active or completed — was written
   out twice and matches the projects_public_read RLS policy, so it is now one
   exported predicate the API and the page share.

3. No field for the current status of the work. `status` is the lifecycle and
   cannot answer "what is happening right now". Adds projects.work_status
   (nullable text, migration applied to the box before this ships), surfaced
   under About and editable in the project form. It had to be added to the
   update whitelist and the create payload too — the Zod schema alone would
   have let it save silently as nothing.

An owner now also sees their own draft's activity; before, the one person who
could act on it was shown the same "idle" as everyone else. Visitors still see
nothing until the project is published, and a draft still 404s for them.

Verified in the running app against production data: owner sees 10 FleetCrown
updates on the reported draft (was empty); a signed-out visitor on an active
project sees 11 with attribution; the bar reads "Preview — this project is
draft and only visible to you. Publish it to go live."; work_status round-trips
PUT → DB → "Current status" on the page, and was cleared again afterwards so no
test content was left behind. Anonymous on the draft: 404, no bar.

npm run verify: exit 0 — tsc clean, lint 0 errors, 223 suites / 2224 tests.

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 21:12:22 +00:00
5c39166924 test(sidebar): guard the avatar that visitors twice called un-clickable (#729)
The same <img class="rounded-md object-cover"> was reported as "this element
should be clickable" twice — on /messages, then on /profiles/<username>. It is
one shared component (ContextSwitcher), so it was one bug; #725 fixed it. The
second report arrived because nothing held that fix in place.

ContextSwitcher had no tests at all. These five assert the invariant the
visitors were asking for: the avatar is wrapped in a real control in both
sidebar states, the control is named, and clicking the collapsed one calls
onExpand — collapsed mode returns before the dropdown renders, so opening the
switcher without expanding the sidebar would still look like a dead pixel.

Verified against production (signed in, desktop): the reported element now sits
in a BUTTON, and clicking it takes the sidebar 64px → 256px and opens the
switcher. Mobile and tablet never render this sidebar. Checked the guard bites
by running it against the pre-#725 file: 3 of 5 fail there, all 5 pass now.

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 17:53:37 +00:00
GandGeorgy Butaev cff4889df7 fix(design): lead visitors instead of making them read an essay (#683)
The public home was 7800px of category cards, personas, steps, and a
comparison table before a first useful action. It is now a one-sentence
hero, two honest CTAs, and three first moves. Public identity URLs go
through one /profiles path.

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
2026-08-13 09:13:10 +00:00
GandClaude Fable 5 0a4ed30e90 fix(design+honesty): repair broken production surfaces and align every page with the site's own standard (#679)
* fix(donations): send anonymous /donations visitors to /support

/donations redirected everyone into ROUTES.DASHBOARD.ANALYTICS — an
auth-gated dashboard route — so anonymous visitors following an old
donations link bounced through the login wall instead of landing on a
page where they can actually donate. Redirect to the public /support
page instead.

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

* fix(blog): ship content/blog in standalone builds, skip malformed posts

In the deployed standalone artifact every blog card showed "Untitled"
with a render-day date: output file tracing only follows the import
graph, so content/blog/**.mdx never made it into the build, and
getBlogPost papered over the missing files by fabricating a title and
date. Fix both sides:

- next.config.js: outputFileTracingIncludes carries content/blog/** for
  /blog and /blog/[slug], so the ISR regenerations can read the posts.
- src/lib/blog.ts: a post without title/date frontmatter is now skipped
  with a console.warn instead of being published as a broken stub —
  fabricated metadata is worse than an absent post.

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

* feat(legal): publish the privacy policy and terms drafts on /privacy and /terms

/privacy and /terms were one-sentence stubs ("will be updated later")
while substantive drafts sat unpublished in legal/PRIVACY_POLICY.md and
legal/TERMS_OF_SERVICE.md. A visible draft with an honest banner beats
an empty promise, so:

- src/config/legal-content.ts: the drafts' substantive content as a
  typed SSOT (counsel-facing bracket placeholders resolved — custody
  wording now matches the platform's public non-custodial stance).
- LegalDocumentPage: shared renderer with a "Draft — pending legal
  review" banner and last-updated date; both pages consume it, so the
  layout can't drift between them.

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

* fix(ui): make outline buttons legible on the dark CTA bands

The docs and security pages close with a near-black bg-surface-public
band, but the secondary Button kept the default outline variant (dark
border, dark text) — effectively invisible until hover. Override to the
inverted palette (white-ish border/text, subtle white hover wash) so
both actions on the band are readable.

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

* fix(copy): honesty pass on marketing claims

Claims should match what the platform actually is and does:

- how-it-works: "No chargebacks, no fraud" -> "No chargebacks". Bitcoin
  removes chargebacks; it does not remove fraud.
- technology: drop "unstoppable" (censorship-resistant is the defensible
  claim); "Edge Functions / Serverless API endpoints" -> "Next.js API
  Routes / Self-hosted API endpoints on our own infrastructure", which
  is the actual deployment reality.
- status: the hardcoded "No incidents reported in the last 30 days" was
  not backed by any incident tracking — say plainly that we do not yet
  publish an incident history.
- landing-page + entity-registry: align agent-autonomy copy with the
  human-approval stance ("within owner-approved limits", "Supervised AI
  services") instead of promising autonomous spending.
- cat-plans: shorten the pre-launch CTA "Back us as a founding
  supporter" -> "Become a supporter" so the label fits its buttons.

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

* feat(nav): surface Governance and Pricing in the Product dropdown; drop dead footer config

- Header Product dropdown gains Governance (/governance) and Pricing
  (/pricing): both routes exist and were reachable only from the footer,
  which buried two pages the header audience actually looks for.
- footerNavigation.company was config no renderer consumes — Footer.tsx
  and the mobile drawer iterate product/learn/support/ecosystem/legal
  only — so the block was dead weight inviting drift. Deleted.

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

* fix(pages): design pass on /governance and /study-bitcoin

Governance:
- Drop the min-h-screen stretch that left a huge empty band under the
  short policy list; add bottom padding instead.
- Close with a "Verify it yourself" block linking the Solon decision API
  and solon.orangecat.ch/ecosystem, so "independently verifiable" ends
  in a link rather than a claim.

Study Bitcoin:
- Use the standard centered public-page heading (PageHeading, same
  pattern as /pricing) instead of the left-aligned dashboard header.
- Remove fabricated duration/lesson counts from the coming-soon courses:
  unbuilt content has no honest hour count. Counts stay on the shipped
  wallet course; the card renders the meta row only when data exists.
- Remove the "Investment Opportunity" benefit card — the platform
  teaches Bitcoin as money/technology and shouldn't pitch it as an
  investment; grid rebalanced to three columns.
- Give the "Browse All Topics" button its previously missing
  #learning-paths anchor target.

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

* refactor(home): server-render the below-the-fold sections

The public home page loaded every below-the-fold section through
next/dynamic inside a client component, with framer-motion whileInView
reveals on top. Result: visitors without JavaScript (and crawlers
reading the HTML) got an empty page below the hero — the platform's
entire pitch was invisible to exactly the audience a marketing page
exists for.

The sections are static copy, so they now live in the RSC tree:

- All five sections + the hero drop 'use client' and framer-motion;
  motion wrappers become plain elements (the scroll-reveal animation is
  dropped rather than kept in leaf client components — it was the thing
  hiding the content).
- HomePublicClient is replaced by a server component HomePublic that
  composes the sections directly, no dynamic() and no skeletons.
- Home.test updated for the new composition: it now asserts every
  section renders in the initial tree.

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

* refactor(support): three-pillar triptych + single source for the Pro paragraph

- The "destination is Pro" paragraph lived verbatim on /pricing and
  /support (already drifting: "fully managed" vs "managed entirely").
  It now lives once as PRO_DESTINATION_COPY in config/public-content.ts,
  split around the emphasized word so both pages render the same words.
- "Choose what to support" becomes the actual three-pillar stack:
  OrangeCat (Economy), FleetCrown (Engineering), Solon (Governance,
  solon.orangecat.ch) — matching ECOSYSTEM_PILLARS. Founder support
  moves to a compact link under the triptych instead of occupying a
  pillar slot.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-12 13:40:30 +00:00
760a615216 refactor(types): the live schema is the source of truth for DB types (#608)
* refactor(types): the live schema is the source of truth for DB types

src/types/database.ts no longer carries a hand-maintained `Database`
interface. It re-exports the one `npm run gen:types` produces from the
live self-hosted Postgres schema, and keeps only the app-model tail.
A hand-written schema type can no longer drift away from the database
without the compiler noticing.

Clearing the 79 resulting errors (79 -> 15 -> 0 over three tsc rounds)
needed three things, none of which erase types:

- `looseClient(sb)` in lib/supabase/untyped.ts — a client view whose rows
  are Record<string, unknown>, for the six helpers that genuinely name a
  table at runtime. Unlike `fromTable()` it does not return `any`, so
  inference in downstream generics survives.
- `FilterChain<B>` — a structural view of the PostgREST filter methods,
  so helpers that receive and return a builder keep the caller's type.
- `AsEntity<T>` — re-declares the two nullable timestamps as optional so
  generated Rows satisfy BaseEntity.

Three real bugs the swap surfaced, all fixed here:

- investments.investor_count is not a column, but the investment domain
  service and the Cat's create_investment handler both wrote it — those
  inserts failed with 42703. Both unit tests that pinned it now assert
  the column is NOT sent.
- typing_indicators.user_id is a foreign key to auth.users, not profiles,
  so the profiles:user_id(...) embed in useTypingSubscription could never
  resolve. Replaced with a second lookup.
- The Loan hand type contradicted the DB CHECK constraints: fulfillment_type
  allowed lightning/onchain/bank_transfer/other where the DB allows only
  manual/automatic, loan_type said existing_loan where the DB says
  existing_refinance, and LoanStatus was missing draft.

Also drops the wall-clock assertions from the currency perf test, which
measured the machine rather than the code; the conversion test now checks
a sats round-trip lands back on the same BTC value to 8 dp.

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

* docs(audit): record the Phase A PR number

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

---------

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 14:39:03 +00:00
abf03b811f fix(api): rate-limit + validate unguarded mutating routes, add route-walker gate (#559)
Audit slice 2 (docs/AUDIT_REPORT.md, 2026-08-02):
- per-IP limits on unauthenticated auth endpoints (verify-captcha, sync,
  callback) — they trigger external calls / session mutation
- per-user write limits: cat/offers-from-text (LLM per request), all six
  loan writes via one loanWriteRateLimit helper, stakeholders,
  webhook-endpoints incl. delivery replay (outbound HTTP),
  integration-keys incl. rotate; integration-key limits on
  v1/stakeholders + v1/timeline/publish
- zod at the boundary for the raw-body mutators (projects status,
  notification preferences, follow/unfollow, wallets POST); dead _body
  parse removed
- api-route-guards.test.ts walks every route.ts and pins two invariants:
  every mutating route authenticates, every mutating route rate-limits —
  allowlists are explicit and reasoned

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:15:30 +02:00
a25c086b32 feat(cat): portable memory — import from & export to another AI (#493)
* feat(cat): import memory from another AI

Adds the "bring your memory from another AI" bridge to /settings/ai —
the Grok-style copy-a-prompt / paste-the-result flow, built on Cat's
existing memory substrate (cat_memories + pgvector) so it needs no schema
change.

- config: MEMORY_IMPORT_PROMPT SSOT (portable across any AI) + route const
- service: parseImportedMemories() (markdown/bulleted/dated lines or a JSON
  array) + importMemories() — reuses the chat extractor's embed -> dedup
  (match_cat_memories) -> insert(source:'import') -> prune path; degrades
  gracefully with no embeddings provider
- api: thin POST /api/cat/memories/import (RLS via withAuth, write
  rate-limited, 100k-char guard)
- ui: CatMemoryImport card; auto-refreshes CatMemoryManager after import
- test: 6 unit tests for the parser

The prompt lives in config so a future reciprocal export ("right of exit")
or a FleetCrown import can share it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(cat): dedup imported memories by exact content

Browser-testing the import flow surfaced a gap: the "skips what it
already knows" dedup used only semantic matching (match_cat_memories),
which runs when embeddings are on. With no provider — or on an exact
re-import — the same paste created duplicate memories.

Add exact-content dedup against existing rows (and within the same
paste), so re-importing is a safe no-op regardless of embeddings state.
Verified end-to-end: re-importing already-known facts leaves the row
count unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(cat): export memory (the reciprocal "right of exit")

Completes the portability thesis: Cat now exports your stored memory in
the same plain-line format the importer accepts, so it round-trips to any
AI — or back into OrangeCat. Not a walled garden.

- config: formatMemoriesForExport() + filename (shared format SSOT)
- ui: "Export" button in the memory manager → downloads a .txt
  (client-side, reuses already-loaded memories; no new endpoint)
- test: round-trip — exported text re-parses to identical facts

Gates run manually (pre-push hook re-runs the slow full type-check):
type-check 0 errors, lint clean, 8/8 unit tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-29 13:40:48 +02:00
Georgy ButaevandCursor 227ac61be4 fix(dev): make pre-push E2E smoke honest and optional
Use localhost:3000, fail with exit code 1 on errors, and skip when no
dev server is running since CI owns the full P0 matrix.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 01:55:37 +02:00