Skip to content

Commit 8e80334

Browse files
huv1kclaude
andcommitted
refactor(error-ui): mask error message, center error, drop test buttons
- Show a generic "we're aware and are working on a fix" message in the shared ErrorBoundary instead of the raw error text (still logged and reported to PostHog). - Vertically center the dashboard route error (min-h-svh), matching the app-level error boundary. - Remove the temporary PostHog error-tracking validation buttons now that error tracking is verified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 67b19cc commit 8e80334

4 files changed

Lines changed: 7 additions & 69 deletions

File tree

src/features/dashboard/shared/route-error.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export function DashboardRouteError({
3434
return (
3535
<ErrorBoundary
3636
description="Sorry, something went wrong with this page."
37+
className="min-h-svh"
3738
error={error}
3839
onRetry={() => {
3940
router.refresh()

src/features/dashboard/sidebar/footer.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,13 @@ import {
2424
} from '@/ui/primitives/sidebar'
2525
import DashboardSurveyPopover from '../navbar/dashboard-survey-popover'
2626
import ContactSupportDialog from '../navbar/report-issue-dialog'
27-
import {
28-
RenderErrorTestButton,
29-
ThrowErrorTestButton,
30-
} from './throw-error-test-button'
3127

3228
export default function DashboardSidebarFooter() {
3329
return (
3430
<>
3531
<SidebarFooter>
3632
<SidebarGroup className="!p-0">
3733
<SidebarMenu>
38-
{/* TEMPORARY: PostHog error-tracking validation (ENG-4261). Remove later. */}
39-
<ThrowErrorTestButton />
40-
<RenderErrorTestButton />
4134
<SidebarMenuItem key="github">
4235
<SidebarMenuButton asChild tooltip="GitHub">
4336
<Link

src/features/dashboard/sidebar/throw-error-test-button.tsx

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/ui/error.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import { cn } from '@/lib/utils'
88
import { ErrorIndicator } from './error-indicator'
99
import Frame from './frame'
1010

11+
// User-facing message shown in place of the raw error. The underlying error is
12+
// still logged and reported to PostHog, so we don't expose internals to users.
13+
const GENERIC_ERROR_MESSAGE =
14+
"We're aware of the issue and are working to fix it as soon as possible."
15+
1116
export default function ErrorBoundary({
1217
error,
1318
description,
@@ -48,7 +53,7 @@ export default function ErrorBoundary({
4853
{hideFrame ? (
4954
<ErrorIndicator
5055
description={description}
51-
message={error.message}
56+
message={GENERIC_ERROR_MESSAGE}
5257
className="border-none"
5358
onRetry={onRetry}
5459
/>

0 commit comments

Comments
 (0)