Commit Graph
4 Commits
Author SHA1 Message Date
GandClaude Opus 5 a21d8906af chore: add a formatter, and close a CSS comment that was never closed (#419)
* 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, and close a comment that was never closed

The formatter refused this repo outright, which turned out to be a real defect
rather than a tooling complaint. kivitendo-intake.css opens a header comment,
and line 17 contains an inner /* ⚠ PRÜFEN */ — CSS comments do not nest, so
that inner terminator CLOSES the header. Everything after it is parsed as CSS
until the stray */ on line 20. A browser mis-parses it the same way.

The file exists in two places (public/presentations/ and deliverables/), both
carrying the same defect; fixing one still failed the gate, which is how the
duplicate surfaced at all.

Mechanical otherwise. This SHA is listed in .git-blame-ignore-revs.

* chore: teach git blame to skip the reformat

* fix: undo a 3-way merge duplication in AdminSidebar.tsx

Merging main with -X theirs duplicated a 30-line block: main's currency-sweep
commit and this branch's prettier reformat both touched overlapping lines in
the single-destination-group render path, and the -X theirs strategy inserted
rather than replaced, leaving two near-identical copies and a dangling closing
brace — SyntaxError: ',' expected at line 298.

The branch has no legitimate change to this file's logic, only formatting, so
main's content is correct outright. Took it wholesale rather than hand-editing
the merge result.

* fix(lint): reattach 5 directives the reformat detached

Four eslint-disable-next-line sites for react-hooks/set-state-in-effect and one
@ts-expect-error, all the same defect: the directive sat above useEffect( (or
above a JSX element), while the statement that actually errors is 1-2 lines
further down inside the block. eslint/tsc report at the real statement; the
directive, still bound to its original line number, protects nothing there.

TimecardReviewDrawer.tsx (x2), DataEntryTabs.tsx, AppointmentBookingForm.tsx,
CreatePoolModal.tsx. Same root cause documented for hirnli, fleetcrown and
ivy-portal earlier today — a positional directive is a hidden dependency on
formatting, and this is the fourth distinct shape it's taken.

* fix(i18n): restore a same-line audit-exemption marker

Fifth shape of today's positional-directive defect, this time the repo's own
i18n-hardcoded-audit convention rather than eslint or tsc: a // i18n-ok comment
exempts a hardcoded string only when it trails the SAME line. prettier wrapped
this one if-statement's long condition onto its own line, leaving the marker
on the return statement below — the exact sibling one line down
('fortgeschrittene bis experten') stayed on one line because it was short
enough not to wrap, and it alone kept passing.

Restored the one-line form and added // prettier-ignore so a future reformat
cannot re-split it. Verified against the real audit script locally: 0 new
violations.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-31 13:35:50 +00:00
Mao NakamotoandClaude Opus 4.7 aab03321bf tools(i18n): expand audit + translation-pipeline scripts
New scripts:
- i18n-leaks.mjs / i18n-apply-leaks.mjs — detect+merge per-locale
  values that are identical to en.json/de.json source (untranslated leaks)
- i18n-hardcoded-audit.mjs — catches German UI strings hardcoded in
  tsx outside messages/ AND wrong-language values inside messages/<locale>.json
- i18n-split-chunks.mjs / i18n-merge-chunks.mjs — split _missing/<locale>.json
  into N chunks for parallel translation, then reassemble

Modified:
- i18n-apply.mjs / i18n-audit.mjs / i18n-missing.mjs / merge-messages.ts
  — accept 'ru' as a valid locale
- package.json — new npm scripts: compliance:i18n-hardcoded, i18n:leaks,
  i18n:apply-leaks; bundled into the compliance umbrella

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-09 09:30:46 +02:00
Mao Nakamoto 4ae037c5fb docs(audit): cleanup pass — clear stale TODOs (i18n-apply was Phase R, Sentry was Phase M); append Phase P–T execution log + 14-file pre-existing react-compiler lint debt note; recorded session patterns in memory (env validation presence-only, design SSOT three-layer, CO₂ credibility traceability, audit-subagent-overflag verification) 2026-06-03 16:39:02 +02:00
Mao NakamotoandClaude Opus 4.7 36234fb346 feat(mission+infra): land Phase J/M/N/O — surface live impact on /shop + /marketplace via shared <MissionStrip> ("Jeder Kauf hält ein Gerät aus dem Müll" + live devices-rehomed + CO₂-avoided stat with methodology link, server-component reusing the same fetchImpactStats helper as ImpactStatsSection so the homepage stat / methodology page / commerce strip never drift apart); wire Sentry inert-until-DSN (src/instrumentation.ts + sentry.server.config.ts + sentry.edge.config.ts; @sentry/nextjs installed; SENTRY_DSN added to src/env.ts schema as optional; zero bundle impact / zero startup cost when DSN absent); generate i18n translator inventory (npm run i18n:missing emits per-locale messages/_missing/<locale>.json with the 1334 missing keys broken down by namespace; docs/TRANSLATION.md explains workflow, priority queue, and why machine-translation is the wrong tool); document dependency upgrade plan (docs/UPGRADE_PLAN.md — Tier 1 safe-today, Tier 2 React 19 + TS 6 + ESLint 10 dedicated branch, Tier 3 Tailwind 4 wait-for-ecosystem); remove obsolete @types/puppeteer (puppeteer 24+ ships own types); explicitly deferred TimecardsClient refactor (Phase L) — 669-line component with no tests, low mission value, refactor risk outweighs benefit until test coverage exists
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 15:39:46 +02:00