A stationary modifier flip answers at the keystroke — the third client of the one shared retarget
Modifiers were sampled only inside resolveOperation, reached from dropUpdated and the commit — and drop callbacks arrive only while the mouse moves, so ⌥ pressed against a still pointer changed nothing until the next twitch. DragSession now arms a local .flagsChanged watch for exactly the session's lifetime (begin arms, end stops, the watchdog guarantees end; ⇧/⌃/caps don't count, a settled hold swallows) and publishes modifierGeneration; the three retargets record which window's surface resolved the proposal (RetargetOrigin — weak registry identity, never board root, so cross-board and two-windows- one-board both answer correctly), and the hovered window replays that same retarget with the operation re-resolved FIRST, since the index space is a function of it. The monitor is injectable — the real one needs a live event stream no test bundle has. Drag-perf card d491e7d3. Claude-Session: https://claude.ai/code/session_01CqjXB7ASoWtbyoGod68k97
This commit is contained in:
@@ -188,6 +188,21 @@ struct BoardView: View {
|
||||
.onChange(of: store.landedReloads) { _, _ in
|
||||
resize.handOff(against: store.snapshot.lanes)
|
||||
}
|
||||
// **The stationary modifier flip's re-proposal** (`BoardDropContext.retargetAfterModifierFlip`).
|
||||
// Drop callbacks arrive only while the mouse moves, so a ⌥ pressed against a still pointer
|
||||
// reaches the drag through the session's `.flagsChanged` watch instead — and lands back on
|
||||
// the one shared retarget here, in the board window whose surface resolved the proposal.
|
||||
//
|
||||
// Every open board window carries this handler and exactly one of them acts: the flip
|
||||
// replays against a `LaneDropRegistry`, which is this window's alone.
|
||||
//
|
||||
// **No transaction of its own**, deliberately: a flip must produce exactly what the next
|
||||
// mouse sample would have produced, and `dropUpdated` wraps nothing either. What moves is
|
||||
// keyed declaratively where it is drawn — the strip on its proposal, each lane on its shadow
|
||||
// run (03-board-ui.md § Motion, transactions keyed narrowly).
|
||||
.onChange(of: appModel.dragSession.modifierGeneration) { _, _ in
|
||||
dropContext.retargetAfterModifierFlip()
|
||||
}
|
||||
.trashPurgeAlert(store: store, confirmations: confirmations)
|
||||
// The board's own anchor for the Style… popover — the surface a board-targeted session hangs
|
||||
// off, since the board has no item to attach to (`styleEditorPresentation`'s `nil` anchor).
|
||||
|
||||
Reference in New Issue
Block a user