Skip to content

UI/UX Redesign: Map-centric dashboard with dark/light mode and mobile-first navigation #25

@mphacker

Description

@mphacker

UI/UX Redesign Plan

Problem Statement

The TeslaUSB web interface is functional but feels like a utility toolkit rather than a polished automotive dashboard. Key issues:

  • 8 navigation items crowd the nav bar (Settings, Analytics, Map, Videos, Lock Chimes, Music, Light Shows, Wraps)
  • Settings is the landing page — a technical, dense form is the first thing users see
  • No visual hierarchy — all pages look like utility forms with emoji icons
  • Mobile experience is poor — nav wraps awkwardly, map doesn't use full viewport
  • Dark mode exists but colors feel inconsistent (green status bars, mismatched button colors)
  • Videos page is redundant with Map — both deal with dashcam footage + GPS data
  • No cohesive design system — inconsistent spacing, typography, and component styles

Design Research & Inspiration

After auditing the current UI across all pages (desktop + mobile) and researching comparable automotive dashcam/IoT dashboard apps, the following patterns should inform our redesign:

Patterns to Adopt

  1. Bottom tab navigation on mobile — Modern dashcam apps use 4-5 clean tabs. We should reduce our 8 items into ~4-5 grouped tabs.
  2. Trip summary card at bottom of map — Instead of a dropdown selector + separate stats bar, show a compact swipeable card with trip info (date, time, distance) and a "More Trips" button.
  3. Event type marker icons — Best-in-class apps use distinct icons for different event types (FSD engage/disengage, incidents, honks). Our map uses generic markers — we should differentiate visually.
  4. Categorized settings — Group settings into clear collapsible sections rather than showing a dense flat form.
  5. Device status indicator — Show a compact mode indicator and connection status at a glance.

Features We Already Have (Keep/Enhance)

  • ✅ FSD overlay on map
  • ✅ Video overlay on map markers
  • ✅ Multi-camera video player
  • ✅ Trip selection and route display
  • ✅ Heatmap visualization

Potential New Enhancements

  1. Event type badges on the map — Show a small icon badge on markers indicating Sentry, SavedClip, FSD event, etc.
  2. Quick-access video list from map — A bottom sheet or side panel showing videos near the current map viewport, allowing browsing without leaving the map.
  3. Trip statistics overlay — Show trip stats (distance, duration, events) in a compact card that's always visible, not hidden in a separate toolbar.

Decision: Videos Page → Merge Into Map

Recommendation: Merge video browsing into the Map page and eliminate the separate Videos page.

Rationale

  1. Videos are inherently spatial — they happened at a location on a trip. The map provides natural context.
  2. The current Videos page shows folders (EncryptedClips, RecentClips, SavedClips, SentryClips) with thumbnail cards — this same data can be presented as a filterable list/panel accessible from the map.
  3. The video player (event_player.html) with its multi-camera view and HUD overlay remains as-is — it just gets launched from the map context instead of a separate page.
  4. Map-centric video browsing is the standard pattern in modern dashcam applications, and it provides better spatial context.
  5. Reduces navigation from 8 to 7 items (further reduced by grouping below).

Implementation Approach

  • Add a "Videos" toggle/panel to the map page that slides in from the right (desktop) or bottom (mobile)
  • The panel shows the same folder selector and video card grid currently on the Videos page
  • Clicking a video card opens the existing event player (full page or modal overlay)
  • Videos with GPS data show their location on the map; tapping a map marker opens the video
  • Videos without GPS data are still accessible via the panel's folder browser
  • The panel can be toggled with a button in the map toolbar

New Information Architecture

Current Navigation (8 items)

Settings | Analytics | Map | Videos | Lock Chimes | Music | Light Shows | Wraps

Proposed Navigation (4 primary + settings)

Desktop: Left sidebar (collapsible icon rail)
Mobile: Bottom tab bar (4 tabs + overflow menu)

Tab Icon Contains Notes
Map map-pin Map + integrated Videos panel Primary landing page
Analytics bar-chart-2 Storage, stats, driving data Dashboard view
Media music Lock Chimes, Music, Light Shows, Wraps Grouped sub-navigation
Settings settings Mode control, WiFi, AP, system Reorganized into sections

