Skip to content

feat(settings): extract all six remaining sections — content lands at /settings/<slug>#143

Merged
MBombeck merged 1 commit intomainfrom
worktree-agent-a19ee13a4f5b628e7
May 8, 2026
Merged

feat(settings): extract all six remaining sections — content lands at /settings/<slug>#143
MBombeck merged 1 commit intomainfrom
worktree-agent-a19ee13a4f5b628e7

Conversation

@MBombeck
Copy link
Copy Markdown
Owner

@MBombeck MBombeck commented May 8, 2026

Summary

Settings → Account, AI, Integrations, Notifications, Dashboard, API, Advanced, and About all show real content now. The eight-tab /settings/<slug> shell from the previous PR no longer falls back to placeholders for known sections.

What users see

  • /settings/account — profile form, passkey list + add-passkey, password change dialog.
  • /settings/about — app version, license badge (AGPL-3.0), build SHA, build timestamp, links to source / CHANGELOG / docs, plus a Check for updates button that compares against the GitHub releases API.
  • /settings/ai — Codex / ChatGPT connect, privacy mode toggle, regenerate insights, per-user AI provider override.
  • /settings/integrations — Withings + moodLog credential forms, sync, full-sync, disconnect — and Test connection buttons (A8-UI) that probe the upstream live and surface translated error codes.
  • /settings/notifications — Telegram, ntfy, Web Push management — including a Test connection button on Web Push.
  • /settings/dashboard — tile layout + threshold overrides (re-uses the existing components).
  • /settings/api — endpoint reference table + bearer-token CRUD.
  • /settings/advanced — export (CSV/JSON/doctor PDF) + danger-zone full data wipe.

Cleanup

  • Deleted src/app/settings/page.legacy.tsx (the 3230-LOC monolith).
  • Sync-from-server patterns rewritten using the React-recommended prev-payload-id render-time pattern, so the strict react-hooks/set-state-in-effect rule passes without a file-level disable.
  • Notifications split into telegram-card.tsx, ntfy-card.tsx, web-push-card.tsx to keep each file under ~600 LOC.
  • New shared primitives: password-input.tsx, test-connection-button.tsx.

i18n

  • Added settings.about.* (10 keys) and settings.testConnection.* (16 keys) in both en.json and de.json. Locale-parity test continues to pass.

Test plan

  • pnpm test — 514 pass (was 505 baseline; +9 new SSR smoke tests, one per section)
  • pnpm typecheck — clean
  • pnpm lint — only the pre-existing medications/page.tsx baseline error remains; all extracted-from-legacy errors gone
  • pnpm format:check — every changed file clean
  • pnpm build/api/version pre-existing turbopack prerender bug is on baseline (documented in spec); unrelated to this PR
  • Manual: navigate to each /settings/<slug> and confirm real content
  • Manual: click "Test connection" on Withings / moodLog / Web Push and verify the latency / error-code feedback
  • Manual: click "Check for updates" on /settings/about

🤖 Generated with Claude Code

… /settings/<slug>

Replace the SectionPlaceholder fallbacks for Account, AI, Integrations,
Notifications, Dashboard, API, Advanced, and About with real per-section
components. Every /settings/<slug> URL now renders working content; the
placeholder only fires for unknown slugs.

A2-content extraction
- Account: profile + passkeys + password change (account-section.tsx)
- AI: insights + per-user provider override (ai-section.tsx)
- Integrations: Withings + moodLog (integrations-section.tsx)
- Notifications: Telegram + ntfy + Web Push (split into telegram-card,
  ntfy-card, web-push-card to keep each file under ~600 LOC)
- Dashboard: layout + thresholds wrappers (dashboard-section.tsx)
- API: endpoints + tokens (api-section.tsx)
- Advanced: export + danger zone (advanced-section.tsx)
- About (greenfield): version, license, build SHA, repo/changelog/docs
  links + "Check for updates" against GitHub releases

A2-about
- Reads /api/version via TanStack Query, surfaces app version, AGPL-3.0
  badge, short build SHA, build timestamp, repo/changelog/docs links.
- "Check for updates" button compares against api.github.com latest
  release tag with up-to-date / newer-available / failure feedback.

A8-UI test buttons
- Shared TestConnectionButton primitive that POSTs to a test endpoint,
  surfaces ok-with-latency or translated meta.errorCode failures.
- Wired into Withings + moodLog (Integrations) and Web Push
  (Notifications). Glitchtip + Umami remain admin-only.

i18n
- New settings.about.* and settings.testConnection.* key groups in en.json
  and de.json.

Cleanup
- Delete src/app/settings/page.legacy.tsx (3230 LOC monolith).
- Convert sync-from-server patterns to the React-recommended
  prev-payload-id render-time pattern so the strict
  react-hooks/set-state-in-effect rule passes without a file-level disable.

Tests
- New src/components/settings/__tests__/sections.test.tsx with 9 SSR smoke
  tests (one per section) — total suite 514 (was 505).

Co-Authored-By: Marc-André Bombeck <mbombeck@gmail.com>
@MBombeck MBombeck merged commit 65e86e4 into main May 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant