Commit Graph
13 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 Fable 5 79f6fd078f feat(saldo): extract the time-balance engine as a standalone package
The Zeitsaldo/Feriensaldo accounting core is now `saldo-engine`
(packages/saldo) — pure, dependency-free TypeScript with its own tests
(node:test, 12 passing, zero app imports) and an MIT licence, ready to
publish and reuse in any project.

- packages/saldo: the engine (computeTimeSaldo / computeVacationBalance),
  schedule math, a config-driven category classifier (Swiss default, bring
  your own), optional Swiss holidays, a BRAND SSOT so the name is a one-line
  change, a README, and a marketing landing page (site/index.html, DE/EN,
  light/dark, live balancing ledger).
- The app dogfoods it: src/lib/team/saldo.ts is now a thin adapter that wires
  the engine to this app's category SSOT (@/config/timecards). Behaviour is
  identical — all existing saldo tests pass through the package.
- tsconfig + jest: `saldo-engine` path alias → packages/saldo/src.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 09:00:21 +02:00
g-butandClaude Sonnet 4.6 afe6f29451 fix: resolve 500 crash on homepage — useTranslations and useSession SSR failures
Three related fixes that together eliminate the homepage 500:

1. Root layout: remove ConditionalMainLayout (rendered Header outside
   NextIntlClientProvider — useTranslations crash)

2. Locale layout: remove duplicate Providers wrapper (already in root),
   keep ConditionalMainLayout inside NextIntlClientProvider context

3. SessionProvider: import SessionContext from next-auth/react and provide
   a loading-state fallback during SSR so useSession() returns
   {data:null, status:'loading'} instead of throwing across all pages

4. Header: dynamic-import UserMenu + MobileMenu with ssr:false as an
   additional guard (auth UI is client-only by nature)

5. tsconfig: include .next/dev/types for Turbopack-generated type stubs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 09:47:50 +02:00
g-butandClaude Sonnet 4.6 016d9e6f82 fix: resolve Next.js 16 Turbopack SSR static generation failures
- Add global-error.tsx (pure HTML, no React imports) to avoid useContext
  null crash in /_global-error SSR bundle during static generation
- Add force-dynamic to not-found.tsx and dozens of locale pages to prevent
  lucide/next-auth from landing in shared SSR bundles
- Extract AbosPageClient from abos/page.tsx (server wrapper pattern)
- Fix blog/page.tsx searchParams type to Promise<T> (Next.js 15+)
- Rewrite SessionProvider to lazy-load next-auth/react client-side only
- Change RouteHandler<TParams> to interface with two call signatures so
  withAuth/withAdmin satisfy Next.js route validator SecondArg inference
- Fix listings/[id] and sellers/[id] params types (non-optional Promise)
- Fix sellers/__tests__ to pass Promise.resolve({id:''}) instead of undefined
- Remove dead file-loader webpack rule from next.config.js
- Add ERROR_MESSAGES constants used by middleware
- Update config tests and API response helper tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 08:47:22 +02:00
g-butandClaude Opus 4.6 f542cb7c44 refactor: replace Medusa API calls with native database queries
Refactor all product management endpoints to use direct PostgreSQL queries
instead of Medusa HTTP API calls. Product CRUD operations (admin/products),
bulk import, health check, and inventory routes now query the database
directly. Remove medusa_customer_id from user model, Medusa provider from
component tree, and Medusa types from common types. Simplify order service,
payment flow, and shop pages to work without Medusa dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 11:43:35 +01:00
g-butandClaude Opus 4.5 c6aa347e68 fix: resolve all TypeScript errors (772→0)
- Add row type interfaces for database query results across API routes
- Fix middleware ValidSession type with explicit interface definition
- Add type casts for query results using `as RowType` pattern
- Fix component type mismatches (DetectedProductData, ListedProduct)
- Add function overloads for chatbot getMessage utility
- Fix design-system kebab-case to camelCase variant conversion
- Exclude backup files from TypeScript checking in tsconfig.json
- Fix FilterableItem compatibility with index signature
- Update WorkshopLocation interface with canton and max_capacity
- Fix payment security undefined check for amount

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 01:28:54 +01:00
g-butandClaude Opus 4.5 0a5c66156b upgrade: Next.js 14 → 16 with ESLint 9 and compatibility fixes
Major version upgrade of Next.js from 14.2.35 to 16.1.1 with associated
dependency updates and code compatibility fixes.

Changes:
- Upgraded Next.js from 14.2.35 to 16.1.1
- Upgraded ESLint from 8.57.1 to 9.39.2 with flat config format
- Upgraded eslint-config-next to 16.1.1
- Removed deprecated .eslintrc.json (replaced by eslint.config.mjs)
- Updated next.config.js: removed deprecated eslint config, moved
  experimental.turbo to turbopack key
- Added Suspense boundaries around useSearchParams() usage (required
  in Next.js 16):
  - auth/login, auth/reset-password, auth/verify-email
  - shop/checkout
  - blog page (BlogNavigationClient)
- Fixed missing imports (getStatusColors in ai-cms, useEffect in
  workshops/propose)
- Made payment-demo a client component to allow event handler props

Build verified with 138 static/dynamic pages generated successfully.
0 npm vulnerabilities after upgrade.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:01:09 +01:00
Your Name 148d91a1b7 Update Dockerfile and TypeScript definitions; enhance health check and user role management
- Added curl to Dockerfile for health check improvements.
- Modified npm install commands to build TypeScript and prune unnecessary packages.
- Updated health check command to use curl for better reliability.
- Adjusted TypeScript definitions for user-related functions to return more specific response types.
- Changed user role options from 'viewer' to 'user' in multiple places for consistency.
- Updated package.json dependencies, including downgrading jsonwebtoken types and switching bcrypt to bcryptjs for compatibility.
- Added new environment variables for email configuration in the env.template file.
- Cleaned up various files by removing unnecessary newlines and ensuring consistent formatting.
2025-12-16 16:11:35 +01:00
Your Name 8b1ed53e6c chore(tsconfig): exclude tina/ from type checking to fix Vercel build 2025-10-29 09:47:49 +01:00
Your Name 819d92cc4c fix: exclude cms-api from TypeScript compilation to fix deployment 2025-09-15 15:28:11 +02:00
Your NameandClaude 13210a88c2 feat: update admin authentication and storage adapters
- Enhanced PostgreSQL storage adapter configuration
- Updated admin dashboard components
- Improved authentication routing
- Fixed TypeScript configuration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 11:10:05 +02:00
Your Name 2eb4d191da Auto-deploy: Updates from 2025-09-15 02:13:33 2025-09-15 02:13:33 +02:00
Your Name f8f4696ce7 Initial commit: Setup Next.js project with basic structure and components 2025-04-17 16:44:47 +02:00