The Media tab opens a sub-view with 4 sections accessible via horizontal pill tabs:

  • Chimes — Lock chime management
  • Music — Music library
  • Shows — Light shows
  • Wraps — Custom wraps

This reduces cognitive load from 8 top-level items to 4, while keeping everything accessible within 1-2 taps.


Design System

Color Palette

Dark Mode (Default — aligns with Tesla's in-car UI)

Token Hex Usage
--bg-primary #0F172A Page background (slate-900)
--bg-secondary #1E293B Card backgrounds (slate-800)
--bg-tertiary #334155 Elevated surfaces (slate-700)
--text-primary #F8FAFC Primary text (slate-50)
--text-secondary #94A3B8 Secondary text (slate-400)
--text-muted #64748B Muted/disabled text (slate-500)
--accent-primary #3B82F6 Primary actions, links (blue-500)
--accent-success #22C55E Success, positive indicators (green-500)
--accent-warning #F59E0B Warnings, attention (amber-500)
--accent-danger #EF4444 Destructive actions, errors (red-500)
--accent-info #06B6D4 Informational (cyan-500)
--border #334155 Borders (slate-700)
--border-subtle #1E293B Subtle dividers (slate-800)

Light Mode

Token Hex Usage
--bg-primary #FFFFFF Page background
--bg-secondary #F8FAFC Card backgrounds (slate-50)
--bg-tertiary #F1F5F9 Elevated surfaces (slate-100)
--text-primary #0F172A Primary text (slate-900)
--text-secondary #475569 Secondary text (slate-600)
--text-muted #94A3B8 Muted text (slate-400)
--accent-primary #2563EB Primary actions (blue-600, darker for contrast)
--accent-success #16A34A Success (green-600)
--accent-warning #D97706 Warning (amber-600)
--accent-danger #DC2626 Danger (red-600)
--accent-info #0891B2 Info (cyan-600)
--border #E2E8F0 Borders (slate-200)
--border-subtle #F1F5F9 Subtle dividers (slate-100)

Semantic Colors (both modes)

Token Dark Light Usage
--mode-present #22C55E #16A34A USB Gadget Mode active
--mode-edit #F59E0B #D97706 Edit Mode active
--fsd-engaged #8B5CF6 #7C3AED FSD engaged route segment
--fsd-disengaged #F97316 #EA580C Manual driving segment
--sentry-event #EF4444 #DC2626 Sentry clip markers
--saved-event #3B82F6 #2563EB Saved clip markers
--recent-event #22C55E #16A34A Recent clip markers

Typography

Font Pairing: Inter / Inter (single family, variable weight)

  • Headings: Inter 600 (semibold)
  • Body: Inter 400 (regular)
  • Labels/captions: Inter 500 (medium), smaller size
  • Monospace (stats/data): JetBrains Mono 400

Why Inter:

  • Inter is the de facto standard for dashboard/automotive UIs
  • Excellent readability at small sizes (important for Pi Zero's lower-res displays)
  • Tesla's own UI uses a geometric sans-serif; Inter is the closest web equivalent
  • Variable font = single file, smaller payload for Pi Zero

Type Scale:

--text-xs:   0.75rem  (12px) — captions, badges
--text-sm:   0.875rem (14px) — secondary text, table cells
--text-base: 1rem     (16px) — body text (min mobile size)
--text-lg:   1.125rem (18px) — card titles, emphasized text
--text-xl:   1.25rem  (20px) — section headings
--text-2xl:  1.5rem   (24px) — page titles
--text-3xl:  1.875rem (30px) — hero numbers (analytics)

Icons

Replace all emoji icons with Lucide Icons (SVG)

Current Emoji Replacement Icon Context
🚗 map-pin Map/trips
📹 video Videos
🔔 bell Lock chimes
🎵 music Music
💡 sparkles Light shows
🎨 palette Wraps
⚙️ settings Settings
📊 bar-chart-2 Analytics
🔄 refresh-cw Mode toggle
⬆️ upload Upload
⬇️ download Download
🗑️ trash-2 Delete
▶️ play Play
✏️ pencil Edit

Delivery method: Inline SVG sprites or individual SVG imports. No icon font (saves bandwidth on Pi Zero).

Spacing System

--space-1:  0.25rem  (4px)
--space-2:  0.5rem   (8px)
--space-3:  0.75rem  (12px)
--space-4:  1rem     (16px)
--space-5:  1.25rem  (20px)
--space-6:  1.5rem   (24px)
--space-8:  2rem     (32px)
--space-10: 2.5rem   (40px)
--space-12: 3rem     (48px)
--space-16: 4rem     (64px)

Border Radius

--radius-sm:   0.25rem  (4px)  — small elements, badges
--radius-md:   0.5rem   (8px)  — buttons, inputs
--radius-lg:   0.75rem  (12px) — cards
--radius-xl:   1rem     (16px) — modals, large cards
--radius-full: 9999px           — pills, avatars

Shadows (dark mode uses border glow instead)

Light mode:
--shadow-sm:  0 1px 2px rgba(0,0,0,0.05)
--shadow-md:  0 4px 6px rgba(0,0,0,0.07)
--shadow-lg:  0 10px 15px rgba(0,0,0,0.1)

Dark mode:
--shadow-sm:  0 0 0 1px rgba(255,255,255,0.05)
--shadow-md:  0 0 0 1px rgba(255,255,255,0.08)
--shadow-lg:  0 4px 12px rgba(0,0,0,0.4)

Transitions

--transition-fast:   150ms ease
--transition-normal: 200ms ease
--transition-slow:   300ms ease

All interactive elements must use transition: all var(--transition-normal).
Respect prefers-reduced-motion: reduce by disabling transitions.


Page-by-Page Redesign Specifications

1. Map Page (New Landing Page — /)

Layout: Full-viewport map with floating UI elements overlaid.

Desktop Layout (≥1024px)

┌──────────────────────────────────────────────────────────┐
│ [≡]  TeslaUSB        [🟢 Present Mode]  [☀/🌙]  [⚙]  │  ← Floating top bar
├────┬─────────────────────────────────────────────────────┤
│    │                                                     │
│ N  │                    MAP                              │
│ A  │              (full viewport)                        │
│ V  │                                                     │
│    │                                    ┌──────────┐     │
│ R  │                                    │ Videos   │     │
│ A  │                                    │ Panel    │     │
│ I  │                                    │ (slide)  │     │
│ L  │                                    │          │     │
│    │  ┌─────────────────────────────┐   └──────────┘     │
│    │  │  Trip: Today 2:30pm · 15mi  │ [FSD] [Heat] [Vid]│  ← Bottom card + toolbar
│    │  │  ◀  12 events · 3 FSD       │                    │
│    │  └─────────────────────────────┘                    │
└────┴─────────────────────────────────────────────────────┘

Nav Rail (left sidebar, collapsed by default):

  • 48px wide icon-only rail
  • Expands to 200px on hover/click
  • Icons: Map (active), Analytics, Media, Settings
  • Mode indicator dot (green=present, amber=edit) at bottom

Floating Top Bar:

  • Semi-transparent background with backdrop blur
  • Left: hamburger (mobile) or logo
  • Center: nothing (clean)
  • Right: Mode badge (compact pill), theme toggle (sun/moon icon), settings gear

Trip Card (bottom of map):

  • Floating card, 360px wide (desktop), full-width (mobile)
  • Shows: Trip date/time, distance, event count, FSD stats
  • Left/right arrows to cycle through trips
  • "All Trips" button opens a dropdown/popover with full trip list
  • Tapping the card expands it to show trip details (replaces current stats bar)

Map Toolbar (floating, bottom-right):

  • Vertical stack of icon buttons with tooltips
  • Buttons: FSD Overlay, Heatmap, Videos Panel, Events Filter, Zoom controls
  • Each button is a 40×40 circle with subtle background

Videos Panel (slide-in, right side):

  • 360px wide panel that slides in from right
  • Header: "Videos" + folder selector dropdown (RecentClips, SavedClips, SentryClips, EncryptedClips)
  • Scrollable grid of video cards (same as current videos page)
  • Each card shows: thumbnail, timestamp, camera count, file size
  • Clicking a card navigates to the full video player
  • Videos with GPS data are highlighted on the map
  • Close button to dismiss panel

Mobile Layout (<768px)

┌──────────────────────────┐
│ [☰]  TeslaUSB   [🟢] [☀]│  ← Compact top bar
├──────────────────────────┤
│                          │
│          MAP             │
│     (full viewport)      │
│                          │
│                          │
│  ┌──────────────────┐    │
│  │ [FSD][Heat][Vid] │    │  ← Floating toolbar
│  └──────────────────┘    │
│                          │
│ ┌────────────────────────┤
│ │ Today 2:30pm · 15mi   ││  ← Draggable bottom sheet
│ │ 12 events · 3 FSD  ▲  ││
│ └────────────────────────┤
├──────────────────────────┤
│ [Map] [Analytics] [Media] [Settings]│  ← Bottom tab bar
└──────────────────────────┘

Bottom Sheet (mobile):

  • Replaces the trip card + videos panel
  • Three states: peek (shows current trip summary), half (shows trip list + quick stats), full (shows video browser)
  • Drag handle at top for smooth transitions between states
  • When in "full" state, shows the same video browser grid

Bottom Tab Bar (mobile):

  • Fixed at bottom, 56px height
  • 4 tabs with icon + label
  • Active tab highlighted with accent color
  • Safe area padding for notched phones

2. Analytics Page (/analytics/)

Layout: Dashboard grid with cards

Desktop

┌──────────────────────────────────────────────────────────┐
│ Analytics                                    [Export] [↻] │
├──────────────────────────────────────────────────────────┤
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐    │
│ │ TeslaCam │ │ LightShow│ │  Music   │ │  Health  │    │
│ │  180 GB  │ │  10 GB   │ │  100 GB  │ │  ✓ OK    │    │
│ │ ████░░░  │ │ ██░░░░░  │ │ ███░░░░  │ │          │    │
│ │ 65% used │ │ 20% used │ │ 45% used │ │ All good │    │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘    │
│                                                          │
│ ┌─────────────────────────┐ ┌────────────────────────┐  │
│ │  Recording Estimate     │ │  Video Statistics       │  │
│ │  ~48 hours remaining    │ │  1,234 clips · 45 GB   │  │
│ │  ▓▓▓▓▓▓▓░░░░░░░░░░░░  │ │  Chart: clips/day      │  │
│ └─────────────────────────┘ └────────────────────────┘  │
│                                                          │
│ ┌─────────────────────────┐ ┌────────────────────────┐  │
│ │  Folder Breakdown       │ │  Event Analytics        │  │
│ │  ┌────────────────────┐ │ │  Sentry: 45 events     │  │
│ │  │ Folder | Size | %  │ │ │  Saved: 12 clips       │  │
│ │  │ Recent | 20GB | 44%│ │ │  FSD: 8 disengages     │  │
│ │  └────────────────────┘ │ │  Chart: events/week    │  │
│ └─────────────────────────┘ └────────────────────────┘  │
└──────────────────────────────────────────────────────────┘

Changes from current:

  • Storage gauges redesigned as clean progress bars inside cards (not circular gauges)
  • Health status integrated as a card rather than separate alerts
  • Charts use consistent color scheme from design system
  • Responsive grid: 4 columns → 2 columns → 1 column
  • Cards have subtle hover elevation effect
  • Add "last updated" timestamp

Mobile

  • Single column stack
  • Storage cards become horizontal scrolling row (swipeable)
  • Charts scale down with touch-friendly tooltips
  • Folder breakdown becomes collapsible accordion

3. Media Page (/media/)

Layout: Tabbed sub-navigation with content area

┌──────────────────────────────────────────────────────────┐
│ Media                                                     │
│ ┌────────┐┌────────┐┌────────┐┌────────┐                │
│ │ Chimes ││ Music  ││ Shows  ││ Wraps  │                │
│ └────────┘└────────┘└────────┘└────────┘                │
├──────────────────────────────────────────────────────────┤
│                                                          │
│  (Content area changes based on selected tab)            │
│                                                          │
└──────────────────────────────────────────────────────────┘

Tab Pills: Horizontal scrollable pills (not traditional tabs). Active pill gets accent-primary background. On mobile, pills scroll horizontally if they overflow.

Chimes Sub-Tab

┌──────────────────────────────────────────────────────────┐
│ Active Chime                                              │
│ ┌────────────────────────────────────────────────────┐   │
│ │ 🔔 MyChime.wav          [▶ Preview]  [✏ Change]   │   │
│ └────────────────────────────────────────────────────┘   │
│                                                          │
│ ┌─── Upload ──────────────────────────────────────────┐  │
│ │  Drag & drop WAV files or click to browse           │  │
│ │  ┌─────────────────────────────────────────────┐    │  │
│ │  │          ╔═══╗                               │    │  │
│ │  │          ║ + ║  Drop files here              │    │  │
│ │  │          ╚═══╝                               │    │  │
│ │  └─────────────────────────────────────────────┘    │  │
│ └─────────────────────────────────────────────────────┘  │
│                                                          │
│ Chime Library                          [Search] [Sort ▾] │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Name        │ Size  │ Duration │ Actions             │ │
│ │ Horn.wav    │ 245KB │ 0:03     │ [▶][✏][⬇][🗑]     │ │
│ │ Beep.wav   │ 120KB │ 0:01     │ [▶][✏][⬇][🗑]     │ │
│ └──────────────────────────────────────────────────────┘ │
│                                                          │
│ ▸ Scheduler (collapsed)                                  │
│ ▸ Random Groups (collapsed)                              │
└──────────────────────────────────────────────────────────┘

Changes from current:

  • Active chime is a prominent card at the top (not buried in the page)
  • Upload area is always visible (not a collapsible)
  • Library table has inline action buttons with icon-only buttons + tooltips
  • Scheduler and Random Groups are collapsible sections (advanced features)
  • On mobile: table becomes card list with swipe actions

Music Sub-Tab

  • Same layout pattern as current but with design system styling
  • Drag-drop upload zone at top
  • File browser with breadcrumb navigation
  • Usage stats as a compact bar above the file list

Shows Sub-Tab

  • Grid of light show cards with preview thumbnails
  • Upload zone at top
  • Action buttons (download, delete, play) on hover/long-press

Wraps Sub-Tab

  • Grid of wrap thumbnail cards
  • Upload zone at top
  • Preview modal on click

4. Settings Page (/settings/)

Layout: Organized sections with clear hierarchy

┌──────────────────────────────────────────────────────────┐
│ Settings                                                  │
├──────────────────────────────────────────────────────────┤
│                                                          │
│ ┌─── Device Status ──────────────────────────────────┐   │
│ │  Mode: ● USB Gadget (Present)      [Switch Mode ▾] │   │
│ │  Uptime: 2d 14h · Storage: Healthy · Temp: 42°C   │   │
│ └────────────────────────────────────────────────────┘   │
│                                                          │
│ ▾ WiFi Configuration                                     │
│ ┌────────────────────────────────────────────────────┐   │
│ │  Connected to: HomeWiFi (-45 dBm)                  │   │
│ │  IP: 192.168.1.100                                 │   │
│ │  [Scan Networks]  [Edit Connection]                │   │
│ └────────────────────────────────────────────────────┘   │
│                                                          │
│ ▾ Access Point                                           │
│ ┌────────────────────────────────────────────────────┐   │
│ │  Status: Auto (starts when WiFi fails)             │   │
│ │  SSID: TeslaUSB · Password: ••••••••               │   │
│ │  [Force Start AP]  [Configure]                     │   │
│ └────────────────────────────────────────────────────┘   │
│                                                          │
│ ▸ Storage Management (collapsed)                         │
│ ▸ System (collapsed — reboot, update, logs)              │
│ ▸ About (collapsed — version, github link)               │
│                                                          │
└──────────────────────────────────────────────────────────┘

Changes from current:

  • Device Status card at top shows mode + key metrics at a glance
  • Mode toggle is a dropdown/select instead of two buttons
  • Settings grouped into collapsible sections
  • Most-used settings (WiFi, AP) expanded by default
  • Advanced settings (Storage, System) collapsed by default
  • Removed "Current Mode" banner from every page — it only shows on Settings and as a compact badge in the nav
  • On mobile: full-width cards, same section grouping

5. Video Player Page (/videos/event/...)

Layout: Preserved almost entirely — user likes it

Minor enhancements:

  • Back button returns to map (instead of videos page)
  • Breadcrumb: Map → Trip Name → Event
  • Camera selector buttons use design system styling (rounded pills, not flat buttons)
  • HUD overlay toggle uses a cleaner icon button
  • Download/Delete buttons styled consistently
  • Dark background by default (video player always looks best dark)
  • On mobile: camera selector becomes a horizontal scrollable row

Component Specifications

Buttons

Variant Dark Mode Light Mode Usage
Primary bg-blue-500 text-white bg-blue-600 text-white Main actions
Secondary bg-slate-700 text-slate-200 bg-slate-200 text-slate-700 Secondary actions
Ghost text-slate-400 hover:bg-slate-800 text-slate-600 hover:bg-slate-100 Tertiary/cancel
Danger bg-red-500/10 text-red-400 bg-red-50 text-red-600 Destructive actions
Icon-only bg-slate-800 text-slate-400 bg-slate-100 text-slate-600 Toolbar buttons

All buttons: min-height: 44px (touch target), border-radius: var(--radius-md), transition: all var(--transition-normal), cursor: pointer.

Cards

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: all var(--transition-normal);
}
.card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

Form Inputs

.input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  color: var(--text-primary);
  min-height: 44px;
  transition: border-color var(--transition-fast);
}
.input:focus {
  border-color: var(--accent-primary);
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

Mode Badge (compact indicator)

Present Mode:  [● Present] — green dot + green text on dark green bg
Edit Mode:     [● Edit]    — amber dot + amber text on dark amber bg

Size: compact pill, fits in the nav bar. On mobile: just the colored dot.

Tables (responsive)

Desktop: Traditional table with header row, hover highlight
Mobile: Convert to card list — each row becomes a card with label: value pairs

Toast Notifications

Replace current flash messages with toast notifications:

  • Slide in from top-right (desktop) or top-center (mobile)
  • Auto-dismiss after 5 seconds
  • Color-coded: success (green), error (red), warning (amber), info (blue)
  • Dismiss button on each toast

Mobile-Specific Patterns

Bottom Tab Bar

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
}

