Repository: terminal
Issue: Process Model v3 / Tab tear-out ship list
Labels: Area-UserInterface,Area-TerminalControl,Area-Settings,Product-Terminal,Issue-Task,Area-Remoting,Area-Windowing

Moving this to separate from #14900. I want that to SPECIFICALLY track tag dragging UX issues (which could apply to us or maybe anyone else using TabView). 


### For general tab tear-out &U drag drop UX issues, see: ---> **#14900** <---


This is a list of things we need to fix to get #5000 / #1256 out the door.

## Original PRs:
* [x] #14825 
* [x] #14843 
* [x] #14851 
* [x] #14866 
* [x] #14901 
* [x] #14935 

## PR Blockers

_We shouldn't even merge these to `main` like this_

```[tasklist]
### PR bugs
- [x] I went into settings to turn on the tray icon, and it crashed when I hit Save. (fixed in 35c7474ab)
- [x] Another curious A/V crash when hot-reloading, with a null Dispatcher? (fixed in 6e4b2e104)
- [x] (ainulindale) Windows don't get activated when they're first created (fixed in 704220f7e)
- [x] (ainu) defterm is ALL SORTS of fucked (fixed in a1a86eb6c)
- [x] (party) tear-out of a single window (with no other running windows) closes the Terminal
- [x] (party) Tear-out a window upscales it on high DPI (805b880da)
- [x] (?) `wt -w _quake` is broken?
```


## Ship blockers

_We can merge these, but iterate in post_


```[tasklist]
### Follow-ups
- [x] Opening settings in two windows at the same time causes a crash (This is upstream MUX#7283)
- [x] I launched an elevated profile, then closed it, and admin terminal stuck around in the tray
- [x] centerOnLaunch:true overrides the tear-out position (fixed in b107f7d20)
- [x] Tearing out of a maximized window shouldn't stay maximized (805b880da)
- [x] `_windowExitedHandler()` would have to be called inside the try clause as a `wil::scope_exit`
- [x] (ainulindale) remove isolated monarch `features.xml`
- [x] Setting terminal as defterm, via the Settings app, while the Terminal is running, opens the previously set terminal (stable), not the Preview one - **we think this was just a bad sefterm build, but need to retry to confirm**
- [x] If you tear out of a single window with session restore turned on, and two windows in `state.json`, then when recreating the window, we'll restore the other window from state (and possibly explode 💥)
- [x] (silmarillion) attaching a tab to an existing window throws a rendered warning?? -2005270527 - **we haven't seen this in a long time**
- [x] (silmarillion) moving a tab to a larger window doesn't resize the control - **THIS WAS AN ATLAS BUG**
- [ ] https://github.com/microsoft/terminal/issues/15156
- [x] https://github.com/microsoft/terminal/issues/15144
- [x] https://github.com/microsoft/terminal/issues/15121
- [x] https://github.com/microsoft/terminal/issues/6507
- [x] That one internal thread about hidden windows, see https://github.com/microsoft/terminal/commit/2c16e7c07b496e2bfbd399d2534d7d3a0ebb1db5#r109802295
- [ ] #15209
- [x] MSFT:43995981
- [x] (move pane to new window) The window should not be allowed to be named "new". This is in monarch somewhere.
- [x] (move pane to new window)  We should not do anything if the target is the source window
```


> `_windowExitedHandler()` would have to be called inside the try clause as a `wil::scope_exit`

see discussion in https://github.com/microsoft/terminal/pull/14843#discussion_r1140486873


## Let's just do it in post
```[tasklist]
### In post
- [x] Evaluate moving the `_ProcessLazySettingsChanges` block in `AppLogic::Create` to after the page is initialized
- [ ] `openSettings` should take a `page` param to open to a specific page.
- [ ] `moveTab`/`Pane` should accept `next` and `previous` to move tabs to the next/previous window. Inspired by #15156
- [ ] Dropping a tab from 100% to High DPI creates the window at a position that's about 1 scaling factor offset from where it should
- [ ] Investigate using a helper struct for passing panes, tabs, content between windows, instead of serializing to JSON. Might need to be stored in ContentManager until the new window can open the content.
- [ ] If we tear out the only tab in a window, to a new window, can we just... move the window there? ;D
- [ ] Tell users why they can't drop a tab; perhaps with a message? Are we allowed to include arbitrary "YOU CANNOT DROP BECAUSE" text?
- [ ] `--isolated` as a cmdline arg
- [ ] `--isolated` shouldn't globalhotkeys, tray icon, defterm, _quake
- [ ] #15271
- [ ] Can we just cover the entire tabview with the drag rect when there's only one tab?
- [ ] https://github.com/microsoft/terminal/issues/15895
- [ ] https://github.com/microsoft/terminal/issues/15763
```

## Did we fix it?

_Things we may have accidentally fixed on the way?_

```[tasklist]
### Fixed?
* [ ] #14012
```