--- phase: 05-live-show-execution plan: 02 type: execute wave: 2 depends_on: - 05-01 files_modified: - lightsync/frontend/index.html - lightsync/frontend/style.css - lightsync/frontend/app.js autonomous: true requirements: - UI-04 - SHW-03 must_haves: truths: - "Live preview panel shows active animation color and type per device, updated in sync with playback" - "Devices with no active cue show a dim inactive indicator" - "A show can be selected from a dropdown and loaded into the timeline + server" - "Preview panel is visible between timeline canvas and block inspector when a show is loaded" artifacts: - path: "lightsync/frontend/index.html" provides: "Live preview div and show selector UI elements" contains: "id=\"live-preview\"" - path: "lightsync/frontend/style.css" provides: "Terminal-aesthetic styles for preview panel and device strips" contains: ".live-preview" - path: "lightsync/frontend/app.js" provides: "preview_update WebSocket handler, show selector logic, preview strip builder" contains: "preview_update" key_links: - from: "lightsync/frontend/app.js" to: "lightsync/api/ws.py" via: "WebSocket onmessage handler for preview_update messages" pattern: "msg\\.type === .preview_update" - from: "lightsync/frontend/app.js" to: "/api/shows" via: "fetch to list and load shows" pattern: "fetch.*api/shows" - from: "lightsync/frontend/app.js" to: "lightsync/frontend/timeline/commands.js" via: "setCurrentShowId() call on show load" pattern: "setCurrentShowId" --- Live preview panel and show selector: add the browser-side UI for live show execution feedback and show management. Purpose: Implements UI-04 (live preview panel) and the frontend half of SHW-03 (show load into timeline + server). The preview panel shows which animation is active on each device during playback. The show selector lets users load saved shows into the timeline editor and connect them to the server-side cue scheduler. Output: Modified `index.html` (new DOM elements), `style.css` (preview panel styles), and `app.js` (preview handler, show selector, preview strip builder). @$HOME/.claude/get-shit-done/workflows/execute-plan.md @$HOME/.claude/get-shit-done/templates/summary.md @.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/05-live-show-execution/05-CONTEXT.md @.planning/phases/05-live-show-execution/05-RESEARCH.md @.planning/phases/05-live-show-execution/05-UI-SPEC.md @.planning/phases/05-live-show-execution/05-01-SUMMARY.md ```css --bg-primary: #0a0a0a; --bg-panel: #0f0f0f; --bg-panel-dark: #080808; --border-dim: #1a4a4a; --accent: #00ffff; --text-primary: #cccccc; --text-dim: #555555; --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace; ``` ```javascript // Active cue: { type: "preview_update", device_id: "uuid", animation: "chase", color: [0, 255, 180] } // Inactive (no cue): { type: "preview_update", device_id: "uuid", animation: null, color: null } ``` ``` GET /api/shows -> [{ id, name, created_at }] GET /api/shows/{id} -> ShowModel (full, including tracks + devices) ``` ```javascript // client.send(msg) — WebSocket send // timeline — TimelineCanvas instance (global in app.js) // timeline.tracks — [{device_id, device_name, strip_type, cues: []}] // timeline.showId — current show UUID or null // timeline.loadTracks(devices) — called with device array from /api/devices ``` ```javascript import { setCurrentShowId } from './timeline/commands.js'; // Already imported in app.js: DeleteBlockCommand // Need to also import: setCurrentShowId ``` ```html ``` Task 1: Add preview panel HTML and show selector to index.html, add CSS styles lightsync/frontend/index.html, lightsync/frontend/style.css - lightsync/frontend/index.html - lightsync/frontend/style.css - .planning/phases/05-live-show-execution/05-UI-SPEC.md **index.html changes:** 1. Add the live preview panel div between `` and `
` inside `
`: ```html ``` The `#live-preview` div starts hidden (`display:none` inline). JS sets `display:flex` when a show loads. Content (device strips) is populated dynamically by JS — the div starts empty. 2. Add show selector controls to the transport bar `