Bottom Sheet (map page)

  • Three snap points: 15% (peek), 50% (half), 90% (full)
  • CSS scroll-snap-type for smooth snapping
  • Backdrop darkens as sheet rises
  • Handle bar at top for drag affordance

Swipe Actions (tables → cards on mobile)

  • Swipe left to reveal action buttons (delete, edit)
  • Long press for context menu
  • Touch targets minimum 44×44px

Pull to Refresh

  • On Analytics page for refreshing stats
  • On Media sub-tabs for refreshing file lists

Dark/Light Mode Implementation

Toggle

  • Icon button in nav: sun icon (light mode) / moon icon (dark mode)
  • Respects prefers-color-scheme on first visit
  • Saves preference to localStorage
  • Applied via data-theme="dark" on <html> element (keep current mechanism)
  • Transition: transition: background-color 200ms ease, color 200ms ease on key elements

CSS Architecture

:root {
  /* Light mode variables (default) */
  --bg-primary: #FFFFFF;
  --text-primary: #0F172A;
  /* ... all tokens ... */
}

[data-theme="dark"] {
  --bg-primary: #0F172A;
  --text-primary: #F8FAFC;
  /* ... all dark overrides ... */
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #0F172A;
    --text-primary: #F8FAFC;
    /* ... */
  }
}

