From c64b0a338a16f7b903008fb5f913c3edbef856da Mon Sep 17 00:00:00 2001 From: Jason Staack Date: Thu, 19 Mar 2026 13:16:11 -0500 Subject: [PATCH] fix(ui): improve error page copy and add design system tokens - Tighten error boundary messaging ("issue persists" vs "keeps happening") - Add error context for debugging (window.__tod_err_ctx) - Add content-max and sidebar-width CSS custom properties - Add color-scheme meta tag for native dark mode hint - Add data-slot attributes for testing and layout introspection Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/components/layout/Sidebar.tsx | 6 ++++-- frontend/src/components/ui/error-boundary.tsx | 9 ++++++--- frontend/src/index.css | 4 ++++ frontend/src/routes/_authenticated.tsx | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/layout/Sidebar.tsx b/frontend/src/components/layout/Sidebar.tsx index 4f86665..bb9fa9f 100644 --- a/frontend/src/components/layout/Sidebar.tsx +++ b/frontend/src/components/layout/Sidebar.tsx @@ -1,4 +1,4 @@ -import { useEffect } from 'react' +import { useEffect, useRef } from 'react' import { Link, useRouterState } from '@tanstack/react-router' import { Monitor, @@ -73,6 +73,8 @@ export function Sidebar() { return () => document.removeEventListener('keydown', handleKeyDown) }, [mobileSidebarOpen, setMobileSidebarOpen]) + const navRef = useRef(null) + // Keyboard toggle: [ key collapses/expands sidebar useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { @@ -223,7 +225,7 @@ export function Sidebar() { {/* Navigation */} -