23 Commits
Author SHA1 Message Date
dependabot[bot] 372eedeb05 deps: bump @playwright/test from 1.64.1 to 1.65.0 (#354)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.64.1 to 1.65.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.64.1...v1.65.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.65.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-09 21:03:06 +01:00
dependabot[bot] ae8456dfe2 deps: bump @playwright/test from 1.64.0 to 1.64.1 (#296)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.64.0 to 1.64.1.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.64.0...v1.64.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.64.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-19 21:35:03 +02:00
dependabot[bot] eacb470591 deps: bump concurrently from 10.0.5 to 10.0.6 (#291)
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 10.0.5 to 10.0.6.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v10.0.5...v10.0.6)

---
updated-dependencies:
- dependency-name: concurrently
  dependency-version: 10.0.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-13 09:32:27 -07:00
dependabot[bot] 9cb4e10ac2 deps: bump @playwright/test from 1.63.0 to 1.64.0 (#290)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.63.0 to 1.64.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.63.0...v1.64.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.64.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-13 09:25:25 -07:00
CatoandClaude Fable 5.1 634ea86168 refactor: quality sweep — lint at zero warnings, one logger, shared ingestion kit, no generated client in git (#271)
* chore(repo): drop ralph.sh residue, ignore the generated Prisma client at the root

ralph.sh was byte-identical to reparaturbonus-zh/ralph.sh ("Ralph Loop for
Revamp-Hirn") and PROMPT.md was its blank task template; nothing in CI, docs
or scripts referenced either.

backend/generated/ is produced by `prisma generate` (typecheck, build and
Dockerfile.backend all run it) and was already ignored by backend/.gitignore,
so it was never committed — but tools that only read the root ignore file
(the fleet jscpd sweep) counted its ~1,300 generated lines as duplicated
source and reported the repo at 4.4%. Listing it at the root too makes those
sweeps see what git sees.

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

* refactor(backend): log through one pino instance, lint console.log out

The backend had pino-http for requests and bare console.log everywhere else
(index.js, jobs/, services/websocket.js — 26 lines). lib/logger.js now owns
the pino-http middleware and exposes its logger, so application logs and
request logs share level, destination and redaction. pino stays an indirect
dependency: pnpm does not hoist pino-http's copy, and a second pino would be
a second place to configure.

The backend had no linter at all. eslint.config.mjs enables exactly one rule,
no-console (warn/error allowed), so this cannot drift back; the root `lint`
now runs both halves, which is what `verify` and CI call.

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

* refactor(ingest): one shared kit for the image/video/audio/database ingestion components and the /ingest pages

The four data-ingestion components each carried their own copy of the
upload state machine (idle → uploading → processing → complete/error), the
file picker + drag-drop + object-URL preview, the auth header, the response
reader, the drop zone, progress bar, error banner, result card and submit
button. The five /ingest/<kind> pages likewise repeated the page frame, the
"Recent …" panel with its loading/error/empty states, the status badge and
the detail panel, plus a private copy of formatFileSize/formatDate.

Now there is one of each:
- components/data-ingestion/shared.tsx — useIngestionUpload, useFilePreview,
  authHeaders, readIngestionResponse and the shared markup pieces
- components/data-ingestion/icons.tsx — the inline SVG paths as data, one
  OutlineIcon/SpinnerIcon component
- ingest/shared.tsx — IngestPage, RecentPanel, StatusBadge, DetailPanel and
  the useRecentSources fetch
- lib/format.ts — formatFileSize/formatDuration/formatDate, with a test

Markup and copy are unchanged; the components render exactly what they did.

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

* refactor(forms): type the stored form structure once, drop the dead quick-field builder

`/api/v1/forms` returned `schema as any` and every consumer re-derived its
shape. `StoredFormStructure` / `FormListRow` in types/saved-form.ts are now
the one description of what the builder writes into the Json column, used by
the route, SavedFormsLibrary, ModernFormBuilderLayout and the builder page.

DynamicForm loses its unused `addQuickField` duplicate of FormFieldBuilder's
own field factory and an unused `handleCreateGroup` argument; the autosave
draft effect reads the current form through a ref instead of listing the
form as a dependency (which is what the exhaustive-deps warning was pointing
at — re-running it per keystroke would clobber the user's input).
SavedFormsLibrary wraps fetchForms in useCallback so the token effect is
honest about what it depends on; its `handleLoginSuccess` was never wired to
anything. Rendered output is unchanged.

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

* refactor(frontend): fix every ESLint warning, gate lint at --max-warnings 0, ban console.log

The frontend lint config had downgraded no-unused-vars, no-explicit-any,
ban-ts-comment, exhaustive-deps, no-unescaped-entities and no-img-element to
"warn" ("temporarily, for build success") and `eslint .` ran with no
warning cap, so 152 warnings sat there unread. Every one is fixed at the
source rather than silenced:

- no-explicit-any: real types — jose's private `email` claim, the next-auth
  Session/User augmentation (`session.user.id` is set by the session
  callback), OpenAI.APIError for the vision route's status checks, typed
  event/data shapes elsewhere. The ambient `declare module '@dnd-kit/*'`
  stub is gone: `@dnd-kit/utilities` is now a declared dependency so its own
  types load.
- no-unused-vars: unused imports/params/state dropped. Seven components and
  one hook turned out to be rendered nowhere (BuilderToolbar,
  FormBuilderQuickStart, FormCreationHub, ModernSidebarStore, MultiStepForm,
  MultiStepFormBuilderStore, QuickActions, useApiRequest) — deleted, and the
  README paragraph that described the *Store wrappers updated.
- exhaustive-deps: callbacks memoised so the dependency arrays are truthful.
- ban-ts-comment / no-unescaped-entities: the comments were covering typed
  code; the entities are escaped.
- The 5 console.log calls in frontend/src (debug leftovers in components
  and services) are removed; console.warn/error stay. `no-console` (allow
  warn/error) is now an error so they cannot come back, with scripts/**
  exempt because printing is their job. (Of the 82 console.log in the repo,
  26 were the backend — routed through pino in the previous commit — and
  the rest are operator scripts, which print by design.)

The downgrade block is gone, so upstream next/core-web-vitals defaults
apply, and `lint` runs with `--max-warnings 0`: a warning fails the gate.
152 → 0.

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:22:22 -07:00
dependabot[bot] c00ad7a35c deps: bump @playwright/test from 1.62.1 to 1.63.0 (#270)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.62.1 to 1.63.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.62.1...v1.63.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.63.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-14 07:38:05 -07:00
CatoandClaude Opus 5 23dc082219 fix(blog): drop two image references whose assets were never committed (#264)
/blog/intake-engine rendered two broken-image boxes: a `coverImage`
frontmatter key pointing at /images/blog/intake-engine/cover.jpg (400 through
next/image) and an inline pipeline.svg (404). Neither asset exists —
frontend/public/images/ has no commits in this repo's history at all, so both
references were dead from the day the post landed. The artwork does not exist
to restore, so the references go. Nothing substantive is lost: the figure sat
directly above the ordered list (Formulare / Sensor- & API-Streams /
Contextual Prompts / AI-Insights) that already carries its content, and its
caption ("Vom Formular über Streams bis zur KI") only restated that list.
Both code paths already guard on `post.coverImage &&`, so the absent key
renders nothing rather than an empty box.

The durable half is scripts/check-content-images.mjs, wired into the root
`verify` (and therefore CI): it walks every content file, extracts each local
image path from frontmatter and from markdown/HTML image syntax, and fails
naming the file and the unresolvable path. Remote and data: URIs and fenced
code samples are out of scope. Nothing could have caught this before —
markdown needs no build step, `next build` never resolves a runtime src, and
lint/typecheck cannot see that a string is a path.


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

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 13:34:19 -07:00
CatoandClaude Opus 5 ed17d502fe fix(verify): the gate was red on an unmodified main, twice over (#259)
`pnpm run verify` — the command this repo's definition of done names — exits
non-zero on a clean checkout of main, for two independent reasons that have
nothing to do with any change. CI cannot see either one.

**1. Generated output from tooling that was removed.**
#254 replaced contentlayer with bip-kit and deleted the `.contentlayer` line
from frontend/.prettierignore. Correct — the tool is gone. But the directory it
generated survives in every checkout that had built the blog before then, and
losing the ignore entry moved it from "invisible" to "in prettier's scope".
Prettier cannot parse its import assertions, so `format:check`, the FIRST gate,
died with a SyntaxError naming a generated file nobody wrote. A fresh clone has
no such directory, which is exactly why CI is green.

Two checkouts here had it, including the worktree of a session running right
now, whose verify is red for this reason as I write it. So preflight grows a
fourth check — same shape as the stale-node_modules one, and covering every
worktree rather than just the current one:

    ! generated output from removed tooling: frontend/.contentlayer
      .claude/worktrees/complete-fetch/frontend/.contentlayer

`--fix` deletes them. Proved by recreating the exact stale state, watching the
read-only run flag both paths, then watching --fix clear them.

**2. A required artifact that no step in the gate produced.**
`typecheck` ran `tsc` against a Prisma client that only ever got generated by
`@prisma/client`'s own postinstall hook, or by `build` — which runs *after*
typecheck. The hook fires in CI; it did not fire here, because pnpm gates
dependency build scripts and caches their side effects. So a clean
`pnpm install --frozen-lockfile` left the client ungenerated and verify died:

    src/lib/db.ts(1,10): error TS2305: Module '"@prisma/client"'
      has no exported member 'PrismaClient'.

Reproduced from an empty node_modules twice before changing anything. The fix
is not to re-approve a hook: a gate should not depend on an install side
effect it does not control. `typecheck` now runs `prisma generate` itself
(~300ms) and the artifact exists because the step that needs it made it.

Both fixes are the same principle — `verify` must depend on the repo, not on
what a previous install or a previous version of the tooling happened to leave
behind. The CLAUDE.md build section is corrected alongside: it still described
contentlayer as the blog pipeline and told the reader to run
`pnpm exec contentlayer build`, which would have recreated failure #1.

verify, from a wiped frontend/node_modules: prettier ok, lint 0 errors / 152
warnings, tsc clean, 96/96 tests (76 frontend + 20 backend), build ok.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-08 04:16:33 +00:00
CatoandClaude Opus 5 bf1d9c32d3 refactor(ai): complete() owns the request, the per-vendor dedupe goes, and the tests can finally run (#252)
* refactor(ai): complete() owns the request, the per-vendor dedupe goes, and the tests can finally run

Three things, and the third is why the first two were invisible.

1. THE 429 BODY WAS READ AND DISCARDED. The hand-rolled `attempt`
   ended a failed request at
   `chat failed (${res.status}): ${detail.slice(0, 200)}` — fetched,
   truncated, and read by nothing. The three kinds of 429 share that
   status code and want opposite responses:
     capacity — a burst; demoting is right.
     daily    — the vendor's whole org-wide budget is spent; every other
                model there is already dead.
     size     — one request exceeded the per-minute allowance alone; the
                next model down has a SMALLER ceiling, so demoting is
                strictly worse.
   The old `fetch` also had NO deadline, so a vendor that accepted the
   connection and never answered held an ingestion job open forever and
   the fallback beneath it was never reached.

2. THE PER-VENDOR DEDUPE IS GONE, and that is the point rather than a
   tidy-up. It kept one link per vendor because "a second model at the
   same vendor draws on the same daily budget". True of the DAILY case
   and only that case — and it discarded the retry that rescues the two
   failures that actually keep happening: a retired model id, and a model
   that is momentarily busy while the vendor is fine. complete() makes
   the distinction per failure KIND instead of up front, so a daily 429
   still condemns the vendor (the dedupe's real benefit, kept) while a
   404 demotes within it. Strictly more chain, not less.

3. NOTHING IN backend/ COULD RUN A TEST. `backend/package.json`'s script
   was `echo "Error: no test specified" && exit 1`, and the root `test`
   only ever ran the frontend. backend/utils/responseHandlers.test.js has
   been sitting there, committed, executed by nothing — its own docstring
   says so. So a chain change here would have shipped with no coverage,
   and any test I added would have joined it in the dark.

   Wired: backend `test` → `vitest run`, root `test` → frontend AND
   backend. 71 frontend + 20 backend, ten of those twenty running for the
   first time.

The 10 new tests drive every failure through a real response BODY,
because the body is the only thing that separates the three 429s. The
SIZE one asserts exactly one request was made — asserting that it threw
would not show the walk STOPPED, since everything failing throws too.
Mocks are real Response objects built per call: one body reads once, so
a shared instance makes link two fail with "Body has already been read",
a fake failure in front of the real one.

verify green.

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

* ci: install backend deps, or the test script I just wired makes the gate red

The previous commit pointed root `test` at both halves. CI installs only
`frontend`, so `pnpm run verify` would have reached `test:backend` and
died with "Command vitest not found" — a wired script and a red gate,
which is worse than the gate that was simply absent.

Adds an `Install (backend)` step and caches on both lockfiles. Verified
`pnpm install --frozen-lockfile` succeeds in backend/ against the
committed lockfile, which is what CI runs.

Also corrects the comment above `Verify`. It described the gate as
"lint + typecheck + build"; it is format + lint + typecheck + test +
build, and `test` now covers both halves. That comment is what a reader
trusts about what "verified" means in this repo, so leaving it describing
the old bundle would be its own quiet lie.

The job id stays `verify-frontend` even though it is now a misnomer:
renaming a job renames the status check, and a required check that
disappears blocks merges rather than failing loudly.

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

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 11:24:33 +00:00
8e3f2cd31d chore: pnpm — the fleet has one package manager (#243)
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 00:33:50 +00:00
55683d426c chore: stop repairing the same checkout drift by hand every run (#237)
Three separate sessions have now opened this repo, found the working copy
silently wrong, and spent part of the run repairing it before any real work
could start:

  2026-08-29  local main held a commit origin never got, so `git pull --ff-only`
              failed for every run entering the repo.
  2026-08-31  local main was 2 commits behind origin (#232, #233).
  2026-09-02  local main was 3 commits behind (#234-#236), two squash-merged
              worktrees were still checked out, and frontend/node_modules
              predated the prettier devDependency from #233 — so the first gate
              of `npm run verify` died on "prettier: not found".

A bare `git status` reports "clean" in all three cases, which is why each run
rediscovers it the hard way instead of inheriting the last one's fix. Per the
never-twice rule, the third instance gets the automation, not a fourth repair.

`npm run preflight` checks the three invisible ones — divergence from origin
(after an explicit fetch), merged worktree branches still checked out (compared
by patch id via `git cherry`, since `git branch --merged` cannot see a squash),
and node_modules older than its lockfile. Read-only by default, exit 1 on drift;
`npm run preflight -- --fix` repairs what it finds and refuses to touch a
worktree with uncommitted changes.

Both paths exercised on this branch: the read-only run caught backend/
node_modules as stale against the #229/#230 security bumps, and --fix
reinstalled it to clean.


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

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 04:09:43 +00:00
GandClaude Opus 5 53d2e70723 chore: add a formatter (#233)
* chore: add a formatter, matching the style this repo already writes

singleQuote=true was chosen by counting this repo's own
imports, not by fleet decree. The fleet is genuinely split and the two repos
that already had a .prettierrc disagreed with each other, so there was no
standard to restore. Quote style does not cross repo boundaries; having a
gate does.

Markdown is ignored for now — prettier rewraps prose, which would bury the
real diff.

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

* style: format with prettier (199 files)

Mechanical. No behaviour change. This SHA is listed in
.git-blame-ignore-revs so `git blame` skips it.

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

* chore: teach git blame to skip the reformat

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

* fix(ci): put prettier where CI actually installs

The formatter was added to the root package.json, but CI installs with
working-directory: frontend and then runs npm run verify at the root, so root
devDependencies are never installed at all. format:check died with
'prettier: not found' before checking a single file.

Root now delegates into frontend the way every other root script already does,
and prettier is a devDependency of frontend, whose lockfile CI installs.

frontend also needs its own .prettierignore: prettier resolves that file
relative to the working directory, so the root one stopped applying the moment
the command ran from frontend/ — which is how README.md and Playwright output
ended up being checked.

* fix(ci): do not format contentlayer's generated output

format:check ran green locally and failed in CI on files that do not exist
locally: CI builds contentlayer before verify, so .contentlayer/generated is
present by the time prettier looks. One generated module imports with
assert { type: 'json' }, which prettier's parser rejects outright.

A local --check cannot see build output, so generated directories have to be
ignored by name rather than discovered.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 11:06:25 +00:00
GandClaude Opus 5 5d55e6d22c chore: declare node >=20, the version the box actually runs (#232)
Was: undeclared.

Eighteen of thirty repos declared no Node version at all, and the twelve
that did used five spellings of the same intent - >=18, >=20, >=20.0.0,
>=22, >=22.19.0. The box runs 20.20.2, so >=22 was a claim nothing could
satisfy and nothing would have caught.

One spelling, matching the machine that runs it, turns an invisible
mismatch into a loud one.


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

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 07:03:23 +00:00
dependabot[bot] de29301ee8 deps: bump concurrently from 10.0.4 to 10.0.5 (#224)
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 10.0.4 to 10.0.5.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v10.0.4...v10.0.5)

---
updated-dependencies:
- dependency-name: concurrently
  dependency-version: 10.0.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-24 14:36:56 +00:00
GandClaude Opus 5 d773b32a3c test: add the hermetic unit gate, and stop an empty env var blanking the brand (#219)
* test: add the hermetic unit gate, and stop an empty env var blanking the brand

`verify` was lint + typecheck + build. The only suite in the repo was
`npx playwright test` — e2e, needing browsers and a running server, so it can
only run somewhere expensive enough that it rarely does. backend's `test` was
`echo "Error: no test specified" && exit 1`. There was no hermetic gate at all,
which is why the fleet audit lists this repo as needing a unit suite rather
than a verify edit.

Adds vitest (one runner, both packages), 43 tests, and puts `test` inside
`verify`. Script names now match the rest of the fleet: `test` is the hermetic
unit suite, `test:e2e*` is Playwright. Nothing live called `npm run test` — CI
calls `npm run verify`, and the only other reference is in
deploy.yml.disabled.

ONE REAL BUG FIXED, in the white-label merge:

  Object.entries(envBranding).filter(([_, value]) => value !== undefined)

An UNSET env var is `undefined`, but a var that is present-and-empty is `''`.
`NEXT_PUBLIC_BRAND_NAME=` is an ordinary line to find in a .env, and that empty
string beat the default — blanking the product name, or the logo path, or the
domain, with nothing to say why. The filter now also rejects empty and
whitespace-only values. This matters here more than in most repos: DataCat
ships as TalentFlow, HealthIntake and LegalIntake, so the branding merge IS the
product's identity.

What the tests hold still:

  - defaults are complete, and the theme is one the type allows — a blank
    default reaches production as an empty <title> or a broken logo src
  - a real env value overrides; an empty or whitespace one does not
  - the merged config never grows a key the defaults do not declare
  - every preset sets only keys BrandingConfig declares. A preset writing
    `primary_color` next to a config reading `primaryColor` renders the default
    and reports success — the expensive drift in a config layer is a key that
    looks applied and is not.
  - every preset merges to a complete config with valid hex colours
  - responseHandlers keeps a uniform envelope: every handler sets a boolean
    `success`, since a client that branches on it must never meet a response
    without it
  - `error()` NEVER attaches `details` in production. That is the leak guard —
    details carry stack traces and driver messages — and it is one `if` away
    from being refactored into always-on.

Negative-tested rather than assumed. Restoring the old `!== undefined` filter
turns exactly the two empty-value tests red; making `details` unconditional
turns exactly the production-leak test red.

Verified locally: lint clean, 43/43 tests. `typecheck` and `build` were NOT run
locally — `contentlayer build` fails on this Node with ERR_INVALID_ARG_TYPE,
the prerequisite PR #191 documents. CI runs the full `verify`, and this change
does not touch the typecheck or build paths.

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

* fix(test): declare vitest in frontend so the new test typechecks

CI caught what my local run could not: `npm run typecheck` is
`cd frontend && npx tsc --noEmit`, so it typechecks frontend/src — including
the new branding.test.ts — but vitest was only installed at the repo root.
tsc could not resolve the module, and the four `it.each` callbacks then fell
back to implicit `any`.

Declared in frontend/package.json rather than excluded from tsconfig. Excluding
test files would have made the error go away while leaving the tests
un-typechecked, and a test that does not compile is not a gate.

This repo is not npm workspaces — frontend and backend install separately — so
a package that imports vitest has to declare it. The root copy stays because
that is where the runner is invoked from.

Verified: full `npm run verify` now passes locally end to end — lint clean,
tsc 0 errors, 43/43 tests, build clean. (Contentlayer generated correctly this
time via frontend's postinstall, which is what had blocked the local typecheck
earlier.)

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

* fix(test): run vitest from frontend, the only place CI installs

Second CI failure on this branch, and my first fix was aimed at the wrong
layer. Exit code 127 — command not found — after lint and typecheck passed.

The cause is in .github/workflows/ci.yml: it installs with
`working-directory: frontend`. The ROOT node_modules never exists in CI. So a
root-installed vitest is not a dependency CI has, and `vitest run` from the
repo root could only ever fail there while passing on my machine, where I had
run `npm install` at the root by hand.

Moving the config into frontend/ rather than adding a root install step: the
runner has to launch from the one directory that has a node_modules, and that
is a fact about this repo's pipeline, not a preference. The config still sets
`root` back to the repo, because the suite spans frontend AND backend.

Root `vitest` devDependency removed for the same reason — declaring a package
that is never installed is a claim the repo cannot back.

Reproduced properly this time: `rm -rf node_modules` at the root, then
`npm run test` — 43/43 pass against CI's actual layout rather than a locally
convenient one. lint and typecheck also clean.

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

* fix: load vitest config as native ESM to survive Node 18 CI

vite 7 (pulled in by vitest ^3.2.7) dropped its CJS build entirely.
frontend/package.json has no "type": "module", so a .ts config gets
bundled and require()'d as CommonJS — and that bundle itself requires
'vite', which is ESM-only, throwing ERR_REQUIRE_ESM under Node 18 (the
version .nvmrc pins for contentlayer). Renaming to vitest.config.mts
makes Vite load it via native dynamic import instead, sidestepping the
CJS bridge. Verified: `npm run verify` (lint+typecheck+test+build)
green under both Node 18 and 22.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 23:30:54 +00:00
dependabot[bot] 445593f841 deps: bump concurrently from 9.2.0 to 10.0.4 (#195)
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 9.2.0 to 10.0.4.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v9.2.0...v10.0.4)

---
updated-dependencies:
- dependency-name: concurrently
  dependency-version: 10.0.4
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 19:45:43 +00:00
dependabot[bot] 9800bea683 deps: bump @playwright/test from 1.54.2 to 1.62.1 (#203)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.54.2 to 1.62.1.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.54.2...v1.62.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.62.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 17:54:41 +00:00
GandClaude Opus 5 250f1b051d fix(ci): put the build back in verify — lint and typecheck cannot see a broken build (#205)
verify was lint + typecheck only. The cost of that gap is on record: contentlayer
0.3.1 reaches into a React internal React 19 removed, so /blog/[slug] threw
"d.getOwner is not a function" during prerender. Both gated signals stayed green
and production served a stale build while every CI run reported success (#202).

verify is now lint + typecheck + build, with `typecheck` promoted to its own
named script so the chain reads as three steps instead of an inline `cd`.

The prisma-engine problem that justified deferring the build no longer
reproduces: `prisma generate` succeeds on 6.19.3.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 16:38:36 +02:00
GandClaude Opus 4.8 c22da3674f chore: close the verify loop (uniform verify script + reflex) (#183)
* ci: add golden verification floor

Wires the shared CI floor (see dotfiles/templates/ci) so main is defended by
lint + typecheck + test + build on every push and PR. npm monorepo — gates frontend lint/typecheck/build (e2e deferred).

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

* ci: pin Node 18 for datacat (contentlayer crashes on exit under Node 20+)

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

* ci: defer build (prisma engine issue); floor = lint+typecheck

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

* chore: add verify script + reflex (Rung 3 — close the loop)

npm run verify = frontend lint+typecheck mirrors CI so an agent self-checks
before done. Verified green.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 11:44:23 +02:00
g-butandClaude Opus 4.5 cb6c2b5ac0 chore: fix security vulnerabilities
Updated vulnerable packages where possible.
Some vulnerabilities remain due to next-contentlayer peer dependency conflicts.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 19:58:41 +01:00
Your NameandClaude b2a4656d16 feat: prepare for deployment - update documentation and backend structure
- Updated CLAUDE.md with unified Erfassung platform concept
- Enhanced backend controllers and routes structure
- Updated dependencies and configurations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-07 19:49:19 +02:00
Your Name 71bd46057e feat(about): enhance about page with project vision and future goals 2025-07-08 23:35:51 +02:00
Your Name c4edfb766e feat(form-builder): Unify builder UX and refactor sidebar editor 2025-07-08 22:39:33 +02:00