Map-Specific Theming

  • Dark mode: Use dark map tiles (e.g., CartoDB Dark Matter or custom dark style)
  • Light mode: Use standard map tiles (current behavior)
  • Map controls and overlays inherit theme colors
  • Video overlay backdrop: always dark (for video visibility)

Responsive Breakpoints

Breakpoint Width Layout
Mobile S 320px Single column, bottom tabs
Mobile L 375px Single column, bottom tabs
Tablet 768px 2 columns, bottom tabs
Desktop 1024px Sidebar nav + content
Desktop L 1440px Sidebar nav + wider content

Key Responsive Behaviors

  1. Nav: Bottom tabs (<1024px) → Left sidebar rail (≥1024px)
  2. Map trip card: Full-width bottom sheet (<768px) → Floating card (≥768px)
  3. Videos panel: Bottom sheet (<768px) → Slide-in right panel (≥768px)
  4. Analytics grid: 1 column (<768px) → 2 columns (768-1024px) → 4 columns (≥1024px)
  5. Media tabs: Horizontal scroll pills (<768px) → Fixed pills (≥768px)
  6. Tables: Card list (<768px) → Traditional table (≥768px)
  7. Settings sections: Full-width stack (all sizes, same pattern)

User Flow Diagrams

Primary Flow: View Trip & Video

