Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

M1: Screenshot Data Model (litmus-b10b)

StatusDone · archived
TypeTask
Prioritynormal
Parent(litmus-k2id)

Add screenshot.rs to litmus-model with Provider, Fixture, ScreenshotKey, ScreenshotMeta, ScreenshotManifest types. Wire into lib.rs. Add serde round-trip tests.

Summary of Changes

Added crates/litmus-model/src/screenshot.rs with:

  • Provider — terminal emulator metadata (slug, name, optional version)
  • Fixture — reproducible terminal scenario (id, name, description)
  • ScreenshotKey — composite key (provider, theme, fixture slugs), flattened in JSON
  • ImageFormat — Png | Webp with extension/mime helpers
  • ScreenshotMeta — full screenshot record with URL, dimensions, format, timestamp, SHA-256 checksum
  • ScreenshotManifest — top-level index with find/for_provider/for_theme/build_index query methods

17 tests covering: serde round-trip, find, URL construction, cache busting, index building, JSON shape verification.

Wired into lib.rs as pub mod screenshot;.