src/switcher/AppearanceSpecs.md
Line coverage:
AppearanceTestable.swift79% · refreshed 2026-05-27 by/coverage-explore
Two pure sizing functions in AppearanceTestable decide how big the switcher's thumbnails are on a
given display, so the UI feels right from an 11" laptop to a 60" TV. The suite pins their output against
a table of 21 real device models (laptops, monitors, ultrawides, TVs) with known pixel + physical
dimensions, so a tweak to the formula can't silently regress any class of screen.
comfortableWidth(physicalDimension) → the fraction of the screen the switcher should occupy (smaller
fraction on bigger/wider screens, separate expectations for horizontal vs vertical use).goodValuesForThumbnailsWidthMinMax(ratio, rowCount) → the (min, max) thumbnail width for a given
screen aspect ratio and row count (3, 4, or 5 rows).(model, pixels, physical-mm, expected comfortable fractions, [(rowCount, expectedMin, expectedMax)]). Both tests loop the table and assert with 0.01
tolerance, naming the failing model.Mirrors AppearanceTests.swift 1:1.