Files
lanework/KanbanTests
rzen 01aa9a0c94 The titlebar stand-in stops reappearing on a window that attaches after the board has loaded
`configureWindow` removed the loading stand-in from whatever window it happened to be
running against, but left `onAttach` installed exactly as `configureLoadingWindow` set
it — a closure that builds a fresh stand-in on every attach, deliberately, so it survives
the provisional-window swap while the board is still loading. SwiftUI's dismantle-then-
make swap has no deadline, though: when it lands after the store has already loaded, the
stale closure reinstalls a stand-in on the real window a moment before `attach`'s own
`addTitlebarAccessoryIfPossible()` installs the real widget beside it — both in the
titlebar, stand-in leading, and nothing left holding a reference to remove it a second
time. `onAttach` is now replaced in `configureWindow` too, keeping only the frame-
placement half a re-attached window still needs. New suite
`BoardLoadingTitlebarSwapRaceTests` drives `HostedWindowController` through the same
attach sequence and pins both the fixed and (as a negative control) the unfixed shape.

Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
2026-08-09 17:32:22 -04:00
..