Remove the App Group wholesale — one sandbox, one bookmark, one flag
Phase 2 of the one-app pivot (DESIGN 12 ▸ App-side state, re-ruled
2026-07-30; reworks 566deab). AppGroup retires; what remains is
AppStateHome — ordinary sandbox Application Support as the one home for
the registry, clipboard staging and template stores, keeping the
unit-test-host redirect (the test host is the app and would sweep real
state). Scalar defaults return to UserDefaults.standard.
BoardRecord's per-edition grant slots and openNow flags collapse to one
bookmark + one isOpenNow; the legacy-key decode and adopt-in-memory
paths go (nothing shipped with group-era records), while the founding
four-keys-required / defaults-for-everything-since decode policy stays —
a bookmarkless record decodes as the born-orphan row rather than
quarantining the list. needsReopen and the pre-anchored re-grant panel
are removed whole: the only state that flow served — a record granted by
a sibling sandbox — is unrepresentable now, and a dead bookmark of our
own was already the orphan case by explicit comment. The
indexOfRecord path fallback dies with it; path is never a key again.
The cross-process freshness stamp (mtime+size re-read) and
BoardEditionPresence with its popover "Also open in…" line retire; the
clipboard prune keeps its atomic .sweeping/ claim-then-delete, reframed
for crash residue and open -n copies rather than sibling editions. The
application-groups entitlement key is gone.
1880 tests in 317 suites green (13 cross-edition tests retired with
their subject).
Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -96,7 +96,7 @@ enum TemplateEngine {
|
||||
|
||||
// MARK: - Where templates live
|
||||
|
||||
/// The store folder's name in both locations — the bundle's and the App Group container's.
|
||||
/// The store folder's name in both locations — the bundle's and the app's own.
|
||||
static let storeFolderName = "Templates"
|
||||
|
||||
/// The bundled store: `<app bundle>/Contents/Resources/Templates/`, holding one board folder per
|
||||
@@ -106,32 +106,21 @@ enum TemplateEngine {
|
||||
Bundle.main.resourceURL?.appendingPathComponent(storeFolderName, isDirectory: true)
|
||||
}
|
||||
|
||||
/// The user store: `Templates/` in the **shared App Group container**, beside the board registry
|
||||
/// and the clipboard's staging store (09-templates.md ▸ Save as Template ▸ Storage, re-homed
|
||||
/// 2026-07-29; 02-architecture.md § Per-board app state, "App-wide state has the same home").
|
||||
/// The user store: `<Application Support>/Templates/`, beside the board registry and the
|
||||
/// clipboard's staging store — 09's settled location ("Application Support … inside the app
|
||||
/// container — friction-free sandbox writes, no location ceremony"; 02-architecture.md
|
||||
/// § Per-board app state, "App-wide state has the same home").
|
||||
///
|
||||
/// **⚠ one-app collapse phase 2**: the cross-edition half of this rationale retires with the App
|
||||
/// Group (12-editions.md ▸ App-side state, re-ruled 2026-07-30); the store simply moves to the
|
||||
/// ordinary sandbox container and keeps every property below, since it never had bookmarks or
|
||||
/// grants to lose.
|
||||
///
|
||||
/// > **templates cross editions**: a template saved in base appears in Pro's chooser, honoring 12's
|
||||
/// > never-an-empty-home-screen promise (templates are plain board folders — no per-edition
|
||||
/// > semantics, no bookmark grant ceremony; the group container is directly writable by every
|
||||
/// > edition).
|
||||
///
|
||||
/// That last clause is why this store needs none of the machinery the registry does: a template is
|
||||
/// a folder inside a container both editions can write, so there is no bookmark to mint and nothing
|
||||
/// to grant — the cross-sandbox caveat that gives `BoardRecord` its per-edition grant slots simply
|
||||
/// does not arise. Spelled through `AppGroup.stateDirectory` like every other app-wide store
|
||||
/// (`ClipboardStore.defaultStagingRoot`, `BoardRegistry.defaultStorageURL`), so all three move
|
||||
/// together if the home ever does.
|
||||
/// This store needs none of the machinery the registry does: a template is a folder inside the
|
||||
/// app's own container, so there is no bookmark to mint and nothing to grant. Spelled through
|
||||
/// `AppStateHome` like every other app-wide store (`ClipboardStore.defaultStagingRoot`,
|
||||
/// `BoardRegistry.defaultStorageURL`), so all three move together if the home ever does.
|
||||
///
|
||||
/// **Named, never created here.** Discovery of a store that does not exist is an empty list, not
|
||||
/// a directory the app made on the off-chance: the store is minted by the first Save as Template,
|
||||
/// and by Reveal in Finder, both of which are 09's other cards.
|
||||
static var userStore: URL {
|
||||
AppGroup.stateDirectory.appendingPathComponent(storeFolderName, isDirectory: true)
|
||||
AppStateHome.directory.appendingPathComponent(storeFolderName, isDirectory: true)
|
||||
}
|
||||
|
||||
// MARK: - Discovery
|
||||
|
||||
Reference in New Issue
Block a user