From fa7fd23debce2e7cfce5a8a2d7a33e4acbe2299d Mon Sep 17 00:00:00 2001 From: bruno cesar Date: Mon, 23 Feb 2026 04:22:57 -0300 Subject: [PATCH] Frontend fixes: investigation 401, navigation redesign, route compat, light mode, i18n - Fix listInvestigations trailing slash (307 redirect -> 401) - Add ExposureFactor, ExposureResponse, TimelineEvent, TimelineResponse, HealthResponse interfaces - Add getEntityExposure, getEntityTimeline, getHealthStatus API functions - Simplify nav to 3 items (Dashboard, Search, Investigations) - Add /app/analysis/:entityId route with lazy-loaded EntityAnalysis placeholder - Add /app/graph/:entityId -> /app/analysis/:entityId redirect - Update all /app/graph/ references to /app/analysis/ (SearchResults, Dashboard, Patterns) - Add light mode CSS variables with [data-theme="light"] selector - Add theme toggle (Sun/Moon) in sidebar, persisted to localStorage - StatusBar polls /api/v1/meta/health every 30s for connectivity status - Fix keyboard shortcuts: allow Cmd+K in input/textarea fields - Add title attrs to collapsed ControlsSidebar icons - Fix ControlsSidebar label truncation (overflow: visible) - Add favicon.svg - Add error toast on Dashboard search failure - Add aria-label to logout button - Add 60+ i18n keys (analysis.*, nav.theme*) in PT-BR and EN Co-Authored-By: Claude Opus 4.6 --- frontend/index.html | 1 + frontend/public/favicon.svg | 4 + frontend/src/App.tsx | 102 +++--- frontend/src/api/client.ts | 77 ++++- frontend/src/components/common/AppShell.tsx | 231 +++++++++---- frontend/src/components/common/StatusBar.tsx | 64 ++++ .../graph/ControlsSidebar.module.css | 132 ++++++++ .../src/components/graph/ControlsSidebar.tsx | 158 +++++++++ .../components/search/SearchResults.test.tsx | 4 +- .../src/components/search/SearchResults.tsx | 2 +- frontend/src/hooks/useKeyboardShortcuts.ts | 48 +++ frontend/src/i18n.ts | 320 +++++++++++++++++- frontend/src/pages/Dashboard.tsx | 111 ++++++ frontend/src/pages/EntityAnalysis.tsx | 14 + frontend/src/pages/Patterns.tsx | 2 +- frontend/src/styles/global.css | 233 ++++++++++--- 16 files changed, 1345 insertions(+), 158 deletions(-) create mode 100644 frontend/public/favicon.svg create mode 100644 frontend/src/components/common/StatusBar.tsx create mode 100644 frontend/src/components/graph/ControlsSidebar.module.css create mode 100644 frontend/src/components/graph/ControlsSidebar.tsx create mode 100644 frontend/src/hooks/useKeyboardShortcuts.ts create mode 100644 frontend/src/pages/Dashboard.tsx create mode 100644 frontend/src/pages/EntityAnalysis.tsx diff --git a/frontend/index.html b/frontend/index.html index 7f5d723..5a83be5 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,6 +3,7 @@ + ICARUS