mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 16:12:11 +00:00
feat(admin): bug-report toggle, unify "Trennen" button styling
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>
This commit is contained in:
1 parent
dc01ab7934
commit
d438a8520d
11 files changed
+76
-2
No files matched your search
@@ -0,0 +1,16 @@
|
||||
-- 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;
|
||||
@@ -466,6 +466,11 @@ model AppSettings {
|
||||
glitchtipEnvironment String? @map("glitchtip_environment")
|
||||
githubIssueTokenEncrypted String? @map("github_issue_token_encrypted")
|
||||
githubIssueRepo String? @map("github_issue_repo")
|
||||
// v1.4.3: explicit toggle so an admin can hide the bug-report
|
||||
// surface without nuking the token+repo config. Default true so
|
||||
// existing instances with credentials don't accidentally lose
|
||||
// the feature on upgrade.
|
||||
bugReportEnabled Boolean @default(true) @map("bug_report_enabled")
|
||||
|
||||
// Medication reminder thresholds (minutes after windowEnd)
|
||||
reminderLateMinutes Int @default(120) @map("reminder_late_minutes")
|
||||
|
||||
Reference in new issue
Block a user