Repository navigation
Conversation
Store local app frames and preferred displays, expose preset and fallback editors, and optionally apply defaults to new standard windows. Preserve exact Undo geometry, screen transfer, padding, cancellation, and live-resize state for preset actions. Include focused model, lifecycle, geometry, resource, and native presentation tests, plus usage documentation. Implementation and review were AI-assisted using OpenCode.
Round-trip per-binding fallback settings through keybind exports, including nested cycles and older formats. Route App Default URLs to the focused app without activating an unrelated target, and keep the legacy Save action decode-only. Add focused export compatibility and URL routing tests. Implementation and review were AI-assisted using OpenCode.
|
Thanks for putting this together! Before I take a look, could you complete your self-review and the remaining manual checks? Our AI policy requires contributors to personally review and verify AI-assisted changes before submission. If "pending human review" just means maintainer review, please clarify that and update the checklist! |
Use per-history-entry identities for exact frames so reusing a shortcut cannot erase an older snapshot. Restore the pre-Undo padding on each selection before resolving another exact or action-based target. Add regressions for the contributor-reported shortcut-reuse and consecutive-Undo sequences. AI-assisted implementation using OpenCode.
|
Thanks for clarifying! “Pending human review” means my own contributor review, not maintainer review. I've updated the wording and checklist. I've tested Finder windows opened from Desktop folders and other apps, and confirmed that explicitly choosing a named display moves the window correctly. My diff review found two Undo edge cases, now fixed in I'm also checking the Current display behavior with two monitors, since it currently doesn't follow the mouse's display like other resize actions. I've left that unchecked rather than treating it as verified. I'll keep this as a draft until my contributor review and remaining verification are complete. |
Resolve Current display presets using the normal action screen preference. Keep automatic presets on the window display and preserve named-display targeting and disconnected-display fallback. Add display-selection regression tests. AI-assisted implementation using OpenCode.
Reuse the resize context screen when resolving Current display presets for preview and execution instead of resampling the cursor at trigger release. Preserve named-display and automatic-window behavior. AI-assisted implementation using OpenCode. All 54 focused tests pass; trigger-release cursor movement still requires manual verification.
bf05b43 to
1b13305
Compare
Finder can temporarily report new windows as non-resizable. Retry a skipped resize once after 350ms, only while observation and preferences remain valid and the window frame is unchanged. Add unchanged-frame and completed-resize guard coverage. AI-assisted implementation using OpenCode; 55 focused tests pass. Manual automatic-window retest remains pending.
After an automatic resize retry, restore the preset origin and clamp using the actual size. Construct focused-app URL actions using the configured cursor-screen preference rather than always the main screen. Add regressions for bottom-right positioning, minimum-size clamping, and URL screen selection. AI-assisted implementation using OpenCode; 57 focused tests pass. Manual retests remain pending.
|
Thanks for your patience! My review caught several edge cases involving Undo history, padding, cursor-screen targeting, preview/execution consistency, and Finder’s delayed resizing and positioning. Those are now fixed, with 57 focused tests passing. |
|
Hey, thanks so much again for all the work on this! I really appreciate that you opened an issue first and tested everything so thoroughly, especially the Finder cases from #76. Unfortunately, I'm going to close this one. After going through the implementation, it isn't quite how we picture this working in Loop, and it would need a lot more than a few review tweaks to get there. Most of the complexity comes from App Default being a special case throughout the window pipeline, with its own handling in I've closed #1179 as a duplicate of #76, since automatically applying a per-app frame to new windows is exactly what #76 asks for. That's the scope we'd like to focus on. The manual App Default action and its per-binding fallback go beyond #76, so if you still think they're worth adding, please open a separate issue for them! Also, following up on my earlier comment, even after the self-review the PR still has code like the migration for the removed Save action from an unreleased build. For the next attempt, please make sure it's something you can explain line by line. If you're still interested, feel free to comment on #76 with how you'd approach it, and we can figure out the right structure together before you start on it. Thanks again :) |
Description
Add local per-app presets for window size, position, and preferred display. The App Default action applies the focused app's preset, with a per-action fallback when no preset is saved. An optional setting applies presets to newly created standard windows without rearranging existing windows.
Includes settings editors, exact-frame Undo, display-disconnection fallback, keybind export/import support, and focused regression tests. Changes are limited to this feature and its stability.
Refs #1179 (approved by the maintainer) and #76. This is intended to cover #76's configurable initial-frame use case. The contributor has confirmed Finder windows opened from Desktop folders, other apps, and mounted devices. Presets are explicitly configured rather than inferred from the last Loop action.
How has this been tested?
b55e523: restoring a manually adjusted frame and consecutive Undo after Left Half → App Default, without a duplicate history step.1b13305; code-identical to pre-attribution-rewritebf05b43).9381ee4. Finder temporarily reports new windows as non-resizable; the fix retries the unfinished size once after 350 ms without overwriting an edited window. The contributor observed a visible two-stage move/resize during Finder window initialization.b55e523.d9c8caa.d9c8caa.Contributor review identified history identity collisions after shortcut reuse, padding leakage during consecutive Undo, Current display ignoring the cursor-screen setting, and preview/execution display mismatch after cursor movement. All four are fixed; the contributor has confirmed their manual retests. Final contributor review and the listed manual checks are complete. Commit attribution was corrected to Mars-den, rewriting commit hashes without changing code; the attribution-rewritten revision was
1b13305; the latest position and URL-targeting fixes are ind9c8caa. Earlier hashes above refer to the historical revisions on which those checks were performed.Focused tests were run from a disposable source copy because the scheme's build action rewrites
Config.xcconfig:Existing verification blockers left unchanged:
CycleProgressStoreTests.swiftuses obsolete APIs and prevents full-suite compilation, hence the explicit exclusion above. Repository-wide SwiftFormat also reports pre-existingdocCommentsviolations inScreenOrder.swiftandWindowFrameResolver.swift. These unrelated repairs are deliberately not included.Screenshots
App Defaults settings and editors
App Defaults manager
Saved apps and the optional automatic new-window setting.
Preset editor
Preferred display and window position controls; size is configured in the adjacent Size tab.
Per-action fallback
The action to use when the focused app has no saved preset.
Checklist
Please describe to which degree, if any, an LLM was used in creating this pull request.
OpenCode (GPT-6.1 Sol) assisted with implementation, review, and automated validation. Contributor self-review and the manual checks listed above are complete; this PR is ready for maintainer review.