A picture off the pasteboard becomes a card's file, its hero, or the board's backdrop

⌘V grows an image-data branch, below the app's own clipboard format and refused
outright while a file URL is on the pasteboard: a screenshot or a browser's Copy
Image lands as "Pasted Image.png" in the anchor card's attachments/, through the
very import path Finder file drops and ⇧⌘A take — one bracket, one Finder-style
collision ladder, one set of banners, and the same silence a drop's arrival has.
A card window's ⌘V pastes onto its own card; a focused text field still wins the
selector natively. A file-shaped flavor travels byte for byte, PNG preferred when
several are offered; TIFF and BMP are re-encoded to PNG, being interchange
encodings rather than files anyone wants in a folder.

The hero key gets the setter it was born owing: "Set as Hero" on any image row of
the attachment list, "Remove Hero" on the row that holds it, with menu-bar twins
so the context entry is nobody's only home. It writes as a restyle — one key, one
bracket, one invertible step on the window's own stack — and replaces rather than
refusing, because a card has one hero and the row that has it says Remove instead.

Edit ▸ Paste as Board Background is the same payload's other destination, taking
the existing background.image convention at its word: the picture into the board
folder as "Pasted Background.png", the colour subkey untouched, the generator's
overwrite-our-own-name rule inherited and its echo memo taught to tell the two
producers apart.

Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
2026-08-09 02:43:53 -04:00
parent b18f7ca609
commit ca5d45156b
21 changed files with 1792 additions and 42 deletions
+1 -1
View File
@@ -273,7 +273,7 @@ public final class CardWindowUndo {
}
private static let fieldOrder: [ExpectedField.Kind] = [
.title, .order, .width, .background, .backgroundImage, .icon, .iconColor, .body,
.title, .order, .width, .background, .backgroundImage, .hero, .icon, .iconColor, .body,
]
}
}
+12
View File
@@ -46,6 +46,15 @@ public enum ExpectedField: Sendable, Equatable {
/// afterwards. `nil` is the absent subkey, exactly as everywhere else here.
case backgroundImage(String?)
/// `hero` the card's banner picture, named by the attachment row's "Set as Hero" / "Remove
/// Hero" (`BoardStore.setHero(_:onCard:on:)`, ruled 2026-08-09).
///
/// Its own case beside `.icon` rather than a reading of it, for `.backgroundImage`'s reason: they
/// are independent values on one card, and a step that named the hero must not stale because
/// somebody picked a symbol afterwards. `nil` is the removed key Remove Hero exactly as
/// everywhere else here.
case hero(String?)
/// `icon` the styling gesture's symbol dimension.
case icon(String?)
@@ -69,6 +78,7 @@ public enum ExpectedField: Sendable, Equatable {
case .collapsed: .collapsed
case .background: .background
case .backgroundImage: .backgroundImage
case .hero: .hero
case .icon: .icon
case .iconColor: .iconColor
case .body: .body
@@ -84,6 +94,7 @@ public enum ExpectedField: Sendable, Equatable {
case collapsed
case background
case backgroundImage
case hero
case icon
case iconColor
case body
@@ -348,6 +359,7 @@ public enum HistoryStaleness {
case let .collapsed(expected): equal(document.collapsed, expected)
case let .background(expected): equal(document.background, expected)
case let .backgroundImage(expected): equal(document.backgroundImage, expected)
case let .hero(expected): equal(document.hero, expected)
case let .icon(expected): equal(document.icon, expected)
case let .iconColor(expected): equal(document.iconColor, expected)
case let .body(expected): document.body == expected