fix(journal): type notifications summary() with TFunction #334

Merged
ullrich merged 1 commit from fix-notifications-tfunction into main 2026-11-15 22:16:39 +00:00
Owner

What

summary() in apps/journal/app/routes/notifications.tsx declared its t parameter as a hand-written (key: string, opts?: Record<string, unknown>) => string. It now uses TFunction<"journal"> from i18next, the same approach as apps/planner/app/components/SessionView.tsx.

Why

i18next 27 tightened TFunction, so the t from useTranslation("journal") is no longer assignable to the hand-written signature. This is the TS2345 that fails CI / Checks on #331. Landing it first lets the grouped i18next Renovate PR (see #333) go green.

Type-only change, no runtime behaviour change.

Testing

  • pnpm typecheck, pnpm lint, pnpm test pass on main (i18next 26).
  • Journal typecheck also passes with this patch applied on top of renovate/i18next-27.x (i18next 27.1.2).
  • E2E not run locally — no runtime change.

🤖 Generated with Claude Code

## What `summary()` in `apps/journal/app/routes/notifications.tsx` declared its `t` parameter as a hand-written `(key: string, opts?: Record<string, unknown>) => string`. It now uses `TFunction<"journal">` from `i18next`, the same approach as `apps/planner/app/components/SessionView.tsx`. ## Why i18next 27 tightened `TFunction`, so the `t` from `useTranslation("journal")` is no longer assignable to the hand-written signature. This is the TS2345 that fails `CI / Checks` on #331. Landing it first lets the grouped i18next Renovate PR (see #333) go green. Type-only change, no runtime behaviour change. ## Testing - `pnpm typecheck`, `pnpm lint`, `pnpm test` pass on `main` (i18next 26). - Journal typecheck also passes with this patch applied on top of `renovate/i18next-27.x` (i18next 27.1.2). - E2E not run locally — no runtime change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(journal): type notifications summary() with TFunction
All checks were successful
CD Staging / Build & Push journal Image (pull_request) Has been skipped
CD Staging / Build & Push planner Image (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
CI / Security Scan (pull_request) Successful in 17s
CI / Dockerfile Package Check (pull_request) Successful in 4s
CI / Visual Tests (pull_request) Successful in 44s
CI / Checks (pull_request) Successful in 1m57s
CI / Journal Image Smoke Test (pull_request) Successful in 1m10s
CI / E2E Tests (pull_request) Successful in 3m35s
Cancel superseded CI / Cancel in-flight CI (pull_request) Successful in 2s
CD Staging / Tear Down PR Preview (pull_request) Successful in 15s
0a08d7f617
The hand-written `(key, opts?) => string` parameter no longer accepts the
`t` from useTranslation under i18next 27 (TS2345). Use i18next's own
TFunction, which compiles on both 26 and 27.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ullrich scheduled this pull request to auto merge when all checks succeed 2026-11-15 22:15:10 +00:00
ullrich deleted branch fix-notifications-tfunction 2026-11-15 22:16:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trails-cool/trails!334
No description provided.