Screenshot in side-by-side view (litmus-x2vo)
Goal
Add a global toggle on the compare page to switch all columns between simulated scene rendering and real provider screenshots.
Current State
The compare page (pages/compare.rs) shows 2-4 themes side by side. Each column renders simulated SceneView for every scene. There are no screenshots on this page — those only appear on the detail page.
Changes
- Add a toolbar at the top of the compare page with:
- Rendering toggle: Simulated / Screenshot (default: Simulated)
- Provider selector: dropdown (kitty, wezterm, etc.) — only visible when Screenshot mode is active
- When in Screenshot mode, replace
SceneViewwithScreenshotImagefor each (theme, scene) cell - Use
scene_id_to_fixture_id()mapping (same as detail page) - If a screenshot is missing for a given theme+fixture+provider, show the existing placeholder
- Responsive: on narrow screens (<900px), columns stack vertically regardless of mode
Dependencies
- Blocked by
litmus-y6dc(global provider selector) — provider is app-level state, no need for a per-page provider dropdown - Uses existing
ScreenshotImagecomponent and manifest infrastructure - Toggle is just Simulated/Screenshot; provider comes from global state
Plan
- Add a
use_signal(|| false)for screenshot mode in CompareThemes - Add a toolbar above the grid with Simulated/Screenshot toggle buttons (reuse provider-btn styling pattern)
- When screenshot mode is active, render ScreenshotImage (using ActiveProvider) instead of TermOutputView
- Show placeholder when screenshot not available
- Add CSS for the toggle toolbar
- Add todo items:
- Add screenshot mode toggle signal
- Add toolbar with toggle buttons
- Conditionally render ScreenshotImage vs TermOutputView
- Add CSS styling for toolbar
- Verify compilation, zero warnings
Summary of Changes
Added Simulated/Screenshot toggle to the compare page:
- Toggle buttons in toolbar above column headers (reuses provider-btn styling pattern)
- Screenshot mode renders ScreenshotImage using the global ActiveProvider
- Shows “No screenshot” placeholder when screenshot unavailable for a theme+fixture+provider
- Default is Simulated mode (TermOutputView rendering)
- CSS: .compare-toolbar, .compare-view-toggle, .compare-toggle-btn, .compare-screenshot-placeholder