Show different tabs side by side in split view

Each tab menu has "Open to the right". It shows the tab in a new pane to
the right of the active pane. A pane shows a document or a plugin tab,
for example a browser tab.

- A plugin view stays in the plugin layer above the panes, so a move
  between panes does not mount it again.
- A browser tab that covers the area moves to the left pane when a tab
  opens beside it. The last pane gives its plugin tab the whole area.
- The "Split" toggle of a document is now "Read beside".

Card 565874b2.
This commit is contained in:
Knotty Wyvern
2026-11-10 06:40:44 -07:00
parent d19bb6a1f0
commit 61976191d0
22 changed files with 473 additions and 116 deletions
+17
View File
@@ -1155,3 +1155,20 @@ Update 2026-10-29: The native Terminal feature keeps the 65% cap on `--rs-select
- Evidence: `tests/smoke/features/pdf.smoke.mjs` and `tests/unit/features/pdf.spec.ts`.
- Replaces / replaced by: The one-page rule and the zoom text of [UI-059](#ui-059--the-pdf-toolbar-on-shared-controls).
- Limits: Only the pages near the visible area have a drawing. Until the viewer reads the size of a page, the page has the size of the first page. Browser checks use desktop service mocks. Native desktop acceptance remains open.
### UI-064 — Split view shows different tabs
- Type: Rule change
- Date: 2026-11-10
- Status: Implemented for user review
- Decision source: Card 565874b2 reports that split view shows only the same document side by side. The user expects different documents side by side, also with a web browser.
- Previous rule: [UI-021](#ui-021--workspace-links-in-document-panes). Only a file tree item or a workspace link opened a document to the right. Document panes held only documents. A plugin tab, for example a browser tab, covered the whole document area. The **Split** toggle showed Read beside the editor of the same document.
- New rule: Each tab menu has **Open to the right**. It shows the tab in a new pane to the right of the active pane. A pane shows a document or a plugin tab. A tab shows in one pane at most, so the item is unavailable for a visible tab. A tab that the user selects, or a file that the user opens, replaces the content of the active pane. The replaced tab stays open. A plugin tab that covers the area moves to the active pane when a tab opens beside it. When one pane is left, its plugin tab covers the area again. A plugin pane has a bar with its title and **Close split**. A document pane beside other panes shows the full path in its bar. The **Split** toggle is now **Read beside**.
- Reason: "Split" named two different things. Users compare a note with a different note or with a web page.
- Scope: Document panes, plugin editor tabs, the tab menu, and the view control.
- Shared implementation: `src/lib/workspace/documentPanes.ts`, `src/lib/workspace/splitLayout.ts` (`stackLayout`, `splitSibling`), `src/lib/layout/DocumentArea.svelte`, and `src/lib/layout/Workbench.svelte`. A plugin view stays in the plugin layer above the panes, so a move between panes does not mount it again.
- Exceptions: **Split right** and **Split down** in the menu of a browser tab still open a copy of the page. In a pane, the copy opens beside that pane.
- Narrow layout: An area of 640 pixels or less shows the panes one above the other, in the same order. The area does not scroll. Each pane keeps its own scroll bar.
- Evidence: `tests/smoke/layout/mixedSplits.smoke.mjs`, `tests/smoke/layout/splits.smoke.mjs`, and `tests/unit/layout/documentPanes.spec.ts`.
- Replaces / replaced by: The document-only panes of [UI-021](#ui-021--workspace-links-in-document-panes), and the name **Split** of [UI-049](#ui-049--one-view-control-and-one-file-name).
- Limits: Panes have equal sizes. A drag cannot move a tab into a pane. Browser checks use desktop service mocks. Native desktop acceptance remains open.