Repository navigation
mac: conch shot photographs the app in its real appearance - #296
Merged
Merged
Conversation
DebugSnapshot captures with view.cacheDisplay, an offscreen re-render. The palette is dynamic NSColors that resolve against the CURRENT DRAWING appearance, and an offscreen draw does not inherit the window's -- so on a light system every snapshot came back dark. That is worse than a wrong-coloured PNG. conch shot exists so UI work can be checked without capturing the screen, and it is what I used to "verify" a night of changes: the reading rhythm, the floating composer, the 52pt header, the folded tool run, the sidebar. All of them were judged in a theme the user never sees. A screenshot tool that lies is worse than none, because it is believed. Now the draw happens inside window.effectiveAppearance.performAsCurrentDrawingAppearance. ui-snapshot.test.ts already pinned that this tool never captures the screen; it now also pins that the draw sits INSIDE the wrapper (a wrapper that does not contain the call is decoration) and that there is exactly one cacheDisplay so a second cannot creep in outside the appearance. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SfEX6bfwCGXtThk1JRNmsE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
conch shothas been photographing the app in the wrong appearance, and I believed it all night.DebugSnapshotcaptures withview.cacheDisplay(in:to:)— an offscreen re-render. The Mac palette is dynamic colours (NSColor(name: nil) { appearance in … }) which resolve against the current drawing appearance, and an offscreen draw does not inherit the window's. On a light system every snapshot came back dark.That matters more than a wrong-coloured PNG.
conch shotexists precisely so UI work can be verified without capturing the screen, and it is the tool I used to "verify" a night of changes — the transcript's reading rhythm, the floating composer, the 52 pt header, the folded tool run, the sidebar. Every one of those was judged in a theme the user never sees. A screenshot tool that lies is worse than no screenshot tool, because it is believed.The fix is to draw inside
window.effectiveAppearance.performAsCurrentDrawingAppearance { … }.Guard
ui-snapshot.test.tsalready pins that this tool never captures the screen. It now also pins that it photographs the app as it actually looks: the wrapper is present, the draw happens inside it (a wrapper that doesn't contain the call is decoration), and there is exactly onecacheDisplayso a second can't creep in outside the appearance.Gate
bun test2301/0 exit 0 (2300 on main plus this guard) ·tsc --noEmitexit 0 ·swift test131/0 · MacxcodebuildBUILD SUCCEEDED · iOSxcodebuildBUILD SUCCEEDED (performAsCurrentDrawingAppearanceis macOS 11+; the target is 14.0).Why this is first
Tyler's feedback was that the shipped app doesn't match the mockups and the JS lab felt better. Before changing any pixels I need a camera that tells the truth — otherwise I'd be tuning a light app by looking at dark renders of it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01SfEX6bfwCGXtThk1JRNmsE