10 Commits
Author SHA1 Message Date
CatoandClaude Opus 5.5 b40e67aeea feat(auth): every way in on AccountKit's own screens (#91)
* feat(auth): every way in on AccountKit's own screens

PrintCraft signed people in against OrangeCat's GoTrue (auth.users). It now
runs on AccountKit (@bitbaum/accountkit 0.23) with AccountKit's own forms:
/login offers email and password, an emailed sign-in link, a passkey,
recovery through the mailed link and the second factor; /register is
sign-up; /account carries the account panel. "Continue with OrangeCat" and
the shared sign-in show when their clients are set, the link and recovery
when mail is. The GoTrue forms, the Supabase cookie middleware and the
browser auth client are gone.

AccountKit's tables live in a host accounts database (app/drizzle, loki
accounts-db.conf); the project data stays in the printcraft supabase schema.
API routes always read it through the service-role client and check
ownership against the session's user id, as they already did for guests.
New accounts get uuid ids (projects.user_id is a uuid), and a supabase
migration drops the projects.user_id key to auth.users, which a new
person's id is not in. Nothing is deleted.

Existing people keep their projects: scripts/db/accountkit-people.sql lists
every project owner with their OrangeCat actor id, and
scripts/db/accountkit-import.sql gives each an account under the same id,
linked to OrangeCat by that actor id, never by address (loki
accountkit-supabase.yml rehearses it rolled back, then imports).

src/lib/auth/accounts.test.ts runs the ways in and the import on the
committed migration; accounts.yml rehearses the import and runs the browser
journey against the production build with AccountKit's real mail caught by
a sink.

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

* ci(auth): the account journey is the browser smoke the rollout gate reads

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

* docs(ci): name the journey's workflow

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 22:01:52 +01:00
b265d65d4a chore(scripts): delete a seed script aimed at a database we retired (#30)
scripts/seed-roli-project.ts hardcoded https://ckpynkpsfnuqndplaapc.supabase.co
— the managed-cloud project this app left when the fleet moved to the
self-hosted Supabase on bitbaum. Nothing references it: no package.json script,
no docs, no workflow.

Deleting rather than repointing, because repointing is the dangerous option. The
script also creates its client with no `db: { schema }`, so aimed at the box
with a working service-role key it would write Roli's project rows into
`public` — which is orangecat's schema, not printcraft's. A one-off seeding
script for one customer's project is not worth carrying with that edge on it;
git remembers it if the figures are ever needed again.

Found by a fleet-wide sweep for hosted-Supabase references, prompted by
botsmann serving PGRST205 for months because its docs described a hosted
project that no longer existed.


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

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 08:47:46 +00:00
GandClaude Opus 5 19938cc7cf ci: call the central auto-merge sweep instead of carrying a copy (#18)
auto-merge-sweep.sh was copied into 22 repos and drifted into EIGHT distinct
versions, 245 to 404 lines. Three of them independently grew different fixes for
real outages, and each fix reached only the repo that wrote it:

  evig, revampit   infra-failure detection + re-run. An Actions incident left
                   main "failure" with no failed job at all; 11 PRs stranded
                   for roughly 14 hours.
  fleetcrown       DEADLOCK naming — a red base with the repairing PR sitting in
                   the queue was indistinguishable from "nothing to merge".
  the other 19     neither.

Nothing could carry a fix across, so every repo waited to hit each outage
itself. This repo now calls the canonical sweep in maonakamoto/dotfiles, and the
local copy is deleted.

The canonical is the union of the three, built on the variant ten repos were
already running rather than on the longest one — the 404-line variant is missing
the step-summary reporting the 296-line one has, so "take the biggest file"
would have silently deleted working behaviour. The merge was 106 insertions and
zero deletions: nothing can be lost by adopting it.

The triggers stay in this file because they genuinely are per-repo: workflow_run
must name the CI workflow exactly, and that name differs across the fleet.

Two details that are silent when wrong, both found by piloting rather than
reasoning:

  rearm_workflows is SPACE-separated. The sweep word-splits it; a comma makes
  one bogus token, every dispatch fails, and the only symptom is that nothing
  deploys — while the sweep still exits 0 and reports a successful merge.

  permissions are declared on the CALLER as well. A called workflow's token is
  capped by what the caller grants, so relying on the callee's block alone can
  hand it a read-only token; the sweep would then merge nothing while exiting 0,
  which is indistinguishable from having nothing to merge.

Verified before this rollout: the canonical ran end to end in dotfiles' own CI,
and the reusable-workflow path ran end to end in the pilot repo (s-ink).

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 14:54:23 +00:00
G d766a39620 fix(ci): declare the failing-job list before the branch that can skip it (#13) 2026-08-07 09:57:35 +00:00
G 9c378d2b8e fix(ci): a red base must not trap the PR that repairs it (#12) 2026-08-07 09:37:25 +00:00
G 819a358f5f fix(ci): stop skipping conflicts, and keep branches current (#10) 2026-08-07 07:11:12 +00:00
GandClaude Opus 5 3fb944cbb6 fix(ci): drain the merge queue oldest-first, not newest-first (#9)
`gh pr list` returns newest-first, and the sweep merges the first eligible PR
then stops. So the newest green PR wins every sweep, and an older one can wait
indefinitely.

Observed in maonakamoto/fleetcrown on 2026-08-06: two consecutive sweeps merged
the two newest PRs while three older green ones sat untouched and were never
even evaluated. With several agent sessions opening PRs continuously that is
starvation — and it starves the worst candidate, since the longest-waiting PR
is the one whose checks were proven against the most now-stale base.

PR numbers increase monotonically with creation, so sorting ascending is FIFO.
The ordering was never a decision, just whatever gh happened to return.

Fixed upstream first (fleetcrown #182) and verified in production there: the
sweep immediately after it landed correctly took the oldest open PR rather than
the newest. This is that one-line change, applied to the fleet.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 13:41:12 +00:00
G 86b82672ad ci: green PRs merge and deploy themselves (#8)
* ci: add the auto-merge sweep policy

* ci: green PRs merge and deploy themselves

* ci: allow deploy to be dispatched so an automated merge still ships
2026-08-05 19:17:22 +02:00
GandClaude Opus 4.8 03dc036e66 chore(infra): remove Vercel references — self-hosted now (#3)
Vercel is fully decommissioned; PrintCraft runs self-hosted on the
Hetzner box "bitbaum" behind Caddy at printcraft.orangecat.ch.

- seed-roli-project.ts: dead printcraft-pied.vercel.app URL → printcraft.orangecat.ch
- .gitignore + app/.gitignore: drop dead .vercel ignore entries
- README "No Vercel" guardrail kept intentionally

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 21:49:20 +02:00
g-butandClaude Opus 4.6 5facb73e1a feat: seed Roli's Duschwand project with all images
- Created guest user (fee8f90d) in Supabase Auth
- Updated GUEST_USER_ID to real user (moved to lib/constants.ts)
- Seed script uploads 7 original photos + 4 styled versions
- Project pre-configured: retro travel style, 2-panel glass surface
- Duschwand preset includes Dusch Armatur dead zone (40x45cm)
- Updated root README with project structure and active projects
- Linked PROJECT.md in Dokumente/Duschwand to app URL

Project URL: /project/dbb22c0d-3979-44b6-af94-0d7f759eaad9/figures

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 02:40:35 +01:00