GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(desktop): Cmd/Ctrl+W closes sidebar tabs, never the window by t3dotgg · Pull Request #25860 · pingdotgg/t3code

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Oct 27, 2026

Copy link
Copy Markdown
Member

Cmd/Ctrl+W should only close tabs in the sidebar. When no tab was left to close, it closed the whole T3 Code window. On Windows and Linux that also quits the app and the local server.

The renderer handles mod+w for terminals and right-panel tabs. When neither applies, the key fell through to a native menu item bound to CmdOrCtrl+W: File > Close Window on macOS, and the Close item in Electron's default Window menu on Linux and Windows.

Now no application menu item has that shortcut on any platform:

  • macOS File > Close Window stays, with no accelerator.
  • The Window menu has an explicit submenu (Minimize, Zoom, and Bring All to Front on macOS), so Electron does not add its Close role.
  • docs/user/keybindings.md now says mod+w never closes the window.

The window close button and Quit work as before. This also covers what #25003 fixes for Windows and Linux, and adds macOS.

Proof: a new menu test fails on main and passes here. On a Linux Electron dev build, one Ctrl+W with no tabs closed the window on main. With this change, Ctrl+W closed an open Files tab, and the next Ctrl+W left the window open.

Before (main): Ctrl+W with no tabs closes the window.
before

After: Files tab open, Ctrl+W closes it, Ctrl+W again leaves the window open.
after

Reviewed with sol-loop: 1 round with GPT-6.1 Sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Oct 27, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — This PR changes the default desktop Cmd/Ctrl+W behavior so it closes renderer tabs but never closes the window or quits the app, with focused cross-platform menu tests. Because this alters a product-default shortcut behavior, it warrants human review.

No code changes detected at edbb2f6. Prior analysis still applies.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg @claude
fix(desktop): Cmd/Ctrl+W closes sidebar tabs, never the window
edbb2f6
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@t3dotgg
t3dotgg force-pushed the fix/cmd-w-never-closes-window branch from 82975f1 to edbb2f6 Compare October 27, 2026 09:26
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: fix/cmd-w-never-closes-window
  • File: .coderabbit.config.ts
  • Commit: edbb2f6
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 9068b3fa-0bb3-4d6b-8aaa-c2cd407dbaa6
Commits

Reviewing files that changed from the base of the PR and between 92e6450 and edbb2f6.

Files selected for processing: 4
  • apps/desktop/src/window/DesktopApplicationMenu.test.ts
  • apps/desktop/src/window/DesktopApplicationMenu.ts
  • apps/desktop/src/window/DesktopWindow.ts
  • docs/user/keybindings.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

Walkthrough

The File menu now closes the clicked window directly on macOS and uses the quit role on other platforms. The Window menu has explicit items. A cross-platform test checks the menu configuration. The keybinding documentation says desktop Cmd/Ctrl+W does nothing when no eligible target remains.

Changes: Desktop window close behavior

Layer / File(s) Summary
Menu and shortcut behavior
apps/desktop/src/window/DesktopApplicationMenu.ts, apps/desktop/src/window/DesktopApplicationMenu.test.ts, apps/desktop/src/window/DesktopWindow.ts, docs/user/keybindings.md
The macOS File menu closes the clicked window directly; other platforms retain the quit role. The Window menu defines Minimize and Zoom items, plus separator and Front items on macOS. The cross-platform test checks for close roles, default Window submenus, and +W accelerators. The comment and documentation describe Cmd/Ctrl+W behavior.

Priority: Normal

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

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#25250: Both PRs route the desktop Cmd/Ctrl+W shortcut away from closing the window.

Suggested labels: bugfix

Suggested reviewers: maria-rcks, juliusmarminge

Merge Risk: Minimal · up to edbb2

Cmd/Ctrl+W is intended to close eligible tabs without closing the window. No actionable merge-blocking risk remains in the supplied evidence.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description follows the template's main sections and covers the problem, the change, and verification. The Problem and Change content is clear. Verification gives a specific failing-then-passing m… Fill in the "Scope and approval" section. Link the triaged bug issue or the discussion with explicit maintainer approval, including the approval comment. If no prior issue exists, explain why this small, focused fix of an obvious bug qualif…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title "fix(desktop): Cmd/Ctrl+W closes sidebar tabs, never the window" is a conventional commit title that states the main change. The PR removes the native menu accelerator that made Cmd/Ctrl+W c…
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.
Full details: Title check

Explanation

The title "fix(desktop): Cmd/Ctrl+W closes sidebar tabs, never the window" is a conventional commit title that states the main change. The PR removes the native menu accelerator that made Cmd/Ctrl+W close the window when no terminal or right-panel tab remained. The changeset matches this: the File and Window menus no longer carry the CmdOrCtrl+W accelerator, the Window menu gets an explicit submenu, and the keybindings doc is updated. The title is specific and accurate.

Full details: Description check

Explanation

The description follows the template's main sections and covers the problem, the change, and verification. The Problem and Change content is clear. Verification gives a specific failing-then-passing menu test, a manual Linux Electron check with observed results, and before/after screenshots. The Scope and approval section is missing. It does not link a triaged bug issue or maintainer approval. It cites PR #25003 but does not say whether that PR or a maintainer approved this direction. The author also left the template's Read CONTRIBUTING.md comment in place, which is not a content problem. The description also names the model used, which the template asks for.

Resolution

Fill in the "Scope and approval" section. Link the triaged bug issue or the discussion with explicit maintainer approval, including the approval comment. If no prior issue exists, explain why this small, focused fix of an obvious bug qualifies without one. Also clarify the relationship to #25003, since the description says this fix covers what #25003 fixes for Windows and Linux.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg
t3dotgg merged commit a86c05f into main Oct 27, 2026
31 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg
t3dotgg deleted the fix/cmd-w-never-closes-window branch October 27, 2026 10:01
@lidge-jun lidge-jun mentioned this pull request Oct 27, 2026
fix(desktop): recover startup failures (chase 261028 B16) goat-si/goat#1920
Merged
Pipyakas pushed a commit to Pipyakas/t3code that referenced this pull request Oct 27, 2026
@t3dotgg @claude @Pipyakas
fix(desktop): Cmd/Ctrl+W closes sidebar tabs, never the window (pingd…
9666241
…otgg#25860)

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit a86c05f)
@adampeterhiggins adampeterhiggins mentioned this pull request Oct 29, 2026
chore: sync upstream through 07f7f976 adampeterhiggins/t3code#512
Merged
19 tasks done
This was referenced Oct 30, 2026
feat(desktop): add an Off option to the quit shortcut setting #27277
Closed
fix(desktop): allow reopening the macOS window from File menu #28054
Open
This was referenced Oct 31, 2026
fix(desktop): Ctrl+W no longer quits the app on Windows and Linux #25003
Closed
Windows desktop app abruptly quits on closing last tab with Ctrl+W; align behavior with macOS via System Tray #10161
Closed
feat(desktop): keep Windows host running in the tray #27568
Closed
@incognitojam incognitojam mentioned this pull request Nov 4, 2026
docs(ledger): Mod+W never closes the desktop window incognitojam/styal#1258
Merged
@olafura olafura mentioned this pull request Nov 7, 2026
test(features): ledger upstream T3 Code through 9504a09f08 hal-c2/hal-c2#1189
Merged
@deepfry666 deepfry666 mentioned this pull request Nov 10, 2026
[Feature]: Prompt for confirmation before closing window when agent tasks are running #10697
Closed
@hxmbl hxmbl mentioned this pull request Nov 22, 2026
[Feature]: Cmd+W should close the window on macOS #40863
Closed
2 tasks done
@FlameFires FlameFires mentioned this pull request Nov 28, 2026
[Feature]: Windows — closing the last window with ✕ quits the app and kills running agent turns; add hide-to-tray (or close confirmation) option #44653
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@t3dotgg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.