17 Commits
Author SHA1 Message Date
CatoandClaude Opus 5.5 7f1dc4198d AI article writing: long text fitted, not refused; throw everything in and Cat writes it (#1838)
* fix(ai): fit long briefs instead of refusing them; actionable input errors

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-19 16:18:51 +01:00
CatoandClaude 09dd258b84 feat(articles): post an article on your own projects' walls too (#1596)
* feat(articles): post an article on your own projects' walls too

- publishArticle takes projectIds; keeps only projects the writer owns
  (fetchUserProjects: owned by their actor, not a draft — the list short
  posts cross-post to) and builds contexts with the one shared
  buildTimelineContexts, now in timeline/utils/timeline-contexts.ts.
- Composer: "Also post on a project" under "Who can read this?", opening the
  same ProjectSelectionModal short posts use; hidden when the writer has no
  projects; not shown when editing.
- ?project=<id or title slug> preselects an owned project; one that is not
  the writer's is not chosen and the composer says so. The fallback sign-in
  button now carries the query in `from`, like middleware and useRequireAuth.
- Project walls read `project` visibility contexts as well as subject posts,
  so cross-posts (short posts and articles) actually appear there.
- Link contract documented once in import-source.ts.

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

* test(articles): give the editor fixture its project list

The article-writing browser check bundles the real composer with its data
boundaries stubbed. "Also post on a project" added one (the writer's
projects, read through the Supabase client), which threw on load in CI with
no Supabase env, so the editor never rendered. The fixture now stubs it like
publishArticle, and checks the control at every width: a ?project= that is
not the writer's is not chosen and says so; an owned one is preselected, its
sheet fits and has full-size targets, and publishing sends its id; with no
projects the control is absent. The sheet is imported directly, not through
next/dynamic, which the fixture does not provide.

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

---------

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

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

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

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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 07:29:52 +01:00
Cato d2dbb21ccc Unify article drafting and edits with WritingKit (#1565)
* fix(articles): unify drafting and edits with WritingKit

* fix(articles): use secure randomness for draft operation identities
2026-11-05 18:05:28 +01:00
Georgy ButaevandClaude Opus 4.8 2208a0ad8b chore(cleanup): remove retired managed-cloud scripts + stray template
Delete 30 dead scripts that drove the retired managed Supabase Cloud via the
Management API / dashboard (key fetchers, Management-API migration runners,
cloud diagnostics). All were already neutered (banner + exit) in 054204e9 and
referenced nowhere in code/CI — the DB is self-hosted (psql + migration files)
so they have no purpose. Also drop env_tokens_template.txt (redundant with
.env.example). History preserves them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 10:58:18 +02:00
Georgy ButaevandClaude Opus 4.8 054204e943 chore(infra): retire managed Supabase cloud; Hetzner self-host is SSOT
The managed Supabase Cloud project (ohkueislstxomdjavyhs) is retired; the
self-hosted instance at supabase.orangecat.ch on the Hetzner box is the single
source of truth. Repoint the image host + setup scripts, rewrite the agent/dev
guidance to use the self-host directly (not the Supabase MCP, which only reaches
the retired cloud), update active docs, exit retired cloud-Management-API
scripts behind a RETIRED guard, env-ify direct-connect scripts, gitignore
.env-backups, and add a founder-run DECOMMISSION-CLOUD runbook. No live code
path references the managed project anymore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 09:26:58 +02:00
g-but ea32d264d5 fix: restore quality gates, remove secret fallbacks, and resolve TS errors 2026-02-18 09:14:10 +01:00
Your NameandClaude Opus 4.5 295e39eddf fix: update scripts to use environment variables
Scripts now read from .env.local using dotenv instead of
having hardcoded values or placeholders.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 13:15:56 +01:00
Your NameandClaude Opus 4.5 bcfb0aa8de security: remove all hardcoded secrets from scripts and docs
- Replaced 29 JWT tokens with environment variable references
- Deleted docs/operations/SUPABASE_API_GUIDE.md (contained real keys)
- Removed mcp-servers/node_modules from git tracking (716 files)
- Updated .gitignore to prevent future exposure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 13:11:53 +01:00
Your Name 1b2a2371e9 refactor: Complete codebase improvements per engineering principles
- Fix currency defaults (SATS → CHF) across forms, configs, and API routes
- Remove @ts-nocheck from socialService.ts and improve type safety
- Replace console.log statements with proper logger utility in production code
- Additional type safety improvements and code quality enhancements
- Documentation updates for improved maintainability

All changes follow DRY, SSOT, and separation of concerns principles.
2026-01-04 12:25:26 +01:00
Your Name a1b3aba810 fix: TypeScript errors in messaging service, profile hooks, and core types
- Fixed messaging service Supabase insert/update type errors
- Fixed profile hooks (useProfileForm, useAuth, useActiveRoute, useMobileMenu)
- Added missing type exports (UserProduct, UserService, UserCause, Profile with email)
- Fixed messaging API route type errors
- Updated Database types for proper Supabase type safety

Note: Some TypeScript errors remain in non-critical areas (commerce, entity configs, tests) but core messaging and profile functionality is type-safe.
2025-12-22 15:38:36 +01:00
Your Name 38cc4669d8 chore: comprehensive codebase cleanup and organization
- Move 100+ files from root to proper directories
  - Migration scripts → scripts/db/
  - SQL files → supabase/sql/archive/
  - Test/debug scripts → scripts/test/
  - Documentation → docs/archive/ (organized by category)
  - Shell scripts → scripts/ (organized by category)

- Fix test organization
  - Remove nested tests/unit/tests/unit/ structure
  - Consolidate test files to proper locations

- Update documentation references
  - Update migration script paths in workflow docs
  - Update scripts/README.md with moved file notes

- Delete placeholder files
  - Remove empty placeholder.ipynb

- Result: Root directory now contains only essential config files
- Result: Professional, organized codebase structure
- Result: All files in proper locations per project standards

See docs/CLEANUP_COMPLETE.md for full details.
2025-12-21 22:57:54 +01:00
Your Name 94bfe613b6 chore: deploy local snapshot
Commit current local state for production deploy.
2025-12-10 16:56:40 +01:00
Your Name 472fa4c75d feat: implement comprehensive wallet management code quality improvements
- Replace console.error with structured logging using logger utility
- Extract duplicate error handling into centralized utilities
- Add constants for magic numbers and timeouts
- Improve type safety by eliminating any types and adding proper interfaces
- Standardize error response format across all wallet API endpoints
- Fix timeout cleanup issues and memory leaks
- Add comprehensive error handling for wallet operations
2025-11-30 18:41:50 +01:00
Your Name ebb0b251d4 feat: Add public profiles and server-side rendered project pages for social sharing
- Add public profile route at /profiles/[username] with server-side rendering
- Convert project pages to Server Components with generateMetadata for SEO
- Add Open Graph and Twitter Card metadata for social media previews
- Fix middleware to allow public access to /profiles/ and /projects/ routes
- Add PublicProfileClient and ProjectPageClient components for interactivity
- Update route constants with PROFILES.VIEW(username) for public profiles
- Add 404 pages for profiles and projects
- Deprecate SocialMetaTags component (replaced with generateMetadata API)
- Fix database field name mapping (name vs display_name)
- Add comprehensive testing scripts and documentation
- Fix missing Link import in UnifiedHeader

This enables users to share their profiles and projects on social media
with proper preview cards (no more 'Loading...' on Twitter/Facebook).

Phase 1 complete - ready for production deployment.
2025-11-12 01:02:16 +01:00
Your Name 5cd7495b78 feat: Complete entity relationship system - 11 APIs connecting profiles, organizations, campaigns, projects
- Added intelligent onboarding with AI analysis and personalized recommendations
- Implemented organization creation with founder membership and role-based access
- Built 11 production APIs for full entity relationships:
  * Profile endpoints: campaigns, projects, organizations
  * Organization endpoints: campaigns, projects, member management
  * Project endpoints: campaigns, add/remove campaigns
  * Campaign endpoints: stats and enhanced detail
- Enhanced UX with guest-first campaign creation flow
- Fixed sidebar naming consistency (Campaigns vs Fundraising)
- Improved onboarding with interactive category cards and clean animations
- Added comprehensive documentation and integration guides
- Implemented proper JSX structure and TypeScript fixes
2025-10-18 09:44:02 +02:00
Your NameandClaude 2872828779 chore: version 0.1.1 deployment - fix configuration and dependencies
- Bump version to 0.1.1 for tracking
- Add webpack-bundle-optimizer script for Next.js config
- Simplify ESLint configuration to resolve missing dependencies
- Prepare for production deployment with proper version control

This deployment includes:
- Profile update fixes with banner_url support
- LN address validation
- Auth cookie fixes for profile updates
- Various documentation and testing improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 09:30:45 +02:00