mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
The `<ErrorDetails>` panel — rendered by every Next.js `error.tsx` boundary in HealthLog — surfaces a "Report bug" button that links to `/bugreport`. When the admin flips `bugReportEnabled = false`, that page renders a "Bug reports are disabled" notice. Showing the button in that state is dead-end UX. Reuse the `useAppSettings()` hook introduced for the sidebar nav (Fix 1) and gate the button on the same flag. The other escape hatches (retry, copy diagnostic payload) stay visible so the panel remains useful even when in-app submission is disabled. Tests: SSR-render `<ErrorDetails>` with both flag states and assert the `/bugreport` href appears / disappears accordingly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>