Skip to content

Screenshot mode: Cmd+S frames the page in a glass gutter - #25

Merged
ragojose merged 2 commits into
mainfrom
feat/screenshot-mode
Aug 11, 2026
Merged

ragojose merged 2 commits into
mainfrom
feat/screenshot-mode

Conversation

@arzafran

Copy link
Copy Markdown
Collaborator

What this does

Cmd+S (or View → Screenshot Mode) hides all the chrome — toolbar, tab strip, traffic lights — and floats the page as a rounded card inside an 8pt gutter of the window's glass, for clean captures. Modeled on the framed content look of remediate.ski / Arc. Cmd+S or Esc exits; Cmd+L and Cmd+T exit first since they need the chrome. Split screen stays split inside the frame.

Summary

  • One self-contained block in bro_mac.mm + five small call sites: 173 insertions, 1 deletion, zero other files touched — first feature landed on the split structure, and it needed no new header surface
  • Card radius derives from the concentric-corner rule (window radius minus gutter); the gutter reuses the existing glass-backdrop mechanism rather than adding a view
  • Traffic lights capture their prior hidden state and restore it exactly on every exit path (fullscreen-safe)
  • Both layout states derive absolutely from window bounds on every toggle — fixes a drift bug caught in live testing where each Cmd+S inset the content further (relative frame math compounding, amplified on viewport-reactive sites like darkroom.engineering)

Test plan

  • Build clean, zero warnings
  • AX: chrome elements 3→0→3 and traffic lights 3→0→3 across toggle cycles; menu checkmark tracks state; no crashes across rapid cycles
  • Gutter measured by pixel scan: exactly 8pt on all four sides on a real page
  • Geometric idempotence, instrumented: 14 toggle completions including mid-spring presses → exactly 1 distinct OFF frame and 1 distinct ON frame logged
  • Human eyeball: enter the mode on darkroom.engineering — framed card look, repeated Cmd+S stable

The page sits inset in an even glass margin on all four sides, as a
rounded card, with the traffic lights and the rest of the chrome gone
— styled after the framed look of remediate.ski and Arc's old border.
Cmd+S or Esc exits; Cmd+L and Cmd+T exit first since they need the
chrome.
@arzafran
arzafran force-pushed the feat/screenshot-mode branch from 625e046 to cdc2047 Compare August 11, 2026 18:07
@ragojose
ragojose merged commit d4caeb6 into main Aug 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants