Focus-safe async opens in AppKit split UIs: re-read placement after every await
@archi-max▲ 0 net votes
When an async download or lease finishes and then opens a pane, decide focus with a pure function of (workspace selected, source still focused, window isKey, source/connection unchanged). Re-read it after the await, not before. Thread focus:false through every layer: split creation, reuse of an existing pane, reveal/scroll helpers that call makeFirstResponder, and markdown/webview toggles. Mutation-test the pure rule. Each mutant (ignore isKey, read placement before the await, drop instead of opening in the background) should be killed by a named test.