Skip to content

Revamped UI - #100

Merged
atulmgupta merged 33 commits into
mainfrom
revamped-ui
Aug 30, 2026
Merged

atulmgupta merged 33 commits into
mainfrom
revamped-ui

Conversation

@atulmgupta

Copy link
Copy Markdown
Contributor

Description

Closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would break existing functionality)
  • Documentation update
  • Infrastructure / CI change

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing tests pass locally
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Screenshots (if applicable)

atulmgupta and others added 20 commits August 23, 2026 21:46
Replace the neon/glassmorphism visual language with a calmer 'Signal Blue' palette (#3b82f6), flatter surfaces, and a simplified splash/logo without gradients. Introduce a central gaugeTone token map (LinearGauge `tone` prop) so status colors stay fixed while brand colors follow the active theme preset. Refactor MetricCard, PageContainer, PageHeader, Badge, Button, Input/Select/Textarea, Tabs/TabNav to shared rounded-shape/CSS-variable tokens and stable `data-role` hooks for tests.

Add a curated compact navigation tree (`sidebar/compactNav.ts`) for the default Linear sidebar — nine product-oriented groups distilled from the full 20-group catalog, with long-tail routes still reachable via /explore or injected into their mapped group when active. Replace the dashboard-only RecentlyViewedWidget with a global StatusBar `RecentPagesSegment` popover. Update PWA icons/manifest to the new framed brand mark. Fix an EfficiencyPage date-range filtering bug (UTC vs. local timezone off-by-one). Update the affected test suite accordingly.
- Backend: /alerts now accepts severity/read/archived filters (GetLogsFiltered), MarkRead persists real read state via BulkSetRead instead of being a no-op, and alert handlers gain OpenTelemetry tracing.
- Status bar: new AlertsSegment (unread critical/warning alerts with drill-through + live announcements), MoreSegment overflow for narrow viewports, StatusBarContext coordinating a single open popover and shared live region, BackgroundWorkSegment showing transient success/error outcomes (not just running jobs), LiveTelemetrySegment flagging streams stale after 2 minutes, admin-only diagnostics popover on ConnectionSegment, and a persistently-owned AboutBuildModal reachable from the Help menu.
- Vehicle scope: useSelectedVehicle now syncs the URL (incl. /vehicles/:id path rewrites) and repairs stale/deleted ids; new useVehicleVinFilter bridges VIN-based Tesla charging pages to the global vehicle id. Many admin/analytics/export pages now consume the canonical selection instead of local state.
- API client: added `acceptedStatuses` so /system/health's HTTP 503 degraded payload is parsed instead of throwing.
- Layout: removed the centered 1920px max-width cap so pages use the full viewport width.
Improve shared component spacing, typography, controls, tables, feedback states, and accessibility. Simplify sidebar and explore navigation, consolidate dashboard actions and status ownership, and expand the onboarding experience.
Introduce a persistent desktop WorkspaceHeader that consolidates breadcrumbs, command-palette search, vehicle scope picker, notifications, and theme control into a single command plane above the main content. The mobile sidebar drawer keeps its own search trigger and vehicle picker for narrower viewports.

Raise the primary layout breakpoint from `lg` to `xl` across Layout, BottomTabBar, and related tests so the new workspace shell only activates on wide desktop screens, with the mobile bottom tab bar and drawer remaining active below that breakpoint.

Restyle PageHeader/PageContainer headers with a rounded panel, accent bar, and lg:pb-6 spacing, and refresh sidebar section rows (Linear/Notion) with active-state highlighting, larger touch targets, and a renamed "Favorites" → "Quick access" / "Pages" → "Workspace" group.

Rebrand the dashboard from "Command Center" to "Fleet Operations" and add a new FleetOperationsBrief component summarizing fleet posture, active vehicle scope, and primary workflow shortcuts (live map, alerts, charging, battery).

Add i18n keys for the new workspace and operations copy.
Adds shared workspace range and density controls, operational briefs, entity preview drawers, deferred command-palette loading, and navigation prefetching. Scopes energy history to the selected window and improves pending live-state handling.
Backend: alerts now filter by a canonical multi-vehicle rule scope (all_vehicles/junction table) instead of the deprecated alert_rules.vehicle_id, add vehicle_id/date-range/keyset-cursor query params to GET /alerts, and expose saved-views listing without a required route.

Frontend: introduce useBulkSetAlertsRead, paginated useAlerts fetchAll mode, an AlertDetailDrawer/AlertOperationalBrief pair, bulk selection on the alerts list, contextual EntityPreviewDrawer related-action links across drives/charging/locations/maintenance/vehicles pages, a shared PageActions layout with semantic action slots, discard-changes-guard dialogs on fleet-ops/settings editors, standardized loading skeletons (ListSkeleton, DataStateNotice) replacing ad-hoc spinners, and a unified StatusAwareError/error-classification module powering QueryError and ErrorDisplay.

Also adds Live/24h rolling range presets with rolling instant bounds in useRangeState, saved-view and alert command-palette integration, and numerous accessibility fixes (form field aria-describedby wiring, Drawer focus/scroll handling, checkbox components).
Introduce a shared EmbeddedChart wrapper plus responsive chart sizing tokens (chartSizing.ts), and migrate ~100 feature charts, widgets, and admin panels off ad-hoc div/height wrappers onto ChartContainer/EmbeddedChart/AnalyticsChartPanel. ChartContainer now supports an `embedded` variant, contained error/retry, contextual empty copy, and semantic size presets; ChartLegend/ChartTooltip replace raw recharts Legend and inline contentStyle so legend toggling and theming stay consistent.

Add DataSourceNotice and PageContainer `dataSources` so pages name unavailable sources and keep working sections visible instead of collapsing to a single fatal error. EmptyState gains a `description` slot and dozens of empty states now explain prerequisites and recovery instead of a bare "No data available".

Correct several data-truth issues:
- Vampire drain migrates to the canonical derived-history API shape (drain_pct_per_day, observed windows) and stops claiming Sentry attribution.
- Charging "efficiency" is renamed to delivery rate (ChargeRatePanel replaces EfficiencyPanel); wall-to-battery loss is explicitly reported as not measured.
- Drive efficiency, scoring, and aggregation now require measured SI energy instead of fabricating a battery-delta estimate; partial coverage is disclosed.
- Energy page derives cost/savings only with complete cost coverage and uses configured gas assumptions.

Harden tooling: audit.sh and verify-api-hooks use a TypeScript/Go AST extractor (contract-paths.cjs), add audit:chart-frame, promote the chart-legend audit to a hard gate, and replace the stale PENDING_MIGRATION list with explicit alternative export-surface checks. Add ListExportMenu-based CSV/JSON export to API logs and the notification inbox, persist DataTable page size, and fix AreaChart gradient id collisions plus route prefetch for parameterized paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move heavy startup work off the critical path so the entry chunk parses and paints sooner:

- Defer the ~1 MB English i18n catalog to an idle-time chunk; `t()` defaults keep the first render readable until it hydrates.
- Lazy-load OpenTelemetry RUM only when `VITE_OTLP_HTTP_ENDPOINT` is set, plus ThemePicker, FeedbackModal, KeyboardShortcutsModal and react-day-picker.
- Load only the active sans/mono font pair from FontProvider after first paint instead of eight families in index.html; drop the global Leaflet stylesheet.
- Add `runtime.ts` barrels for ui/feedback/motion/data-display so shell components stop pulling whole category barrels into the entry chunk.
- Replace the `clsx` dependency with an inline class joiner in `cn()`; split `webVitalsConsent` out of the reporter.
- Dismiss the splash on rAF rather than `window.load`.

Bundle/perf tooling: extract shared `bundle-assets.mjs`, detect the real entry from `dist/index.html`, report initial (entry + modulepreload) gzip, fix `measure-perf.mjs` on Windows with a shared headless Chrome, and add `perf-baseline.schema.json` with a regenerated baseline.

Layout fix: bound the ChartContainer viewport (`min-w-0`, `max-w-full`, `contain: layout size`) so a chart's intrinsic SVG width can no longer stretch its grid track; EmbeddedChart now only defaults to fluid when no explicit height is given.

Accessibility: add a shared `<Table>` primitive and convert remaining raw `<button>`/`<table>`/`sr-only` usages to shared components, and interpolate the bulk-feedback toast count instead of concatenating.
Adds GET /api/v1/activity, a read-only timeline unioning drives, charging sessions, alerts, software updates, and annotations via a single composed query. Extends Action Center with four new evidence providers (battery health, drive efficiency, command reliability, system incidents) run concurrently, plus supporting SLOs, dashboards, and alerting rules.

On the frontend, introduces operational-mode awareness (live/cached/as-of) that gates live-only mutations at the request boundary, adds presentation modes (report/kiosk) replacing the dashboard-only kiosk implementation, workspace/product preferences (persona, landing page, default vehicle, contextual help), decision-narrative components for operational briefs, and a PWA precache audit to keep route chunks on-demand rather than eagerly downloaded. Also hardens the verify-api-hooks contract-path extractor for dynamic route helpers and updates numerous UI components/tests for the new features.
Use a ref for location in usePresentationMode's updateMode callback to avoid stale closures and unnecessary re-creation on navigation. Add tests for disabled bulk actions when reconnecting in AutomationListPage, and for cross-tab storage updates overriding a failed in-memory write in useProductPreferences.
Introduce a route-aware workspace scope (`useWorkspaceScope` + `getWorkspaceRouteScope`) so the shell header/footer own the canonical range and vehicle pickers, and per-page `RangePicker`/`VehicleSelect` instances defer to them unless explicitly marked `scope="local"`.

- Add `WorkspaceScopeProvider`/`useWorkspaceScope` and route→scope mapping in `lib/workspaceScope.ts`.
- `PageActions` now prunes nested controls tagged as workspace-managed via a new `WORKSPACE_SCOPED_CONTROL` marker.
- Replace ad-hoc per-page `<Select>` vehicle pickers (Statistics, Timeline, WeeklyDigest, Locations, Sharing/Trips, ServiceIntelligence, StateMachineDebugger) with the canonical `VehicleSelect`.
- Remove `ActiveVehicleSegment` from the status bar/MoreSegment; simplify `WorkspaceContextControl` and rebalance `WorkspaceHeader` into a three-track grid with `--shell-sidebar-width` CSS vars.
- Extend `Grid` with `2xl`/`3xl` breakpoints and a container-aware `minItemWidth` auto-fit mode; adopt it across several stat-card grids.
- `useRangeState` now resets pagination params on range change; `ChargingCurvePage`/`StateMachineDebuggerPage` reset stale selections on range change too.
- Update associated tests to cover workspace scoping, pruning, and the new Grid/header behavior.
Replace translate-x centering with a flex-centered positioner div to avoid subpixel offset issues. The panel now sits inside a fixed, pointer-events-none wrapper that centers its content, accounting for the sidebar width on xl screens via padding instead of a half-width CSS variable.

Removes the now-unused --shell-sidebar-half-width token and updates tests to match the new DOM structure and classes.
Adds a read-only diagnosis endpoint (GET /data-repair/suggestions) that detects broken drive/charging session boundaries by finding durable telemetry evidence contradicting the stored state (e.g. a charging session starting while a drive is still open), instead of relying on wall-clock age alone.

Rewrites session recovery/cleanup (RecoverSessions, ValidateRecoveredSessions, RecoverIncompleteSessions, CleanupStaleSessions) to close sessions only from timestamped contradicting evidence; ambiguous sessions are left open for operator review rather than auto-closed after a timeout.

The apply path (POST .../close) now supports applying a reviewed suggestion with bounds checking, idempotency, optimistic concurrency (compare-and-swap on ended_at), evidence re-validation, and an overlap guard against the next session. All repair mutations are now wrapped in a transaction with an audit_logs entry and OpenTelemetry spans.

Adds frontend components (RepairSuggestionCard, RepairSuggestionSection, RepairEvidenceTimeline) and hooks (useRepairSuggestions, useApplyDriveRepair, useApplyChargingRepair) so operators can review evidence and explicitly confirm each repair; DataRepairPage now surfaces these suggestions above the legacy stale-session worklist.

Adds new SLOs/dashboards/alerts for data_repair_read_availability and data_repair_write_availability, and layer-annotation doc.go files for several packages.
Introduces end-to-end durable data-repair case management: new DB schema (cases/comments/scan-runs/quarantine), repositories, scanner pipeline, and API routes for case listing/stats/detail, transitions, assignment, comments, bulk actions, scan trigger, quarantine, restore, and boundary preview. Legacy delete flows now quarantine with reversible snapshots, close/apply paths are case-aware with stronger concurrency/audit handling, and OpenAPI/SLO/trace docs were updated.

On the frontend, Data Repair was reorganized into a case workspace with queue/drawer/collaboration/quarantine views, new TanStack hooks, and controlled action flows (preview-before-apply, reasoned quarantine/restore, bulk transitions). AI guidance and wording were updated from “discard” to “quarantine,” with related toast/UI/navigation and accessibility improvements plus expanded tests.
updated
Modernize the responsive UI and data-trust experience, deliver production-grade repair workflows, and add comprehensive accessibility, performance, security, PWA, observability, and release gates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Pin the release scan to Trivy v0.74.0 because the action's removed v0.65.0 release assets break every matrix job before scanning. Preserve the archive/report contract, add a 30-minute timeout, and lock the inputs with a regression test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Replace the EOL nginx 1.25 / Alpine 3.19 runtime that introduced three fixable CRITICAL CVEs with digest-pinned nginx 1.30.4 on Alpine 3.24. Apply available Alpine security upgrades during the image build so fixed OpenSSL and expat packages are included before the release scan.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Compare grouped calendar keys with today in the active vehicle timezone instead of UTC. This keeps Aug 27 labeled Today during the Pacific evening after UTC has advanced to Aug 28, and applies the same correction to charging history.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Use theme-aware surfaces and stronger foregrounds for the mobile tab bar, add compact localized labels, and preserve a non-color active state across light and dark themes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
atulmgupta and others added 4 commits August 27, 2026 23:00
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Scale canonical fleet-state reads, live recovery, remediation, accessibility, observability, and release-quality gates for production fleets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
atulmgupta and others added 9 commits August 28, 2026 23:31
Add reset-safe supervised self-driving analytics with explicit telemetry confidence and historical normalization provenance.

Ship the responsive FSD dashboard, accessible chart semantics, browser and unit coverage, and route-scoped SLO assets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Add durable Fleet API budgets, telemetry provenance and transport agreement, operator-facing data quality, guarded recovery and retention controls, deterministic Helm secret lifecycle, and generated SLO evidence.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Retry failed subscriptions while connected, fail liveness only for broker-reachable consumer wedges, and reject multi-owner Fleet Telemetry deployments. Add persistent broker queue headroom and truthful subscription/backlog observability.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Add replay-safe probes, bounded dependency waits, persistent-state guards,
and non-overlapping MQTT worker rollouts for same-node recovery.

Retain the Redis client across startup outages so cache and live-state
integration recover without requiring an API restart. Add a machine-checked
operator runbook and Helm CI recovery assertions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Ship a pinned Fleet Telemetry producer that publishes Tesla source timestamps, quarantine timestamp-less payloads, and propagate event time through live state, FSMs, and drive/charging sessions.

Continuously reconcile the durable MQTT subscription with generation-safe SUBACK leases so silent subscription loss self-heals without deleting the offline queue.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Use bounded curl retries for all pinned Fleet Telemetry build inputs and fetch the upstream source directly from codeload so transient GitHub network failures do not abort release builds.

Upgrade the Docker build action to the Node 24-based v7 release in CI and release workflows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Replace the empty subscription-lock barrier with a synchronized lifecycle transition after any in-flight SUBACK completes, preserving shutdown ordering while satisfying static analysis.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
Override vulnerable dependencies in the pinned upstream Fleet Telemetry source while retaining reproducible versions and upstream MQTT regression tests.

This removes the critical gRPC authorization bypass and all remaining fixable high/medium findings from the release candidate image.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4f5fe6d-5e00-4d43-a379-96a3491480e3
@atulmgupta
atulmgupta marked this pull request as ready for review August 30, 2026 19:42
Copilot AI lite review requested due to automatic review settings August 30, 2026 19:42
@atulmgupta
atulmgupta merged commit 4a3425e into main Aug 30, 2026
50 of 57 checks passed
@atulmgupta
atulmgupta deleted the revamped-ui branch August 30, 2026 19:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants