From 6234532c59c0d2279990c0aded5e0f7d29bed3ac Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Fri, 4 Dec 2026 01:03:17 +0000 Subject: [PATCH] Retro CRT: snap live switches (a blended text glow hung skwasm) Co-Authored-By: Claude Opus 5.5 --- app/notes/design-retro-crt.md | 14 +++++++++++--- app/test/ui/theme/high_contrast_design_test.dart | 7 ++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/notes/design-retro-crt.md b/app/notes/design-retro-crt.md index 90a78efa..86b339bf 100644 --- a/app/notes/design-retro-crt.md +++ b/app/notes/design-retro-crt.md @@ -80,7 +80,14 @@ device in light mode still gets a light page. Retro CRT also sets: `radius: 0`, `flat`, `frame: outlineVariant`, `panel: surfaceContainerLow`, `ansi` (brightness steps above), `transcript: prompt`, -`selectedRow: framed`, the default `pill` composer and `>` prompt glyph. +`selectedRow: framed`, the default `pill` composer and `>` prompt glyph, and +`snapSwitch: true` (High contrast's token): a live switch into or out of +Retro CRT snaps instead of blending. Blending the glow lerps every text +shadow through a near-zero blur, and in the browser bench's `design` +scenario (rapid live switches) skwasm then threw "memory access out of +bounds" in paragraph layout and the page stopped answering. An experiment +build without the glow passed the same scenario; with the snap it passes +with the glow. ## Terminal reuse @@ -122,7 +129,8 @@ the brightness. `terminalTextTheme` takes the optional glow. - `test/ui/theme/design_screen_overlay_test.dart`: the pattern is one boundary, adds no saveLayer, is not repainted while content scrolls, lets pointers through, and a design switch does not remount the app. -- `test/ui/theme/compact_switch_test.dart` switches live into and out of - both entries frame by frame. +- `test/ui/theme/compact_switch_test.dart` and + `high_contrast_switch_test.dart` switch live into and out of both entries + frame by frame. - `test/perf/design_bench_test.dart` picks up both entries; see the report for the browser bench. diff --git a/app/test/ui/theme/high_contrast_design_test.dart b/app/test/ui/theme/high_contrast_design_test.dart index d4820b86..05edf3d3 100644 --- a/app/test/ui/theme/high_contrast_design_test.dart +++ b/app/test/ui/theme/high_contrast_design_test.dart @@ -255,7 +255,12 @@ void main() { expect(tokens.largeTargets, isFalse, reason: design.id); expect(tokens.minContrast, isNull, reason: design.id); expect(tokens.windowRadius, isNull, reason: design.id); - expect(tokens.snapSwitch, isFalse, reason: design.id); + // Retro CRT snaps too: a blended text glow hung skwasm. + expect( + tokens.snapSwitch, + design.crtPhosphor != null, + reason: design.id, + ); expect(tokens.transcript, isNot(TranscriptStyle.boxed)); expect(tokens.selectedRow, isNot(SelectedRowStyle.inverted)); final frame = tokens.frame;