Realign search, clipboard, and lane-hover code with the second batch

Creation now clears the search by mechanism, not gesture: one seam
(noteUserCreation) states 04's rule once, called from the placeholder
funnel, paste — cards and lanes, after the staleness guard so a stale
paste clears nothing — and Finder file-drop creation; the attach path
deliberately doesn't clear, and cross-board arrivals and New Lane stay
outside the seam (a transfer isn't creation; a lane can't be born
invisible). An open inline rename now survives the filter hiding its
card: the model already kept the editor, but the field renders in the
card's slot, so renderedCards keeps the renaming card's slot exactly as
long as the editor is open — the query stands throughout, and commit or
Escape lets the predicate apply in the same pass. Verified conformant
and newly pinned: query-emptied lanes keep their slot with a 0 badge,
pasteboard staleness (takeover before paste and mid-staging both no-op),
out-transition reachability and the strip pre-divide hold by
construction with comments citing their rulings.

Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
2026-07-28 08:45:12 -04:00
parent 524488122f
commit 5c0c0e5619
9 changed files with 423 additions and 21 deletions
+10
View File
@@ -1723,6 +1723,14 @@ public final class BoardStore {
/// string, since a missing key is the untitled state and `""` would be a real, blank title
/// (01-storage-format.md § Frontmatter).
///
/// **A Finder file drop is a user-initiated creation, so it clears the search**
/// (04-interactions.md § Search, stated by mechanism: "N, Return-creation, the header button,
/// empty-space double-click, paste, and Finder file drops alike"). Cleared at the gesture, in
/// front of the write, exactly as the placeholder's begin clears it in front of the typing
/// `TransientBoardState.noteUserCreation()` is the rule's one home, and the *attach* half of the
/// same gesture (`importAttachments`) deliberately does not call it, because a drop on a card
/// creates nothing that could be born invisible.
///
/// **Partial failure is honest, and leaves no half-made card.** The batch stops at the first file
/// that cannot be imported an unreadable source, a vanished one, a disk with no room left
/// which banners naming it; the cards already made keep their files, matching `importAttachments`'
@@ -1735,6 +1743,8 @@ public final class BoardStore {
let lane = snapshot.lanes.first(where: { $0.id == laneID && !$0.isDeleted })
else { return }
transient.noteUserCreation()
let rendered = lane.cards.filter { !$0.isDeleted }
let target = min(max(0, index), rendered.count)
let root = rootURL