Open App → Map (landing)
  → See current/recent trip on map
  → Tap trip card to cycle trips or open trip list
  → Tap event marker on map
  → See video overlay preview
  → Tap overlay to open full video player
  → Multi-camera view with HUD
  → Back button returns to map

Alternative Flow: Browse Videos by Folder

Open App → Map (landing)
  → Tap Videos button in toolbar
  → Videos panel slides in
  → Select folder (RecentClips, SavedClips, etc.)
  → Browse video cards with thumbnails
  → Tap card to open video player
  → Back button returns to map with panel open

Settings Flow

Open App → Map (landing)
  → Tap Settings tab
  → See device status at top
  → Expand WiFi section to configure
  → Expand AP section to manage access point
  → Switch mode via dropdown
  → Back to Map

Media Management Flow

Open App → Map (landing)
  → Tap Media tab
  → See Chimes tab (default)
  → Upload new chime via drag-drop
  → Set as active
  → Switch to Music tab
  → Browse/upload music files
  → Switch to Shows tab
  → Upload light show
  → Back to Map

Accessibility Requirements

  1. Color contrast: All text meets WCAG AA (4.5:1 for normal, 3:1 for large text)
  2. Focus indicators: Visible focus ring (2px solid accent-primary, 2px offset) on all interactive elements
  3. Keyboard navigation: Full tab order, Enter/Space activation, Escape to close panels/modals
  4. ARIA labels: All icon-only buttons have aria-label. Map markers have descriptive labels.
  5. Screen reader: Live regions for toast notifications, mode changes, upload progress
  6. Reduced motion: @media (prefers-reduced-motion: reduce) disables all animations/transitions
  7. Touch targets: Minimum 44×44px for all interactive elements
  8. Semantic HTML: Proper use of <nav>, <main>, <section>, <article>, headings hierarchy

