mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 11:38:21 +01:00
dependabot/github_actions/github/codeql-action-4.39.3
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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>
|
||
|
|
a1610260e9 |
docs(spec): first fiat-rail spike — TWINT via Payrexx (Swiss-first, opt-in)
The one-week plan's Twint spike (research + plan, no build). OC settles Bitcoin only today; 'any currency' is aspirational. Picks TWINT (CH's dominant rail) via Payrexx (Swiss-first, marketplace-native: split + automated seller-KYC + payouts, also PostFinance/cards/PayPal/Bitcoin, white-label). Surfaces the core tension — fiat can't be non-custodial AND pseudonymous, so fiat is an opt-in SECOND track (KYC'd sellers) while Bitcoin stays the default non-custodial/pseudonymous path. Recommends Model A (PSP marketplace, fiat-native, FleetCrown-first) over Model B (fiat-in->BTC-out bridge, deferred). Plugs in via a payment_methods abstraction (new 'fiat_psp' resolver branch + provider adapter + seller opt-in + payer button), bounded blast radius, Bitcoin path untouched. Key recommendation: land the first BTC payment (Workstream A) BEFORE splitting focus onto fiat. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
d460ec73c9 |
docs(spec): Cat economic-loop build spec (Workstream C)
Code map finding: the talk->published->payable loop already works end-to-end for cause/project/product (real Lightning invoices). Workstream C is smaller than assumed — gaps are surfacing, not plumbing. Ranked build list: C-1 make the Cat the default /dashboard surface (highest leverage), C-2 close the wallet-at-publish dead-end (published != payable; demo-critical), C-3 starter prompts, C-4 payable success card. Decision needed: C-1 redirect vs hero-embed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
ddbf18a987 |
feat(funding): configurable per-entity funding transparency (#385)
Owners can opt a fundraise into transparency (private | total | public) via a toggle on the wallet-entity link, defaulting to private. The visibility lives on entity_wallets (the polymorphic junction), so one column serves every entity type — no per-table sprawl. Two SECURITY DEFINER reads back it: - get_entity_funding_stats returns the honest ledger-derived BTC total (anonymous amounts included, identities never leaked), gated by the link's visibility; null when private. - contributions RLS tightened so the public supporter list is revealed only when the fundraise is 'public'. App wiring: - config/wallet-visibility.ts — SSOT for the three levels (mirrors the DB CHECK) - services/wallets/funding-stats.ts — read helper over the RPC - EntityLedgerTotal — owner-opt-in public BTC total (cause + research) - WalletVisibilityToggle + PATCH /api/wallets/entity-visibility — owner write path - Mounted generically in PublicEntityDetailPage: an owner-only card shows the toggle when a primary entity_wallets link exists (the link is what it governs; no link → funding flows to the default wallet, nothing entity-scoped to control) Box-side follow-ups (per CLAUDE.md, via founder): apply migration 20260706000000 to supabase.orangecat.ch, regenerate DB types (visibility not yet in generated types — two localized casts flagged for removal), refresh live-schema.json for audit:schema. Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
a978456960 |
feat(assistants): chat-first assistant page + breadcrumb alignment fix
Per docs/specs/ai-assistant-surface.md (founder review: breadcrumb misaligned, page 'looks bad and not really working'): - Breadcrumb: flatten crumbs/chevrons into ONE flex row (the nested span.flex per item was a second flex context whose box height differed from the Home link's — labels floated above the row on every entity detail page). - Assistant detail: the page IS the conversation. Price chip in the header (AssistantPriceChip, display-currency aware); chat main column at conversation height (50vh); welcome/pricing/details leftover cards removed (welcome renders as the chat's first message; tags+personality as one compact strip). Paid pricing_model with no price normalizes to free so chip and charge path always agree. - Root cause of 'No AI Assistants Yet': zero published assistants ever existed. Seeded + published the real flagship 'OrangeCat Guide' (free, founder-owned, honest platform-help prompt) directly in prod. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
ea1f492499 |
docs(blog): "Your Most Valuable Skill Is the One You Call 'Nothing'" + interviewer spec
New blog article (content/blog/your-most-valuable-skill.mdx) — dual-audience (FleetCrown style): a story for non-technical readers + "🔧 Under the hood" boxes for builders. Covers the economic agent's next frontier: Cat interviewing users to surface latent value (curse of expertise, stories-in-value-out, the 12 forms of value), turning gaps into the smallest publishable step, the anti-hustle/consent guardrails, and the keystone (a structured economic-profile store). Positions FleetCrown as the execution half ("you tell it what to do, and it does it") — OC finds & distributes value, FleetCrown builds it, settled in Bitcoin. Also adds the engineering spec docs/specs/cat-economic-interviewer.md (methodology + question taxonomy + data model + roadmap) that the article reflects. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
6add226cf4 |
feat(entity): detail-page quick wins + per-entity primary-action SSOT
The entity detail pages rendered a debug dump (Status/Created/Updated as "values", title duplicated by the breadcrumb, no clear action). First batch of fixes — applies to ALL entities, differences driven by config (SSOT), shared fixes in the generic components: - entity-cta.ts (NEW SSOT): each entity's ONE primary action — service "Book this service", project "Fund this project", event "RSVP", asset "Rent or buy", etc. (from the economic taxonomy). One place; detail pages stay generic. - Owner view (EntityDetailPage): dropped the raw created_at/updated_at dump (noise); added a "View public page" action so owners see their listing as buyers do (next to Edit); breadcrumb no longer repeats the title as its last crumb. - Public view (PublicEntityDetailPage): removed the Created/Updated timestamps card; breadcrumb title-dup fixed; the mobile primary CTA now uses the entity's own verb (getEntityPrimaryCta) instead of a generic "Support". Also adds the two specs that frame the larger work: docs/specs/entity-detail-redesign.md and docs/specs/economic-agent-capability.md. tsc 0; lint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |