Commit Graph
233 Commits
Author SHA1 Message Date
Cato 9a7210f196 chore(email): remove the dead Brevo SMTP fallback (#694)
Production's SMTP credential has answered "Login denied" since at least
2026-09-05, so every send that "fell back" to it delivered nothing while the
code reported a provider. Mail now goes through Resend (@bitbaum/mail-kit),
or Listmonk when enabled with Resend behind it; a Resend failure is reported
as { success: false } instead of handed to a relay that cannot log in.

Removes transporter.ts, the Brevo probe script, EMAIL_* env, the nodemailer
dependency and its override, and rewrites the email docs to match.
2026-11-10 10:14:57 +01:00
CatoandClaude 8a2ecc3c7c docs(auth): a real password reset is proven live (#669)
Loki's accountkit-switch.yml prove now runs a real reset: the product's
forgot-password page, the mail in a throwaway real inbox, its link, a new
password set on the reset page, and that password signing in. It passed
here; the doc no longer lists it as unproven.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 10:48:16 +01:00
CatoandClaude a44fb929bd feat(auth): every way in on AccountKit's own screens (#655)
/auth/login, /auth/register and /auth/forgot-password are AccountKit's
forms: password, passkey, an email sign-in link, recovery, Sign in with
OrangeCat and the shared bitbaum sign-in, each when its env is set.
/dashboard/security carries AccountKit's account panel (password,
passkeys, two-step sign-in, linked sign-ins, deletion). compat passes
screens: 'accountkit' (AccountKit 0.20).

AccountKit is the only credential writer. evig's /api/auth/register,
forgot-password, reset-password and verify-email and
/api/user/change-password are removed: they shadowed AccountKit's
endpoints of the same names. Kept, as AccountKit hooks or evig's own code:
the per-account lockout, the 6-digit address code (it replaces
AccountKit's confirmation mail), IT-Hilfe's claim link (now an AccountKit
reset token, old links honoured), the team invitation claim, the HR hire,
staff permissions and referral credit. Deletion is refused for a super
admin and for a person on kept records.

Migration 143 (additive, idempotent) makes the panel's rename and
deletion reach users. The e2e job imports the seeded accounts before the
journeys and runs a browser journey through every method, with mail
caught by a sink.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 01:39:27 +01:00
CatoandClaude a76f266429 docs(auth): the account journeys are proven live (#653)
Loki's accountkit-switch.yml prove ran on every switched app with
throwaway accounts: two sessions, a row change read on the next request,
a password write ending every session, sign-out, deletion, and a real
browser OrangeCat sign-in where offered. The docs listed these as waiting
on an approved test identity; they now say what was proven, what it
found, and what no machine can prove (a reset mail in a real inbox).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 20:49:00 +01:00
CatoandClaude Opus 5.5 ae54efc68b docs(auth): AccountKit answers sign-in since 2026-11-01 (#650)
* docs(auth): AccountKit answers sign-in since 2026-11-01

The switch ran from loki's accountkit-switch.yml: survey (nobody locked
out), import under locks, AUTH_RUNTIME=accountkit, restart, and a live
proof with a throwaway account. The docs said "staged, off"; they now say
what runs, how to roll back, and what still needs an approved test
identity.

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

* docs(auth): link Loki's switch instead of naming its paths as evig's

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 18:38:17 +01:00
CatoandClaude d71830833e refactor(auth): use AccountKit's compat layer instead of a local copy (#646)
The next-auth/react bridge, its call helper, the session plumbing, the
AUTH_RUNTIME switch, the import rehearsal script and the journey-test cookie
client were copies of code five products each carried. They now come from
AccountKit 0.18.0:

- @bitbaum/accountkit/auth/nextauth-compat answers next-auth/react. The
  product's compat.ts holds only what is its own: the session shape, how each
  password form signs in, its login codes and hooks.
- @bitbaum/accountkit/auth/switch: sharedRuntimeEnabled().
- `pnpm run db:rehearse-import` runs AccountKit's accountkit-rehearse-import
  on this product's import SQL.
- The journeys use @bitbaum/accountkit/auth/compat-testing.

Behaviour is unchanged with the switch off. With it on, a signed-out session
reads as null, and a resolver or hook failure is a readable refusal rather
than a 500. The real-database journeys pass unchanged.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 12:00:51 +01:00
CatoandClaude Opus 5.5 2a8f186326 test(auth): prove nobody waits for an email confirmation (AccountKit 0.16.0) (#639)
* feat(auth): nobody waits for an email confirmation on AccountKit (0.16.0)

AccountKit 0.16.0 makes "sign in now, confirm later" the shared default for
every product (owner decision, 2026-11-01), which was already evig's own rule.
The open decision in docs/ACCOUNTKIT-MIGRATION.md is therefore settled and
removed. Confirming an address still unlocks staff powers (claims.ts).

A journey now runs a runtime that sees a configured mail sender and proves an
unconfirmed account signs in; on 0.15.0 the same test is refused.

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

* fix(deps): take AccountKit 0.16.0 from npm, the artifact the canary runs

The rollout gate holds a consumer until the canary (BiasLens) has deployed
the same artifact. BiasLens runs @bitbaum/accountkit@^0.16.0 from npm; a git
tarball pin of the same release is a different artifact and would wait
forever. Same form as the fleet bot's #640.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 07:44:24 +01:00
CatoandClaude d2fb2a421b feat(auth): stage AccountKit beside Auth.js, switch off (#637)
evig moves from Auth.js to @bitbaum/accountkit one reversible step at a time.
This step adds everything the switch needs and changes nothing while
AUTH_RUNTIME is unset.

- Migration 142: AccountKit's tables under an `auth_` prefix, plus the
  users <-> auth_users mirror functions, inert until attached.
- scripts/db/accountkit-import.sql: copies accounts under their own ids,
  bcrypt hashes byte for byte, OrangeCat actor ids as `orangecat` rows,
  refuses drift or a live shared runtime, then attaches the mirror triggers.
  The rehearsal CLI always rolls back and prints only counts.
- src/lib/auth/shared/: the runtime (ids: 'uuid', legacy bcrypt), a session
  reader in evig's shape, re-read from `users` on every request, and a
  bridge that answers next-auth/react in evig's login codes, keeping
  evig's lockout. Proxy and change-password follow the switch.
- src/lib/auth/claims.ts: the staff/verification rule, written once and
  used by both runtimes. The jwt callback's three copies now call it.
- CI runs the rehearsal and the real-database journeys after the migration
  chain.

docs/ACCOUNTKIT-MIGRATION.md records what is left before switching, chiefly
the unverified-sign-in policy decision.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 06:32:19 +01:00
CatoandClaude c270fc4f63 docs(agents): fold CLAUDE.md and .claude/CLAUDE.md into AGENTS.md (#625)
Both CLAUDE.md files now only point at AGENTS.md, the fleet's one
agent-file shape (bitbaum/fleet scripts/ci/agent-rules.mjs), and the
`@~/.claude/CLAUDE.md` import is gone: a rule that lives on one person's
machine is not the repo's. The engineering rules move into AGENTS.md
(layers, code rules, i18n, database, storefront and QC, ERPs, divisions,
auth, design), with every named path, script and symbol checked against
the tree.

Dropped: the restated mission and org identity (src/config/org.ts is the
producer, as AGENTS.md already said), the API route template, the
copied admin-sections commands, the historical 002b auth migration
instructions, the stack table and the pre-commit checklist (`pnpm run
verify` is the gate). Four docs that sent readers to CLAUDE.md for
content now point at AGENTS.md.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-29 12:54:04 +01:00
Cato 18555942dd feat(auth): one password rule from @bitbaum/accountkit (non-empty, up to 128) (#610)
* feat(auth): one password rule from accountkit (non-empty, up to 128); drop local config, strength checks and hint text

* test(auth): register route test uses the one password rule
2026-10-28 03:59:20 +01:00
Cato 0acd7dbd4e docs: the admin quick reference says the default admin login is local-development only (#613) 2026-10-28 03:50:52 +01:00
CatoandClaude Opus 5.5 e5e43e9444 chore: delete orphaned upcycling code, unused CMS packages, archive retired guides (#575)
* chore: delete orphaned Monitor-Upcycling config, status data and business-plan scripts

The /projects/upcycling pages and businessPlan messages were removed earlier.
Their config (upcycling-routes/-assets/-evidence), status data, the status
helpers, the tests that only covered them, the three businessplan scripts and
the i18n:businessplan script were referenced by nothing else.

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

* chore: delete unused ai-native-cms packages and nextjs-basic example

Neither package was a pnpm workspace member, a dependency, a tsconfig path or
imported anywhere; the lockfile has only the root importer, so it is
unchanged. Drop the now-pointless examples/ ignore entries too. packages/saldo
stays, so the packages/ ignores stay.

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

* docs: archive retired deploy, hosting and CMS guides

github-vercel-setup duplicated the secrets section of deployment.md under a
Vercel name; hosting-migration-frauenfeld planned a move that is done;
migration (Strapi) and the cms-solution and system-integration tombstones
describe setups that no longer exist. Point deployment.md at its own secrets
section instead.

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>
2026-10-19 14:27:23 +02:00
CatoandClaude Opus 5.5 acc2353a2f docs: regenerate API docs, archive dated records, fix live docs (#574)
* docs: regenerate API documentation from src/app/api (329 routes)

The generator only recognised `export async function GET`, so every route
exported as a guarded const (`export const GET = withAdmin(...)`) or a
destructured re-export was missing: the doc listed 116 endpoints, many of
them since renamed or removed, against 329 route files today. Teach it the
other two export shapes and the withAuth/withAdmin guards, and regenerate
both copies.

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

* docs: archive dated audits, compliance trackers and migration proposals

Moves point-in-time records into docs/archive/ (with a README saying they
describe the day they were written): the 2026-01 dev-guide compliance
plan, codebase audit, DRY/SSOT and Phase 1 fix logs, the 2026-02 overnight
cross-project plan, the 2026-07-02 audit report, the 2026-07-06 Shopware
migration plan and system migration strategy, and CODE_AUDIT.md.

CODE_AUDIT.md was listed in .claude/CLAUDE.md, .gemini/GEMINI.md and
docs/README.md as the current list of issues to fix while its own banner
called it a historical snapshot; those entries now point at
docs/AUDIT_BACKLOG_2026-08.md, the list of findings still open. docs/README
also stops linking api/, legacy/ and reference/, which do not exist.

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

* docs: archive closed trackers and docs for removed code

Into docs/archive/: ARCHITECTURE_DEBT (status CLOSED 2026-06-30),
DATABASE_AUDIT (Neon, pre-cutover), UPGRADE_PLAN (2026-06-03 snapshot;
Tailwind 4 and React 19 are done), MIGRATION_PLAN_QQQ5 and
PROFILES_SSOT_PLAN (both executed: migrations 105 and 121/122),
production-ready-checklist (Frauenfeld plan that never shipped), and three
docs whose code is gone: PROJECT_PAGES_GUIDE (src/components/projects and
the per-project pages, now one [slug] route), RevampCopilot (no
src/features/chatbot) and projects/upcycling (the /projects/upcycling
pages and businessPlan messages are no longer in the tree).

Inbound references follow the move, including three code comments.
SHARED_CONTEXT and COMMANDS stop describing the upcycling mini-site as
live; COMMANDS drops db:migrate-users, which is not a script.

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

* docs: correct live docs against the tree

- BLOG_SYSTEM: rewritten from the code. There is no TinaCMS and no
  content/submissions; posts merge content/posts/*.md with blog_posts, and
  submissions are blog_submissions rows reviewed by staff.
- installation guide: rewritten. There is no cms-api, no
  docker-compose.dev.yml and no default admin password; setup is
  services:up, db:migrate, setup-admins, dev.
- RELIABILITY: migration 005b (not 005), no ENABLE_CMS gate, prod facts.
- RESPONSIVE_DESIGN_SYSTEM: ResponsiveSection/Hero/Heading were removed;
  document Section, PageHero and Heading instead.
- DEAD_CODE: the /api/repairers and /api/it-hilfe/helpers proxies and the
  routes.helpers alias are deleted, not 410; fix a stale line range.
- DEV_GUIDE, AGENTS, claude/cursor/gemini guides, .cursorrules:
  DEVELOPMENT_GUIDELINES.md never existed here; protected files are in
  .claude/CLAUDE.md. src/config/site.ts -> org.ts/urls.ts; Next.js 16.
- src/middleware.ts -> src/proxy.ts; components/ui/Button.tsx ->
  src/components/ui/button.tsx; reference page paths.
- docs-paths baseline 68 -> 6, as the check asks when the count falls.

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

* docs: fix dead links in package and example READMEs

ai-native-cms-core linked a Next.js plugin, a CLI and docs/quick-start.md
that do not exist in this repo; ai-native-cms-react has no README; the
saldo README pointed at the repo root instead of the implementation in
src/lib/team/saldo.ts.

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>
2026-10-19 14:10:38 +02:00
CatoandClaude be2f01859d docs: correct drift — evig host, /opt/evig box paths, email provider, CI smoke target (#573)
- Production host is evig.orangecat.ch everywhere a doc presents the current
  address; revampit.orangecat.ch is the retired 308 redirect.
- Box was renamed /opt/revampit -> /opt/evig (systemd evig-app, evig-cron@*,
  evig-backup, scripts/selfhost-deploy-evig.sh); docs and the Layer B list
  still named the old paths and a deploy script that no longer exists.
- CLAUDE.md claimed auth-smoke/inventory-smoke target the old host; CI now
  defaults PLAYWRIGHT_BASE_URL to evig.orangecat.ch, so the redirect has no
  CI coverage. Say so.
- Local dev DB is the Docker Postgres on 5433, not Neon.
- Email is Resend first (src/config/email.ts), not Listmonk/Brevo.
- README: no "Swiss-compliant donation receipts" while in formation; real
  test layout, eight locales, actual CI jobs.
- CONTRIBUTING / PR template / REVIEW: evig name, pnpm, Node 22.13+,
  messages/ path; no donate link to Revamp-IT.
- ARCHITECTURE_QUICK_START: drop the example that granted staff by e-mail.
- Payment setup docs: canonical webhook URLs plus a note on providers
  configured before the rename.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 12:51:27 +02:00
Cato 6c94ad5f25 Stop briefing agents with retired Revamp-IT facts. (#560)
Staff is the is_staff column, and production is one app on Hetzner. The agent brief, the auth doc, and the generated API page still said otherwise, so the next session kept reopening closed work. lint:claims fails the build if those sentences come back.
2026-10-14 05:23:24 -07:00
CatoandClaude 346b19c5b6 ci: the fleet's file-input check runs in verify (#542)
Adds @bitbaum/chatkit (dev only — evig has no chat) for its
chatkit-check-file-inputs bin, and `check:file-inputs` to `verify`, which
CI runs verbatim. It fails any file input whose literal accept mixes image
and document families, the shape that made Android show a capture-app
chooser instead of the file browser (SourceUploader, fixed in #537).

Pinned to the merged chatkit 0.4.1 commit until it is on npm.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-07 05:18:17 -07:00
CatoandClaude 69022040d9 feat(records): ROADMAP.md, CHANGELOG.md and a public /roadmap read from the fleet map (#522)
evig joins the fleet's building-in-public record contract. The record lives
in this repository as two markdown files; Loki's fleet map ingests them and
the site renders them from the map, so there is one source and no local copy
that can drift.

- ROADMAP.md at the root, Now / Next / Later / Shipped with milestones,
  derived from CLAUDE.md, docs/ and the git history. No dates. The honesty
  boundary holds: the Verein is "in Gründung", nothing claims receipts or a
  recognised non-profit status.
- CHANGELOG.md at the root in Keep-a-Changelog form, generated from the same
  releases src/config/changelog.ts renders at /changelog; that config now
  states the root file is the canonical record and must move with it.
- /[locale]/roadmap renders profile.roadmap from
  loadDevelopmentProfile(fleet map, "evig") with evig's own chrome
  (PageHero, Section, Card) — the data is the map's, the markup is ours, so
  the card-shell ratchet holds at 3. Fetch revalidates every 300s with an 8s
  timeout. A null profile says the record is temporarily unavailable; an
  empty one says nothing is recorded yet.
- Labels for the page and the footer link in all eight locales, DE canonical.
- Footer links the roadmap next to the changelog; both are in the sitemap.
- Unit test for the data path over a fleet-map fixture through
  developmentProfileFromMap, grouping, progress and the fetcher's cache
  semantics.

Until Loki's producer change deploys, the live map carries no evig records
and the page shows "nothing recorded yet" — expected.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-28 04:37:09 -07:00
CatoandClaude Opus 5 65ed27a08c fix(e2e): stop shipping the two E2E login addresses as defaults (#491)
The E2E personas are real accounts on a real deployment, and every place
that needed one carried it as a literal in a public repo: a fallback in
scripts/e2e-inventory-prod.sh, four `|| '...'` defaults across the e2e
specs and their auth helper, a workflow header comment, and two docs
tables. The repo therefore published whose accounts they are — and the
defaults were dead weight besides: CI has supplied both addresses from
the repository secrets of the same name since they were created, so the
literals were an unreachable branch that only ever leaked.

Now there is no default anywhere. The addresses come from
AUTH_TEST_USER_EMAIL and AUTH_TEST_ADMIN_EMAIL, both existing repo
secrets, and the absence of one is an error rather than a quiet
substitution:

- scripts/e2e-inventory-prod.sh requires both with `:?` naming the
  secret. The "no passwords configured, skip" path still runs first, so
  an unconfigured checkout is unaffected.
- The two consuming jobs guard first and fail with `::error::` naming
  the missing secret, instead of dying inside bash or playwright.
- The specs skip a persona when its address is unset, the same way they
  already skip on a missing password, rather than attempting a login
  with an empty e-mail and reporting it as a broken page.

Unchanged: the e2e-local job, which sets all four addresses to its own
seeded @evig.test fixtures at job level, so the defaults were never
reached there either.

Not addressed here, and still in the tree: the owner's address in the
SUPER_ADMIN_EMAILS allowlist (plus its assertions and the applied SQL
migrations that reference it), and the public contact address in
src/config/org.ts, which is published on purpose. Those are identity and
data, not E2E credentials, and removing them is a separate decision.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 03:27:12 -07:00
CatoandClaude Fable 5.1 e2c67d8aa5 chore(cleanup): dedupe migrations, blog scripts, i18n baseline; rate limiting over limitkit; no-console (#488)
* chore(db): empty the two byte-identical duplicate migrations instead of skipping one

004_ai_inventory_system.sql and 005_messaging_system.sql were 402- and
295-line copies of 004b and 005c (the originals were renamed with a suffix
in 21a6b2477, then re-added unsuffixed in e920eb231). Both names are
recorded in production's schema_migrations — backfilled by
083_backfill_schema_migrations.sql, which lists all four filenames — so
neither file can be deleted without a restore-from-backup audit reading it
as a vanished migration.

The bodies are gone; each file keeps a comment with the history. Applied
as a no-op, so the MIGRATION_SUPERSEDED skip list in migration-order.sh
(which existed only because 005's unguarded CREATE TRIGGERs aborted a
second application) is no longer needed and is removed from all three
runners' comments. The deploy script was not run; evidence is read from
the migration files and the runner sources only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

* chore(scripts): delete the Strapi-era blog and docker setup scripts

scripts/setup-blog.sh and scripts/start-blog.sh were byte-identical copies
of tools/development/setup-blog.sh and start-blog.sh; all four drove a
Strapi blog that no longer exists (the blog is DB-backed, no compose file
has a Strapi service, and .gitignore's /strapi entry pointed at nothing).
tools/development/docker-setup.sh was the wrapper around the same stack.
Nothing in package.json, CI or the docs invoked any of them; the one
prose mention in docs/guides/system-integration.md now says so.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

* fix(i18n): baseline states each missing key once, not once per locale

scripts/baselines/i18n-missing.json listed the same ~90 keys under each of
six locales — six near-identical blocks that jscpd flagged as the repo's
largest clone group. The generator now writes one entry per key naming
the locales it is missing from; the audit converts back to the per-locale
view it compares against, so its regression semantics are unchanged
(0 new, 0 fixed on regeneration).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

* refactor(security): one rate limiter over limitkit, lockout kept apart

Two hand-rolled limiters served ~20 routes each: an lru-cache counter in
lib/security/rate-limit.ts and a bare-Map window in lib/auth/rate-limiter.ts.
Both are replaced by the fleet's limitkit (SHARED.md); evig keeps only its
limit VALUES and the call shapes routes were written against, so no route
changed beyond its import. The auth file's account-lockout half — a
per-account, DB-backed state, not rate limiting — lives on as
lib/auth/lockout.ts. AUTH_CONFIG.rateLimit moves next to the other limits
as AUTH_RATE_LIMITS; lru-cache is dropped.

Behaviour that changed underneath, deliberately: sliding windows instead
of a TTL that restarted on every hit, refusals no longer count (a hammered
key recovers when the attacker stops), the client IP is the last
X-Forwarded-For hop (the one Caddy wrote), and the store is bounded. The
login limit was "5 per 15 min then a 30-min block"; limitkit does not
model a punitive block, so it is 5 per sliding 30 minutes — the same
steady-state admission.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

* chore(lint): no-console in src/, and a useMounted hook for the SSR mount flag

App code logs through src/lib/logger.ts, the one console sink. ESLint now
enforces no-console (warn/error allowed) across src/, with the logger and
tests carved out; scripts/ are CLIs whose stdout is their output and stay
uncovered.

Four components each carried a useState(false)+useEffect(setMounted(true))
pair with a react-hooks/set-state-in-effect exception. They share one
useMounted() built on useSyncExternalStore, which needs no effect and no
exception.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 22:42:11 -07:00
CatoandClaude Fable 5.1 43eeb203fc chore: rename FleetCrown to Loki (#476)
The product was renamed on 2026-09-14: bitbaum/loki, loki.orangecat.ch,
LOKI_* env keys, loki-* units. This repo referenced the old name in
21 files changed, 30 insertions(+), 30 deletions(-).
Email addresses at the old sending domain stay until the new domain is
verified in Resend.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 16:23:26 -07:00
894b203602 docs: sync docs with actual stack (#447)
Docs truth-sweep against ground truth (package.json, CI workflows):
- npm → pnpm across evergreen docs (pnpm 11.25.0 is the package manager;
  npx tsx → pnpm exec tsx, npx ts-prune/jscpd → pnpm dlx, npm ci →
  pnpm install --frozen-lockfile, package-lock.json → pnpm-lock.yaml)
- Jest → Vitest in README, CONTRIBUTING, COMMANDS (vitest 4 is installed)
- Node claims: README 20+ → 22.13+ (engines) with CI/deploy on 24;
  deployment.md "Setup Node 20 (npm cache)" → Node 24 (pnpm cache), and
  the pipeline line now shows `pnpm run verify` as CI actually runs
- TypeScript 5.x claims → 6 (typescript ^6.0.3); Next.js 14 → 16 in
  BLOG_SYSTEM, guides/ARCHITECTURE, AI_BOT_SYSTEM_PROMPT
- COMMANDS.md: dropped nonexistent `dev:cms` script; services list fixed
  to db/meilisearch/listmonk (no redis in compose)
- HR_RUNBOOK: `npm run test -- src/…` → `pnpm run test src/…` (pnpm
  passes args without the `--` separator)

Historical records (docs/archive/**, dated audit reports, UPGRADE_PLAN)
left as-is — they describe what was true when written.


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

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-04 15:01:39 +00:00
ba754f6508 chore(deploy): rename revampit infra references to evig (#430)
* chore(deploy): rename revampit infra references to evig

The GitHub repo was renamed revamp-it -> evig a while back and the
domain/Caddy layer already points at evig.orangecat.ch (with a 308 from
the old revampit.orangecat.ch), but the self-host deploy pipeline was
still targeting /opt/revampit and the revampit-app systemd unit. Renamed
the deploy script, CI's throwaway fixture names, and the smoke-test
default URLs to match. The systemd unit + /opt directory on the box were
renamed to evig-app / /opt/evig directly, verified live (200 before and
after).

Left untouched: production database names/users (revampit_cms etc. in
rollback-production.sh, monitoring-setup.sh, check-services.sh) and the
revampit-cron@*.timer / revampit-backup units — those are a separate,
higher-stakes rename.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG

* chore(deploy): point deploy pipeline + CI fixtures at evig, not revampit

The GitHub repo was renamed revamp-it -> evig a while back and the
domain/Caddy layer already points at evig.orangecat.ch (with a 308 from
the old revampit.orangecat.ch), but the self-host deploy pipeline was
still targeting /opt/revampit and the revampit-app systemd unit. Updates
the deploy script's NAME var, CI's throwaway fixture names/emails, and
the smoke-test default URLs to match. The systemd unit + /opt directory
on the box were renamed to evig-app / /opt/evig directly, verified live
(200 before and after, zero downtime).

Left untouched: production database names/users (revampit_cms etc. in
rollback-production.sh, monitoring-setup.sh, check-services.sh) and the
revampit-cron@*.timer / revampit-backup units — those touch live data
and a schedule (one timer looks like it releases escrow), so they're a
separate, higher-stakes rename flagged for a deliberate go/no-go rather
than folded in here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG

* fix(docs): point deploy-script docs at the renamed evig script

The rename to scripts/selfhost-deploy-evig.sh left 5 docs pointing at the
old filename, tripping the docs-paths CI gate (stale count rose 68 -> 73).
Fixed the references; net stale count actually fell to 65, so lowered the
baseline in the same PR per the gate's own instruction.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG

* fix(ci): correct the docs-paths baseline back to 68

My previous commit set this to 65 based on a local run that was reading a
dirty working tree (leftover untracked files were falsely satisfying 3
path checks). Verified against a truly clean clone of this branch: the
real count, after the doc-path fixes, is 68 — unchanged from main, since
this PR only touches the 5 revampit->evig references and leaves the
pre-existing unrelated stale docs alone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG

---------

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-02 10:37:38 +02:00
GandClaude Opus 5 706bd35500 docs: record the page walk — what it found and why greps could not (#392)
The backlog described two rounds; there have been three. The third came from
opening all 33 public pages in a browser instead of reading the code, and the
distinction matters enough to write down: greps and typechecks were green
throughout, while the site was serving donation buttons pointing at another
organisation, two nav entries rendering <a href="">, a 404 in the live FAQ,
a tenure claim on an org founded two years ago, and three different causes of
one doubled page title.

Records what the refocus settled (services catalogue, Über uns, navGroup as
the placement SSOT) so it is not re-litigated, and adds the four gates from
this pass — each mutation-proved, because a gate that has never been seen red
is a claim rather than a check.

Two items promoted to "needs a human decision", both because they are claims
about the world that the repository cannot answer:

  - Praktikum + Wiedereinstieg name HEKS, AOZ and two municipalities as
    partners. If evig runs those programmes they belong with pillar 4 and
    deserve prominence; if they came across with the code, naming four real
    organisations is worse than merely off-thesis.
  - /karriere is invisible to nav, footer and sitemap, and carries the only
    hardcoded-German PageHero on the site, so it is also the one page that
    cannot be translated.

And education is now stated as the biggest gap rather than a bullet: George
has said teaching will be a large part of what evig does, and /workshops
renders "0 Workshops" while /blog renders nothing. The seeded workshops use
legacy category strings matching none of the ten canonical ids, are written
in formal "Sie" against the site's "du", and have no instances outside
e2e-seed.ts — so even with rows there would be no dates and no registration.

New process notes: a cancelled deploy is not a failed one (a newer merge
supersedes it, and a watcher checking only "not success" cries wolf), and
measure the rendered output rather than reasoning about the framework — two
of the three doubled titles were missed by reasoning about Next's
title.template and found by curling <title>.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 23:41:22 +02:00
GandClaude Opus 5 dcf832eb6f docs: refresh the audit backlog for the refocus, and record five gate blind spots (#384)
The backlog described the state before the 2026-08-25 refocus, so a session
reading it would have re-derived findings that are already fixed and, worse,
re-litigated decisions that were deliberately made.

Records what the refocus settled (divisions removed, repairs → technicians,
five pillars, no printers, the charity line) as "do not re-litigate", and
keeps the genuinely open items.

The section worth reading is the gate blind spots, all five learned the hard
way in this pass:

  - The i18n wrong-language detector cannot separate sibling Romance
    languages. Ten correct Spanish/Italian strings were flagged, every one
    scored `own 0` — the words are simply absent from its word list for that
    language, so it falls through to whichever sibling has a hit. Read before
    accepting; a flag does not mean a bad translation.
  - `lint:chrome` greps `rounded-(lg|xl)`, so `rounded-2xl` slips past. The
    abos skeleton hand-rolled a card shell for months, unseen.
  - A missing-key audit cannot see a WRONG value. `itHelp.hub.subtitle` sat as
    literal English in five locales with the key present, so nothing flagged
    it. Only reading the rendered page found it.
  - Dead-key detection must grep the NAMESPACE PREFIX, not just call sites.
    `home.newsletter` appears in no `t()` call in page.tsx and is very much
    alive via `useTranslations('home.newsletter')` in another component.
  - A CONFLICTING PR runs no CI at all. #380 went DIRTY and only Snyk
    reported — which passes on everything — so it read as "waiting on CI"
    rather than "will wait forever". Check `mergeable` first.

Also records that background `npm run verify` runs get killed in this
environment (five times, no OOM, 12 GB free) and that `setsid nohup` survives,
and that CI green is not live — every merge in this pass was re-probed against
production, which is how the stale divisions subtitle was caught rendering
under a heading that correctly read "3 Bereiche".

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 22:33:58 +02:00
GandClaude Opus 5 f6b9a73b8b feat(brand): evig repairs becomes evig technicians, and evig stops asking for printers (#382)
Three changes from the same focusing pass, all of them cases where the copy
described an organisation the code had already outgrown.

## The division is named after the person, not the service

`evig repairs` → `evig technicians`. "Repairs" names what happens; a user is
looking for someone who will do it. The surface has worked that way for a long
time — post a request, receive offers from technicians nearby, choose one, with
a budget filter that already splits "Gratis / Community" from "Mit Budget" —
only the naming lagged behind the product.

Contained to `src/config/divisions.ts` plus the `divisions.items.<id>` key in
eight locales, because the wordmark is composed (`${ORG.name} ${id}`) and every
consumer derives from the array. No component changed.

## IT-Hilfe stops promising charity

The page called itself "Kostenlose Community-Reparatur" and said "kostenlos"
three times over: meta title, meta description, subtitle, tagline. That framing
does two bad things at once — it hides the marketplace the code implements, and
it forecloses the half of the model where a technician actually earns. Rewritten
to what it is: describe the problem, get offers, choose. "Über die Community
gratis oder fair bezahlt" keeps the free path visible without making it the
whole promise.

Fixed alongside: `itHelp.hub.subtitle` was stored as literal ENGLISH in es, fr,
it, ja and ko. Not a missing key — a wrong value, so no fallback could catch it
and no missing-key audit could see it. Five locales showed an English sentence
in the middle of a translated page.

## No more printers

The donation pages solicited "Laptops, Desktop-PCs, Monitore, Tastaturen,
Mäuse, Drucker" while the new homepage copy says evig does not deal in
printers. One of the two had to go. A printer is the archetype of what evig
deliberately does not take: low value, hard to refurbish, and — per
co2-impact.ts, which already refuses to publish a factor for the category —
without a defensible open number, so we could not even honestly claim a saving
for keeping one alive. GPUs take their place in the list, which is what the AI
thesis actually needs.

The erfassung category '60' (Drucker & Scanner) deliberately STAYS. Existing
inventory rows point at it, and deleting a category that historical records
reference would corrupt them. Not soliciting new ones is the change; rewriting
the past is not.

## /revamped deleted

294 lines selling "die REVAMPED-Zertifizierung … unser exklusives REVAMPED-
Label" — the previous organisation's name, as a product label, after the
rebrand. It was orphaned from nav and footer but still listed in the sitemap,
so it was indexable. It also advertised a certification for computers "we
build" on behalf of a service flagged `available: false`, and its inbound CTA
copy had sat unmaintained long enough to contain a German grammar error ("Hol
sich deine" for "Hol dir deine"). Page, messages, sitemap entry and the
inbound certification block are all gone. If evig wants a quality label later,
it belongs on the QC Prüfsiegel the intake pipeline already produces.

Also removed `ROUTES.public.transparenzKennzahlen` — a route constant used by
nothing, pointing at a page that deliberately calls notFound().

## One baseline moved, deliberately

Two new "wrong language" findings, both false positives of the same kind as the
last batch: "Trovare un tecnico" (correct Italian) and "Encontrar a quien lo
repare" (correct Spanish), each scored `own 0` because the words are absent
from the detector's own word list for that language. Verified by reading, then
accepted.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 20:07:56 +00:00
GandClaude Opus 5 374f4ed875 refactor(brand): drop evig architecture + health, and the "not a charity" line (#379)
Two divisions leave the site. `evig architecture` and `evig health` were real
research, but they were George's research, not evig's work, and carrying them
here cost the one thing a young organisation cannot spare: a reader being able
to say in one sentence what evig does. They now live as projects on
orangecat.ch ("Building for the Ruin", "Healthspan and Preservation").

Because EVIG_DIVISIONS is the only list, removing the two entries is the whole
change on the render side: the homepage hero rail, the divisions section and
its ICU {count}, the footer column and the nav entries all follow with no edit
of their own. That is the SSOT paying for itself — a five-division site became
a three-division site without a single hardcoded number to hunt down.

Also removed, per the same focusing pass:

  - `/architecture` and `/health` routes, their ROUTES entries, and their
    'architecture'/'health' theme keys in SECTION_KEYS.
  - divisions.items.* and divisions.pages.* for both, in all eight locales
    (912 lines of message JSON).
  - The "we are not a charity" framing. It appeared as
    about.mission.paragraph1 and vision.diff.intro (plus README and
    EVIG_STORY), and it had gone stale: it was an over-correction away from
    Revamp-IT's specific charity-recycling model, and it now contradicted
    evig's own legal page, which says gemeinnütziger Verein in Gründung.
    Defining yourself by what you are not is weak copy anyway. It states the
    positive instead — and keeps "in Gründung", the honesty boundary that no
    recognised tax-exempt status is claimed until the Verein is registered.

Docs updated in the same commit (CLAUDE.md brand table, EVIG_STORY divisions
section) with a note not to reintroduce the two, so the next session does not
read a doc describing a site that moved on.

npm run verify green: lint, umlauts, chrome, docs, compliance, typecheck,
7747 tests, production build.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 17:32:12 +00:00
GandClaude Fable 5 4553102879 test(e2e): wire three never-run specs into CI, and make the security one real (#377)
* test(e2e): wire three never-run specs into CI, and make the security one real

The e2e-local job runs 'tests/e2e/*journey.spec.ts'. Nine specs are not
named *journey, so nothing ran them — anywhere, ever. I ran all of them
against a locally seeded instance before wiring any, which is the only
reason this PR is three specs and not nine.

Wired (41 assertions that were running nowhere):
  security            4 tests — rewritten, see below
  notification-hrefs  21 assertions, green as-is
  user-admin-flows    16 assertions, green after one fix

security.spec.ts was a STUB and wiring it as-written would have been
worse than leaving it out: two of its four tests had comment-only bodies
('Would need to fill and submit form 6 times'), a third asserted only
inside an isVisible() branch, and every one called test.skip() when
redirected to login — which /it-hilfe/create always does signed out. In
CI it would have reported a green 'security' check while exercising
nothing. It now asserts the closed side of the authorization boundary: no
admin page renders and no admin/money API answers 2xx to a signed-out
request, and a refused response carries no user data. Proven by mutation
— adding a public route to the protected list turns it red.

user-admin-flows addressed routes as /de/x. The app 307-redirects those
to /x, and when that races the client router Playwright aborts the
navigation (net::ERR_ABORTED) — indistinguishable from a broken page.
It cost three wrong hypotheses (concurrency, then state residue, then a
fresh database) before I read the error. Now uses the canonical paths,
which is where the redirect lands and what users actually see.

NOT wired, with reasons rather than silence: marketplace, it-hilfe,
appointments, payment-return and timecards fail against the current app —
marketplace expects an h1 of 'Marketplace' and the text 'gebrauchte
IT-Geräte', which is pre-rebrand Revamp-IT copy. dashboard-timecards
skips its only test. Specs nothing runs rot; these did. Recorded in
docs/AUDIT_BACKLOG_2026-08.md.

Verified: 3 consecutive green runs of the bundle, typecheck, lint, docs gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: record which never-run E2E specs rotted, with the triage evidence

Three are now wired; the other six are not, and the table says why rather
than leaving a silent gap. marketplace expects pre-rebrand copy, and
dashboard-timecards skips its only test. it-hilfe is the best next
candidate — 10 of its 14 tests already pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(e2e): the signed-out security spec was running signed IN

CI rejected the previous commit and it was right to. playwright.config.ts
sets storageState globally, so every context — the page AND the request
fixture — inherits a saved login unless a spec says otherwise. My
'authorization boundary (signed out)' tests therefore ran authenticated:
/api/invoices, /api/admin/users and /api/admin/refunds all answered 200,
and the spec reported the doors were open.

They passed locally only because no saved-session file exists there. That
is the worst kind of green: right answer, wrong reason, and dependent on
which machine you run it on.

Both specs now force an empty session explicitly. For security.spec.ts
that line IS the test — a signed-out check carrying a session asserts
nothing about the closed side of the boundary.

Same root cause fixed notification-hrefs: it probes whether a ROUTE
exists using a dummy UUID matching no record. Signed out, an auth
redirect answers that without touching the database. Signed in, the admin
page renders and correctly 404s on the missing record — so it reported
'notification deep link is broken' when nothing was broken.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 16:32:41 +02:00
GandClaude Fable 5 b191157be0 docs: record the 2026-08-24 audit backlog and gate limitations (#375)
Nine PRs shipped from this audit. This file keeps what is still OPEN so
the next session starts from the findings instead of re-deriving them:
the pci-compliance decision (payment routes have NO rate limiting, so
neither deleting nor wiring it is obviously right), the five ratchet
baselines and what they mean, and — importantly — where the gates are
BLIND, so nobody reads a green run as a clean codebase.

Also lists the lower-severity findings the five audit sweeps produced but
this pass did not fix: workshop capacity oversell, commission computed 4x
with 3 copies missing the is_revampit exemption, an order-completion rule
stated three ways, two live rate limiters, 86 hex literals in a second
token source, and nine E2E specs no CI job runs.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 20:46:09 +00:00
GandClaude Fable 5 fe811bcfc2 docs: correct the design-system section that described a deleted file (#370)
CLAUDE.md carried a full 'Layer 2 — tailwind.config.ts' section for a file
Tailwind v4 removed, plus a token table naming --color-bg / --color-surface
/ --color-border (zero occurrences in globals.css; the real names are
--surface-base, --text-primary, --border-default), a dark-mode mechanism
that does not exist (it claimed @layer utilities auto-remaps bg-white —
globals.css contains no 'bg-white'), and a green #f0fdf4..#14532d palette
for a brand that is Ion Lime. Five false claims in sixty lines, in the
file every agent session reads first.

Also corrected: Tailwind 3.4 -> 4 and React 18 -> 19 in the stack tables;
the .claude/CLAUDE.md ADMIN_SECTIONS table (10 rows, wrong paths, ids that
no longer exist — 'products' and 'finances' are gone, and granting
'workshops' grants nothing because the admin section is 'workshops-admin')
replaced by a pointer to sections.ts and the two rules that do not change;
the dev-DB row that said Neon while CLAUDE.md said Docker:5433;
002-simplified-auth.sql -> 002b-; repairer_profiles -> technician_profiles
(renamed by migration 105); and a Revamp-IT street address in
SHARED_CONTEXT that org.ts explicitly forbids publishing.

scripts/ci/docs-paths-exist.sh closes the class: every backticked repo path
in the docs must exist. CLAUDE.md, .claude/CLAUDE.md and README.md are held
at ZERO; the 68 stale references in older reference docs are ratcheted so
they can fall but never rise. Historical plans and audits are excluded —
a June plan naming files that later moved is history, not a defect.
Proven by mutation: a planted bad path in CLAUDE.md exits 1.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 20:33:37 +02:00
GandClaude Opus 5 de244172ff fix(email): the relay says 250 and the mail goes nowhere (#311)
* fix(vote): give the "sign in to vote" error the door it names

The vote-auth fix (#305) tells someone whose email belongs to an account to
sign in, and then leaves them standing there. This repo's own rule is that
every stated problem links to where it is fixed — a warning without a way out
is a dead end.

The reason it shipped without the link was that apiFetch flattens every
failure to a bare { success, error } string. The only way for the UI to know
WHICH failure it got was to match the German sentence, and branching on prose
breaks the first time someone rewords or translates it. So the fix is one
level down: give the envelope a machine-readable code.

  ERROR_CODES        one SSOT for codes, next to ERROR_MESSAGES. Add one only
                     when the interface must DO something different — the
                     message is for the human, the code is for the UI.
  apiBadRequest      optional third argument, omitted from the body when unset
  ApiResponse.code   optional, so all ~100 existing callers are untouched
  apiFetch           passes a string code through; ignores a non-string one
                     rather than handing junk to the UI

The vote page now renders "Anmelden" as a link to loginUrl beside that error,
reusing the string already there for the success panel — no new i18n keys, so
no locale can desync.

Tests assert the passthrough and the omission, and I checked the passthrough
test fails with the apiFetch change reverted (1 of 14) rather than assuming a
green suite meant something. The route test now pins the code, using a mock
that actually forwards the third argument — a mock that dropped it would have
made the assertion vacuous.

5963 tests green across 440 suites; eslint and the umlaut linter clean.

* fix(vote): the one live decision could not be voted on at all

Found by opening the real share link at 390px while verifying #307, not by
any test. The page drew "Deine Stimme" and then nothing. Submitting answered
"Stimmdaten erforderlich". There was no ballot, and nothing on screen said
why.

`thumbs_up_down` has been in VOTING_METHODS all along, with a zod schema, a
validator and a tally on the server — and no branch in either voting surface,
and no case in useVoteState's switch. buildVoteData() fell through to
`undefined`, which TypeScript allows because the switch had no default and
the return type is `unknown`. So the absence compiled, rendered blank, and
failed at the server. Production's only decision uses that method.

Fixed on both surfaces — the public share-link page and the members'
VotingPanel — with one component, and the choice labels in config beside the
other methods' rather than typed into JSX. No default selection: a thumbs
vote is a single deliberate tap, so pre-selecting "Dafür" would submit an
opinion the voter never expressed.

Two guards, because the compile-time one alone would not have caught this:

  useVoteState  a `never` exhaustiveness default — a method with no case is
                now a build error rather than a silent undefined
  ballot-coverage.test.tsx  renders EVERY entry in VOTING_METHODS and asserts
                the ballot contains something interactive. A missing render
                branch is absence, and absence is what the switch guard cannot
                see. It iterates the config, so it cannot drift from it.

Checked the coverage test fails with the branch removed (thumbs_up_down only,
6 of 7 still passing) rather than trusting a green suite.

7747 tests green across 529 suites; eslint and the umlaut linter clean.

* fix(email): the relay says 250 and the mail goes nowhere

Sent a probe from the production host through the configured relay to a real
mailbox. The SMTP conversation was flawless — EHLO, STARTTLS, AUTH, accepted —
and the message never arrived. Not the inbox, not spam, not trash.

The cause is the sender domain. EMAIL_FROM in prod is noreply@revampit.ch,
which has no SPF record and no brevo._domainkey DKIM record. Brevo accepts mail
from a domain it has not authenticated and then drops it, so every layer
reports success and the inbox stays empty. Searching the recipient mailbox back
through its whole history finds no application mail at all: every revamp-it.ch
message in it is human mail from colleagues via the org's own server. evig's
transactional email has never worked.

scripts/test-email.ts could not have caught this. It mailed only itself, and it
called a relay handoff "Email sent successfully!". So it is rebuilt to answer
the question that matters:

  - takes the recipient as an argument instead of sending to EMAIL_FROM
  - resolves the sender domain's SPF, DKIM and DMARC before sending, and says
    plainly that an unauthenticated domain will vanish despite a 250
  - refuses to describe acceptance as delivery

The DKIM verdict is deliberately relay-aware. Selectors are chosen by the
provider and cannot be enumerated from DNS, so a missing selector is only
conclusive when we know which one to expect — Brevo documents brevo._domainkey.
Against any other relay an unknown selector is reported as inconclusive, not as
a failure. Checked both ways: google.com is flagged when sending through Brevo
(true — it has no Brevo key) and is not flagged otherwise.

Nothing here fixes delivery. That needs a sending domain that exists and is
authenticated with the provider, which is a purchase and a DNS change, not a
code change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs: the canonical host moved, and the redirect to it must keep the method

revampit.orangecat.ch now redirects to evig.orangecat.ch, so every doc that
called the old host "where this codebase runs" was pointing at a redirect.

It was added as `redir ... permanent`, which is 301, and 301 does not preserve
the HTTP method — a POST arrives as a bodyless GET. Auth.js then answered
InvalidProvider ("Callback for provider type (credentials) is not supported"),
because a GET on a credentials callback is not a thing. Browser traffic never
noticed: it lands on the canonical host and posts there. Only non-browser POST
clients broke — the CI auth smoke, API callers, and any webhook still aimed at
the old host. Fixed on the box by making it a 308; documented here so it is not
reintroduced.

Also records why auth-smoke and inventory-smoke deliberately point
PLAYWRIGHT_BASE_URL at the OLD host: that is what exercises the redirect, and it
is how this was caught. Repointing them at the canonical host would turn a real
gate into a green one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 20:30:06 +00:00
GandClaude Fable 5 8b76fcdf7f fix: blog reader experience + GTM/distribution layer (#301)
* fix(blog): real 404s, retired-slug 301, locale dates, translated categories, index SEO

- Scope the blog index loading.tsx into an (index) route group so
  /blog/[slug] no longer streams under a Suspense boundary — notFound()
  now returns a real HTTP 404 with the shared not-found UI instead of a
  blank 200.
- 301 the retired slug die-revamp-it-plattform to /blog via
  RETIRED_POST_REDIRECTS (config SSOT) + locale-aware permanentRedirect.
- formatDate() accepts the active app locale; blog surfaces (hero, lists,
  featured grid, post header, related, comments) pass it so dates follow
  the page language. Non-blog surfaces stay de-CH.
- Category chips translate via blog.categoryLabels in messages/ (key list
  SSOT in BLOG_CATEGORY_KEYS, fallback to raw name), all 8 locales.
- BlogFeaturedGrid cards now show the publish date.
- Blog index generateMetadata gains canonical, hreflang languages,
  og:image and Blog JSON-LD; post pages gain RSS feed autodiscovery.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(content): new post "Der Kreislauf braucht ein Schaufenster" + GTM one-pager + social drafts

- New blog post (DE + EN, 2026-08-13): the circular economy needs a
  distribution side — the marketplace as the missing half of the loop.
- docs/GTM_2026-08.md: distribution one-pager — ICP, shortest path to a
  first paying customer (marketplace via Payrexx, BTCPay pending server
  provisioning), channel rollout (blog/RSS → Listmonk newsletter →
  Mastodon → LinkedIn → local Swiss), weekly cadence, honest metrics.
- content/social/queue.md: Mastodon + LinkedIn DRAFTS (DE + EN) for the
  new post and 3 strong existing posts; George approves before posting.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 22:09:47 +02:00
GandClaude b508e9a0df feat(brand): evig divisions — computers, repairs, ai, architecture, health (#300)
evig is one organisation said at rising scale: keep something useful for
longer. The site never stated that. The homepage described surfaces ("Shop,
Community-Marktplatz, Werkstatt und Techniker-Netzwerk") and burned its whole
first mobile screen on a badge and two buttons.

Adds EVIG_DIVISIONS as the single source for the brand architecture. The
homepage hero rail, the divisions section (including its count, via ICU
{count} rather than a number typed into a message), the footer column, the nav
entries and the division pages all derive from it. Wordmarks compose from
ORG.name, so "evig health" is never a literal.

A division is a lens, not a second storefront: computers and repairs point at
/marketplace and /it-hilfe, which already serve them. The three with no home
get pages through one shared DivisionPage component — hero, thesis, numbered
strands, honesty boundary, CTA — so a fourth adds a config entry, not a fork.

  evig architecture (research) — build so the ruin still reads. Material that
  ages instead of decaying, structure you may see, parts that come apart. The
  laptop question at building size: is it what it says it is, and can it be
  opened, repaired and passed on?

  evig health (research) — the longest-lived thing we want to keep is a
  person. Healthspan, memory that belongs to the person, and continuity of
  what someone knew, with consent given in life.

Both are marked research and sell nothing, and each page states what it is NOT
before its CTA: health is not medicine and promises no immortality and no copy
of a person; architecture is not a practice and gives no structural advice.
That block is required, not decorative — it is what makes the ambition sayable.

Mobile: the hero fold forced 88vh and centred a short block inside it, so the
first screen was mostly empty and the second CTA landed under the FABs. Height
now follows content on phones; the full fold returns from sm: up.

Copy is written in DE and translated into all eight locales, structure in
config and strings keyed by division id — no arrays in the message files.

Validated: typecheck, lint (0 errors), lint:umlauts, production build, jest at
baseline (16/31 pre-existing failures, unchanged), i18n audit unchanged, and
the design-system greps (no hex, no shadow-lg, no hand-rolled card shells).
Rendered and screenshotted at 390px and 1280px; no horizontal overflow.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-12 11:04:09 +00:00
GandClaude Opus 5 6e9496eb00 fix(auth): evig owns its own admin + docs(legal): Verein founding documents (#270)
* fix(auth): remove Revamp-IT super admins from evig, DB is the SSOT

evig separated from Revamp-IT on 2026-07-24, but three Revamp-IT accounts
(andreas@, veronica@, daniel@revamp-it.ch) were still hardcoded in
SUPER_ADMIN_EMAILS. isSuperAdmin() resolves that list by e-mail alone,
bypassing the database entirely, so each of them held full access to
evig's sensitive sections (users, finances, settings) — and the demotion
guard in PATCH /api/admin/users/[id]/permissions explicitly refuses to
demote anyone on the list, making them un-removable through the UI.

- SUPER_ADMIN_EMAILS reduced to the owner only. It is a bootstrap FLOOR
  so evig can't lock itself out; users.is_super_admin stays the SSOT and
  is how every other super admin is granted.
- Super-admin is now checked BEFORE the is_staff gate in
  canAccessSection/canAccessSensitive/getAccessibleSections, so a cleared
  is_staff flag can't lock the owner out of their own admin.
- STAFF_EMAIL_DOMAIN derives from ORG.emailDomain (evig.ch); the legacy
  Revamp-IT domains move to LEGACY_STAFF_EMAIL_DOMAINS so existing logins
  keep working until the Layer B infra cutover.
- Docs corrected: staff has been DB-granted (never domain-derived) since
  the permissions-v2 hardening, but .claude/CLAUDE.md still documented
  "anyone with @revamp-it.ch email is staff", which was simply false.

Regression guard added: the removed Revamp-IT addresses must return false
from isSuperAdmin().

Verified: typecheck clean, lint 0 errors, 156 auth/permission/user tests
pass. The 25 pre-existing failures in src/config/__tests__ reproduce
identically on main and are untouched by this change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs(legal): add evig Verein founding documents

Draft Statuten + Gründungsprotokoll for founding evig as a gemeinnütziger
Verein with seat in Zürich, plus the operational checklist.

The statutes are drafted so that (a) the tax-exemption application to the
Kantonales Steueramt Zürich can be filed on the first attempt, and (b) a
later spin-out of the commercial arm into a GmbH needs NO amendment.

Exemption-critical clauses (ESTV Kreisschreiben Nr. 12, § 61 lit. g StG):
- Art. 2: idealistic Zweck, explicit "kein Erwerbszweck", economic activity
  admitted only as "Mittel zum Zweck und nie Selbstzweck", and directed at
  the Allgemeinheit rather than members (Uneigennützigkeit).
- Art. 3: assets dedicated exclusively and irrevocably to the purpose.
- Art. 17: Vermögensanfall to another tax-exempt Swiss legal person; any
  distribution to members excluded.

Structural clauses:
- Art. 4: the Verein may found/hold participations, held as Vermögensanlage
  and subordinate to the purpose, with NO Geschäftsführung by the Verein —
  which is both what KS 12 requires and what keeps the founder clear of the
  self-employment ban. This is what makes the GmbH split amendment-free.
- Art. 10 Abs. 2: the board must have >= 3 members before any compensation
  or employment of a board member may be resolved, so founding stays
  possible with 2 while independence exists exactly when it matters.
- Art. 12: unpaid by default, effective expenses against receipt only
  (Pauschalspesen excluded — they get requalified as salary), mandatory
  Ausstand on one's own compensation, disclosure in the annual report.
- Art. 14: publication of statutes, board, annual report and accounts in a
  form that keeps changes traceable; and no Spendenbescheinigungen or
  claims of recognised gemeinnützigkeit before the Verfügung exists —
  matching ORG.legalForm = 'in Gründung' as the SSOT.

Formal requirements per the Handelsregisteramt Zürich Merkblätter are noted
inline (min. 2 founders, original handwritten signatures, election
acceptance recordable in the minutes).

Verified: lint:umlauts clean, no "ß" (Swiss German rule).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(legal): publish the Verein statutes at /transparenz/statuten in all 8 locales

The founding documents were repo-only. They are now a public page, in every
language the site speaks, reachable from the Transparenz hub and the sitemap.

Honesty first: evig is not yet founded, so STATUTEN_STATUS.state drives an
unmissable draft banner. Publishing a draft as the governing statutes of an
association that does not legally exist would be a false claim; publishing it
AS a draft is the transparency the statutes themselves promise (Art. 14).

SSOT split:
- src/config/statuten.ts   — structure: article order, numbers, section grouping
- messages/<locale>.json   — strings only, one coherent body per article
- src/lib/legal/           — parses bodies into paragraph/list blocks
- src/components/legal/    — renders them

Paragraph numbers and list letters are GENERATED by the renderer, never read
from a translated string, so all 8 locales show identical structure. That also
sidesteps the repo's fragile-array i18n trap (arrays have no per-element
fallback). German is declared authoritative via STATUTEN_AUTHORITATIVE_LOCALE
and every translated locale carries a notice card saying so.

Verified: lint, lint:umlauts, typecheck, test:i18n green; all 8 locales render
200 with 18 articles each; i18n audits show zero new leaks and zero new missing
keys vs main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-06 09:33:42 +00:00
GandClaude Opus 4.8 d5f50c3aca feat(host): make evig.orangecat.ch the canonical host (now live) (#256)
evig.orangecat.ch is live (DNS A record + Caddy vhost → the app on the Hetzner
box, HTTPS, health 200; both hosts serve). Auth is safe on it (trustHost:true +
host-only cookies). Flip the code canonical to evig; revampit.orangecat.ch stays
a working alias until the deploy-path/systemd identifiers are cut over (Layer B).

- org.ts `website` → evig (reverts the #252 dead-URL stopgap)
- urls.ts PUBLIC_SITE_URL default → evig (metadataBase fallback; prod env wins)
- MISSION_STATEMENT.md website → evig
- .env.selfhost.local.example host vars → evig

Build-time NEXT_PUBLIC_SITE_URL/APP_URL already flipped to evig in the SELFHOST_ENV
secret + prod runtime .env, so this deploy inlines evig into OG/canonical.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 14:29:10 +02:00
GandClaude Opus 4.8 281ea850c2 fix(org): point canonical URL at the live host (evig.orangecat.ch has no DNS) (#252)
org.ts `website` claimed https://evig.orangecat.ch, but that domain does not
resolve (curl 000, no DNS) — so the canonical URL, JSON-LD, and OG cards pointed
at a dead host. Point back to the live production host revampit.orangecat.ch
(Layer B infra, per .claude/CLAUDE.md — the host stays revampit until a real
infra cutover). When DNS + Caddy vhost + deploy paths make evig.orangecat.ch
real, flip this one constant. Also fixes the same dead URL in MISSION_STATEMENT.md.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 10:20:13 +02:00
GandClaude Opus 4.8 57eaa9589e brand(evig): finish evig rename + honour the Revamp-IT roots and tell the fork (#248)
Two things the user asked for: finish renaming Layer A brand surfaces to evig
(the GitHub repo is already `evig`; the rendered app copy + org.ts were already
migrated), and lean INTO the Revamp-IT origin — name it, honour its history, and
tell the fork honestly. Layer B infra identifiers (is_revampit, @revamp-it.ch,
revampit_cms, /opt/revampit, systemd, host) are deliberately untouched.

Layer A rename (leftovers):
- package.json name revampit -> evig
- public/site.webmanifest: name/short_name/description -> evig; drop the stale
  RevampIT orange (#ff6b35) for evig obsidian (#0a0a0a)
- LICENSE holder -> evig
- packages/saldo/package.json: stale github.com/maonakamoto/revampit -> /evig
- CONTRIBUTING.md clone URL: was doubly-stale g-but/revampit -> maonakamoto/evig
- public/saldo/index.html footer "from Revamp-IT" -> "from evig"
- public/blog/geraete-eingang-integration.svg diagram label -> evig

Honour Revamp-IT + the fork story (naming them, linking revamp-it.ch, crediting
their real since-2003 history as THEIRS, and framing the split as a difference of
ambition + tempo — not grievance):
- src/config/org.ts: new ORG_ORIGIN SSOT (Revamp-IT: Zürich gemeinnütziger Verein,
  since 2003, revamp-it.ch)
- GeschichteSection (/about) + vision (/vision): render the Revamp-IT link, rewrite
  the origin narrative in DE + EN
- messages/{fr,es,it,ja,ko}.json: translated founding narrative (vision stays de/en
  with DE fallback, as before)
- docs/EVIG_STORY.md + docs/MISSION_STATEMENT.md: rewritten to name/honour Revamp-IT
  and set the "grateful, never at their expense" voice guardrail; docs/MANIFESTO.md
  retitled to evig with a dated historical note

Verified: tsc clean, eslint clean on changed files, lint:umlauts clean, all 7
locale JSON valid with balanced <a>/{foundingYear} tags.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 09:17:34 +02:00
GandClaude Opus 4.8 3ac9c4bac7 feat: /vision — the founding vision as a real route (#246)
* docs(evig): founding story SSOT, brand package, non-profit framing

- docs/EVIG_STORY.md: canonical founding narrative (the 'access to
  intelligence is the inequality that matters' thesis) that About/hero/
  decks/grants derive from.
- public/brand/: organised brand package (SVGs + raster exports + manifest).
- .claude/CLAUDE.md: reconcile non-profit framing (gemeinnütziger Verein in
  Gründung) with the standing honesty boundary (no tax-deductible receipts
  until registered + canton-recognised).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(vision): add /vision manifesto route (Obsidian & Ion Lime, DE+EN)

The founding vision as a real, full-bleed public route — the surface the
live site had nothing of (mission/thesis for donors + talent). Debuts evig's
new obsidian+lime identity as a scoped, low-risk beachhead; the green app is
untouched and the global retheme stays a separate decision.

- Route src/app/[locale]/vision/{page,content}.tsx — static, own header/footer.
- ConditionalMainLayout: locale-aware /vision opt-out from standard chrome.
- globals.css: scoped .theme-vision tokens (obsidian/lime primitives +
  semantic overrides) + self-contained .v-* layout. Zero literal hex in TSX.
- Fonts self-hosted (subset woff2, no CDN): Space Grotesk, Inter, Plex Mono.
- i18n: DE (canonical) + EN vision namespace; other 6 locales fall back to DE
  and are recorded in the i18n baseline (intentional deferral until copy locks).
- routes SSOT + sitemap wired.

Verified: typecheck, lint (0 errors), test:i18n (16/16) all green; rendered
/vision (de) + /en/vision at 1200px and 390px — fonts load, theme scopes,
chrome opt-out works, no horizontal overflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(vision): real CTA destinations, footer discoverability, repo cleanup

- CTAs no longer point at the non-existent hallo@evig.ch mailbox — route to
  real in-app pages instead: Support → /get-involved/partnerships, Build →
  /get-involved, products → /contact (added partnerships + contact to the
  ROUTES.public SSOT).
- Discoverability: link /vision from the site footer navigation.
- Cleanup: remove 11 orphaned 'ChatGPT Image …' scratch PNGs (8.4 MB) that
  were shipping unreferenced in public/images/logo/.
- i18n: drop the now-unused mailto subject keys; add footer.vision label
  (DE+EN); baseline the deferred locales for the new keys.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-27 17:50:04 +02:00
Mao NakamotoandClaude Opus 4.8 9ef3c02008 rebrand(evig): identity SSOT, i18n, README, logo assets [Layer A/1]
- org.ts: name/mission/founding → evig; positioning = affordable intelligence
- KILL money-routing: blank revamp-it IBAN; add PAYMENT (BTC + OrangeCat, TODO)
- blank infra-coupled fields evig lacks (phone, legacy site, external shops)
- i18n: brand tokens → evig across all locales (values only, keys untouched)
- README + logo assets → evig

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-26 12:19:40 +02:00
Mao NakamotoandClaude Fable 5 46db684c62 docs(hr): document Zeiterfassung & Monatsrapport flow
Adds an HR_RUNBOOK section for the time-tracking work now live: Arbeitsplan
drives Soll (Pensum must reconcile), today marker, four-eyes approval with
in-drawer confirmations, honest interim/as-of reports, real numbers for
pre-cutover months, and the public social-worker share link (/r/<token>).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 08:07:42 +02:00
Mao NakamotoandClaude Fable 5 c97286e2eb fix(intake): finish-line clarity — final QA surfaced at the progress bar, publish gate names open items
At 17/18 the page left people hunting: "Alles in Ordnung" still showing
(but a no-op), the one open item buried in the list, the publish gate
saying only "alle Pflichtpunkte müssen abgehakt sein".

- When only the Vier-Augen item remains, the progress card shows the two
  one-click finishes right there: "Als Zweitperson bestätigen" and
  "Allein im Dienst — übersteuern" (audited standard note).
- "Alles in Ordnung" hides once it has nothing left to do.
- The publish gate lists the open required items by name.
- Docs: .claude/CLAUDE.md QC-gate + CO₂-SSOT sections brought current;
  INTAKE_QC_DESIGN.md addendum for the 2026-07-17 journey-audit round.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 19:47:28 +02:00
Mao NakamotoandClaude Fable 5 5e06971bbb Merge branch 'claude/inventory-system-design-8popfp': destination-driven intake capture release
Main's #212 was a squash of this branch's earlier QC pipeline commits;
all code conflicts resolved to the branch side (strictly newer), messages
merged key-level (zero overlapping keys with main's protocol/timecard work).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 11:55:05 +02:00
Mao NakamotoandClaude Fable 5 883eda9bf8 feat(intake): destination-driven capture step, untested-listing disclosure, process page
- Erfassung: replace AnnahmeFields with CaptureDestinationFields — explicit
  destination choice (quality/inventory/parts/recycle/shop_untested) drives
  the workflow via src/config/intake-workflow.ts; skip-QC requires reason +
  price and is audited
- Marketplace: trust strip and info panel disclose untested RevampIT items
  (no Prüfsiegel) with link to the quality process
- so-funktionierts: process page content + open-source CTA
- Admin: AdminPageGuide component, intake pipeline/detail updates, quick
  actions; remove QuickIntakeForm and ProduktAufnehmenModeToggle
- i18n: intake/erfassung/marketplace/process keys for all locales
  (timecard translation work intentionally excluded from this release)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 11:36:31 +02:00
Mao Nakamoto 373ddc8153 feat(intake): unify capture QC and publishing workflow 2026-07-16 14:25:17 +02:00
GandClaude d80ab61aa6 fix(timecards): mobile-first day view — time fields first, one header, one action bar (#219)
Phone screenshots of the deployed Zeiterfassung showed the day view
unusable: the Von/Bis/Pause inputs sat two screens below a full-screen
hour grid (read as "no way to enter the hours"), the header zone burned
~1.5 screens (page kicker + title + plan card + month title + the plan
repeated + a SECOND Save/Submit cluster), the clock-in and AI widgets
stacked below the day form, the "Erweitert" label overflowed the
viewport, and the feedback FAB overlapped the sticky action bar.

Restructure (mobile and desktop):

- Day view order now matches the job: duration hero → Von/Bis/Pause
  fields FIRST (h-11 touch targets, always visible) → quick actions
  (fill / absences / clear) → hour grid → category + note.
- Hour grid demoted to a disclosure: collapsed on phones, open from lg
  where it sits in a second column beside the form. Tri-state default
  comes from CSS (hidden lg:block), so SSR and client render identically
  and there is no effect-driven flicker.
- TimecardHeader reduced to one line: month + status badge + days/total.
  The schedule summary lives only in the plan card above; Save/
  Einreichen live ONLY in the sticky bottom bar (previously duplicated).
- Clock-in widget + AI assistant render in month view only — they act on
  the whole card, not the selected day.
- Page header is one line (kicker removed).
- Extras toggle label shortened to "Erweitert" (was overflowing).
- Sticky bar gets pr-16 on phones so the floating feedback FAB can't
  cover the submit button.
- i18n: new dayGridShow/dayGridHide keys + shortened extrasToggle in all
  8 locales; removed now-unused submitHint/headerStatus* keys;
  stale-baseline updated surgically.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-16 13:42:20 +02:00
G 6dc60279e2 feat(intake): quality-control pipeline — verdicts, publish gates, buyer-facing test results, QR labels, mobile UX, Kivvi (#212)
Checklist pass/fail/n.a. verdicts with a failed pipeline state; QC publish gate on all three publish paths; buyer-visible test results + verified badge; QR device labels; Vier-Augen-Prinzip on final QA; mobile-first pipeline cards; Kivvi sync from both intake doors. E2E journey updated to the verdict API with a second seeded staff account for four-eyes sign-off.
2026-07-16 12:11:35 +02:00
Claude a4a468e843 chore(intake): renumber verdict migration 132 → 135 after main took 132-134
Main's team-space PR (#216) landed migrations 132-134 while this branch
was in flight; the checklist-verdicts migration moves to the next free
number (content unchanged, still idempotent). Doc/schema references
updated; design doc now describes the Vier-Augen override path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014kyGETHYwy5KHEXxWdPw4j
2026-07-16 09:53:32 +00:00
Claude 179190a489 Merge remote-tracking branch 'origin/main' into claude/inventory-system-design-8popfp 2026-07-16 09:48:50 +00:00
GandClaude 4c4b509eb7 docs: production URLs — revampit.orangecat.ch is the app, www.revamp-it.ch is legacy Joomla (#217)
A deploy-verification session wasted time probing www.revamp-it.ch (the
org's old Joomla site) because no doc states where this codebase actually
runs. Now documented in CLAUDE.md (loaded by every agent session) and in
docs/SHARED_CONTEXT.md Access Points: production app + health endpoint +
admin + Zeiterfassung routes, with an explicit warning about the legacy
site.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-16 11:45:16 +02:00
GandClaude ce41d0d789 feat(timecards): one pointer engine — swipe/drag selection, split shifts, unscheduled days (#215)
The time-entry tool (Zeiterfassung) had four usability failures reported
from daily use:

1. Split shifts (e.g. 08–12, break, 14–17) were effectively impossible:
   the hour grid's drag REPLACED the whole selection, a second block
   needed Ctrl-clicks per 30-min slot, and touch had no path at all.
2. Working on a day outside the weekly plan dead-ended: day-fill refused
   ("Kein Plan-Tag"), bulk fill silently skipped selected non-plan days,
   and there were no plain start/end/break inputs as a fallback.
3. Drag/swipe selection was broken: both grids relied on mouseenter,
   which touch pointer events never fire (implicit capture), and no
   touch drag existed by design.
4. The day editor was hidden behind a view toggle with no direct route
   from the calendar; several hints/titles were hardcoded German.

What changed:

- New `useGridPointerInput` — ONE gesture engine for both grids (pointer
  events + elementFromPoint hit-testing). Mouse: press paints, drag
  extends. Touch: tap toggles; hold briefly OR swipe sideways to paint
  (vertical swipes still scroll — `touch-action: pan-y` + non-passive
  touchmove lock while painting). Trailing clicks after a drag are
  swallowed; modifier clicks pass through as taps.
- `useCellSelection` rebuilt on the engine for the hour grid: drag
  paints, drag starting on a selected slot erases, tap toggles,
  Shift-click adds a range; drags interpolate so fast swipes leave no
  holes. Split shift = paint two blocks; the gap becomes the break and
  the summary lists each block.
- Month grid runs on the engine too (removes its hand-rolled drag
  logic); adds erase-paint ('remove' mode), double-click → day editor,
  touch long-press no longer fights the context menu; weekday labels now
  come from the schedule SSOT.
- Day editor: exact Von/Bis/Pause fields (native inputs, two-way synced
  with the hour grid — external changes re-seed the grid, user gestures
  never echo back), so precise or off-raster times work on any device.
- Fills on explicitly targeted non-plan days now enter the standard
  manual day (TIMECARD_MANUAL_DEFAULT) instead of refusing/skipping —
  relabelled button in the day view, sync message for bulk fills. The
  whole-month fill stays plan-only.
- Clearing the hour grid now zeroes the entry duration (previously left
  a phantom total).
- Day editor reachable from the calendar: double-click a day, "Tag
  bearbeiten" in the bulk bar (single day), or the context menu.
- i18n: interaction hints rewritten, hardcoded German strings moved to
  admin.timecards.* and translated in all 8 locales; stale-baseline
  updated surgically for the touched keys; obsolete keys removed.
- jsdom PointerEvent polyfill in jest.setup (RTL otherwise drops
  pointerType/button/coords); month-grid + hour-grid test suites updated
  and extended for touch taps, long-press/horizontal paints, erase, and
  split shifts (28 tests green).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-16 11:25:38 +02:00
G 3b7f7d450f feat(admin): language switching + compact stats strip (#211)
Admin now follows the NEXT_LOCALE cookie (was hard-pinned to German); LocaleSwitcher in the admin top bar + mobile user menu pills; sidebar/bottom-nav/command-palette section labels localized in all 8 locales via admin.sections with a config↔de.json parity test. AdminStatsGrid card wall replaced by a compact AdminStatsStrip (same quick-filter API) so list pages show actual content above the fold on mobile; DonationStatsCards consolidated onto the shared strip; dead marketplace StatsCard removed.
2026-07-16 09:20:45 +02:00