Skip to content

feat: add Window: Maximize (Stage Manager) command#626

Open
ajchemist wants to merge 1 commit into
SuperCmdLabs:mainfrom
ajchemist:feature/window-maximize-stage-manager
Open

feat: add Window: Maximize (Stage Manager) command#626
ajchemist wants to merge 1 commit into
SuperCmdLabs:mainfrom
ajchemist:feature/window-maximize-stage-manager

Conversation

@ajchemist

Copy link
Copy Markdown
Contributor

What

Adds a new window management command: Window: Maximize (Stage Manager).

It maximizes the focused window while keeping macOS Stage Manager's staged-windows strip on the left visible:

  • left edge — reuses Almost Maximize's left inset (the work area is 90%-width centered there, so the inset is 5% of the work-area width)
  • top / right / bottom — extend to the full work area, same as Maximize

Why

Raycast's Window: Maximize implicitly changes its sizing depending on whether Stage Manager is enabled. Instead of overloading the existing Maximize behavior, this adds an explicit, separate command so users can choose either behavior deterministically.

How

Window layout geometry lives in three places; all three implement the new preset identically (fill-stage / system-window-management-fill-stage):

Path File
Native helper (primary path for hotkeys/commands) src/native/window-adjust.swift
Main-process fallback src/main/main.ts
Window Management panel UI src/renderer/src/WindowManagerPanel.tsx

Plus:

  • src/main/commands.ts — root command registration (searchable as "stage", "maximize", …)
  • src/renderer/src/utils/command-helpers.tsx — launcher glyph (thin left strip + maximize rectangle), same glyph used for the panel tile

Testing

  • tsc -p tsconfig.main.json clean; renderer typecheck introduces no new errors
  • window-adjust.swift compiles; binary accepts the fill-stage action
  • Verified on-device via a signed DMG built from this branch: window maximizes with the Stage Manager strip remaining visible

Maximize the focused window while keeping the Stage Manager strip
visible: the left edge reuses Almost Maximize's left inset (5% of the
work-area width) and the top/right/bottom edges extend to the full
work area, unlike Raycast's Maximize which changes behavior implicitly
based on Stage Manager state.

Preset id: fill-stage / command id: system-window-management-fill-stage,
implemented in all three layout paths (native window-adjust helper,
main-process fallback, Window Management panel).
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: e62fdf498d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ajchemist
ajchemist marked this pull request as ready for review July 10, 2026 08:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e62fdf498d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +579 to +581
x: area.origin.x + inset,
y: area.origin.y,
width: max(minWidth, round(area.width - inset)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Respect the Stage Manager strip side

When the Dock is positioned on the left, macOS places Stage Manager's recent-apps strip on the right; this preset always offsets the left edge and extends to the right work-area edge, so in that configuration Window: Maximize (Stage Manager) still covers the strip it is meant to preserve. Detect the strip side (or Dock orientation) and apply the inset to the right edge for that case as well.

Useful? React with 👍 / 👎.

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