Performance Considerations (Pi Zero 2W)

  1. No external font loading — Bundle Inter as a local WOFF2 file (~95KB variable) to avoid network dependency when on AP mode
  2. Inline critical CSS — First paint CSS inlined in <head>, rest loaded async
  3. SVG icon sprite — Single sprite sheet for all icons, cached aggressively
  4. No JavaScript framework — Keep vanilla JS + Jinja2 templates (no React/Vue overhead)
  5. CSS custom properties — Theme switching via CSS variables (no page reload, no JS DOM manipulation)
  6. Lazy load images — Thumbnails use loading="lazy" and intersection observer
  7. Service worker — Already exists for map tiles; extend to cache static assets (CSS, JS, icon sprite)
  8. Bottom sheet: Pure CSS scroll-snap + minimal JS for drag (no heavy library)
  9. Minimize reflows — Use transform and opacity for animations, not width/height/margin

Implementation Priority

Phase 1: Foundation (Design System + Navigation)

  • Implement CSS custom properties for all color tokens
  • Set up dark/light mode toggle with system preference detection
  • Replace emoji icons with Lucide SVG icon sprite
  • Build new navigation: left sidebar rail (desktop) + bottom tab bar (mobile)
  • Route Map to / (make it the landing page)
  • Move Settings to /settings/
  • Typography: Switch to Inter (local WOFF2)

Phase 2: Map Page Transformation

  • Redesign map toolbar as floating icon buttons
  • Replace trip dropdown + stats bar with floating trip card
  • Build videos slide-in panel (desktop) / bottom sheet (mobile)
  • Implement trip cycling (prev/next arrows) on trip card
  • Integrate video folder browser into the panel
  • Add dark/light map tiles for theme switching

Phase 3: Media Hub

  • Create unified Media page with tab pill navigation
  • Migrate Lock Chimes content into Chimes sub-tab
  • Migrate Music content into Music sub-tab
  • Migrate Light Shows into Shows sub-tab
  • Migrate Wraps into Wraps sub-tab
  • Responsive table → card conversion for mobile

Phase 4: Analytics & Settings Refresh

  • Redesign Analytics with card grid layout
  • Redesign storage gauges as progress bars
  • Reorganize Settings into collapsible sections
  • Add device status card to Settings
  • Replace flash messages with toast notification system

Phase 5: Polish & Accessibility

  • Full accessibility audit (contrast, focus, ARIA, keyboard)
  • Animation/transition polish (micro-interactions)
  • Performance optimization (critical CSS, lazy loading)
  • Cross-browser testing (Chrome, Safari, Firefox mobile)
  • Edge case handling (offline mode, slow connection, error states)

Files That Will Need Changes

File Change Type Priority
scripts/web/static/css/style.css Major rewrite — new design system tokens, all component styles Phase 1
scripts/web/templates/base.html Major rewrite — new nav structure, icon system, theme toggle Phase 1
scripts/web/static/js/main.js Major rewrite — new nav behavior, bottom sheet, panel toggle Phase 1
scripts/web/blueprints/mapping.py Route change — serve at / instead of /map/ Phase 1
scripts/web/blueprints/mode_control.py Route change — move from / to /settings/ Phase 1
scripts/web/web_control.py Blueprint registration order change Phase 1
scripts/web/templates/mapping.html Major update — floating UI, trip card, videos panel Phase 2
scripts/web/templates/videos.html Deprecate — content moves to map videos panel Phase 2
scripts/web/templates/lock_chimes.html Migrate into media hub template Phase 3
scripts/web/templates/music.html Migrate into media hub template Phase 3
scripts/web/templates/light_shows.html Migrate into media hub template Phase 3
scripts/web/templates/wraps.html Migrate into media hub template Phase 3
scripts/web/templates/analytics.html Redesign with card grid Phase 4
scripts/web/templates/index.html Redesign as Settings page Phase 4
scripts/web/templates/event_player.html Minor styling updates Phase 5
scripts/web/static/css/analytics.css Merge into main style.css Phase 4
NEW: scripts/web/static/icons/ Lucide SVG icon sprite Phase 1
NEW: scripts/web/static/fonts/inter.woff2 Bundled Inter font Phase 1
NEW: scripts/web/templates/media.html Unified media hub template Phase 3
NEW: scripts/web/blueprints/media.py Unified media blueprint (or keep separate blueprints, share template) Phase 3

Summary

This redesign transforms TeslaUSB from a utility toolkit into a cohesive automotive dashboard by:

  1. Making Map the hero — Full-viewport map as landing page with integrated video browsing
  2. Simplifying navigation — 8 items → 4 tabs with logical grouping
  3. Proper dark/light mode — Consistent, system-aware theming with automotive-grade colors
  4. Mobile-first UX — Bottom tabs, bottom sheets, swipe actions, proper touch targets
  5. Visual polish — SVG icons, Inter typography, consistent spacing, smooth transitions
  6. Map-centric video access — Trip cards, event type markers, integrated video panel
  7. Preserving what works — Map features, video overlay, multi-camera player, FSD overlay all stay

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions