diff --git a/desktop/src/shared/ui/markdown.tsx b/desktop/src/shared/ui/markdown.tsx index 2259d8f4c..48305780d 100644 --- a/desktop/src/shared/ui/markdown.tsx +++ b/desktop/src/shared/ui/markdown.tsx @@ -74,6 +74,17 @@ let shikiHighlighter: HighlighterGeneric | null = let shikiInitPromise: Promise | null = null; const loadedLangs = new Set(); const loadedThemes = new Set(); +// ───────────────────────────────────────────────────────────────────────────── +// DEBUG diagnostic (Phase 2 virtualization). When true, inline images that +// carry an imeta `dim` tag — the ones whose row height we reserve up front in +// `ImageBlock` — get a red ring so you can SEE the dim-vs-dim-less split in the +// running app: ringed = height-reserved, un-ringed = `dim`-less natural-load +// thrasher. Uses `outline` (zero layout impact), never `border`, so toggling it +// can't shift a single pixel. Flip to false (or delete the const + its one use +// in `ImageBlock`) to remove. Not for shipping styling. +const DEBUG_RING_DIM_IMAGES = true; +const DEBUG_DIM_IMAGE_RING_CLASS = "outline outline-2 outline-red-500"; + const tokenCache = new Map(); const MAX_CACHE_ENTRIES = 100; const MAX_LOADED_LANGUAGES = 30; @@ -309,7 +320,12 @@ function ImageBlock({ {/* biome-ignore lint/a11y/useKeyWithClickEvents: image opens lightbox on click; keyboard equivalent handled by lightbox close button */}