Repository navigation
Conversation
Skip automatic placement when a direct accessibility tab group contains multiple tabs. Bound child accessibility calls and document the conservative exclusion of new or restored multi-tab windows. AI-assisted with OpenAI ChatGPT. Manually reviewed and approved by the author; author verified behavior with Finder and Ghostty.
- Use the existing setFrameSynchronously instead of changing it, and let handleSizeConstrainedWindow correct the position - Leave anchoredFrame unchanged, as it runs for every resize - Drop the README section for the hidden initialWindowFrames key
d53648b to
03751f1
Compare
There was a problem hiding this comment.
Hey, thanks for this, and for posting the proposal on #76 first! Sorry I didn't get back to you on it sooner. The overall structure is pretty much what I had in mind; a separate observer for configured apps, leaving existing windows alone, and reusing the existing resize primitives instead of branching through the action pipeline.
I rebased this onto develop and pushed a small commit on top:
- Dropped the changes to
Window.setFrameSynchronously. #1190 just restructured that code, andplacealready reads the frame back afterwards, so the failure return wasn't needed. It now uses the existing setter and letshandleSizeConstrainedWindowcorrect the position. - Reverted the
anchoredFramechange. Keeping the title bar on screen for windows larger than the display is a good idea, butanchoredFrameruns for every resize, so I'd rather take that as its own PR if you're up for it! - Removed the README section, since the README is user-facing and this isn't configurable without
defaults writeyet.
On your question about scope: I'd like the settings UI to be part of this PR, since right now there's no way for users to turn this on. A couple of other things:
- Could you match the rest of the codebase's style a bit more? Mainly splitting up the dense one-line
guards and the multi-statement lines instart(), and adding the usual file headers to the new files. - A short doc comment on
initialWindowFramesdescribing what it stores would be nice to have.
Since I force-pushed, please reset your local branch to the updated one before pushing again. Thanks again!
- Expand dense guards and observer setup - Add headers to the new Swift files - Clarify what initialWindowFrames stores AI-assisted with OpenAI Codex for the style edits and verification.
Use a single modal to manage apps and edit their initial window frames with the existing custom action editor. AI-assisted with OpenAI Codex for implementation and build verification.
Fit the requested frame before applying inner padding and pass explicit zero dimensions through to the window setter. Cover both cases with placement tests. Use the custom editor defaults, share the app exclusion check, and disable drag reordering in the placement list. AI-assisted with OpenAI Codex for implementation and verification.
Use the shared padded target and verify that the right-edge placement matches a custom action. AI-assisted with OpenAI Codex for implementation and testing.
|
Thanks for the review and rebase, The settings UI is now under Behavior -> Window. I kept initial placement consistent with custom actions at screen edges. For example, with zero padding, a preset starting at X = 80% with width = 50% gets clipped to the rightmost 20% of the screen. |
Description
Adds opt-in initial window placement for #76. In Settings -> Behavior -> Window -> Initial Window Placement -> Configure…, choose an app and set the size and position of its new windows using Loop’s custom action editor. Removing the app removes its rule.
Loop observes configured apps and applies each rule to new standard, resizable windows on their current display. Windows already open when observation starts stay in place. Placement skips excluded apps, minimized and fullscreen windows, and native multi-tab groups. It reuses Loop’s resize and size-constraint handling without activating the app or adding an Undo entry.
Placement follows the same screen-edge behavior as custom actions. With zero padding, X at 80% and width at 50% produces a frame covering the rightmost 20% of the usable display.
Context and earlier PR
I had not received a reply to my proposed approach in #76, so I continued with a small local implementation one evening. During that work, Codex misread my request to “get this over with” as a request to finish and publish quickly. I meant to make small steps toward the result. It published #1194 before I had reviewed and approved it. That PR was closed and its branch was removed. I am sorry for the noise; I take responsibility for what I submit.
The Finder-specific diagnosis in my earlier comment also needs correction: another Loop build was running with its own Finder rule. Those tests did not establish a Finder initialization bug. I repeated the Finder checks with only the development build running.
How has this been tested?
Checklist
Please describe to which degree, if any, an LLM was used in creating this pull request.
OpenAI Codex generated and revised and tested this change with me. I have personally reviewed all of the new code and the demonstrated behavior.