Skip to content

Open new windows in native tabs if option is set#9159

Merged
lionel- merged 1 commit intomainfrom
feature/tabbed-new-windows
Aug 26, 2025
Merged

Open new windows in native tabs if option is set#9159
lionel- merged 1 commit intomainfrom
feature/tabbed-new-windows

Conversation

@lionel-
Copy link
Contributor

@lionel- lionel- commented Aug 25, 2025

Addresses #8731

Release Notes

New Features

  • macOS: When the window.nativeTabs is set to true, new windows will now always open in native tabs (Improve native tabs support on macOS #8731). Previously they would only do so if the global macOS setting to always prefer opening in native tabs was also set.

Bug Fixes

  • N/A

QA Notes

When window.nativeTabs is set on macOS, every action that opens a new window should consistently open a native tab.

This should be the case even when the following macOS setting is set to "never":

Screenshot 2025-08-25 at 17 19 19

@lionel- lionel- requested a review from DavisVaughan August 25, 2025 16:23
Copy link
Contributor

@DavisVaughan DavisVaughan left a comment

Choose a reason for hiding this comment

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

Yay!

const forceNewTabbedWindow = this.configurationService.getValue<boolean>('window.nativeTabs');
if (forceNewTabbedWindow || options.forceNewTabbedWindow) {
// --- End Positron ---
const activeWindow = this.getLastActiveWindow();
Copy link
Contributor

Choose a reason for hiding this comment

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

Screenshot 2025-08-26 at 8 55 36 AM

Technically I don't think it requires a restart. I tried to change the setting and got prompted to restart but said "no" and it still works as expected. I'm ok with this tradeoff of being extra safe though.

if (forceNewTabbedWindow || options.forceNewTabbedWindow) {
// --- End Positron ---
const activeWindow = this.getLastActiveWindow();
activeWindow?.addTabbedWindow(createdWindow);
Copy link
Contributor

Choose a reason for hiding this comment

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

Here's a good video of me running through all the main ways I open a project. It all works as expected.

Something like this would make a good page on the positron docs?

Notably Files: Open Recent which doesn't open in a new window by default, but you can force it to open in a new window by Cmd + Clicking on the project name, and it works well with this option.

Lastly, I don't show it in the video here, but I also personally set "window.openFoldersInNewWindow": "on" because I always want my folders to open in a new tab. This forces the 3 cases of "overwrites current tab" that you see in this video to instead also open in a new tab instead, which I think we should at least document alongside this option, as I think people will find it useful.

Screen.Recording.2025-08-26.at.8.52.29.AM.mov

@lionel- lionel- merged commit a9e9837 into main Aug 26, 2025
14 of 15 checks passed
@lionel- lionel- deleted the feature/tabbed-new-windows branch August 26, 2025 17:03
@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants