Petvity moves from Auth.js to @bitbaum/accountkit one reversible step at a
time, as evig and kivvi do. Nothing changes while AUTH_RUNTIME is unset.
- Migration 0008: AccountKit's tables under an `auth_` prefix, plus the
users <-> auth_users mirror functions, inert until attached.
- scripts/db/accountkit-import.sql: accounts under their own ids, bcrypt
hashes byte for byte, verification kept, orangecat_sub as an `orangecat`
account row; refuses collisions, drift or a live shared runtime, then
attaches the triggers. The rehearsal CLI always rolls back.
- lib/auth/shared/: the runtime (ids: 'uuid', legacy bcrypt, AccountKit
0.16.0), a session reader re-read from `users` on every request, a bridge
that answers next-auth/react including "Sign in with OrangeCat", and a
Petvity row for a person AccountKit creates itself. AccountKit's own
credential endpoints stay closed; Petvity's writers stay the only ones.
- lib/auth/claims.ts: the ADMIN_EMAILS promotion rule, written once.
- The proxy has one routing function and two session sources.
- browser-smoke.yml runs the account journey once per runtime; the
AccountKit leg first runs the rehearsal and the real-database journeys.
docs/ACCOUNTKIT-MIGRATION.md records what is left before switching.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
ChartKit 0.7.0 closes both gaps recorded in package-plan.json (#140):
LineChart now labels days on a 30-day span, and Meter takes a tone and
showValue={false}.
- HealthTrendChart renders ChartKit's LineChart on the server: one line
per metric, the species' normal range as a reference band, the portal
locale for dates and numbers. A day without a reading is left out of
that line. The trend charts sit one per row: in the portal's 4xl
column, three across left each plot about 190px and the day ticks ran
into each other.
- The twin score and per-metric bars (DigitalTwinCard, public pet page,
portal dashboard) are ChartKit Meters coloured by the twin state's
tone, with the figure printed once by the page.
- The twin score block wraps under the state name on a narrow card; at
390px in German it was clipped ("41 / 1") before this change.
- recharts is removed, with the chart colour config and the tooltip
shadow that only it used. Both exceptions leave package-plan.json; the
bindings are recorded instead.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
Reviewed every chart against @bitbaum/chartkit 0.6.0. Two exceptions,
each with the missing capability:
- HealthTrendChart (30-day daily trends): LineChart labels its time axis
only at month and year starts, so a migrated 30-day chart showed no dates
on its x axis.
- Digital-twin score bars: Meter has no tone/colour input and always prints
its own value.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>