Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-window support #2237

Merged
merged 34 commits into from
May 29, 2023
Merged

Multi-window support #2237

merged 34 commits into from
May 29, 2023

Conversation

PalmerAL
Copy link
Collaborator

This PR re-architects parts of the browser to support (long-requested) multi-window support. In some places, this means modifying the code to pick the right window instead of assuming there's a single primary window, or modifying things like the history service to have a single global instance that can be shared across windows.

Most of the actual tab management is handled in windowSync.js; it listens for changes on the task/tab objects, and synchronizes those changes with the other windows using IPC. The result is that each window gets the same view into the tab state.

The task list is shared across windows, so each window acts as a different "view" of the task list. Opening a task in a window "steals" the task from any other window where it's currently open. Tabs stay in memory until the last window is closed (there should probably be a way to manually destroy them sooner; I plan to add this to the task overlay UI).

There's still a number of bugs with this that I'm working on solving, but I believe all of the core functionality should be working, and it's mostly usable without running into too many issues.

@PalmerAL
Copy link
Collaborator Author

@RubenSmn If you have a chance to test this for a bit and see if you notice any obvious bugs before I merge it, that would be great. No worries if not though.

@RubenSmn
Copy link
Contributor

RubenSmn commented May 22, 2023

Switching to a empty task gets you stuck, you can't switch out, you need to click the window and then you can ctrl+[ out.

To reproduce:

  • create a task or 2 with some tabs
  • create a task with no tab
  • ctrl+[ to switch tasks
  • get stuck on the empty task
  • click on the window with your mouse
  • be able to switch again

@RubenSmn
Copy link
Contributor

RubenSmn commented May 22, 2023

Switching to a task that is opened on another window you get a white screen (browser view) until you click with the mouse.

To reproduce:

  • create 2 tasks with some tabs
  • open each task on a different window
  • ctrl+[ to switch task on one of the windows

This problem does not occur if you manually use ctrl+shift+e and click on a task, only with the shortcut.

@flightmansam
Copy link
Contributor

This is so amazing! The day has come, I'll be using this over the next few days and see what I can see.

This is needed for events to be synced to other windows in the correct order
@PalmerAL
Copy link
Collaborator Author

@RubenSmn Both should be fixed now. The switching task case is still a little weird - when you switch in the first window, the second window creates a blank third task and switches to that. In the simple case, it seems like the windows should just swap tasks, but in general I'm not sure how the second window should pick a new task from the task list.

@PalmerAL PalmerAL mentioned this pull request May 27, 2023
@PalmerAL
Copy link
Collaborator Author

I'm going to merge this so that I can make a beta release with it. However, if you see any other issues, please let me know!

@PalmerAL PalmerAL merged commit 5bd1544 into master May 29, 2023
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.

None yet

3 participants