mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 06:18:00 +01:00
dependabot/github_actions/github/codeql-action-4.39.3
115
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
49290ffe92 |
feat(messages): Ask Cat button + @cat hint in the conversation composer (#1551)
Co-authored-by: catomean <catomean@users.noreply.github.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
8172121e7d | Enable Cat to manage project investor rooms (#1538) | ||
|
|
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 |
||
|
|
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> |
||
|
|
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> |
||
|
|
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>
|
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
4ad63c1187 | Enforce authenticated author identity in the legacy post writer (#1396) | ||
|
|
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 |
||
|
|
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 |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
47f916ad71 | feat(profile): validate private location coordinates (#1192) | ||
|
|
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>
|
||
|
|
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> |
||
|
|
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>
|
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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>
|
||
|
|
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> |
||
|
|
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> |
||
|
|
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>
|
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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>
|
||
|
|
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> |
||
|
|
d3e1bbe644 |
fix(e2e): reset password test uses a distinct new password
Supabase rejects setting the same password; run this test last so login checks still use the fixture password restored on the next CI bootstrap. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
ed688ec7a1 |
fix(e2e): target reset form password inputs reliably
Use form-scoped password fields and exact submit button label. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
2f5d54f67b |
fix(e2e): disambiguate reset password field locators
The reset form renders duplicate placeholder nodes; target the first match. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
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> |
||
|
|
7e2f34c508 |
fix(ci): bootstrap E2E fixtures and stabilize reset password test
Ensure self conversation + fixture project before P0 matrix. Keep reset password fixed so CI login credentials stay valid across runs. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
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> |
||
|
|
1bf199e31b |
fix(ci): add service role and refresh token for P0 matrix
Password reset UI requires access_token + refresh_token. Messaging API needs server-side service role in CI. Provision E2E_RESET_REFRESH_TOKEN. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
6d5121afe8 |
fix(e2e): close remaining P0 matrix failures in CI
Fix undefined conversationId, accept cat chat 503, and exercise password reset via pre-provisioned token only (skip flaky forgot-password UI step). Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
c118021039 |
fix(ci): wire real Supabase secrets for P0 auth matrix
CI login failed because the app was built against dummy Supabase while E2E credentials target production. Use repo secrets for client env vars. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
8d5ea2427e |
fix(e2e): use unambiguous password field selector in login helper
getByLabel('Password') matched the show-password toggle and broke CI P0
matrix login. Centralize login in tests/e2e/helpers/login.ts.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
||
|
|
87eddf8070 |
fix(e2e): unify credential env vars and repair P0 matrix specs
Add tests/e2e/helpers/credentials.ts as SSOT (E2E_USER_* with legacy fallback). Fix workflow-matrix project route, message delete payload, and API response parsing. CI exports legacy aliases for global-setup. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
d40648d4df |
fix(audit): principles sweep — repair 2 live schema-drift bugs + SSOT stragglers
Founder-mandated SSOT/DRY/SoC audit + fix pass (report:
docs/audits/2026-07-03-principles-audit.md). Live schema verified on the box.
Live bugs fixed:
- POST /api/research 500s: createResearch + Cat create_research inserted the
9 denormalized counter columns dropped by migration 20260404000005; types
(research.ts, database.ts) and the research dashboard no longer reference
the dead counters either.
- Group-events APIs: profiles!group_events_creator_id_fkey /
group_event_rsvps_user_id_fkey embeds 400 on live (FKs point at auth.users,
not profiles). Split queries fetchEntityOwner-style via new shared
services/groups/eventProfiles.ts across 4 server/browser consumers.
SSOT/DRY fixes:
- Refresh stale scripts/db/live-schema.json from the box (audit:schema clean:
search_queries, user_economic_profile, payment_intents.lnurl_verify_url).
- ROUTES.DASHBOARD.CAT_WELCOME replaces 5x '/dashboard/cat?welcome=true';
exported isCatHubPath() replaces ad-hoc startsWith checks.
- 5 hardcoded fetch('/api/…') moved to API_ROUTES (new WEBHOOK_ENDPOINTS.
DELIVERIES, AUTH.OAUTH_PROVIDERS, DISCOVER.COUNTS).
- contextual-create.ts migrated to ROUTES.* + single COMPOSE_HREF.
- Fix 3 stale tests asserting the retired SATS currency code (failing on main).
Gates: type-check 0 · lint clean · 957/957 tests · audit:routes clean ·
audit:schema clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
||
|
|
a52836c793 |
chore: remove all Vercel — everything runs on Hetzner
Production is fully self-hosted on the Hetzner box (bitbaum, behind Caddy) with self-hosted Supabase. This scrubs the remaining Vercel footprint: Code (src/ now has zero Vercel references): - security page: "Hosted on Vercel" → self-hosted infrastructure - FleetCrown URL fleetcrown.vercel.app → fleetcrown.orangecat.ch (entity registry + external-publish allowlist; the dead vercel.app subdomain was also a re-registration risk in an allowlist) - webhook-secret error + cron/env comments point at the box, not Vercel - corrected stale "Vercel kills the function on response" comments (false on a persistent server) to accurate await-before-respond reasoning Security/config: - supabase/config.toml: dropped dead *.vercel.app auth redirect URLs - @vercel/mcp-adapter dependency removed (unused) Artifacts removed: - scripts/auth/vercel-login.js, scripts/preview-url.sh, scripts/dev/merge-env.js, scripts/monitoring/deployment-monitor.js, scripts/db/setup-env.js, mcp-servers/vercel-openapi.json, .vercel/ - setup_vercel_secrets MCP tool in mcp-servers/github-server.js - .gitignore Vercel section; env scripts stripped of vercel-login/token Docs + .claude rules/commands rewritten to the self-host deploy flow (scripts/deploy-selfhost.sh / .github/workflows/cd.yml; env at /opt/orangecat/app/.env). Historical/archive records left intact. Verified: tsc 0 errors, SELF_HOST=1 build green, cron unit tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |