Skip to content

Add manual Window Layout utility - #106

Merged
niharnm merged 4 commits into
mainfrom
nihar/window-layout
Sep 9, 2026
Merged

niharnm merged 4 commits into
mainfrom
nihar/window-layout

Conversation

@niharnm

@niharnm niharnm commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Adds Window Layout as an independent optional utility with five explicit actions: Left Half, Right Half, Maximize, Center, and Restore Previous Placement. Actions are available in the module, search, pinned actions, and optional shell-owned shortcuts.

The module uses Semper's existing Accessibility window backend and geometry. It reads only the selected app's focused window and checks process and window identity. It refuses missing, minimized, unsupported, unreadable, and full-height windows using Workspace Restore's existing conservative geometry boundary. It does not infer fullscreen state from button roles or use an undocumented fullscreen attribute. Full-height targets are also refused, so halves and Maximize can be unavailable when the menu bar and Dock both auto-hide. Center remains available for smaller windows. Adding or opening the module does not request Accessibility access; a layout action does.

Each write checks the current frame and reads back the result. The layout backend also checks the expected display snapshot after its last asynchronous window refresh and before writing. Refusals without a write preserve the preceding placement record and report the backend refusal, including when external changes already reached the requested target. They cannot create a new receipt or clear an existing one. Supported, verified partial changes retain one previous placement in memory. Restore preserves later manual moves and refuses changed displays or stale windows. An unreadable attempted-write result or an app-constrained full-height result requires explicit placement review. Full-height post-write readback retains the known before/after record but does not advertise automatic restore. That review and its message survive cancellation, backend failures, retries, and pause/resume until explicit acknowledgement. Pause drains work and preserves history; removal and shutdown clear it.

Window Layout and Workspace writes exclude one another without blocking lifecycle drainage. Away excludes both. Presentation retains its own recovery record. No automatic layout triggers, new dependencies, persistence format, or window-title collection.

Validation:

  • The revised Window Layout, Workspace, admission, and lifecycle regression run passed 148 tests across nine suites without launching Semper.
  • Before the final no-write correction, the new gated regression failed against unchanged b8ce5bd production source with eight assertions across four cases. It exposed receipt replacement on excluded no-write results and receipt clearing on a refused restore already at target. All cases pass after the correction, with additional coverage proving refused first actions do not invent a receipt.
  • Tests include topology changes during the final backend suspension for both layout and restore, stable name/order changes, the conservative auto-hide limit, excluded constrained readback on arrange/restore, retained review evidence, and fresh eligibility after acknowledgement.
  • Debug app/test-target and App Store-conditioned Debug builds passed for no-write correction 0f25f65, with two jobs and isolated DerivedData.
  • Python runner syntax and git diff --check passed.
  • Source review corrections cover masked failure reasons, unsupported fullscreen inference, late topology validation, unsupported constrained readback, and preserving receipt ownership on no-write refusals. Follow-up source review found no further issues.
  • Hosted run 34374841575 passed 2186 tests and failed one stale nine-module shutdown-order expectation. That expectation is corrected, and the lifecycle suite is now included in the standalone runner. Runs 34376342841 and 34377426574 passed at e1949e3 and b8ce5bd. Final CI run 34379764603 passed at exact head 0f25f65ce4e4082c24a4d71aea86a15992adbf15.
  • The Vercel preview status passed at 0f25f65; the preceding head had reported a build-rate limit. No manual deployment retry or account change was attempted.

Native acceptance remains required: focused-window and full-height/auto-hide behavior, constrained app windows, shortcuts while another app is active, restore after manual movement, module pause/remove, keyboard and accessibility behavior. No live window changes or permission changes were run in this branch.

Separate from Presentation cancellation in #102, which has been merged. The product and website documentation owners are handling their own files.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
semper Ready Ready Preview Sep 9, 2026 4:55pm UTC
semper-vmf1 Ready Ready Preview Sep 9, 2026 4:55pm UTC

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

Deployment failed for project semper-vmf1 with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/niharnsm-8472s-projects?upgradeToPro=build-rate-limit

@niharnm
niharnm merged commit e621a11 into main Sep 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant