Build: land focus mode (pane recession, hover reveal, soft caret centering) #87
Notifications
Due Date
No due date set.
Blocks
#88 Calibration gate: does the focus surface rule calm?
AlexKucera/museion
Reference: AlexKucera/museion#87
Reference in new issue
Block a user
Part of #21 (map: Wayfinder map: M1 focus mode & typographic calm).
(Asset upload failed server-side at charting — spec baked into this body.)
What to build
The execution child of the map "Wayfinder map: M1 focus mode & typographic calm" (#21). Focus mode per the charting contract: panes and editor toolbar recede, centered measure on the workspace background, hover-summoned overlay panes, soft caret centering. The build IS the prototype — the calibration gate judges calm.
Acceptance criteria
[Generated by AI]
Resolution
Landed on
wayfinder/87-focus-mode@b0ab800(local, unpushed — push awaits authorization; a local branch in the shared checkout serves the calibration session on this machine).What landed
DesignTokens.workspaceBackgroundNSColor twin — SwiftUI Color can't cross into NSTextView).FocusChrome.swift— left-edge hover slides rail+library in (library only when window ≥1100px — #17's width collapse is NOT overridden, per the map contract); right-edge hover slides the mentor in. Panels float OVER the measure — the measure never moves. 14pt edge sensor strips (HoverZone, tracking-area,hitTest → nil— hover never steals clicks); 140 ms hide grace covers the zone→panel transit. easeOut 0.2 s in / easeIn 0.15 s out.CaretCentering): ±60pt comfort band around the visible center; fires fromtextDidChangeONLY — scrollback and drag-selection are never fought; animated scroll (0.18 s); document clamp parks at the bottom and follows line by line — no jump at the document end. Band math pinned byFocusModeTests.swift(5 tests).saveState == .failed; #67 conflict alert unchanged; autosave runs underneath. ⌘S moved to the body level so it stays armed with the toolbar hidden (drafts have no autosave — ⌘S is their only save path).PostsLibraryColumnextracted from PostsPaneView — one library implementation for the unfocused layout and the focus overlay (rename sheet + context menu travel with it).Verification
tvidentifier warnings pre-exist on main).Calibration knobs (the fog's polish ticket dials these)
FocusChrome.swiftconstants: comfort band 60pt, hover zone 14pt, reveal/hide animation curves + durations, 140 ms hide grace.Session-log
docs/devlog/20261009-issue87-focus-mode_log.md— DOX pass done (app + tests AGENTS.md, devlog + INDEX).Note for the calibration gate (#88)
Checkout
wayfinder/87-focus-mode(verifygit branch --show-current, clean tree) before build-and-run — the gate must calibrate THIS build. The pinned corpus piece: "The expected value of showing" inspike/prose/.[Generated by AI]
Follow-up (live report from Alexander): ⇧⌘F is taken by a system-wide shortcut on his machine — the charting probe only checked NSUserKeyEquivalents and in-app collisions, not global hotkeys. Shortcut is now ⌃F (commit
9c2926fonwayfinder/87-focus-mode). The greyed-out item was the entry guard firing correctly with no file loaded — disregard.The map Notes' '⌘⇧F is free' pin is now stale — treat ⌃F as the shortcut.
[Generated by AI]
Audit follow-up (
d07d418onwayfinder/87-focus-mode, all tests green): reviewer fan-out synthesized — one failure surface in focus (floating chip; toolbar stays recessed), dirty-draft '⌘S saves' cue in focus, mentor reveal honors the #17 width verdict, hidden panels leave the a11y tree, NSColor(Color) bridge replaces the twin constant, dead HoverZone width plumbing deleted + zoneWidth hoisted as the calibration knob.Open (needs Alexander): ⌃F shadows NSTextView's Emacs-style caret-forward binding (menu key equivalents beat the responder chain) — pressing ⌃F in the editor will toggle focus instead of moving the caret one character. If that bites while writing, ⌥⌘F is the suggested free combo; say the word and it's a one-line change.
Known accepted trade-off: toggling focus remounts the mentor pane and library column (half-typed mentor prompt / open rename sheet would be lost) — recorded here for the calibration pass to feel for.
[Generated by AI]
Shortcut settled: ⌥⌘F (commit
1bb3b45) — Alexander's call. ⌃F would have shadowed the editor's Emacs caret-forward binding. Records updated.[Generated by AI]