mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 04:12:04 +00:00
Bucket E+F of the v1.4.3 polish pass.
**Disconnect-button styling unified.** Three integrations had three
different "Trennen" buttons: Withings used `outline` + `text-
destructive`; moodLog used solid `destructive` (red bg, white text);
the AI/Codex card used `ghost` + `text-destructive`. Same action,
three readings — confusing. All three now use the Withings pattern
(`outline` + `text-destructive`). The actual confirmation button
inside the AlertDialog keeps its solid-red treatment so the final
"yes, do it" still reads as a strong commit.
**Bug-report explicit on/off toggle.** Until v1.4.3 the bug-report
feature was implicitly gated on "is the GitHub token + repo
configured". An admin who wanted to *temporarily* hide the report
button (e.g. during a freeze window) had to clear the encrypted
token, forcing re-entry on resume — destructive for a reversible
intent. Migration `0027_bug_report_enabled_toggle` adds
`app_settings.bug_report_enabled BOOLEAN NOT NULL DEFAULT TRUE`,
the admin settings schema accepts `bugReportEnabled`, and a Switch
in the admin → Bug Report card lets the operator flip it.
`POST /api/bugreport` now returns 503 ("Bug reports are disabled by
the administrator") when the flag is off — the client already
renders a "not configured" screen on that status, so the report
button hides gracefully without further client-side wiring.
i18n keys added: `admin.bugReportEnabledLabel` + `…Description` in
both DE and EN.
Tests + typecheck green (671/671).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
17 lines
746 B
SQL
17 lines
746 B
SQL
-- v1.4.3: explicit on/off switch for the bug-report surface.
|
|
--
|
|
-- Until this release the bug-report feature was implicitly gated on
|
|
-- "is the GitHub token + repo configured?". That coupling meant an
|
|
-- admin who wanted to *temporarily* hide the bug-report button (e.g.
|
|
-- during a deploy freeze) had to clear the encrypted token, which
|
|
-- forced a re-entry on resume — destructive for a reversible
|
|
-- intent.
|
|
--
|
|
-- Default `true` so existing instances with credentials configured
|
|
-- keep the feature visible after the upgrade. Admins who want it off
|
|
-- flip the switch in `/admin/integrations` (or whichever section
|
|
-- mounts the bug-report card).
|
|
|
|
ALTER TABLE "app_settings"
|
|
ADD COLUMN "bug_report_enabled" BOOLEAN NOT NULL DEFAULT TRUE;
|