From 7ed268ed2af4bb07b6c2339b56f4147696704d80 Mon Sep 17 00:00:00 2001 From: Joshua Park Date: Thu, 26 Nov 2026 19:13:37 -0500 Subject: [PATCH] docs(split-view): archive the change and sync its specs --- .../2026-11-26-add-split-view}/.openspec.yaml | 0 .../arc-reference/README.md | 0 .../screenshots/drag-across-sheet.jpg | Bin .../screenshots/drag-onto-page.jpg | Bin .../screenshots/favorite-split-selected.jpg | Bin .../screenshots/favorite-split.jpg | Bin .../peek-in-split-other-pane-clicked.jpg | Bin .../screenshots/peek-in-split.jpg | Bin .../screenshots/pinned-split-pane-closed.jpg | Bin .../pinned-split-pane-restored.jpg | Bin .../screenshots/pinned-split-row-menu.jpg | Bin .../pinned-split-selected-hover.jpg | Bin .../screenshots/pinned-split-shown.jpg | Bin .../screenshots/split-two-panes-toolbar.jpg | Bin .../screenshots/split-with-pinned-tab.jpg | Bin .../screenshots/today-split-hover.jpg | Bin .../today-split-pinned-pane-closed.jpg | Bin .../2026-11-26-add-split-view}/design.md | 0 .../dia-reference/README.md | 0 .../screenshots/split-button-menu-single.jpg | Bin .../screenshots/split-button-menu-split.jpg | Bin .../screenshots/split-two-panes.jpg | Bin .../2026-11-26-add-split-view}/proposal.md | 0 .../specs/browser-window/spec.md | 0 .../specs/favorites/spec.md | 0 .../specs/page-toolbar/spec.md | 0 .../specs/peek/spec.md | 0 .../specs/pinned-tabs/spec.md | 0 .../specs/sidebar/spec.md | 0 .../specs/split-view/spec.md | 0 .../specs/tab-folders/spec.md | 0 .../2026-11-26-add-split-view}/tasks.md | 52 +- openspec/specs/browser-window/spec.md | 11 + openspec/specs/favorites/spec.md | 16 +- openspec/specs/page-toolbar/spec.md | 4 +- openspec/specs/peek/spec.md | 27 +- openspec/specs/pinned-tabs/spec.md | 12 +- openspec/specs/sidebar/spec.md | 16 +- openspec/specs/split-view/spec.md | 465 ++++++++++++++++++ openspec/specs/tab-folders/spec.md | 6 +- 40 files changed, 566 insertions(+), 43 deletions(-) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/.openspec.yaml (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/README.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/drag-across-sheet.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/drag-onto-page.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/favorite-split-selected.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/favorite-split.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/peek-in-split-other-pane-clicked.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/peek-in-split.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/pinned-split-pane-closed.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/pinned-split-pane-restored.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/pinned-split-row-menu.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/pinned-split-selected-hover.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/pinned-split-shown.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/split-two-panes-toolbar.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/split-with-pinned-tab.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/today-split-hover.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/arc-reference/screenshots/today-split-pinned-pane-closed.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/design.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/dia-reference/README.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/dia-reference/screenshots/split-button-menu-single.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/dia-reference/screenshots/split-button-menu-split.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/dia-reference/screenshots/split-two-panes.jpg (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/proposal.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/specs/browser-window/spec.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/specs/favorites/spec.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/specs/page-toolbar/spec.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/specs/peek/spec.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/specs/pinned-tabs/spec.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/specs/sidebar/spec.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/specs/split-view/spec.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/specs/tab-folders/spec.md (100%) rename openspec/changes/{add-split-view => archive/2026-11-26-add-split-view}/tasks.md (87%) create mode 100644 openspec/specs/split-view/spec.md diff --git a/openspec/changes/add-split-view/.openspec.yaml b/openspec/changes/archive/2026-11-26-add-split-view/.openspec.yaml similarity index 100% rename from openspec/changes/add-split-view/.openspec.yaml rename to openspec/changes/archive/2026-11-26-add-split-view/.openspec.yaml diff --git a/openspec/changes/add-split-view/arc-reference/README.md b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/README.md similarity index 100% rename from openspec/changes/add-split-view/arc-reference/README.md rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/README.md diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/drag-across-sheet.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/drag-across-sheet.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/drag-across-sheet.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/drag-across-sheet.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/drag-onto-page.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/drag-onto-page.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/drag-onto-page.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/drag-onto-page.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/favorite-split-selected.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/favorite-split-selected.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/favorite-split-selected.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/favorite-split-selected.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/favorite-split.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/favorite-split.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/favorite-split.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/favorite-split.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/peek-in-split-other-pane-clicked.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/peek-in-split-other-pane-clicked.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/peek-in-split-other-pane-clicked.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/peek-in-split-other-pane-clicked.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/peek-in-split.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/peek-in-split.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/peek-in-split.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/peek-in-split.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/pinned-split-pane-closed.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/pinned-split-pane-closed.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/pinned-split-pane-closed.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/pinned-split-pane-closed.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/pinned-split-pane-restored.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/pinned-split-pane-restored.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/pinned-split-pane-restored.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/pinned-split-pane-restored.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/pinned-split-row-menu.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/pinned-split-row-menu.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/pinned-split-row-menu.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/pinned-split-row-menu.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/pinned-split-selected-hover.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/pinned-split-selected-hover.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/pinned-split-selected-hover.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/pinned-split-selected-hover.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/pinned-split-shown.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/pinned-split-shown.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/pinned-split-shown.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/pinned-split-shown.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/split-two-panes-toolbar.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/split-two-panes-toolbar.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/split-two-panes-toolbar.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/split-two-panes-toolbar.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/split-with-pinned-tab.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/split-with-pinned-tab.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/split-with-pinned-tab.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/split-with-pinned-tab.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/today-split-hover.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/today-split-hover.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/today-split-hover.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/today-split-hover.jpg diff --git a/openspec/changes/add-split-view/arc-reference/screenshots/today-split-pinned-pane-closed.jpg b/openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/today-split-pinned-pane-closed.jpg similarity index 100% rename from openspec/changes/add-split-view/arc-reference/screenshots/today-split-pinned-pane-closed.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/arc-reference/screenshots/today-split-pinned-pane-closed.jpg diff --git a/openspec/changes/add-split-view/design.md b/openspec/changes/archive/2026-11-26-add-split-view/design.md similarity index 100% rename from openspec/changes/add-split-view/design.md rename to openspec/changes/archive/2026-11-26-add-split-view/design.md diff --git a/openspec/changes/add-split-view/dia-reference/README.md b/openspec/changes/archive/2026-11-26-add-split-view/dia-reference/README.md similarity index 100% rename from openspec/changes/add-split-view/dia-reference/README.md rename to openspec/changes/archive/2026-11-26-add-split-view/dia-reference/README.md diff --git a/openspec/changes/add-split-view/dia-reference/screenshots/split-button-menu-single.jpg b/openspec/changes/archive/2026-11-26-add-split-view/dia-reference/screenshots/split-button-menu-single.jpg similarity index 100% rename from openspec/changes/add-split-view/dia-reference/screenshots/split-button-menu-single.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/dia-reference/screenshots/split-button-menu-single.jpg diff --git a/openspec/changes/add-split-view/dia-reference/screenshots/split-button-menu-split.jpg b/openspec/changes/archive/2026-11-26-add-split-view/dia-reference/screenshots/split-button-menu-split.jpg similarity index 100% rename from openspec/changes/add-split-view/dia-reference/screenshots/split-button-menu-split.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/dia-reference/screenshots/split-button-menu-split.jpg diff --git a/openspec/changes/add-split-view/dia-reference/screenshots/split-two-panes.jpg b/openspec/changes/archive/2026-11-26-add-split-view/dia-reference/screenshots/split-two-panes.jpg similarity index 100% rename from openspec/changes/add-split-view/dia-reference/screenshots/split-two-panes.jpg rename to openspec/changes/archive/2026-11-26-add-split-view/dia-reference/screenshots/split-two-panes.jpg diff --git a/openspec/changes/add-split-view/proposal.md b/openspec/changes/archive/2026-11-26-add-split-view/proposal.md similarity index 100% rename from openspec/changes/add-split-view/proposal.md rename to openspec/changes/archive/2026-11-26-add-split-view/proposal.md diff --git a/openspec/changes/add-split-view/specs/browser-window/spec.md b/openspec/changes/archive/2026-11-26-add-split-view/specs/browser-window/spec.md similarity index 100% rename from openspec/changes/add-split-view/specs/browser-window/spec.md rename to openspec/changes/archive/2026-11-26-add-split-view/specs/browser-window/spec.md diff --git a/openspec/changes/add-split-view/specs/favorites/spec.md b/openspec/changes/archive/2026-11-26-add-split-view/specs/favorites/spec.md similarity index 100% rename from openspec/changes/add-split-view/specs/favorites/spec.md rename to openspec/changes/archive/2026-11-26-add-split-view/specs/favorites/spec.md diff --git a/openspec/changes/add-split-view/specs/page-toolbar/spec.md b/openspec/changes/archive/2026-11-26-add-split-view/specs/page-toolbar/spec.md similarity index 100% rename from openspec/changes/add-split-view/specs/page-toolbar/spec.md rename to openspec/changes/archive/2026-11-26-add-split-view/specs/page-toolbar/spec.md diff --git a/openspec/changes/add-split-view/specs/peek/spec.md b/openspec/changes/archive/2026-11-26-add-split-view/specs/peek/spec.md similarity index 100% rename from openspec/changes/add-split-view/specs/peek/spec.md rename to openspec/changes/archive/2026-11-26-add-split-view/specs/peek/spec.md diff --git a/openspec/changes/add-split-view/specs/pinned-tabs/spec.md b/openspec/changes/archive/2026-11-26-add-split-view/specs/pinned-tabs/spec.md similarity index 100% rename from openspec/changes/add-split-view/specs/pinned-tabs/spec.md rename to openspec/changes/archive/2026-11-26-add-split-view/specs/pinned-tabs/spec.md diff --git a/openspec/changes/add-split-view/specs/sidebar/spec.md b/openspec/changes/archive/2026-11-26-add-split-view/specs/sidebar/spec.md similarity index 100% rename from openspec/changes/add-split-view/specs/sidebar/spec.md rename to openspec/changes/archive/2026-11-26-add-split-view/specs/sidebar/spec.md diff --git a/openspec/changes/add-split-view/specs/split-view/spec.md b/openspec/changes/archive/2026-11-26-add-split-view/specs/split-view/spec.md similarity index 100% rename from openspec/changes/add-split-view/specs/split-view/spec.md rename to openspec/changes/archive/2026-11-26-add-split-view/specs/split-view/spec.md diff --git a/openspec/changes/add-split-view/specs/tab-folders/spec.md b/openspec/changes/archive/2026-11-26-add-split-view/specs/tab-folders/spec.md similarity index 100% rename from openspec/changes/add-split-view/specs/tab-folders/spec.md rename to openspec/changes/archive/2026-11-26-add-split-view/specs/tab-folders/spec.md diff --git a/openspec/changes/add-split-view/tasks.md b/openspec/changes/archive/2026-11-26-add-split-view/tasks.md similarity index 87% rename from openspec/changes/add-split-view/tasks.md rename to openspec/changes/archive/2026-11-26-add-split-view/tasks.md index 86dd0a08..e96ab494 100644 --- a/openspec/changes/add-split-view/tasks.md +++ b/openspec/changes/archive/2026-11-26-add-split-view/tasks.md @@ -17,24 +17,24 @@ Suggested order: - with a Peek open from one pane, a click on the other pane. Verify that the README lists each. If closing a pinned split's pane differs from the spec's "Pages of a pinned split", update the spec and D10 before 2.6. -- [ ] 1.2 Change `native/ClairHost.h` as D2 and D10 list: +- [x] 1.2 Change `native/ClairHost.h` as D2 and D10 list: - `ClairTab.splitPartnerID`, `isLeadingPane` and `splitRatio`; - the split calls on `ClairBrowser`; - the split kind of `ClairPinnedItem`; - favorites as items. Document each as the header documents the rest. Verify that the header compiles in `ClairHostObjCxxTests.mm` in CI. -- [ ] 1.3 Update `FakeHost` and `FakeBrowser`: splits of two tabs, ratio, replace, swap, separate and close, pinned and favorited split items, and the one-row folding of D2. Verify with new cases in `FakeBrowserTests` in CI. +- [x] 1.3 Update `FakeHost` and `FakeBrowser`: splits of two tabs, ratio, replace, swap, separate and close, pinned and favorited split items, and the one-row folding of D2. Verify with new cases in `FakeBrowserTests` in CI. ## 2. Engine -- [ ] 2.1 Audit Chromium's split code paths for the native window (design "Risks"): +- [x] 2.1 Audit Chromium's split code paths for the native window (design "Risks"): - `kSideBySide` checks in `TabStripModel`; - observers of `OnSplitTabChanged` in `chrome/browser/ui` that reach `BrowserView`; - what `IDC_CONTENT_CONTEXT_OPENLINKSPLITVIEW` and `NEW_SPLIT_VIEW` do in `browser_navigator.cc`. Turn on the feature or guard the paths as needed. Verify with an engine build (2.9) and the runtime test of 3.12 that making and closing a split doesn't crash, and record what was guarded in D1. -- [ ] 2.2 Add `engine/overlay/chrome/browser/clair/window/clair_splits.{h,mm}` (D1, D7, D12): +- [x] 2.2 Add `engine/overlay/chrome/browser/clair/window/clair_splits.{h,mm}` (D1, D7, D12): - making a split from two tabs and from a new tab; - replacing, swapping, separating and closing a split; - the ratio; @@ -43,19 +43,19 @@ Suggested order: - activating the remaining tab when a pane closes. Verify with the runtime tests in 3.12. -- [ ] 2.3 Focus and visibility (D4, D5): activate the partner on `OnWebContentsFocused`, and mark the partner visible in `ActiveTabChanged`. Verify with the runtime tests in 3.12: +- [x] 2.3 Focus and visibility (D4, D5): activate the partner on `OnWebContentsFocused`, and mark the partner visible in `ActiveTabChanged`. Verify with the runtime tests in 3.12: - both panes report `visible`, and both `hidden` after another tab is selected; - clicking in the other pane makes it the active tab. -- [ ] 2.4 Add `engine/patches/clair/split-on-option-click.patch` (D6) for Blink's `navigation_policy.cc` and `ui/base/window_open_disposition_utils.cc`, with a header comment and its `series` entry. Handle `NEW_SPLIT_VIEW` in `ClairSplits::OpenURL` (single page, split pane, Peek). Stop removing Open Link in Split View from the page's context menu. Verify: +- [x] 2.4 Add `engine/patches/clair/split-on-option-click.patch` (D6) for Blink's `navigation_policy.cc` and `ui/base/window_open_disposition_utils.cc`, with a header comment and its `series` entry. Handle `NEW_SPLIT_VIEW` in `ClairSplits::OpenURL` (single page, split pane, Peek). Stop removing Open Link in Split View from the page's context menu. Verify: - the patch check applies the series; - the runtime tests in 3.12 cover Option+click on a single page, in each pane of a split (no new tab, Back returns), from a favorite (no Peek), inside a Peek, and from the context menu; - no download starts in any of these. -- [ ] 2.5 Add the split record to `ClairPinStore` (D10): split records with their place and ratio, pins that name their split and index, and splits in folders, still one level deep. Add pinning, unpinning, favoriting and separating a split, Remove Pin, Remove Favorite, Restore Last Closed Tab, and Move to Space. Verify with the runtime tests in 3.12 that pinned and favorited splits, their order, pages and ratio survive a relaunch, and that Separate leaves two pins in place (each read from `Local State` after quitting). -- [ ] 2.6 Bind pinned and favorited splits (D10): selecting one opens its unopened pages as a split with its ratio; closing one pane takes its pin out of the item, leaving the other pin in its place, and Restore Last Closed Tab brings the split back; a Today split with a pin-bound tab keeps the binding. Verify with the runtime tests in 3.12. -- [ ] 2.7 Peek's Open in Split View (D11): expand and split, and no button while the parent has a partner. Verify with the runtime tests in 3.12. -- [ ] 2.8 Bridge the D2 calls and snapshots, and the menu bar items of D9: Tabs › Split with Tab ›, and View › Add Split View (⌃⇧=), Close Split Pane (⌃⇧−) and Separate Tabs, with Add Split View showing "Cannot Add New Pane" while split. Verify with the runtime tests in 3.12. -- [ ] 2.9 Build the engine with `gh workflow run engine.yml -f ref=`. Verify that `chromium-engine-` is published and CI's engine check passes. -- [ ] 2.10 Update `docs/native-window.md`: +- [x] 2.5 Add the split record to `ClairPinStore` (D10): split records with their place and ratio, pins that name their split and index, and splits in folders, still one level deep. Add pinning, unpinning, favoriting and separating a split, Remove Pin, Remove Favorite, Restore Last Closed Tab, and Move to Space. Verify with the runtime tests in 3.12 that pinned and favorited splits, their order, pages and ratio survive a relaunch, and that Separate leaves two pins in place (each read from `Local State` after quitting). +- [x] 2.6 Bind pinned and favorited splits (D10): selecting one opens its unopened pages as a split with its ratio; closing one pane takes its pin out of the item, leaving the other pin in its place, and Restore Last Closed Tab brings the split back; a Today split with a pin-bound tab keeps the binding. Verify with the runtime tests in 3.12. +- [x] 2.7 Peek's Open in Split View (D11): expand and split, and no button while the parent has a partner. Verify with the runtime tests in 3.12. +- [x] 2.8 Bridge the D2 calls and snapshots, and the menu bar items of D9: Tabs › Split with Tab ›, and View › Add Split View (⌃⇧=), Close Split Pane (⌃⇧−) and Separate Tabs, with Add Split View showing "Cannot Add New Pane" while split. Verify with the runtime tests in 3.12. +- [x] 2.9 Build the engine with `gh workflow run engine.yml -f ref=`. Verify that `chromium-engine-` is published and CI's engine check passes. +- [x] 2.10 Update `docs/native-window.md`: - a "Split view" section: `ClairSplits` over Chromium's split collections, focus and visibility, the Option+click patch, and splits across windows and Spaces; - "Pins and favorites": the split record. @@ -63,23 +63,23 @@ Suggested order: ## 3. ClairUI -- [ ] 3.1 Fold split tabs into one row in `TabListLogic` and the window model, and set `paneCount` from the active tab's partner (D2, D3). Verify with `ClairUI` unit tests in CI: rows for a Today split, a pinned split, a favorited split, and a Today split holding a pin-bound tab; and `PageHeaderPolicy` with the toolbar off while split. -- [ ] 3.2 Lay out the panes (D3): two `PageCardView`s with their own cards, the focus ring, the 10 pt gap, and the find field, loading indicator, Peek and toasts against the right area. Verify with unit tests in CI for the pane frames at a few widths and ratios, and by hand in 3.11. -- [ ] 3.3 Add `SplitDivider` (D3): grabber, resize cursor, live widths, the page minimum of about 210 pt (and the ratio held when the area is too narrow), the snap to equal panes within 20 pt of the centre, and `setSplitRatio` when the drag ends. Verify with unit tests in CI for the clamp, the narrow case, the snap and the ratio, and by hand in 3.11. -- [ ] 3.4 Add the pane headers and the split button (D9): +- [x] 3.1 Fold split tabs into one row in `TabListLogic` and the window model, and set `paneCount` from the active tab's partner (D2, D3). Verify with `ClairUI` unit tests in CI: rows for a Today split, a pinned split, a favorited split, and a Today split holding a pin-bound tab; and `PageHeaderPolicy` with the toolbar off while split. +- [x] 3.2 Lay out the panes (D3): two `PageCardView`s with their own cards, the focus ring, the 10 pt gap, and the find field, loading indicator, Peek and toasts against the right area. Verify with unit tests in CI for the pane frames at a few widths and ratios, and by hand in 3.11. +- [x] 3.3 Add `SplitDivider` (D3): grabber, resize cursor, live widths, the page minimum of about 210 pt (and the ratio held when the area is too narrow), the snap to equal panes within 20 pt of the centre, and `setSplitRatio` when the drag ends. Verify with unit tests in CI for the clamp, the narrow case, the snap and the ratio, and by hand in 3.11. +- [x] 3.4 Add the pane headers and the split button (D9): - `PageHeaderContent.pane(leading:focused:)`, with × at the trailing slot; - the split button in the trailing slot of the toolbar, and before × in a pane header, with site controls, extensions and indicators one slot further left; - no button on a Peek's toolbar or while the toolbar is off and the page isn't split; - the other pane's split button, site controls, extensions and indicators shown while the pointer is over that pane, and a click on one focusing the pane first. Verify with unit tests in CI for each variant's controls and `ToolbarArrangement`'s slots, the narrow-window cases included. -- [ ] 3.5 Add the split button's two menus and Split with Tab › in the Today, pinned and favorite menus (D9), including Add Split View and New Tab making a new-tab-page pane with the command bar centred on it, and Esc leaving that page. Verify with unit tests in CI for each menu's items in order, the disabled Move Left and Move Right, the Today-only list in the sidebar's order with favicons and without tabs already in a split, the tab a New Tab split splits from each menu, Split with Tab disabled on a pinned tab or favorite already in a split, and the menu bar item disabled while split. -- [ ] 3.6 Add the link status texts of D13a: "Open in Split View" with Option, "Open in Peek" with Shift while the Peek preference is on, the URL alone in a Peek, updates as the keys change, and the capsule in the hovered link's pane. Verify with unit tests in CI for the text from each modifier, preference and Peek case, and by hand in 3.11. -- [ ] 3.7 Centre the command bar on the focused pane while split, clamped inside the window (D13b). Verify with unit tests in CI for its frame over each pane, a narrow pane, and a single page, and by hand in 3.11. -- [ ] 3.8 Add the split row (D2, D13): chips with favicon, title or custom name, the divider while not selected and pills while selected; × in Today, − and × in the pinned section; the click that shows the split; the row's menu with Separate Tabs and its omitted items; and the row dragged as one, into and out of folders too. Verify with unit tests in CI for the row's states, buttons and menu, and `PinsLogic.listDrop`'s gaps for a split row around open and closed folders. -- [ ] 3.9 Add the favorite split tile: the segments with icons, the divider line, and the white or light grey selected tile with the blended ring. Verify with unit tests in CI for the grid with a split tile, and by comparing screenshots with `arc-reference/screenshots/favorite-split*.jpg`. -- [ ] 3.10 Add dragging onto the page (D8): the portrait drag image, the half or pane drop zone and slide with 1.1's metrics, no zone for a split row or the tab already shown, and the drop calls. Verify with unit tests in CI for which zone a point picks, single and split, and the side passed to `splitTab:withTab:side:`, and by hand in 3.11. -- [ ] 3.11 Check the flow by hand against `arc-reference/` and `dia-reference/` with `tests/probe/`, using `build/probe/bin/drag` for drags. Verify that each of these matches the spec, and record anything that differs from Arc or Dia in the design: +- [x] 3.5 Add the split button's two menus and Split with Tab › in the Today, pinned and favorite menus (D9), including Add Split View and New Tab making a new-tab-page pane with the command bar centred on it, and Esc leaving that page. Verify with unit tests in CI for each menu's items in order, the disabled Move Left and Move Right, the Today-only list in the sidebar's order with favicons and without tabs already in a split, the tab a New Tab split splits from each menu, Split with Tab disabled on a pinned tab or favorite already in a split, and the menu bar item disabled while split. +- [x] 3.6 Add the link status texts of D13a: "Open in Split View" with Option, "Open in Peek" with Shift while the Peek preference is on, the URL alone in a Peek, updates as the keys change, and the capsule in the hovered link's pane. Verify with unit tests in CI for the text from each modifier, preference and Peek case, and by hand in 3.11. +- [x] 3.7 Centre the command bar on the focused pane while split, clamped inside the window (D13b). Verify with unit tests in CI for its frame over each pane, a narrow pane, and a single page, and by hand in 3.11. +- [x] 3.8 Add the split row (D2, D13): chips with favicon, title or custom name, the divider while not selected and pills while selected; × in Today, − and × in the pinned section; the click that shows the split; the row's menu with Separate Tabs and its omitted items; and the row dragged as one, into and out of folders too. Verify with unit tests in CI for the row's states, buttons and menu, and `PinsLogic.listDrop`'s gaps for a split row around open and closed folders. +- [x] 3.9 Add the favorite split tile: the segments with icons, the divider line, and the white or light grey selected tile with the blended ring. Verify with unit tests in CI for the grid with a split tile, and by comparing screenshots with `arc-reference/screenshots/favorite-split*.jpg`. +- [x] 3.10 Add dragging onto the page (D8): the portrait drag image, the half or pane drop zone and slide with 1.1's metrics, no zone for a split row or the tab already shown, and the drop calls. Verify with unit tests in CI for which zone a point picks, single and split, and the side passed to `splitTab:withTab:side:`, and by hand in 3.11. +- [x] 3.11 Check the flow by hand against `arc-reference/` and `dia-reference/` with `tests/probe/`, using `build/probe/bin/drag` for drags. Verify that each of these matches the spec, and record anything that differs from Arc or Dia in the design: - a tab, pinned tab and favorite dragged onto each half of a single page, and onto each pane of a split; - Option+click in a single page, in each pane, from a pinned tab and inside a Peek; - the split button's place in the toolbar and each pane, both menus, and Move Left and Move Right; @@ -94,7 +94,7 @@ Suggested order: - pinning, favoriting, a pinned split dragged into and out of a folder, Close and Keep Pinned, one pane of a pinned split closed, separating, unpinning; - the toolbar off while split; - Light and Dark Mode. -- [ ] 3.12 Add runtime tests to `tests/runtime/` (`SplitViewTests.swift`) for: +- [x] 3.12 Add runtime tests to `tests/runtime/` (`SplitViewTests.swift`) for: - making a split from a tab menu, the menu bar and Option+click; - Option+click in a split (no new tab, Back returns), from a favorite, inside a Peek, and from the context menu, with no download; - both pages visible, and focus by clicking the other pane; @@ -112,8 +112,8 @@ Suggested order: ## 4. Release notes and checks -- [ ] 4.1 Add a Changie fragment (Added): split view, two tabs side by side, made by dragging a tab onto the page, Option+click or the split button, shown as one row in the sidebar, and pinnable and favoritable as one item. Verify that it's in the PR. -- [ ] 4.2 Run `openspec validate --all --strict` and the merge gate, and start `quality.yml` on the branch with the last push. Verify that CI and the quality checks pass. +- [x] 4.1 Add a Changie fragment (Added): split view, two tabs side by side, made by dragging a tab onto the page, Option+click or the split button, shown as one row in the sidebar, and pinnable and favoritable as one item. Verify that it's in the PR. +- [x] 4.2 Run `openspec validate --all --strict` and the merge gate, and start `quality.yml` on the branch with the last push. Verify that CI and the quality checks pass. ## Workflow follow-up diff --git a/openspec/specs/browser-window/spec.md b/openspec/specs/browser-window/spec.md index 43275624..c188b6f6 100644 --- a/openspec/specs/browser-window/spec.md +++ b/openspec/specs/browser-window/spec.md @@ -452,3 +452,14 @@ When Clair launches, it SHALL reopen the tabs that were open when it quit, as Ar #### Scenario: Open pins - **WHEN** the user quits with a pinned tab and a favorite open, and relaunches - **THEN** both are open again, and the pinned tabs and favorites that weren't open are listed, still not open + +### Requirement: Both pages of a split are visible +When the active tab is in a split, the page area SHALL show both tabs' pages in their panes (`split-view`), each resized with its pane, and both SHALL be reported to the page as visible. Selecting a tab outside the split SHALL report both as hidden. + +#### Scenario: A split +- **WHEN** the window shows a split +- **THEN** both panes' pages report `document.visibilityState` as `visible` + +#### Scenario: Leaving the split +- **WHEN** the user selects a tab outside the split +- **THEN** both of the split's pages report `document.visibilityState` as `hidden` diff --git a/openspec/specs/favorites/spec.md b/openspec/specs/favorites/spec.md index 8cd34d61..eb398d48 100644 --- a/openspec/specs/favorites/spec.md +++ b/openspec/specs/favorites/spec.md @@ -21,7 +21,7 @@ Each profile SHALL have its own favorites, in the user's order. A window SHALL s - **THEN** the same page shows, without reloading ### Requirement: Favorites grid -Favorites SHALL show as tiles of equal size between the URL field and the Space header, each with the page's icon centred, in rows of at most four. The grid SHALL take as few rows as that allows, and as few columns as those rows allow. Tiles SHALL be 47 points tall and share the sidebar's width, less 8 points at the edges and between tiles. +Favorites SHALL show as tiles of equal size between the URL field and the Space header, each with the page's icon centred, in rows of at most four. A favorited split SHALL take one tile (`split-view`). The grid SHALL take as few rows as that allows, and as few columns as those rows allow. Tiles SHALL be 47 points tall and share the sidebar's width, less 8 points at the edges and between tiles. #### Scenario: One favorite - **WHEN** a profile has one favorite @@ -35,6 +35,10 @@ Favorites SHALL show as tiles of equal size between the URL field and the Space - **WHEN** a profile has eight favorites and the sidebar is at its default width - **THEN** they show in two rows of four square tiles +#### Scenario: A favorited split +- **WHEN** a profile's favorites are a split of two pages and one other favorite +- **THEN** the grid shows two tiles, each half the row + ### Requirement: Favorite tile states A tile SHALL be tinted against the sidebar, darker under the pointer in Light Mode and lighter in Dark Mode. The tile of the favorite whose page the window shows SHALL turn white in Light Mode, or light grey in Dark Mode, with a 2-point ring in its icon's main colour. No other row SHALL be highlighted while it's shown. @@ -103,14 +107,14 @@ While the window shows a favorite's page, Cmd+W and Close Tab in its menu SHALL - **THEN** "Mail" keeps its tile, its page is closed, and "News" is active ### Requirement: Favorite menu -A favorite's context menu SHALL offer Copy Link, Rename…, Mute or Unmute, Edit Pinned Page › (`pinned-tabs`), Duplicate, Close Tab while its page is shown, and Remove Favorite. Hovering a tile SHALL show no button. +A favorite's context menu SHALL offer Copy Link, Rename…, Mute or Unmute, Edit Pinned Page › (`pinned-tabs`), Duplicate, Split with Tab › (`split-view`), Close Tab while its page is shown, and Remove Favorite. Hovering a tile SHALL show no button. #### Scenario: The shown favorite's menu - **WHEN** the window shows "Mail" and the user right-clicks its tile -- **THEN** the menu offers Copy Link, Rename…, Mute, Edit Pinned Page, Duplicate, Close Tab and Remove Favorite +- **THEN** the menu offers Copy Link, Rename…, Mute, Edit Pinned Page, Duplicate, Split with Tab, Close Tab and Remove Favorite ### Requirement: Leaving a favorite's site -From a favorite, a URL the user enters in the command bar or URL field that is on another site (another scheme or host, as for Peeks in `peek`) SHALL open in a new Today tab at the top, leaving the favorite's page as it was. A URL on the same site SHALL load in the favorite. A favorite's page navigated away from its pinned URL SHALL keep Back to Pinned URL in the Tabs menu (`pinned-tabs`). +From a favorite, a URL the user enters in the command bar or URL field that is on another site (another scheme or host, as for Peeks in `peek`) SHALL open in a new Today tab at the top, leaving the favorite's page as it was. A URL on the same site SHALL load in the favorite. A favorite's page in a split (`split-view`) SHALL load either in its pane. A favorite's page navigated away from its pinned URL SHALL keep Back to Pinned URL in the Tabs menu (`pinned-tabs`). #### Scenario: Another site from the URL field - **WHEN** the window shows the favorite "Mail" at `https://mail.example.com/` and the user enters `https://news.example.org/` in the URL field @@ -120,6 +124,10 @@ From a favorite, a URL the user enters in the command bar or URL field that is o - **WHEN** the user enters `https://mail.example.com/settings` there instead - **THEN** "Mail" loads it +#### Scenario: Another site in a favorited split's pane +- **WHEN** the window shows a favorited split of "Mail" and "Calendar", with "Mail" focused, and the user enters `https://news.example.org/` in the command bar +- **THEN** "Mail"'s pane loads `https://news.example.org/`, and no Today tab opens + ### Requirement: Favorite tiles show their Peek While a favorite's page has a Peek open, its tile SHALL show the Peek page's favicon as a small badge at its top-trailing corner. diff --git a/openspec/specs/page-toolbar/spec.md b/openspec/specs/page-toolbar/spec.md index 1927e65c..c4571b00 100644 --- a/openspec/specs/page-toolbar/spec.md +++ b/openspec/specs/page-toolbar/spec.md @@ -37,7 +37,7 @@ The toolbar SHALL sit inside the card, across its top, 32 points tall, with a 1- - **THEN** the toolbar is hidden and the video fills the screen, and the toolbar returns when full screen ends ### Requirement: Toolbar controls -The toolbar SHALL hold, from its leading edge, the sidebar toggle, back, forward and reload, centred 21, 57.75, 94.75 and 132 points from the card's leading edge, and the host in the middle. At its trailing end it SHALL hold the site-controls button, centred 21 points from the card's trailing edge, with the pinned extensions and then the permission indicators to its left, 36 points apart. All of them SHALL be vertically centred in the toolbar. +The toolbar SHALL hold, from its leading edge, the sidebar toggle, back, forward and reload, centred 21, 57.75, 94.75 and 132 points from the card's leading edge, and the host in the middle. At its trailing end it SHALL hold the split button (`split-view`), centred 21 points from the card's trailing edge, as in Arc, then to its left the site-controls button, the pinned extensions and the permission indicators, 36 points apart. All of them SHALL be vertically centred in the toolbar. #### Scenario: Leading controls - **WHEN** a window shows the toolbar, with the sidebar shown or hidden @@ -45,7 +45,7 @@ The toolbar SHALL hold, from its leading edge, the sidebar toggle, back, forward #### Scenario: Trailing controls - **WHEN** the active tab uses the camera and two extensions are pinned -- **THEN** from the trailing end, the toolbar shows the site-controls button centred 21 points from the card's edge, the second and first pinned extensions centred 57 and 93 points from it, and the camera indicator centred 129 points from it +- **THEN** from the trailing end, the toolbar shows the split button centred 21 points from the card's edge, the site-controls button centred 57 points from it, the second and first pinned extensions centred 93 and 129 points from it, and the camera indicator centred 165 points from it ### Requirement: Same controls in the toolbar or the sidebar The toolbar's controls SHALL be the sidebar's browser controls, moved: its host is the URL field, and its toggle, back, forward, reload, indicators, pinned extensions and site-controls button are the sidebar's. Every requirement on those controls in other capabilities, including their behaviour, tooltips, VoiceOver labels, highlights, menus and what they act on while a Peek shows, SHALL apply wherever they show. diff --git a/openspec/specs/peek/spec.md b/openspec/specs/peek/spec.md index 5487cfaa..715d6717 100644 --- a/openspec/specs/peek/spec.md +++ b/openspec/specs/peek/spec.md @@ -21,7 +21,7 @@ While the Peek preference is on, Shift+clicking a link in a page in a native bro - **THEN** the link opens in a new window ### Requirement: Peek layout -The Peek SHALL be a card with rounded corners centred over the page card, about 80% of the page card's width and its full height less about 2 points at the top and bottom. Behind it, the parent page SHALL shrink by about 9 points on each side and be washed out toward the window's background colour, in Light and Dark Mode. +The Peek SHALL be a card with rounded corners centred over the page card, about 80% of the page card's width and its full height less about 2 points at the top and bottom. Behind it, the parent page SHALL shrink by about 9 points on each side and be washed out toward the window's background colour, in Light and Dark Mode. In a split, the Peek SHALL be centred over the whole page area, measured as one card, and only its parent's pane SHALL shrink and wash out behind it, as in Arc. #### Scenario: Peek open - **WHEN** a Peek is open in a window whose page card is 1723 by 1030 points @@ -31,12 +31,20 @@ The Peek SHALL be a card with rounded corners centred over the page card, about - **WHEN** the user resizes the window with a Peek open - **THEN** the Peek and the parent page keep their proportions to the card +#### Scenario: A Peek in a split +- **WHEN** the window shows a split and a Peek opens from the trailing pane +- **THEN** the Peek is centred on the page area, about 80% of its width, the trailing pane shrinks and washes out behind it, and the leading pane keeps its size and colour + ### Requirement: Peek buttons -A column of round buttons SHALL sit outside the Peek's top-trailing corner, beside the card: Close (×) and then Expand. Each SHALL highlight under the pointer and have a VoiceOver label naming its action, and Arc's tooltip: "Close" with ⌘W, and "Expand" with ⌘O. +A column of round buttons SHALL sit outside the Peek's top-trailing corner, beside the card: Close (×), then Expand, then Open in Split View (`split-view`), as in Arc, which SHALL NOT show while the Peek's parent is in a split. Each SHALL highlight under the pointer and have a VoiceOver label naming its action, and Arc's tooltip: "Close" with ⌘W, "Expand" with ⌘O, and "Open in Split View". #### Scenario: Buttons shown -- **WHEN** a Peek is open -- **THEN** Close and Expand show in a column beside its top-trailing corner, outside the card +- **WHEN** a Peek is open on a tab that isn't in a split +- **THEN** Close, Expand and Open in Split View show in a column beside its top-trailing corner, outside the card + +#### Scenario: A Peek in a split +- **WHEN** a Peek is open on a tab in a split +- **THEN** only Close and Expand show ### Requirement: Peek animation Opening a Peek SHALL grow the card from the point the user clicked to its full size in about 190 ms, fast at first and then settling, while the parent page shrinks and washes out and the buttons move with the card's corner. Closing it SHALL reverse this toward the same point. With Reduce Motion on, the Peek SHALL fade in and out instead. @@ -190,3 +198,14 @@ While the preference for links to other sites is on (`settings-window`), a link #### Scenario: Pages that navigate themselves - **WHEN** a pinned tab's page changes its location by script without the user clicking a link - **THEN** the tab navigates, and no Peek opens + +### Requirement: The link status names the Peek +While the Peek preference is on, Shift is held and the pointer rests on a link in a page, the link status (`browser-window`) SHALL read "Open in Peek", where Shift+click opens it in a Peek. Pressing or releasing Shift while the status shows SHALL update it at once. Inside a Peek, where Shift+click opens a new tab, it SHALL show the URL alone. + +#### Scenario: Holding Shift over a link +- **WHEN** the pointer rests on a link to `https://example.com/` and the user holds Shift +- **THEN** the link status reads "Open https://example.com/ in Peek" + +#### Scenario: Peek preference off +- **WHEN** the Peek preference is off and the user holds Shift over the link +- **THEN** the link status reads `https://example.com/` diff --git a/openspec/specs/pinned-tabs/spec.md b/openspec/specs/pinned-tabs/spec.md index b905501c..4c71a72f 100644 --- a/openspec/specs/pinned-tabs/spec.md +++ b/openspec/specs/pinned-tabs/spec.md @@ -17,7 +17,7 @@ A pinned tab SHALL keep its pinned URL, its page title, its icon and any custom - **THEN** that page shows as it was, without reloading ### Requirement: Pinned section -Between the Space header and the "New Tab" row, the sidebar SHALL list the Space's pinned tabs in the user's order, with the icon and title each had when last open. A pinned tab whose page isn't open SHALL look like one whose page is open and isn't selected. A divider SHALL separate the pinned section from "New Tab" while the Space has Today tabs. +Between the Space header and the "New Tab" row, the sidebar SHALL list the Space's pinned tabs, and its pinned splits as split rows (`split-view`), in the user's order, with the icon and title each had when last open. A pinned tab whose page isn't open SHALL look like one whose page is open and isn't selected. A divider SHALL separate the pinned section from "New Tab" while the Space has Today tabs. #### Scenario: Pinned and Today tabs - **WHEN** a Space has the pinned tabs "Mail" and "Docs" and two Today tabs @@ -31,6 +31,10 @@ Between the Space header and the "New Tab" row, the sidebar SHALL list the Space - **WHEN** "Mail" is pinned in "Work" and the window shows "Home" - **THEN** the sidebar doesn't list "Mail" +#### Scenario: A pinned split +- **WHEN** "Work" has the pinned tab "Mail" and then a pinned split of "News" and "Docs" +- **THEN** the pinned section lists "Mail" and then one row holding a "News" chip and a "Docs" chip + ### Requirement: Pinning and unpinning Tabs › Pin Tab (Cmd+D) and Pin Tab in a Today tab's menu SHALL pin the tab at the bottom of the pinned section, keeping its page and its selection. On a pinned tab, the item SHALL read Unpin Tab and SHALL move the tab to the top of the Today tabs, keeping its page, or opening it if closed, and its custom name. The pinned URL SHALL be the page's URL when it was pinned. @@ -149,7 +153,7 @@ A pinned tab's menu SHALL offer Edit Pinned Page › with "Replace Pinned URL wi - **THEN** Save is disabled ### Requirement: Pinned tab menu -A pinned tab's context menu SHALL offer Copy Link, Rename…, Mute or Unmute, Edit Pinned Page ›, Duplicate, Move to Space (with more than one Space), Pin to Favorites and Unpin Tab, and no Remove Pin. Copy Link SHALL copy the page's current URL, or the pinned URL while the page is closed. Duplicate SHALL open the same URL as a new Today tab at the top. +A pinned tab's context menu SHALL offer Copy Link, Rename…, Mute or Unmute, Edit Pinned Page ›, Duplicate, Split with Tab › (`split-view`), Move to Space (with more than one Space), Pin to Favorites and Unpin Tab, and no Remove Pin. Copy Link SHALL copy the page's current URL, or the pinned URL while the page is closed. Duplicate SHALL open the same URL as a new Today tab at the top. #### Scenario: Copy Link on a closed pinned tab - **WHEN** the pinned tab "Mail" has no open page and the user chooses Copy Link @@ -163,6 +167,10 @@ A pinned tab's context menu SHALL offer Copy Link, Rename…, Mute or Unmute, Ed - **WHEN** the user right-clicks a pinned tab - **THEN** the menu ends with Pin to Favorites and Unpin Tab +#### Scenario: Split with Tab +- **WHEN** the user right-clicks the pinned tab "Mail" and chooses Split with Tab › "News" +- **THEN** the window shows a split of "Mail" and "News", "News" focused + ### Requirement: Collapsing the pinned section While the Space has pinned tabs, hovering the Space header SHALL show a chevron at its leading edge, sliding the name aside as in Arc; without pinned tabs the header shows no chevron. Clicking it or anywhere else on the header, or View › Collapse Pinned Tabs, SHALL hide the pinned rows except the active one, and turn the chevron to point sideways, shown without hover. Clicking it again or View › Expand Pinned Tabs SHALL show them. Each Space SHALL remember the choice across windows and launches. diff --git a/openspec/specs/sidebar/spec.md b/openspec/specs/sidebar/spec.md index 636c4749..4a9ae7f7 100644 --- a/openspec/specs/sidebar/spec.md +++ b/openspec/specs/sidebar/spec.md @@ -6,7 +6,7 @@ Defines the native window's sidebar: the browser controls it carries in place of ## Requirements ### Requirement: Navigation controls -The sidebar's top row SHALL hold, after the window controls, a button that hides the sidebar, then back, forward and reload. Back and forward SHALL be dimmed and inert when the active tab can't go that way. Reload SHALL become stop while the active tab loads. When the sidebar is too narrow for that row, as in Arc, the row SHALL hold back, forward and a menu offering reload (or stop) and Hide Sidebar. While the toolbar shows, the row SHALL hold only the window controls. +The sidebar's top row SHALL hold, after the window controls, a button that hides the sidebar, then back, forward and reload. Back and forward SHALL be dimmed and inert when the active tab can't go that way. Reload SHALL become stop while the active tab loads. When the sidebar is too narrow for that row, as in Arc, the row SHALL hold back, forward and a menu offering reload (or stop) and Hide Sidebar. While the toolbar or a split's pane headers show, the row SHALL hold only the window controls. #### Scenario: Going back - **WHEN** the user has followed a link in the active tab and clicks back @@ -24,6 +24,10 @@ The sidebar's top row SHALL hold, after the window controls, a button that hides - **WHEN** the toolbar is shown - **THEN** the sidebar's top row shows only the window controls, and the hide-sidebar button, back, forward and reload are in the toolbar +#### Scenario: A split with the toolbar off +- **WHEN** the toolbar is off and the window shows a split +- **THEN** the sidebar's top row shows only the window controls, and the hide-sidebar button, back, forward and reload are in the pane headers + ### Requirement: Tooltips in Arc's wording The sidebar's controls SHALL have Clair's own tooltips, never the system's, in Arc's wording and with their shortcuts: "Hide sidebar" ("Show sidebar" while hidden, "Lock sidebar" while the hidden sidebar is revealed), "Go back", "Go forward", "Reload this page" or "Stop loading this page", "Copy URL", "Site Control Center", "Close tab" and "More options"; also "Downloads", "New" on the footer's plus, and a pinned extension's action title, or its name when that's empty. @@ -70,7 +74,7 @@ Resting the pointer on a tab row for about 2 seconds SHALL show a tooltip as `ta - **THEN** no tooltip shows the tab's title ### Requirement: URL field -Below the top row, the sidebar SHALL show the active tab's host without a leading `www.`, or its full URL for pages without a host such as `chrome://` pages and files, with a search icon and "Search or Enter URL…" for a new tab page. Clicking the field SHALL open the command bar on the current URL, and its context menu SHALL offer Copy URL. While the pointer is over the field, its background SHALL darken. While the toolbar shows, the field SHALL be its host instead. +Below the top row, the sidebar SHALL show the active tab's host without a leading `www.`, or its full URL for pages without a host such as `chrome://` pages and files, with a search icon and "Search or Enter URL…" for a new tab page. Clicking the field SHALL open the command bar on the current URL, and its context menu SHALL offer Copy URL. While the pointer is over the field, its background SHALL darken. While the toolbar or a split's pane headers show, the field SHALL be their hosts instead. #### Scenario: Web page - **WHEN** the active tab shows `https://news.ycombinator.com/item?id=1` @@ -92,6 +96,10 @@ Below the top row, the sidebar SHALL show the active tab's host without a leadin - **WHEN** the toolbar is shown - **THEN** the sidebar shows no URL field, and the toolbar shows the host +#### Scenario: A split with the toolbar off +- **WHEN** the toolbar is off and the window shows a split +- **THEN** the sidebar shows no URL field, and each pane's header shows its host + ### Requirement: URL field buttons While the toolbar is off and the pointer is anywhere over the key window's sidebar, the URL field's trailing end SHALL show a copy button and the site-controls button, fading in and out. While the toolbar shows, its buttons SHALL always show (`page-toolbar`). @@ -471,11 +479,11 @@ Below the URL field, the sidebar SHALL show, in this order: the favorites of the - **THEN** its row reads "Fruit Co" ### Requirement: Today tab menu -A Today tab's context menu SHALL offer Copy Link, Rename…, Duplicate, Mute or Unmute, Pin Tab, Pin to Favorites, Move to Space (`spaces`), Close Tab and Close Tabs Below. Close Tabs Below SHALL close only the Today tabs below it. +A Today tab's context menu SHALL offer Copy Link, Rename…, Duplicate, Mute or Unmute, Split with Tab › (`split-view`), Pin Tab, Pin to Favorites, Move to Space (`spaces`), Close Tab and Close Tabs Below. Close Tabs Below SHALL close only the Today tabs below it. #### Scenario: Today tab's menu - **WHEN** there is one Space and the user right-clicks a Today tab's row -- **THEN** the menu offers Copy Link, Rename…, Duplicate, Mute, Pin Tab, Pin to Favorites, Close Tab and Close Tabs Below +- **THEN** the menu offers Copy Link, Rename…, Duplicate, Mute, Split with Tab, Pin Tab, Pin to Favorites, Close Tab and Close Tabs Below #### Scenario: Close Tabs Below leaves pinned tabs - **WHEN** the user chooses Close Tabs Below on the first Today tab of a Space with pinned tabs diff --git a/openspec/specs/split-view/spec.md b/openspec/specs/split-view/spec.md new file mode 100644 index 00000000..5407508a --- /dev/null +++ b/openspec/specs/split-view/spec.md @@ -0,0 +1,465 @@ +# split-view Specification + +## Purpose + +Split view shows two tabs side by side in one window, as in Arc and Dia, so the user can read or work on two pages at once. A split shows as one row in the sidebar, can be pinned or favorited as one item, and comes back after a relaunch. + +## Requirements + +### Requirement: Two panes side by side +A split SHALL show two tabs' pages side by side in the window's page area, each in its own pane card with rounded corners, the panes separated by a gap of about 10 points, as in Arc. A split SHALL hold exactly two tabs, and SHALL never stack its panes top to bottom. Each pane SHALL be an ordinary tab, with its own history, Peek and DevTools. + +#### Scenario: A new split +- **WHEN** the user makes a split of "News" and "Docs" +- **THEN** "News" shows in the leading pane and "Docs" in the trailing one, each in its own card, of equal width, with a gap between them + +#### Scenario: Resizing the window +- **WHEN** the user resizes a window showing a split +- **THEN** both panes resize, keeping their share of the width + +### Requirement: The focused pane +One pane of a split SHALL be focused. It SHALL have a 2-point ring in the accent colour, as in Arc. Clicking anywhere in the other pane, its header included, SHALL focus it. A newly made split SHALL focus the pane that was added. + +#### Scenario: Clicking the other pane +- **WHEN** the leading pane is focused and the user clicks in the trailing pane's page +- **THEN** the trailing pane is focused and ringed, the click reaches its page, and the leading pane loses its ring + +### Requirement: The window acts on the focused pane +The URL field, back, forward, reload and stop, Copy URL, find in page, DevTools, Print, zoom, site controls, page info, pinned extensions and permission indicators SHALL act on the focused pane's tab. Find SHALL open at the focused pane's top-trailing corner, and DevTools SHALL dock inside its tab's pane. + +#### Scenario: Find in a split +- **WHEN** the trailing pane is focused and the user presses Cmd+F +- **THEN** the find field opens at the trailing pane's top-trailing corner and searches its page + +#### Scenario: Cmd+L +- **WHEN** the leading pane is focused and the user presses Cmd+L, types a URL and presses Return +- **THEN** the leading pane loads the URL, and the trailing pane doesn't change + +### Requirement: The command bar over the focused pane +While the page is split, the command bar SHALL open centred on the focused pane rather than on the window, however it's opened (Cmd+L, Cmd+T, a pane's host, or New Tab in a split menu), and SHALL stay inside the window when the pane is narrower than it. + +#### Scenario: Cmd+L in the trailing pane +- **WHEN** a split's trailing pane is focused and the user presses Cmd+L +- **THEN** the command bar opens centred on the trailing pane, with its URL selected + +#### Scenario: A narrow pane +- **WHEN** the focused pane is narrower than the command bar +- **THEN** the command bar opens as near the pane's centre as it can while staying inside the window + +### Requirement: Pane headers +While the page is split, each pane SHALL have a header, whatever the toolbar preference, laid out as the toolbar (`page-toolbar`). Each SHALL hold back, forward, the link icon, the host and a close button centred 21 points from its trailing edge. The leading pane's header SHALL also lead with the sidebar toggle. The focused pane's SHALL also show reload and, left of the close button and 36 points apart, the split button, site controls, pinned extensions and indicators, as in Arc. + +#### Scenario: Headers of a split +- **WHEN** the window shows a split with the trailing pane focused +- **THEN** the leading pane's header shows the sidebar toggle, back, forward, the link icon, its host and ×, and the trailing pane's shows back, forward, reload, the link icon, its host, the indicators, pinned extensions, site controls, the split button and × + +#### Scenario: Toolbar preference off +- **WHEN** the toolbar preference is off and the user makes a split +- **THEN** both panes show headers, and the sidebar shows no back, forward, reload or URL field until the split ends + +### Requirement: Controls of the other pane +While the pointer is over the pane that isn't focused, its header SHALL show its reload, split button, site-controls button, pinned extensions and indicators too, fading in and out, as Arc does near its toolbar. Clicking one of them SHALL focus that pane and act on its tab. + +#### Scenario: Hovering the other pane +- **WHEN** the leading pane is focused and the pointer moves over the trailing pane's page +- **THEN** the trailing pane's header shows its reload, split button, site-controls button, pinned extensions and indicators, and hides them once the pointer leaves the pane + +#### Scenario: Clicking site controls there +- **WHEN** the user clicks the site-controls button in the header of the pane that isn't focused +- **THEN** that pane is focused, and the Site Control Center opens for its page + +### Requirement: Resizing the panes +A divider in the gap between the panes SHALL show the resize pointer and a faint grabber. Dragging it SHALL resize both panes, stopping when either pane's page would be narrower than about 210 points, as in Dia. The split SHALL keep the ratio, across tab switches and relaunches. A new split SHALL start with equal panes, and the divider SHALL snap to equal panes while it's dragged near the centre. While the page area is too narrow for two such pages, the panes SHALL keep their ratio. + +#### Scenario: Dragging the divider +- **WHEN** the user drags the divider of an equal split in a wide window 200 points toward the trailing edge +- **THEN** the leading pane widens and the trailing pane narrows by 200 points + +#### Scenario: Past the limit +- **WHEN** the user keeps dragging toward the trailing edge +- **THEN** the trailing pane's page stops at about 210 points wide + +#### Scenario: Snapping to the centre +- **WHEN** the user drags the divider to within about 20 points of the page area's centre +- **THEN** the panes become equal before the user lets go, and stay equal once the user does + +#### Scenario: The grabber +- **WHEN** the pointer moves over the divider +- **THEN** the grabber fades to its full colour, and back to faint once the pointer leaves + +#### Scenario: Coming back to the split +- **WHEN** the user resized a split, selects another tab and then selects the split again +- **THEN** the split shows with the ratio it had + +### Requirement: Dragging a tab onto the page +Dragging a Today tab, pinned tab or favorite over the page SHALL turn the drag into a portrait card with the tab's favicon and title, as in Arc. While the page isn't split, the half under the pointer SHALL become a translucent drop zone with an accent border, the page sliding to the other half, and moving across SHALL swap them. Dropping SHALL make a split with the tab in that half. + +#### Scenario: Dropping on the trailing half +- **WHEN** the window shows "News" and the user drags the Today tab "Docs" over the trailing half of the page and drops it +- **THEN** the window shows a split of "News" and "Docs", "Docs" trailing and focused + +#### Scenario: Moving across +- **WHEN** the user drags a tab over the trailing half and then over the leading half +- **THEN** the drop zone moves to the leading half, and the page slides to the trailing half + +#### Scenario: Leaving the page +- **WHEN** the user drags a tab over the page and then back over the sidebar +- **THEN** the drop zone closes, the page fills the page area again, and the drag shows the tab's row + +### Requirement: Dropping on a split page +While the page is split, the pane under a dragged tab SHALL become the drop zone. Dropping SHALL put the dropped tab in that pane, focused, and the tab it replaces SHALL leave the split with its page and become its own row directly below the split's row. Dropping a tab on the page where it already shows SHALL do nothing. + +#### Scenario: Replacing a pane +- **WHEN** the window shows a split of "News" and "Docs" and the user drops the Today tab "Mail" on the trailing pane +- **THEN** the split shows "News" and "Mail", "Mail" focused, and "Docs" is its own row below the split's row + +#### Scenario: A tab already in the split +- **WHEN** the user drags the tab of the split's own row over the page +- **THEN** no drop zone shows + +### Requirement: Option+click opens a split +In a native window, Option+clicking a link SHALL open it in a new tab beside the page it was clicked in, as the trailing pane of a split, focused, instead of downloading it. Opening a link from a pinned tab or favorite this way SHALL make a split, not a Peek. Option+click inside a Peek SHALL act as a plain click. + +#### Scenario: A page that isn't split +- **WHEN** the window shows "News" alone and the user Option+clicks a link to `https://example.com/` +- **THEN** a split shows "News" leading and a new tab at `https://example.com/` trailing and focused, and nothing is downloaded + +#### Scenario: A favorite +- **WHEN** the window shows the favorite "Mail" and the user Option+clicks a link to another site +- **THEN** the link opens in a split with "Mail", and no Peek opens + +### Requirement: Option+click in a split +While the page is split, Option+clicking a link in either pane SHALL load it in the other pane as a new navigation and focus that pane. No tab SHALL be created, and Back in that pane SHALL return to the page it showed before. + +#### Scenario: Option+click in the leading pane +- **WHEN** a split shows "News" and "Docs" and the user Option+clicks a link to `https://example.com/` in "News" +- **THEN** the trailing pane shows `https://example.com/` and is focused, the sidebar has no new row, and Back in that pane returns to "Docs"'s page + +#### Scenario: Option+click in the trailing pane +- **WHEN** the user Option+clicks a link in the trailing pane +- **THEN** the link loads in the leading pane + +### Requirement: The link status names the split +While Option is held and the pointer rests on a link in a page, the link status (`browser-window`) SHALL read "Open in Split View", where Option+click opens it in a split. Pressing or releasing Option while the status shows SHALL update it at once. Inside a Peek, where Option+click acts as a plain click, it SHALL show the URL alone. + +#### Scenario: Holding Option over a link +- **WHEN** the pointer rests on a link to `https://example.com/` and the user holds Option +- **THEN** the link status reads "Open https://example.com/ in Split View" + +#### Scenario: Releasing Option +- **WHEN** the user then releases Option +- **THEN** the link status reads `https://example.com/` + +### Requirement: Link status in a split +While the page is split, the link status SHALL show at the bottom-leading corner of the pane holding the link. + +#### Scenario: A link in the trailing pane +- **WHEN** the pointer rests on a link in the trailing pane +- **THEN** the link status shows at the trailing pane's bottom-leading corner + +### Requirement: Open Link in Split View +A link's context menu SHALL offer Open Link in Split View, after Open Link in New Tab, which SHALL act as Option+click on that link. + +#### Scenario: From the context menu +- **WHEN** the window shows "News" alone and the user chooses Open Link in Split View on a link +- **THEN** the link opens in a new tab as the trailing, focused pane of a split with "News" + +### Requirement: The split button +The toolbar SHALL show a split button at its trailing end (`page-toolbar`), and a split's pane headers just before their close buttons (see "Pane headers"), as in Arc, with the tooltip "Split view". Clicking it SHALL open its menu below it. No split button SHALL show on a Peek's toolbar, nor while the toolbar preference is off and the page isn't split. + +#### Scenario: The toolbar +- **WHEN** the toolbar shows a page that isn't split +- **THEN** the split button sits at its trailing end, with the site-controls button to its left + +#### Scenario: Sidebar layout +- **WHEN** the toolbar preference is off, the page isn't split, and the pointer is over the URL field +- **THEN** no split button shows + +#### Scenario: A Peek's toolbar +- **WHEN** a Peek is open with the toolbar shown +- **THEN** the Peek's toolbar shows no split button + +### Requirement: The split button's menu on a single page +On a page that isn't split, the split button's menu SHALL offer the heading "Split with Tab", the Today tabs of the window's Space other than the shown tab and those in a split, in the sidebar's order, each with its favicon and title, a divider and New Tab, as in Dia. Choosing a tab SHALL make a split with it trailing and focused. The list SHALL have no cap, and SHALL scroll when long. + +#### Scenario: Two other Today tabs +- **WHEN** the window shows "Mail" and the Space's Today tabs are "News", "Mail" and "Docs" +- **THEN** the menu offers "Split with Tab", "News", "Docs", a divider and New Tab + +#### Scenario: A tab already in a split +- **WHEN** the window shows "Mail", and the Space's Today tabs are "Mail", "Plan" and a split of "News" and "Docs" +- **THEN** the menu offers "Split with Tab", "Plan", a divider and New Tab + +#### Scenario: Choosing a tab +- **WHEN** the user chooses "Docs" +- **THEN** a split shows "Mail" leading and "Docs" trailing and focused, and the sidebar shows one row for both + +### Requirement: Splitting with a new tab +New Tab in a Split with Tab menu, and View › Add Split View (⌃⇧=), SHALL make a split of its target tab (see "The tab a new-tab split splits") and a new tab on the new tab page, trailing and focused, and open the command bar centred on the new pane, as Arc does with its empty pane. Choosing a page SHALL load it in the new tab. Esc SHALL close the command bar and leave the new tab page in its pane. While the page is split, Add Split View SHALL show the toast "Cannot Add New Pane". + +#### Scenario: Add Split View +- **WHEN** the window shows "News" alone and the user presses ⌃⇧= +- **THEN** a split shows "News" and a new tab page, the new tab trailing and focused, with the command bar centred on it + +#### Scenario: Choosing a page +- **WHEN** the user then types `example.com` and presses Return +- **THEN** the trailing pane loads `example.com` + +#### Scenario: Esc +- **WHEN** the user presses ⌃⇧= and then Esc +- **THEN** the command bar closes, and the split shows "News" and the new tab page + +#### Scenario: Already split +- **WHEN** the page is split and the user presses ⌃⇧= +- **THEN** the toast "Cannot Add New Pane" shows, and the split doesn't change + +### Requirement: The tab a new-tab split splits +New Tab in a tab's Split with Tab › context menu SHALL split that tab, whichever tab the window shows. View › Add Split View, New Tab in Tabs › Split with Tab › and New Tab in the split button's menu SHALL split the shown tab. + +#### Scenario: From another tab's menu +- **WHEN** the window shows "Mail" and the user chooses New Tab from the Split with Tab › menu of the Today tab "News" +- **THEN** the window shows a split of "News" and a new tab page, the new tab trailing and focused, and "Mail" isn't in a split + +#### Scenario: From the menu bar +- **WHEN** the window shows "Mail" and the user chooses Tabs › Split with Tab › New Tab +- **THEN** the window shows a split of "Mail" and a new tab page + +### Requirement: The split button's menu on a split +On a split page, a pane's split button SHALL open a menu offering Move Left and Move Right, a divider, Separate Tabs and Close This Tab, as in Dia. Move Left SHALL be disabled in the leading pane and Move Right in the trailing pane. Moving SHALL swap the panes, keeping the moved pane focused. + +#### Scenario: The leading pane's menu +- **WHEN** the user opens the split button's menu in the leading pane +- **THEN** it offers Move Left disabled, Move Right, a divider, Separate Tabs and Close This Tab + +#### Scenario: Move Right +- **WHEN** the user chooses Move Right in the leading pane "News" +- **THEN** "News" shows in the trailing pane, focused, and the other tab in the leading pane + +### Requirement: Split with Tab in the menus +Tabs › Split with Tab › SHALL list the Today tabs as the split button's menu does, with New Tab, and SHALL be disabled while the page is split. The menus of a Today tab, pinned tab and favorite SHALL offer Split with Tab ›, listing the Space's Today tabs other than that tab and those in a split, in the sidebar's order, each with its favicon, then New Tab. Choosing one SHALL make a split of the menu's tab, leading, and the chosen tab, trailing and focused. + +#### Scenario: From a tab's menu +- **WHEN** the user right-clicks the Today tab "News" and chooses Split with Tab › "Docs" +- **THEN** the window shows a split of "News" leading and "Docs" trailing and focused + +#### Scenario: From the menu bar while split +- **WHEN** the page is split and the user opens the Tabs menu +- **THEN** Split with Tab is disabled + +### Requirement: No Split with Tab for a tab already in a split +A Today tab's, pinned tab's or favorite's Split with Tab › SHALL be disabled, New Tab included, while that tab is already in a split, as for a pinned tab or favorite whose page is in a Today split. + +#### Scenario: A favorite in a Today split +- **WHEN** the favorite "Mail" is in a Today split with "News" and the user right-clicks "Mail"'s tile +- **THEN** Split with Tab is disabled + +### Requirement: Closing a pane +Each pane's × in its header, Close This Tab in its split menu, Cmd+W and View › Close Split Pane (⌃⇧−) on the focused pane SHALL close that pane's tab only, with its leave-page confirmation. The other tab SHALL then show alone, active, in the split's place in the sidebar. The pane of a pinned tab or favorite in a Today split SHALL close as Close and Keep Pinned does. A pane of a pinned or favorited split SHALL close as "Closing a pane of a pinned split" says. + +#### Scenario: × on a pane +- **WHEN** a split shows "News" and "Docs" and the user clicks × in the "Docs" pane's header +- **THEN** "Docs" closes, and "News" shows alone, active, in the split's place in the list + +#### Scenario: A page that asks before it's left +- **WHEN** the pane's page asks before it's left and the user chooses to stay +- **THEN** the split stays as it was + +### Requirement: Separating a split +Separate Tabs, in a pane's split menu, the split row's menu and View, SHALL end the split and keep both tabs with their pages, as two rows in the split's place, in pane order. The window SHALL show the tab of the focused pane alone. + +#### Scenario: Separate Tabs +- **WHEN** a split shows "News" leading and "Docs" trailing and focused, and the user chooses Separate Tabs +- **THEN** the sidebar lists "News" and then "Docs" where the split's row was, and the window shows "Docs" alone + +### Requirement: The split row +In the sidebar, a split SHALL show as one row with a chip per tab, in pane order, each with the tab's favicon and title (or custom name), truncated to share the row, as in Arc. While the split isn't selected, a thin divider SHALL separate the chips. While it's selected, the row SHALL be highlighted and each chip SHALL show as its own grey pill, in the same place as before, as in Arc. + +#### Scenario: A split in Today +- **WHEN** a Space has the Today tabs "Mail" and a split of "News" and "Docs" +- **THEN** the sidebar lists "Mail" and one row holding a "News" chip and a "Docs" chip + +#### Scenario: Selecting it +- **WHEN** the user selects that split +- **THEN** the row is highlighted, each chip is a grey pill, and neither chip moves + +#### Scenario: The selected split +- **WHEN** the window shows the split +- **THEN** its row is highlighted, and each chip is a grey pill on it + +### Requirement: Selecting the split row +Clicking anywhere on a split row SHALL show the split with the pane that was focused last focused. A chip SHALL NOT be selected on its own. + +#### Scenario: Clicking a chip +- **WHEN** a split of "News" and "Docs" was last focused on "Docs", another tab is shown, and the user clicks the "News" chip +- **THEN** the window shows the split with "Docs" focused + +### Requirement: Closing a page from its row +Hovering a split's row in Today SHALL show a close button at the trailing end of each chip, with the tooltip "Close tab", and ⌘W on the focused pane's chip while the split shows. Each SHALL close its chip's tab only, as the pane's × does (see "Closing a pane"). Middle-clicking a chip SHALL do the same. + +#### Scenario: Closing one chip +- **WHEN** a Today split shows "News" and "Docs" and the user hovers its row and clicks the "Docs" chip's × +- **THEN** "Docs" closes, and "News" shows alone, in the split's place in the list + +#### Scenario: Hovering the row +- **WHEN** the user hovers either chip of the row +- **THEN** both the "News" chip and the "Docs" chip show a × + +### Requirement: The split row's menu +Right-clicking a split row SHALL open the menu of its kind for the tab whose chip is under the pointer (Today tab menu, `pinned-tabs`, `favorites`), without Split with Tab ›, Back to Pinned URL or Edit Pinned Page ›, with Separate Tabs added. Pin Tab, Pin to Favorites, Unpin Tab, Remove Favorite and Move to Space SHALL act on the whole split. + +#### Scenario: A Today split's menu +- **WHEN** the user right-clicks the "Docs" chip of a Today split +- **THEN** the menu offers the Today tab menu's items for "Docs", and Separate Tabs, and no Split with Tab + +#### Scenario: Copy Link +- **WHEN** the user chooses Copy Link from that menu +- **THEN** the URL of "Docs" is copied + +### Requirement: Dragging a split row +Dragging a split row SHALL move the whole split: within Today, into the pinned section, into, within and out of a folder (`tab-folders`), into the favorites, onto the Space header, and to another Space or window, as dragging a tab row does. A split row SHALL make no drop zone over the page. Chips SHALL NOT be dragged out of the row on their own. + +#### Scenario: Reordering +- **WHEN** the user drags a split row above the first Today tab +- **THEN** the split is first in Today + +#### Scenario: Into a folder +- **WHEN** the user drops a Today split row on the folder "Work" +- **THEN** the split is pinned as the first item of "Work", as one row + +### Requirement: Tab commands treat a split as one row +The tab commands of `spaces` (Next Tab, Previous Tab, Ctrl+Tab, Cmd+1 to Cmd+9, Close Tabs Below, and Ctrl+Shift+PageDown and PageUp) SHALL count a split as one row. Selecting it SHALL show the split as clicking its row does. + +#### Scenario: Ctrl+Tab +- **WHEN** Today lists "Mail", a split, and "Docs", "Mail" is shown, and the user presses Ctrl+Tab twice +- **THEN** the window shows the split and then "Docs" + +### Requirement: A split moves as one +Moving a split to another Space, showing it in another window, closing its window and Clear Today SHALL treat both tabs as one: they SHALL stay a split, with their order and ratio, and never show in two windows at once. + +#### Scenario: Move to Space +- **WHEN** the user chooses Move to Space › "Work" on a split row +- **THEN** both tabs move to the top of "Work"'s Today tabs as one split + +#### Scenario: Another window +- **WHEN** two windows show the same Space and the user clicks a split row in the second +- **THEN** the split moves to the second window, both panes, and the first window shows another tab + +### Requirement: Splits after a relaunch +Splits SHALL come back after a relaunch, with Reopen Closed Window and after a crash, as splits of the same tabs, in the same order and place, with their ratio and focused pane. + +#### Scenario: Relaunch +- **WHEN** the user quits with a split of "News" and "Docs" at a 2:1 ratio and relaunches +- **THEN** the sidebar shows the split's row in its place, and selecting it shows "News" and "Docs" at a 2:1 ratio + +### Requirement: Peeks in a split +Shift+clicking a link in either pane SHALL open a Peek of that pane's tab, centred over the whole page area, with only that pane shrinking and washing out behind it, as `peek` describes. Closing it SHALL show the split as it was. + +#### Scenario: A Peek from the trailing pane +- **WHEN** a split shows "News" and "Docs" and the user Shift+clicks a link in "Docs" +- **THEN** a Peek opens centred on the page area, "Docs"'s pane shrinks and washes out behind it, and "News"'s pane doesn't change + +#### Scenario: Closing it +- **WHEN** the user presses Esc +- **THEN** the Peek closes and the split shows as before + +### Requirement: Open in Split View from a Peek +A Peek's Open in Split View button SHALL turn the Peek into a normal tab in a split with its parent, trailing and focused, keeping its page and history. While the parent is already in a split, the button SHALL NOT show, since a split holds two tabs. + +#### Scenario: From a single page +- **WHEN** a Peek is open on "News", which isn't split, and the user clicks Open in Split View +- **THEN** a split shows "News" leading and the Peek's page trailing and focused + +#### Scenario: From a split +- **WHEN** a Peek is open on the leading pane "News" of a split with "Docs" +- **THEN** the Peek shows Close and Expand only + +### Requirement: A split with a pinned tab or favorite +A split made of a Today tab and a pinned tab's or favorite's page SHALL show as a split row in Today, as in Arc. The pinned tab's row or favorite's tile SHALL stay in its place, and selecting it SHALL show the split. Separating the split, or closing the Today tab's pane, SHALL leave the page with its pin. + +#### Scenario: Dragging a favorite onto the page +- **WHEN** the window shows the Today tab "News" and the user drops the favorite "Mail" on the page's trailing half +- **THEN** a split row of "News" and "Mail" shows in Today, and "Mail"'s tile stays in the grid + +#### Scenario: Separating +- **WHEN** the user chooses Separate Tabs on that split +- **THEN** "News" is a Today row and "Mail" shows from its tile alone + +### Requirement: Pinning a split +Pin Tab (Cmd+D) on a split, Pin Tab in its row's menu, and dragging its row into the pinned section SHALL pin the split as one item, keeping its pages, ratio and selection. Pin to Favorites and dragging it onto the favorites SHALL make it one favorite. Unpin Tab and dragging it below the divider SHALL make it a Today split again. + +#### Scenario: Dragging a split over the favorites +- **WHEN** the user drags a split's row over the favorites +- **THEN** the drag shows the tile it would become, a segment per page with its icon, as "The favorite split tile" describes + +#### Scenario: Cmd+D on a split +- **WHEN** the window shows a Today split of "News" and "Docs" and the user presses Cmd+D +- **THEN** the split is the last item of the pinned section, as one row, and stays shown + +#### Scenario: Unpinning +- **WHEN** the user chooses Unpin Tab on a pinned split +- **THEN** it becomes the first Today row, still a split + +### Requirement: The pinned split row +A pinned split SHALL show in the pinned section as a split row, with the titles each page had when last open. Hovering the selected pinned split SHALL show a − button, "Close and Keep Pinned", that closes both pages and keeps the row. Hovering one that isn't selected SHALL show ×, "Remove Pin", which removes it, and Restore Last Closed Tab SHALL bring it back. + +#### Scenario: Close and Keep Pinned +- **WHEN** the window shows a pinned split and the user clicks its − +- **THEN** both pages close, the row stays in place, and the next tab shows as `spaces` defines + +#### Scenario: Selecting it again +- **WHEN** the user then clicks the row +- **THEN** both pinned URLs load, as a split with its ratio + +### Requirement: Pages of a pinned split +A pinned or favorited split SHALL keep a pinned URL for each page. Selecting it SHALL open each page that isn't open, as a split. Its row or tile SHALL show no "/" and offer no Back to Pinned URL. + +#### Scenario: Navigated away +- **WHEN** the "Mail" pane of a pinned split follows a link to another page of its site +- **THEN** the row shows the new title in its chip, with no "/", and Tabs › Back to Pinned URL is disabled + +### Requirement: Closing a pane of a pinned split +Closing one pane of a pinned or favorited split SHALL take that page out of the item, as in Arc: the item SHALL become a pinned tab, or a favorite, of the other page, in the split's place, showing that page alone. Restore Last Closed Tab SHALL bring the closed page back into the item as a split, with its pinned URL and the ratio. + +#### Scenario: Closing one pane +- **WHEN** a pinned split of "Mail" and "Calendar" shows and the user closes the "Calendar" pane +- **THEN** "Mail" shows alone, as a pinned tab in the split's place, and the pinned section has no "Calendar" + +#### Scenario: Restoring the closed pane +- **WHEN** the user then chooses Restore Last Closed Tab +- **THEN** the pinned split of "Mail" and "Calendar" is back in its place, shown with its ratio + +### Requirement: The favorite split tile +A favorited split SHALL take one tile in the favorites grid, divided into a segment per page by a thin line, each segment with its page's icon centred, as in Arc. While the window shows it, the tile SHALL turn white in Light Mode, or light grey in Dark Mode, with a 2-point ring that blends from the leading page's icon colour to the trailing page's. + +#### Scenario: Not shown +- **WHEN** a profile's favorites are a split of "Verge" and "Ars" and the single favorite "Wikipedia" +- **THEN** the grid shows two tiles, the first divided into a "Verge" and an "Ars" segment + +#### Scenario: Shown +- **WHEN** the window shows the favorited split +- **THEN** its tile is white with a ring blending from "Verge"'s colour to "Ars"'s + +### Requirement: Separating a pinned or favorited split +Separate Tabs on a pinned split SHALL leave two pinned tabs in its place, in pane order. On a favorited split, it SHALL leave two favorites in its place. Each SHALL keep its pinned URL, name and page. + +#### Scenario: A pinned split +- **WHEN** the pinned section lists "Mail", a pinned split of "News" and "Docs", and "Plan", and the user chooses Separate Tabs on the split +- **THEN** the pinned section lists "Mail", "News", "Docs" and "Plan" + +#### Scenario: A favorited split +- **WHEN** the user chooses Separate Tabs on a favorited split of "Verge" and "Ars" +- **THEN** "Verge" and "Ars" are two favorites in its place in the grid + +### Requirement: Pinned splits after a relaunch +Pinned and favorited splits SHALL come back after every relaunch, in their place, with each page's pinned URL, name and ratio. A page open when Clair quit SHALL come back open. + +#### Scenario: Relaunch +- **WHEN** the user quits with a pinned split whose pages were closed, and relaunches +- **THEN** the pinned section lists the split row in its place, and selecting it opens both pinned URLs as a split + +### Requirement: Splits in private windows +Incognito and guest windows SHALL support splits as other windows do, without the pin and favorite items. + +#### Scenario: Incognito +- **WHEN** the user Option+clicks a link in an incognito window +- **THEN** the link opens as the trailing pane of a split in that window diff --git a/openspec/specs/tab-folders/spec.md b/openspec/specs/tab-folders/spec.md index 5868f1d4..56b790ca 100644 --- a/openspec/specs/tab-folders/spec.md +++ b/openspec/specs/tab-folders/spec.md @@ -7,7 +7,7 @@ Folders group the pinned tabs of a Space, as in Arc: a folder sits in the Space' ## Requirements ### Requirement: Folders hold pinned tabs -A Space's pinned section SHALL hold pinned tabs and folders in the user's order. A folder SHALL have a name and hold pinned tabs only, in the user's order, and no folders. A folder SHALL belong to one Space. Favorites and Today tabs SHALL hold no folders, and incognito and guest windows SHALL show none. +A Space's pinned section SHALL hold pinned tabs, pinned splits (`split-view`) and folders in the user's order. A folder SHALL have a name and hold pinned tabs and pinned splits only, in the user's order, and no folders. A folder SHALL belong to one Space. Favorites and Today tabs SHALL hold no folders, and incognito and guest windows SHALL show none. #### Scenario: A folder among pinned tabs - **WHEN** "Work" has the pinned tab "Mail", then the folder "Docs" holding the pinned tabs "Spec" and "Plan" @@ -17,6 +17,10 @@ A Space's pinned section SHALL hold pinned tabs and folders in the user's order. - **WHEN** the folder "Docs" is in "Work" and the window shows "Home" - **THEN** the sidebar doesn't list "Docs" +#### Scenario: A split in a folder +- **WHEN** the folder "Docs" holds "Spec" and then a pinned split of "News" and "Plan" +- **THEN** under "Docs" the sidebar lists "Spec" and one split row holding a "News" chip and a "Plan" chip + ### Requirement: Creating a folder in place New Folder in the footer's + menu, the Space header's menu and the sidebar's own menu SHALL add an open, empty folder named "Untitled" at the end of the Space's pinned section, and show its name in a field with the text selected and the placeholder "Folder Title". Return or the field losing focus SHALL keep the name; Esc or an empty name SHALL keep "Untitled".