Files
lanework/KanbanPro/Edition/ProEdition.swift
T
rzen 96c4014fef Wire native undo into menus, toolbar, and command validation
The command surface was already almost entirely platform machinery —
this card proves it and pins it. Headless probes established that
NSWindow.validateMenuItem answers enablement AND rewrites the row title
from the delegate-supplied manager, so 'Undo Move 3 Cards' flows step
phrase to Edit menu with no code of ours; under the lock the rows dim
and keep their names, the correct reading of the-stack-survives. The
toolbar twins validate through validateUserInterfaceItem, which never
touches labels — 03's static-label exception proven rather than
asserted — and their specs' enablement abstention is pinned so nobody
later adds a second, disagreeing answer. The one link a headless run
cannot close is the nil-target key-window resolution itself: standard
responder-chain behavior with none of our code in it, left as the
manual check. Base-edition 'disabled without undo' scaffolding is
reworded away — every base board has undo now. New suites cover the
trash's two doors (delete-then-undo byte-identical to Put Back's
effect), position-preserving restore of a middle card, and the
capstone: five gestures forward, five presses back to the origin
board, five forward again, the menu phrase asserted after every press.

Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
2026-07-28 15:29:45 -04:00

38 lines
2.5 KiB
Swift

import Foundation
/// **Pro's source root.** This directory — and this file's presence in it — *is* the edition
/// split (12-editions.md ▸ Targets): the `Kanban` target compiles `Kanban/` alone, the
/// `KanbanPro` target compiles `Kanban/` **plus** `KanbanPro/`. Nothing in the shared tree is
/// `#if`-ed on an edition, because "the editions differ at the binary level" (12) is only true if
/// the difference is a file one target builds and the other does not.
///
/// **What lands here, and when.** Nothing yet — this is a reserved root, split out ahead of the
/// code so pro-m1 is a set of new files rather than a second pass over the project structure:
///
/// - `KanbanPro/Git/` — the git `HistoryProviding` implementation (06-history-undo.md: undo as
/// forward restore commits over HEAD's first-parent ancestry), init/adoption, branches, commit
/// identity, repository hygiene. Brings the libgit2 dependency with it; the base target must
/// never gain one, which `scripts/verify-editions.sh` checks against the signed binary.
/// - `KanbanPro/Remote/` — pull/push, push-on-commit (07-sync-collab.md). The
/// `com.apple.security.network.client` entitlement Pro already carries is for this, and base's
/// lack of it is the other half of what the verification script checks.
/// - `KanbanPro/Auth/` — remote credentials over the declared keychain access group
/// (07 ▸ Auth: Keychain, SSH, TOFU).
///
/// **What does not land here**: anything the edition matrix marks ✓ for all three editions. The
/// board experience, agent attribution and accessibility are shared code and stay in `Kanban/`.
///
/// The type itself is a namespace, not state — the composition root that picks a
/// `HistoryProviding` per edition is `AppModel.makeHistoryProvider`, and it lives in the shared
/// tree because base's `NativeHistoryProvider` is the shared default. Pro's override is one closure
/// installed from here once `KanbanPro/Git/` exists (pro-m1); until then Pro runs the native stack,
/// which is the seam working rather than a gap.
enum ProEdition {
/// The edition's own bundle identifier (12 ▸ Targets, ruled 2026-07-27: base keeps
/// `dev.rzen.indie.Kanban`, Pro mints its own). Stated as a constant so the value has one
/// home in Pro-only code; the running app reads its identity from `Bundle.main`, which is
/// already how the App Support directory is per-edition without a line of edition code
/// (`BoardRegistry`, `ClipboardStore`).
static let bundleIdentifier = "dev.rzen.indie.KanbanPro"
}