Public pictures still passed through the app box: storage-api answered
every supabase.orangecat.ch/storage/v1/object/public/... request, and
next/image fetched, resized and cached them there. orangecat-media holds
private files too, so it never gets a public domain; public pictures go
to the separate public bucket fleet-media under orangecat/<bucket>/<path>,
served from MEDIA_PUBLIC_BASE.
- src/lib/media/public-url.ts: the one URL helper. Direct address only
for objects known to be copied (listing every 10 min + own writes),
otherwise the Supabase address. Unset base: unchanged.
- New uploads: server-side ones are written to fleet-media as stored;
browser uploads ask POST /api/media/mirror. Stored URL is the direct one
or, on any failure, the Supabase one.
- Background copy from instrumentation: idempotent, throttled
(MEDIA_BACKFILL_KBPS, 512), one process at a time under a lease taken
with a Postgres advisory lock (new migration). Only buckets declared
public in code AND marked public in storage.buckets. Removes copies of
deleted originals after a complete scan, capped at a tenth per run.
- next/image: with the base set at build, a custom loader draws R2
pictures unoptimized and sends Supabase public pictures to
/api/media/object, which redirects to R2 once copied, else to the
optimizer as before.
- Docs: STORAGE_R2_BACKEND.md (how, switch-on, rollback, the pre-move
disk copy an operator may remove), .env.example; three docs that named
the removed auto-merge.yml now name the forge merge check.
Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T
Co-authored-by: Claude <noreply@anthropic.com>
Both CLAUDE.md files now only point at AGENTS.md, the fleet's one
agent-file shape (bitbaum/fleet scripts/ci/agent-rules.mjs). What was
still true moves into AGENTS.md: the principles and the entity test, the
shipping hand-offs (re-arm, post-main), the self-hosted Supabase read and
migration path, the design tiers and the one-orange rule, and the money
surface as the reference for one shape per kind. Every named path,
script, workflow key and component was checked against the tree.
Dropped as stale or copied:
- `.claude/CLAUDE.md` still listed the warm accent as `#ff5c00`; the root
file and globals.css say it is gone (accent = Bitcoin orange).
- a machine-specific project path, the duplicated stack table and the
`.claude/rules` restatements (those files remain).
Docs and comments that sent readers to CLAUDE.md for "Shipping" or the
principles now point at the AGENTS.md sections.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
Forty-five 2025 plans, assessments, design scenarios, status reports and
superseded business docs move to docs/archive/ (same relative path). Each
described a plan or a snapshot as if it were the running system: strict:false,
a five-table schema, an "organization" entity, price_sats, a Gemini /api/chat
widget, a /auth/forgot-password page, Google Places, building group labels and
contract voting flows that never landed.
Fixed in place: NAVIGATION_UX_DESIGN.md (referenced by .claude/rules) gains a
status note naming what shipped and where; GENERIC_API_HANDLERS.md lists the
handler options the code actually takes; datetime_standards.md points at
scripts/dev/; CONTRIBUTING.md describes the auto-merge shipping flow. Inbound
links repointed (SECURITY.md at the root, SUPABASE_SCHEMA_GUIDE.md for schema).
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD
Co-authored-by: Claude <noreply@anthropic.com>
* 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>
The docs tree had sprawled into ~40 overlapping/singleton/empty directories.
Consolidated (history preserved via git rename detection; links rewritten so
no previously-working link broke):
- architecture/ ← adr/, database/, + loose *_ARCHITECTURE / my-cat specs
- development/ ← standards, contributing, guides, examples, templates, components, ai
- operations/ ← devops (+runbooks), deployment, supabase
- design-system/← design, UX, ux-improvements, branding
- reference/ ← api, changelog, content, misc
- forward-looking/ ← planning, improvements, implementation
- archive/2026-h1/ ← point-in-time reports/plans that were loose at docs/ root
- removed empty docs/analysis/; rewrote docs/README.md as a current index
Verified: non-README relative-link health 81→83 OK (0 regressions, same 64
pre-existing-rot broken); all new README links resolve; external refs in
.claude/ + root repointed to moved targets.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>