Three curated symbol vocabularies — boards, lanes, and cards each pick from their own shelf

`CuratedSymbols` was one flat ~65-glyph list serving every style-editor target alike. It is
now three level-specific sets — `boards` (project/container/identity), `lanes`
(workflow/stage/status), `cards` (work-item/content) — each ~30-40 entries, seeded from the
original list and `SymbolPickerCatalog.defaultSet`, reorganized by which level a glyph actually
reads as being about. Overlap is kept where a glyph genuinely fits everywhere (`flag`, `star`).

Wiring:
- `BoardInfoPopover`'s board-glyph `SymbolPicker` now passes `CuratedSymbols.availableBoards`
  instead of the picker's domain-agnostic default.
- The card sidebar's `SymbolPicker` (`CardSidebarSections`) now passes
  `CuratedSymbols.availableCards` instead of the old flat `available`.
- The style editor's own curated grid (`StyleEditorView`, the Style… popover's only remaining
  anchor) reads `CuratedSymbols.availableForStyleEditor(level:spansLevels:)`: a homogeneous
  target reads its own level's set, and a target that somehow spans more than one level (today
  unreachable — 04-interactions.md's cards-XOR-lanes rule keeps a live selection homogeneous)
  reads the three combined, via a new `BoardStore.styleTargetSpansLevels` seam that asks the
  question `styleLevel(of:)` deliberately collapses.
- `CuratedSymbols.combined` (the three sets' stable-order union) also replaces the old `.all`
  in `SymbolPickerCatalog`'s full-catalog fallback.
- `SymbolPickerCatalog.defaultSet` is kept as the fallback for a caller naming no level (a
  future saved-search picker, say) rather than retired.

DESIGN/03-board-ui.md and DESIGN/05-card-window.md's Styling/sidebar prose amended minimally
where they named "the curated set" as a single list.

Tests: three new/rewritten suites in KanbanTests/StyleModelTests.swift (set shape, availability,
overlap, `combined`, the style-editor level/span decision, the board-anchor width tripwire), one
new test in KanbanTests/StyleWriteTests.swift (`styleTargetSpansLevels`), and the old
single-list-pinning tests in KanbanTests/SymbolPickerTests.swift and KanbanTests/CardSidebarTests.swift
updated to the new set names. 2834 tests, 487 suites green (KanbanTests, arm64); one unrelated
flaky failure (RootRecoveryTests.vanishAndReturn under full-suite load) passed clean in isolation.

Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
2026-08-09 01:26:36 -04:00
parent c87616f3fb
commit db863ba011
11 changed files with 288 additions and 79 deletions
+20
View File
@@ -1784,6 +1784,26 @@ public final class BoardStore: HealHost {
}
}
/// Whether `target` names **both** a lane and a card the finer question `styleLevel(of:)`
/// deliberately does not ask, because that function's job is a single leading-well default and a
/// mixed set collapsing to `.card` is fine for that ("if a mixed set ever reached here, `doc.text`
/// is the level whose default would actually be removed"). The curated symbol grid's job is
/// different showing the *wrong* level's whole vocabulary would be a worse failure than showing
/// too much so it asks this instead (`CuratedSymbols.combined`'s own doc comment).
///
/// Unreachable through any live selection today: 04-interactions.md's cards-XOR-lanes rule keeps
/// a `store.selection` homogeneous, so every real `StyleTarget.items` this app constructs already
/// names only lanes or only cards. Kept as a real check rather than assumed, so the grid degrades
/// gracefully instead of silently mis-rendering if that invariant is ever loosened.
public func styleTargetSpansLevels(_ target: StyleTarget) -> Bool {
guard case let .items(ids) = target else { return false }
let namesALane = snapshot.lanes.contains { ids.contains($0.id) }
let namesACard = snapshot.lanes.contains { lane in
lane.cards.contains { ids.contains($0.id) }
}
return namesALane && namesACard
}
/// Writes a style gesture the **one** commit point every anchor shares (03-board-ui.md §
/// Styling Controls: "One component, one behavior, three anchors"), and the quick-style recents
/// row with them.