Commit Graph
119 Commits
Author SHA1 Message Date
Cato d2dbb21ccc Unify article drafting and edits with WritingKit (#1565)
* fix(articles): unify drafting and edits with WritingKit

* fix(articles): use secure randomness for draft operation identities
2026-11-05 18:05:28 +01:00
Cato 0e410b3097 feat(writing): extract revision-safe content operation core (#1563)
* feat(writing): extract revision-safe content operation core

* docs(writingkit): make verification instructions portable
2026-11-05 10:41:19 +01:00
Cato 961b7893f5 Keep temporary Cat chats from writing durable memory through tools (#1562)
* fix(cat): refuse durable memory tools in temporary chats

* fix(cat): include durable context documents in temporary privacy gate
2026-11-04 19:02:35 +01:00
Cato 0b970d0f18 Protect learned offerings and keep Cat recovery controls usable (#1558)
* Require owner consent before publishing learned economic offerings

* Honor the feedback host hiding contract in chats and overlays

* Wait for authenticated DOM before responsive layout checks

* Report safe sign-in lifecycle metadata when responsive checks fail

* Consolidate the remaining Cat privacy and recovery release handoff

* Prevent caching of the owner-only offerings response

* Use and verify the actual no-store policy for private offerings

* Reload sharing state safely after an uncertain write result
2026-11-04 16:51:35 +01:00
Cato 34a96adedc Keep paired Cat questions before replies when timestamps tie (#1559) 2026-11-04 15:54:23 +01:00
Cato a8023c4f9e Resolve the live free catalogue before building Cat fallback chains (#1557) 2026-11-04 15:35:41 +01:00
Cato ce4c1e64d2 Honor temporary chat and memory consent for economic learning (#1556) 2026-11-04 15:24:54 +01:00
Cato 702d5593de fix(cat): preserve failed turns and expose safe diagnostics (#1543) 2026-11-04 14:52:20 +01:00
Cato c3ffe478ea fix(cat): make permissions atomic and recovery reflect availability (#1542) 2026-11-03 11:21:13 +01:00
CatoandClaude fa09bc6a4f docs(agents): fold CLAUDE.md and .claude/CLAUDE.md into AGENTS.md (#1472)
Both CLAUDE.md files now only point at AGENTS.md, the fleet's one
agent-file shape (bitbaum/fleet scripts/ci/agent-rules.mjs). What was
still true moves into AGENTS.md: the principles and the entity test, the
shipping hand-offs (re-arm, post-main), the self-hosted Supabase read and
migration path, the design tiers and the one-orange rule, and the money
surface as the reference for one shape per kind. Every named path,
script, workflow key and component was checked against the tree.

Dropped as stale or copied:
- `.claude/CLAUDE.md` still listed the warm accent as `#ff5c00`; the root
  file and globals.css say it is gone (accent = Bitcoin orange).
- a machine-specific project path, the duplicated stack table and the
  `.claude/rules` restatements (those files remain).

Docs and comments that sent readers to CLAUDE.md for "Shipping" or the
principles now point at the AGENTS.md sections.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-29 10:57:51 +01:00
Cato 20d75f1b9a feat(auth): one password rule from @bitbaum/accountkit (non-empty, up to 128) (#1461)
* feat(auth): one password rule from accountkit (non-empty, up to 128); remove complexity rules, common-password list and strength meter

* fix(auth): reset-password form and settings use the one rule; drop stale 8-char docs example

* docs(utils): password example follows the one rule
2026-10-28 04:03:10 +01:00
Cato 658883af58 fix(integrations): restore identity choices and recoverable controls (#1421)
* fix(integrations): restore identities and recoverable permission controls

* fix(integrations): use patched URI validation
2026-10-24 02:12:24 +02:00
Cato 7618207d2b fix(ui): return confirmation focus to its actual opener (#1420) 2026-10-23 18:53:17 +02:00
Cato e9ebf1800c fix(ui): keep mobile sheet scrolling separate from dismissal (#1419) 2026-10-23 18:36:50 +02:00
Cato 2dec38a8de fix(timeline): preserve account-scoped drafts when closing composer (#1417) 2026-10-23 18:29:40 +02:00
Cato 58550f1ec3 fix(pwa): remove unsupported install metadata and stale copy (#1414) 2026-10-23 18:01:10 +02:00
Cato 4d002d3dd8 fix(cat): make editor directions actionable without unsolicited upgrades (#1413) 2026-10-23 13:00:30 +02:00
Cato 023673bb56 fix(bookings): recover failed loads and scope view filters (#1412) 2026-10-23 12:42:52 +02:00
Cato 8b0e92c29a fix(tasks): apply filters and recover failed list requests (#1410) 2026-10-23 12:26:32 +02:00
Cato 945e790532 fix(dashboard): reuse the shared Cat intent composer (#1409) 2026-10-23 12:09:18 +02:00
Cato 8ef96f64b8 fix(cat): ground application navigation in verified capabilities (#1407) 2026-10-23 12:01:38 +02:00
Cato e7307befe9 fix(settings): name controls and serialize preference saves (#1405) 2026-10-23 11:49:48 +02:00
Cato 30ee22a14b fix(articles): preserve and scope the device draft library (#1404) 2026-10-23 11:37:31 +02:00
Cato ee8a955e4f fix(cat): open writing suggestions and keep passive memory useful (#1401) 2026-10-22 21:21:21 +02:00
Cato 4ad63c1187 Enforce authenticated author identity in the legacy post writer (#1396) 2026-10-22 20:30:32 +02:00
Cato 02d3f86c54 Preserve unsaved article text during draft switching and clearing (#1397) 2026-10-22 20:16:32 +02:00
Cato 7e8cb63e63 Clarify profile setup and repair mobile navigation and create dialogs (#1399) 2026-10-22 20:08:52 +02:00
Cato a875b88606 Repair private article ownership and focused writing routes (#1395) 2026-10-22 19:00:45 +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 2be2861eaa Protect article drafts on navigation and focus the writing surface (#1388) 2026-10-22 11:04:09 +02:00
Cato 481e7ba780 Refactor dashboard and activity layout and correct derived state (#1386) 2026-10-22 10:34:51 +02:00
Cato 9e17bed51e Unify Cat branding, refresh install icons, and restore mobile writing choices (#1384)
* Restore article discovery and refactor the header create menu

* Unify Cat branding and refresh installed icons; restore mobile creation choices

* Use the canonical Cat mark across remaining app and public surfaces

* Load the current app shell on launch and keep cached navigation for offline use
2026-10-22 03:30:58 +02:00
CatoandClaude 45fd5e076a docs: archive 2025 plans that read as current (#1351)
Forty-five 2025 plans, assessments, design scenarios, status reports and
superseded business docs move to docs/archive/ (same relative path). Each
described a plan or a snapshot as if it were the running system: strict:false,
a five-table schema, an "organization" entity, price_sats, a Gemini /api/chat
widget, a /auth/forgot-password page, Google Places, building group labels and
contract voting flows that never landed.

Fixed in place: NAVIGATION_UX_DESIGN.md (referenced by .claude/rules) gains a
status note naming what shipped and where; GENERIC_API_HANDLERS.md lists the
handler options the code actually takes; datetime_standards.md points at
scripts/dev/; CONTRIBUTING.md describes the auto-merge shipping flow. Inbound
links repointed (SECURITY.md at the root, SUPABASE_SCHEMA_GUIDE.md for schema).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 14:25:12 +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 Opus 5.5 b774f06de7 docs: correct drift in agent instructions, README and ops docs (#1348)
* docs: correct drift in agent instructions, README and ops docs

- Auto-merge sweep lives in bitbaum/fleet, not bitbaum/dotfiles; cd.yml is
  dispatch-only (handed off by ci.yml post-main), not a workflow_run listener
- Design-system docs match globals.css / tailwind.config.ts: warm accent
  #ff5c00, bg-bitcoinOrange (no bitcoin-orange utility), tiffany/orange are
  legacy; display typography is shipped
- .claude rules: real paths (src/lib/validation/, entityCrudHandler.ts,
  standardResponse.ts, withZod/withRateLimit/withRequestId, services/actors),
  real Button/Alert APIs, real rate limits, search via @bitbaum/searchkit,
  real payment modules, PostgREST instead of the POSTGRES_URL tunnel,
  lint-staged pre-commit, eslint.config.mjs
- README/AGENTS/REVIEW: Next 16 / TS 6 / Tailwind 4, pnpm, messaging is not
  E2E-encrypted yet, beta not Live, CD deploys, migrations apply on deploy
- docs/: deploy process, CI/CD, migrations guide, moved docs/ paths, stale
  CLI-entity and edge-function docs flagged

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

* style(docs): prettier on the docs touched by the drift fix

lint-staged would have run this; the commit was made without hooks.

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 12:07:09 +02:00
CatoandClaude Opus 5.5 7e37e20616 fix: invitations that work (and are safe), one project payment section, AI fill keeps your edits, events on their own clock (#1262)
* fix(wallets): an extended public key never lands in a public address column

Linking an xpub wallet copied the key into the entity's bitcoin_address,
which public pages render as a payable address. A key on a public page
reveals every address the wallet will ever derive, and wallets reject it.
The selector now leaves the column empty (payers get a fresh address from
the linked wallet), and the entity schemas refuse a key server-side so the
Cat and the API cannot write one either.

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

* fix(create): AI fill never undoes an edit, a template keeps what was typed, success says live when it is live

- handleAIPrefill merged the whole echoed snapshot, so a field typed while
  the AI was thinking went back to its old value. It now applies only the
  fields the AI changed, and skips any the person edited since the send.
- A template pick (Previous → template) replaced the whole form. On create a
  dirty form now takes template values only for untouched fields.
- The success screen called every new item a draft and offered Publish Now,
  which 400s on an already-live assistant, circle or active wishlist. It now
  reads the created row: live items say so and link to themselves.
- A new group linked to the literal /groups/[slug]. One fillUrlTemplate
  fills every placeholder for both the success screen and the redirect.

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

* fix(dates): real date pickers, events on their own clock, availability names its zone

- 'date' fields fell through to a text box: no picker, and edit forms showed
  the raw stored timestamp. They are date inputs now; events get a
  datetime-local input instead of 'Format: YYYY-MM-DDTHH:mm' text.
- Events defaulted to UTC, so a creator in Zurich typing 19:00 published
  21:00. A new event starts on the browser's zone, picked from a list of
  real zones; stored instants and template defaults are shown as that zone's
  wall time, so an edit cannot keep a stray +00:00 and move the night.
- The availability editor dropped the schedule's zone on every change and
  the public page printed hours with no clock. The zone is kept (the
  browser's for a new schedule) and shown: '09:00–17:00 (Zurich time)'.
- Bookings send the booker's zone instead of being stored as UTC.
- A wishlist's event date read a day early west of Greenwich.
- zoneLabel moves to utils/timezone (re-exported from domain/events/time).

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

* fix(projects): one payment section — a project's own address becomes its linked wallet

The project page rendered a second payment box from the legacy
projects.bitcoin_address, beside the shared section that never reads it:
the page could show one address and pay another, a project whose owner had
no wallet showed a pay button that could not pay, and the box claimed the
address was 'verified and monitored'.

- Migration: each project's legacy address (on-chain, Lightning, or an xpub)
  becomes a wallet linked to that project, which payment resolution already
  prefers. Skips projects with an explicit link, group-owned projects and
  unclaimed owners; per-row savepoints so one odd row cannot abort a
  deploy; idempotent. Verified against Postgres 16.
- ProjectDonationSection, BitcoinPaymentButton and useProjectDonation are
  gone; ProjectFavoriteButton keeps the favourite (neutral, not error red).
  Wishlist tiers move beside the payment section.
- The floating mobile 'Support' button scrolled to an element that only
  existed on legacy-address projects; it targets #pay.

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

* fix(groups): invitations reach the invitee, can be accepted, and only by them

Three implementations wrote group_invitations and none worked end to end:
- Accepting inserted into group_members as the invitee, which that table's
  policy forbids to non-admins, so no invitation could be accepted.
- Nobody was told: no notification type existed, and the only live writer
  (the Cat) did a raw insert with no admin, member or duplicate checks.
- Security: 'Token invitations are viewable' let anyone read pending link
  invitations, and accept_group_invitation (SECURITY DEFINER, granted to
  anon) skipped its owner check for them — anyone could join such a group.

Now:
- Migration: drop that policy; both answer functions require the invitation
  to name the caller, lock the row, pin search_path and are not callable by
  anon; group_invite joins the notification type CHECK. Verified on Postgres
  16 (stranger refused, invitee joins once, anon cannot execute).
- The domain answers through those functions, notifies the invitee on
  create, and is the one implementation: the Cat uses it, the dead browser
  copy is removed. Link/e-mail invitations (undeliverable, 404 link) are no
  longer offered.
- /dashboard/invitations/[id]: the invitee sees who invited them into what,
  and joins or declines — a private group is unreadable on its own page to
  someone not yet a member.

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

* fix(groups): 'Invite' invites — nobody is added to a group without saying yes

The member dialog's Invite button called addMember and put the person in
the group outright, unasked. It now sends an invitation (notification +
answer page), shows who is already invited, and says they join once they
accept.

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

* fix(search): one escape for search terms — commas and brackets no longer rewrite the filter

A dozen copies of term.replace(/[%_]/g, ...) fed user text into PostgREST
.or('a.ilike.%x%,b.ilike.%x%') filters. None escaped LIKE's own backslash,
and none quoted the value, so a comma in a search ('Smith, J') ended the
condition and parentheses opened a group the caller never wrote.

lib/db/likePattern: escapeLike, containsPattern for .ilike(), and ilikeAny
for .or(), which double-quotes the value as PostgREST reads it. Every copy
now uses it; sanitizeQuery is gone. The profile search's in-memory city
filter compared against the escaped term and missed cities with _ or %.

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

* refactor(create): date inputs in their own field component; app locale for wall time

FormField went over the 300-line component limit with the date and
datetime cases; they move to fields/DateInputs, and a redundant fragment
around the textarea goes. instantToWallTime reads numeric parts in
APP_LOCALE, as check:app-locale requires.

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

* refactor(create): one Pay-into group for every entity that receives money

Seven configs carried their own copy of the wallet group (two ids, two
shapes). walletFieldGroup() is the one definition; tables that still have
address columns opt into declaring them, which a wizard needs to place the
group on the right step — a group with no fields shows on every step.

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

* refactor(bitcoin): one explorer link builder; the unused bitcoin service goes

Explorer links were built by hand in three places — two on mempool.space,
one on blockstream.info — and none followed NEXT_PUBLIC_BITCOIN_NETWORK.
lib/bitcoin/explorer builds them all. src/services/bitcoin/index.ts (347
lines, no importers) is removed and the docs that named it point at the
modules that do the work.

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

* fix(a11y): a button-styled link is one control, not a button inside a link

94 places wrapped <Button> in <Link>: a <button> inside an <a> — invalid
HTML, two tab stops for one action, announced twice. <Button href> already
renders the link itself, but dropped aria-label, title, id and disabled,
which is why callers avoided it. It now carries them (a disabled link is
announced and inert) and passes onClick through.

52 sites converted mechanically (plain href on the link, no handler on the
button); 42 put a class or target on the outer link and need a look each,
held by a ratchet test that may only fall. The signed-out purchase line no
longer promises 'a Lightning invoice' — an xpub wallet issues a fresh
on-chain address.

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

* refactor(bitcoin): one address-balance fetcher — refresh reports rate limits and is never stale

Three fetchers read an address balance. services/blockchain (used by the
wallet and project refresh) had no timeout, threw errors that matched none
of the codes its caller maps, and was cached by Next for five minutes, so
'refresh' could return the old number. The treasury's had no timeout and
counted confirmed funds only. lib/bitcoin/addressBalance is the one: timeout,
RATE_LIMITED / API_ERROR_<status> codes, confirmed plus unconfirmed, no
cache, testnet-aware. services/blockchain.ts is removed.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-07 10:30:40 -07:00
c022bfdf46 docs: sync docs with actual stack (#890)
Truth-sweep of the living docs against repo ground truth (pnpm 11.25.0,
Node 24, Vitest, zod 4, TS 6, Next 16/React 19, self-hosted Supabase with
file-based migrations applied on deploy):

- npm/npx commands -> pnpm / pnpm exec / pnpm dlx; `run X -- --flag`
  loses the `--`; package-lock.json -> pnpm-lock.yaml
- jest -> Vitest (config names, vi.fn/vi.spyOn, reporter examples,
  debug commands, framework mentions)
- retired mcp_supabase_* examples -> current mechanisms: PostgREST
  reads, migrations as supabase/migrations/*.sql applied on deploy,
  box psql for DDL
- version claims: TypeScript 5.x -> 6.x, Node 20 -> 24, Next.js 15 ->
  16, React 18 -> 19; CI described as Node 24 + pnpm
- nonexistent scripts replaced with real ones (test:comprehensive:* ->
  test:*, diag:supabase -> scripts/diagnostics/*, db:migrate/test:
  migration -> deploy-applied migrations / migration-replay.yml)
- infrastructure.md deploy claim fixed: cd.yml deploys main after green
  CI (doc said pushes to main do NOT deploy)
- zod 4 API: z.record now takes key+value schemas


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-09-04 17:02:55 +00:00
G fa965e94d1 docs: mark 2025-12-30 development README as stale, not Production Ready 2026-09-03 09:34:31 +00:00
30abac251b fix(cat): @cat has resolved to nobody for two days (#802)
* fix(cat): @cat has resolved to nobody for two days

The email-derived-handle retirement renamed the Cat. Its predicate —
`username = split_part(email, '@', 1)` — is exactly right for a person,
whose public crawlable handle then republishes their email local part.
It is exactly wrong for the Cat, because deriving the handle from the
address is HOW the Cat is created: cat-account.ts registers
`cat@orangecat.invalid` precisely so handle_new_user mints `cat`. So the
script matched, and at 2026-08-26 21:58:59Z the handle became
`user_0234d5e38e66`.

`@cat` is the platform's advertised interface and it resolves by
username, so every `@cat` in a message or under a post has since
resolved to nobody. No reply anywhere. Found by typing `@` in the
composer in production and seeing no Cat in the menu.

Nothing went red. The account still existed, /profiles/cat still 301'd
through profile_username_history, CI was green, health was 200. The only
symptom was silence from the feature whose job is to answer.

Three defects, three fixes:

POLICY — the retirement could not tell a leaked address from a system
identity. Now excluded by property, not by name: RFC 2606 reserves
`.invalid` for undeliverable addresses, so there is no mailbox, no
owner, and nothing personal in the local part. Hardcoding 'cat' in SQL
would have put a second definition of the handle where it could drift
from config/cat-identity.ts. Applied to the rename script and to
count_email_derived_usernames(), which would otherwise have gone from 0
to 1 and turned the nightly gate red for a profile that is fine.

CODE — ensureCatAccount looked the Cat up BY USERNAME, so its
self-healing walked straight past a rename: lookup missed, createUser
said "already registered", second lookup missed, returned null on every
tick. It now keys on the login address, which no policy has reason to
rewrite, and treats the handle as a field to assert rather than a key to
search by. A rename now repairs itself on the next tick.

GATE — nothing checked the product's own claim. checkCatHandle asserts
that the name we tell people to type reaches the Cat; a lookup by id
would have stayed green throughout. The literal it carries is pinned to
CAT_USERNAME by a test, so the duplicate cannot drift.

Proven by mutation: restoring the username lookup, removing the
re-assert, and drifting the gate's literal each turn the suite red.
The migration was rehearsed against production inside a transaction and
rolled back — UPDATE 1, DELETE 1, 28 real retired handles untouched,
gate still reads 0.

Also restores the github.com/catomean links lost when this worktree was
reset; the owner rename left them pointing at a redirect.

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

* fix(docs): point at bitbaum, the canonical owner

catomean is itself a redirect now — the repos live in the bitbaum org.

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

* fix(mentions): the @ menu was offering rows nobody can read

Production has 84 profiles and 74 of them have no display name — the
correct consequence of no longer minting names out of email local parts,
where NULL is honest. The menu did not account for that, so what it
actually showed on a bare `@` was two rows of `user_d58c7dccec41`,
printed twice each: once as the name, because the name falls back to the
handle, and once as the subtitle.

Three changes, all following from the data rather than from taste.

A nameless row now shows its handle ONCE, in the position the eye reads
first, instead of the same hex string on two lines.

A nameless profile is not offered at all on a bare `@`. You cannot be
searching for a name that does not exist, so those rows were pure noise
in the one position that matters most — the first thing anyone sees when
they discover the feature. Type any part of the handle and they come
straight back through the existing prefix rules.

At equal match quality, a named profile outranks a nameless one. `@u`
matches `ursula` and `user_d58c7dccec41` equally well by anything the
score can see, and only one of them is a row a human can act on. The
tiebreak sits after match quality, never before it, so an exact handle
match still wins — a demotion that overrode "this is plainly the row
being asked for" would be a worse bug than the one it fixed.

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

* chore: leave the CLAUDE.md owner line to #803

Both branches edit the same line; one owner avoids a conflict that would
stop CI running on whichever loses.

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-28 07:03:52 +00:00
df236c001a feat(loans): borrower payoff handoff UI flow
Adds incoming-offer management to the loans dashboard, connects accept
flows to payment creation/completion and refinance obligation creation,
and tightens touched loan dialogs/cards for mobile-first responsiveness.

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 10:28:26 +02:00
c9ffae2050 feat(loans): offer API routes and domain validation
Moves loan offer create, update, and borrower response flows behind
internal /api/loans/offers handlers so the entire loans write path now
runs through API and domain validation instead of browser Supabase calls.

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 09:50:42 +02:00
13e36cdc44 feat(loans): payment API routes + obligation handoff
Adds POST /api/loans/payments and POST /api/loans/payments/:id/complete,
including optional createObligation on refinance completion. Adds RLS UPDATE
policy migration for loan_payments.

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 09:19:55 +02:00
051053c620 feat(loans): obligation loan API route
Adds POST /api/loans/obligation with domain authz (borrower owns source
loan), eliminating the last browser Supabase write in loan mutations.

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 08:38:56 +02:00
2e897c5bfc fix Cat Credits metering and refresh AI model registry (#395)
* fix(cat): meter Cat Credits from OpenRouter's real usage.cost

Prefer OpenRouter's provider-reported per-request cost (usage.cost, USD→BTC)
for Cat Credits debits, falling back to the registry token-price estimate when
the field is absent. Ledger metadata now records pricingSource
(provider_reported | registry_estimate). Free models always meter to 0.

Pinned by regression tests for the metering preference and the OpenRouter cost
plumbing (buffered + streamed), guarding the prior "$0 for unknown model" leak.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(ai): refresh 2026 model roster and consolidate registry SSOT

Update AI_MODEL_REGISTRY to the Q1-2026-verified roster and pricing (free,
economy, standard, premium tiers), with boundary-safe resolution of
provider-returned snapshot ids. model-registry.ts is now a generated projection
of ai-models.ts rather than a drifted duplicate list.

Refresh docs to match reality: rewrite MODEL_SYSTEM.md (provider chain,
Cat Credits metering, current roster) and chat.md (authenticated /api/cat/chat
contract), retiring references to the removed UnifiedAIClient/ModelStatusBadge
and public /api/chat endpoint. Mark completed items in the research handoff.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 22:02:03 +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
Georgy ButaevandCursor d09569334e docs(audit): close workflow verification exit criteria
Record CI P0 matrix 11/11 green, bootstrap self-healing, and add
workflow_dispatch for manual CI reruns.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 01:46:15 +02:00
Georgy ButaevandCursor 0a5f30b770 fix(ci): mint fresh reset tokens per run for P0 matrix
Bootstrap generates single-use recovery sessions, fixes reset URL encoding,
and disables retries for the password-reset test.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 00:18:59 +02:00
Georgy ButaevandCursor 292f4841c3 fix(ci): bootstrap E2E fixtures on Node 20 with ws transport
Use ESM imports plus ws for Supabase realtime init in GitHub Actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 23:45:09 +02:00
Georgy ButaevandCursor e7e0602ace fix(e2e): run messaging matrix checks via browser fetch
page.request missed auth cookies for sendMessage's getServerUser path;
in-page fetch matches production audit and CI login session.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 23:20:13 +02:00
Georgy ButaevandCursor 40d49b1021 docs(ci): document configured E2E fixture secrets
Record fixture account, project ID, and reset-token refresh notes after
GitHub Actions secrets were provisioned for P0 matrix.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 22:25:10 +02:00