Skip to content

fix(desktop): reopen the main window from the File menu - #11069

Open
angusm73 wants to merge 2 commits into
pingdotgg:mainfrom
angusm73:fix/desktop-reopen-main-window
Open

angusm73 wants to merge 2 commits into
pingdotgg:mainfrom
angusm73:fix/desktop-reopen-main-window

Conversation

@angusm73

@angusm73 angusm73 commented Sep 10, 2026 •

Copy link
Copy Markdown

What Changed

Adds File → New Window with ⌘N on macOS and Ctrl+N on Windows/Linux. Reuses the existing window activation behavior to reopen the main window, or restore and focus it when already open.

Why

Addresses the macOS window-reopening problem reported in #435 (already closed).

After closing the main window with ⌘W on macOS, the File menu offers no way to reopen it. This adds the expected menu command and shortcut while preserving the existing single-window and backend-readiness behavior.

Validation

  • All 34 focused desktop menu/window tests passed; targeted lint, formatting, and desktop typecheck passed.
  • Tested in an isolated macOS desktop instance: ⌘W followed by ⌘N, reopening through the File menu, repeated ⌘N without duplicate windows, and restoring a minimized window.
  • Windows/Linux use Electron's platform-aware accelerator; interactive testing was on macOS only.

UI Changes

Before After
File menu before: Close Window only File menu after: New Window with Command-N

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Implemented with GPT-6 via Codex.

Summary by CodeRabbit

  • New Features
    • Added a New Window option to the desktop app’s File menu.
    • Added the Cmd/Ctrl+N keyboard shortcut for opening a new desktop window.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 10, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 3aa13ed

Macroscope's review found this PR approvable — This is an isolated 15-line desktop menu fix that routes File → New Window through the existing window activation behavior. It does not alter existing paths or introduce schema, security, billing, deployment, default, or static-analysis changes.

No code changes detected at 3548ec5. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 1624c91b-eb21-4bf3-91d0-cfa39ac83860

📥 Commits

Reviewing files that changed from the base of the PR and between 3aa13ed and 3548ec5.

📒 Files selected for processing (1)
  • apps/desktop/src/window/DesktopApplicationMenu.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The desktop File menu adds a New Window item with a CmdOrCtrl+N accelerator. The handler resolves DesktopWindow and calls activate.

Changes

Desktop New Window Menu Action

Layer / File(s) Summary
Wire New Window menu action
apps/desktop/src/window/DesktopApplicationMenu.ts
Adds the newWindowClick handler and registers the New Window item with its accelerator and separator.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 3548e

The New Window action reuses the existing activation path and retains centralized failure handling, with no identified merge-blocking issue.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a File menu action to reopen the main window.
Description check ✅ Passed The description includes the required What Changed, Why, UI Changes, and Checklist sections. It explains the problem, implementation, validation, and UI impact. The interaction video is not included, …
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 1, 2026 — with ChatGPT Codex Connector
@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Hi! We are cleaning up open PRs, and this one appears to have been created with an older model (gpt-6). If this change is really important, we recommend rebuilding the PR with a newer model if possible.

@maria-rcks maria-rcks closed this Oct 11, 2026
@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Reopening, this was closed by mistake. Sorry for the noise!

@maria-rcks maria-rcks reopened this Oct 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants