Follow frontmost app when placing new windows - #45
Merged
Conversation
- Preserve focus when new windows target persisted workspaces
|
| Filename | Overview |
|---|---|
| Sources/DefiMacOS/MacOSPlatform+Snapshot.swift | Moves frontmost-process capture to snapshot finalization and supplies it to focused-window resolution. |
| Sources/DefiMacOS/SnapshotEngine.swift | Updates focused-window resolution to accept the snapshot’s captured frontmost process identifier. |
| Sources/DefiRuntime/WindowReconciliation.swift | Allows non-floating frontmost-app spawns to activate and focus their assigned workspace. |
| Tests/DefiRuntimeTests/BackgroundWindowDiscoveryTests.swift | Distinguishes frontmost and background processes in discovery coverage. |
| Tests/DefiRuntimeTests/PlacementPreferencesTests.swift | Verifies that a frontmost-app spawn follows persisted workspace placement and becomes selected. |
Sequence Diagram
sequenceDiagram
participant SE as SnapshotEngine
participant WS as NSWorkspace
participant AX as Accessibility API
participant WR as Window Reconciliation
SE->>WS: Read frontmost process at finalization
SE->>AX: Resolve focused window for process
SE->>WR: Reconcile snapshot and process ID
WR->>WR: Place new window in assigned workspace
WR->>WR: Focus non-floating frontmost-app spawn
Reviews (1): Last reviewed commit: "fix(focus): follow frontmost app when pl..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing