feat(cold-turkey): the writing lock (#162)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
Wires #161's goal engine and #160's contract into the app: armed from a corner dot or View ▸ Start Cold Turkey…, enforced by the macOS app-kiosk (7-option presentation combo + fullscreen, restored on completion), readout with hairline + near-goal terracotta, and a completion note fading back into focus. While held: focus exit, reading, new buffers, ⌘W/⌃⌘F/⌘N refused (key-code-matched monitor — character matching is layout/Caps-blind; no .closeItem placement exists), ⌘Q asks once per #163's ruling. Typing continuity holds by construction — lock ⇒ focus freezes the branch under the editor and chrome mounts as overlays only. Arm values type directly (1…1000 words / 1…60 min, defaults 250/5). Nothing persists. Wayfinder map #158 Build S2; suite 620, flip-verified pins.
This commit is contained in:
1 parent
7b6abb5d65
commit
a9e199fce4
16 files changed
+1167
-19
No files matched your search
@@ -55,6 +55,9 @@ struct WorkspaceView: View {
|
||||
// #91: drag a markdown file onto the window — same guest slot as
|
||||
// File ▸ Open… Non-markdown drops are refused.
|
||||
.dropDestination(for: URL.self) { urls, _ in
|
||||
// #162: no new buffers while a Cold Turkey block holds —
|
||||
// the open Piece is the one being counted.
|
||||
guard !gate.writingLock.isLocked else { return false }
|
||||
// #141: the window destination is the only one that ever
|
||||
// fires (field-verified 2026-11-02 — nested editor-level
|
||||
// SwiftUI targets are never consulted, and AppKit views
|
||||
@@ -74,8 +77,10 @@ struct WorkspaceView: View {
|
||||
// #21: left-edge hover slides rail+library back in as an overlay.
|
||||
// Library only while the window width allows it (#17 verdict stands:
|
||||
// a collapsed pane is not summoned by focus).
|
||||
// #162: suppressed while a Cold Turkey block holds — the library
|
||||
// stays hidden and the open Piece stable for counting (#158).
|
||||
.overlay {
|
||||
if gate.isFocused {
|
||||
if gate.isFocused, !gate.writingLock.isLocked {
|
||||
// #17 verdict: the library reveal honors the width collapse.
|
||||
let showsLibrary = geo.size.width >= 1100
|
||||
FocusOverlayPanel(edge: .leading, panelWidth: leftRevealWidth(showsLibrary)) {
|
||||
@@ -176,6 +181,13 @@ struct WorkspaceView: View {
|
||||
selection = .posts
|
||||
}
|
||||
}
|
||||
// #162 audit: View ▸ Start Cold Turkey… can fire while another
|
||||
// pane is up (the rail is hover-reachable in focus) — the bar
|
||||
// would pop stale on the next Posts mount. Any pane change
|
||||
// drops a pending arm-bar.
|
||||
.onChange(of: selection) { _, _ in
|
||||
gate.writingLock.showsArmBar = false
|
||||
}
|
||||
}
|
||||
|
||||
/// #94: the ask presents while a batch is staged.
|
||||
|
||||
Reference in new issue
Block a user