Skip to content

armgit / cra

Public Imported from GitHub
0

The open-source Arc replacement for macOS. Spaces, pinned tabs, split view, Little Windows and Arc's shortcuts on Chromium, with your Arc sidebar imported in one go.

Blank Window as Arc 1.172 does it: Move to… opens the tabs in the main window, + does nothing, light theme (#220, #219)

Victor9de5a5949300
diff --git a/Packages/CraCore/Sources/CraCore/BlankWindow.swift b/Packages/CraCore/Sources/CraCore/BlankWindow.swift
index eb291d8..c688019 100644
--- a/Packages/CraCore/Sources/CraCore/BlankWindow.swift
+++ b/Packages/CraCore/Sources/CraCore/BlankWindow.swift
@@ -5,16 +5,22 @@ import Foundation
/// (`sidebarContext: standalone` in StorableWindows.json, `{standalone: <window id>}` in
/// StorableSidebar.json) beside the global one every other window shares. Seen in Arc 1.172
/// (6 Nov 2026): the header reads "This Window", there are no favorites, no pinned section and no
-/// space icons, the command bar opens, and closing the window removes its container.
+/// space icons, the command bar opens, and closing the window removes its container. Its + does
+/// nothing. "Move to…" lists the spaces; picking one moves the window's tabs to the top of that
+/// space's Today, opens its open tab in the main window and closes the Blank Window.
/// Cra gives the window a space of its own that no space list shows (`Space.standaloneWindowID`).
public enum BlankWindow {
/// The sidebar header, Arc's words.
public static let title = "This Window"
- /// Arc's theme-less window, a plain grey-violet. Fitted on window captures (dark mode, inactive):
- /// Arc's sidebar is #313246 at the top and #363247 at the bottom, Cra draws this as #303145 and
- /// #363548. (Arc's empty page area is lighter than Cra's, #4F4B5D against #3A3B4E.)
- public static let theme = SpaceTheme(colors: ["#222337", "#2B273A"], intensity: 0.9, noise: 0.08, appearance: "dark")
+ /// Arc's theme-less window: grey-violet while macOS is dark, lavender-white while it is light
+ /// (Arc follows the system). Fitted on window captures (inactive): dark, Arc's sidebar is #313246
+ /// at the top and #363247 at the bottom, Cra draws #303145 and #363548; light, Arc's is #E3E3F4 and
+ /// #E9E7F1, Cra draws #E5E5F3 and #EAE9F3. (Arc's empty page area differs from Cra's: #4F4B5D
+ /// against #3A3B4E dark, #F8F7FA against #E0DFEE light.)
+ public static let theme = SpaceTheme(
+ light: SpaceTheme(colors: ["#DCDBF3", "#E6E3EF"], intensity: 0.9, noise: 0.08, appearance: "light"),
+ dark: SpaceTheme(colors: ["#222337", "#2B273A"], intensity: 0.9, noise: 0.08, appearance: "dark"))
/// The space a new Blank Window shows, with its three containers.
public static func space(window: UUID, at date: Date, id: UUID = UUID()) -> (space: Space, containers: [SidebarItem]) {
diff --git a/Packages/CraCore/Sources/CraCore/TabTearOff.swift b/Packages/CraCore/Sources/CraCore/TabTearOff.swift
index 09274ad..911eb2c 100644
--- a/Packages/CraCore/Sources/CraCore/TabTearOff.swift
+++ b/Packages/CraCore/Sources/CraCore/TabTearOff.swift
@@ -3,8 +3,9 @@ import CoreGraphics
/// A sidebar tab dragged out of the window and let go where no Cra window is (GitHub #219).
/// Arc 1.172 (6 Nov 2026, offline copy, real drags): the tab leaves its space and opens alone in
/// a new Blank Window ("This Window", BlankWindow) the size of the window it came from; the
-/// window it left shows no tab if that one was open. Dropped near the screen's top left, the new
-/// window sat exactly 20 pt inside the visible frame on both axes.
+/// window it left shows no tab if that one was open. The new window centres on where the pointer
+/// let go (two drops in the open: 926 × 500 at (1100, 700) and (500, 820) from the top left opened
+/// at (637, 450) and (37, 570)); near the screen's edge it stays 20 pt inside the visible frame.
public enum TabTearOff {
/// How far inside the screen's visible frame the window stays.
public static let inset: CGFloat = 20
diff --git a/Packages/CraCore/Tests/CraCoreTests/BlankWindowTests.swift b/Packages/CraCore/Tests/CraCoreTests/BlankWindowTests.swift
index 8eb06c1..5d51ed6 100644
--- a/Packages/CraCore/Tests/CraCoreTests/BlankWindowTests.swift
+++ b/Packages/CraCore/Tests/CraCoreTests/BlankWindowTests.swift
@@ -14,6 +14,9 @@ struct BlankWindowTests {
#expect(space.emoji.isEmpty && space.symbol == nil)
#expect(space.standaloneWindowID == window)
#expect(space.profileID == nil) // the normal Default profile, not incognito
+ // It follows macOS, as Arc's does: lavender-white while light, grey-violet while dark.
+ #expect(space.theme.followsSystem)
+ #expect(!space.theme.resolved(systemDark: false).isDark && space.theme.resolved(systemDark: true).isDark)
#expect(containers.map(\.id) == [space.favoritesContainerID, space.pinnedContainerID, space.todayContainerID])
#expect(containers.map(\.container) == [.favorites(spaceID: space.id), .pinned(spaceID: space.id), .today(spaceID: space.id)])
}
diff --git a/Packages/CraCore/Tests/CraCoreTests/TabTearOffTests.swift b/Packages/CraCore/Tests/CraCoreTests/TabTearOffTests.swift
index cb3a7f5..6635f8e 100644
--- a/Packages/CraCore/Tests/CraCoreTests/TabTearOffTests.swift
+++ b/Packages/CraCore/Tests/CraCoreTests/TabTearOffTests.swift
@@ -26,6 +26,17 @@ struct TabTearOffTests {
#expect(f == CGRect(x: 20, y: 1117 - 53 - 760, width: 1000, height: 760))
}
+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/219"))
+ func arcsDropsInTheOpenCentreOnThePointer() {
+ // Arc 1.172: a 926 × 500 window's tab let go at (1100, 700) and (500, 820) from the top left
+ // opened at (637, 450) and (37, 570) from the top left.
+ let size = CGSize(width: 926, height: 500)
+ for (drop, origin) in [(CGPoint(x: 1100, y: 700), CGPoint(x: 637, y: 450)), (CGPoint(x: 500, y: 820), CGPoint(x: 37, y: 570))] {
+ let f = TabTearOff.frame(size: size, droppedAt: CGPoint(x: drop.x, y: 1117 - drop.y), visible: visible)
+ #expect(f == CGRect(x: origin.x, y: 1117 - origin.y - 500, width: 926, height: 500))
+ }
+ }
+
@Test(.bug("https://github.com/VictorKildahl/cra/issues/219"))
func inTheOpenTheWindowCentresOnThePointer() {
let f = TabTearOff.frame(size: CGSize(width: 700, height: 500), droppedAt: CGPoint(x: 900, y: 500), visible: visible)
diff --git a/Sources/Cra/App/AppDelegate.swift b/Sources/Cra/App/AppDelegate.swift
index 1837353..8b2a2f9 100644
--- a/Sources/Cra/App/AppDelegate.swift
+++ b/Sources/Cra/App/AppDelegate.swift
@@ -476,6 +476,22 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuItemValidation {
return c
}
+ /// A Blank Window's "Move to…" (Arc 1.172): its tabs go to the top of the space's Today, the one
+ /// it had open opens in the main window with its page as it was, and the Blank Window closes.
+ func moveBlankWindow(_ c: MainWindowController, toSpace sid: UUID) {
+ guard c.isBlank, store.space(sid) != nil, !store.isStandalone(space: sid) else { return }
+ let open = store.moveBlankWindowTabs(c.windowID, toSpace: sid)
+ let target = useNormalWindow(forSpace: sid)
+ if let open {
+ store.selectTab(open, window: target.windowID)
+ if let rt = c.browsers.release(open) { target.takePage(rt) }
+ } else {
+ store.focusSpace(sid, window: target.windowID)
+ }
+ c.window?.close()
+ target.showWindow(nil)
+ }
+
/// A tab dragged out of every Cra window and let go (GitHub #219): as in Arc, it moves into
/// a new Blank Window placed where it was dropped, with its page as it was (no reload).
/// `screenPoint` is where the pointer let go; the window takes the size of the one it came from.
@@ -954,6 +970,12 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuItemValidation {
}
return
}
+ // blankMoveTo=<n>: a Blank Window's "Move to…" picking the nth space, as its menu does (#220).
+ if let n = dict["blankMoveTo"].flatMap(Int.init) {
+ guard main.isBlank, store.spaceOrder.indices.contains(n - 1) else { CraLog.note("blankMoveTo: no Blank Window or space \(n)"); return }
+ moveBlankWindow(main, toSpace: store.spaceOrder[n - 1])
+ return
+ }
// dragEnd=<text>&at=x,y: the window's tab whose URL holds the text dragged and let go there
// (from the screen's top left) with nothing taking it, as a drag out of the sidebar ends
// (#219). Without at: a point of the screen no Cra window covers.
diff --git a/Sources/Cra/Services/SidebarStore.swift b/Sources/Cra/Services/SidebarStore.swift
index 77d362c..0ff691e 100644
--- a/Sources/Cra/Services/SidebarStore.swift
+++ b/Sources/Cra/Services/SidebarStore.swift
@@ -338,24 +338,18 @@ final class SidebarStore {
if wasOpen { selectTab(id, window: window) }
}
- /// A Blank Window's "Move to…" (Arc's header button): its tabs go to the top of a space's
- /// Today and the window becomes a normal window on that space, its open tab still open.
- func moveBlankWindow(_ window: UUID, toSpace sid: UUID) {
+ /// A Blank Window's "Move to…" (Arc 1.172): its tabs go to the top of the space's Today in
+ /// their order and the window lets them go. Returns the tab it had open, which AppDelegate
+ /// opens in the main window before it closes the Blank Window.
+ @discardableResult
+ func moveBlankWindowTabs(_ window: UUID, toSpace sid: UUID) -> UUID? {
let own = focusedSpaceID(window: window)
- guard isBlank(space: own), let blank = spaces[own], let target = spaces[sid], !isStandalone(space: sid) else { return }
- let open = self.window(window).selectedTabPerSpace[own]
+ guard isBlank(space: own), let blank = spaces[own], let target = spaces[sid], !isStandalone(space: sid) else { return nil }
+ let open = selectedTabID(in: own, window: window)
moveItems(children(of: blank.todayContainerID).map(\.id), to: target.todayContainerID, index: 0)
- updateWindow(window) {
- $0.focusedSpaceID = sid
- $0.selectedTabPerSpace[own] = nil
- if let open, items[open] != nil { $0.selectedTabPerSpace[sid] = open }
- }
- var ids = Set<UUID>()
- collectSubtree(of: blank, into: &ids)
- for i in ids { items[i] = nil }
- spaces[own] = nil
- blankSpaceIDs.remove(own)
+ updateWindow(window) { $0.selectedTabPerSpace[own] = nil }
touch()
+ return open
}
func isBlank(space id: UUID?) -> Bool { id.map(blankSpaceIDs.contains) ?? false }
diff --git a/Sources/Cra/UI/Sidebar/List/SidebarView.swift b/Sources/Cra/UI/Sidebar/List/SidebarView.swift
index 7956244..f538a3f 100644
--- a/Sources/Cra/UI/Sidebar/List/SidebarView.swift
+++ b/Sources/Cra/UI/Sidebar/List/SidebarView.swift
@@ -667,7 +667,11 @@ final class SpaceDockView: NSView {
self.ui = ui
self.actions = actions
library = LibraryButtonView(ui: ui, actions: actions)
- plus = SidebarGlyphButton(symbol: "plus", size: 28, iconSize: 13, help: "New Space", colors: SidebarColors()) { actions.editSpace(nil) }
+ // Arc 1.172: a Blank Window's + shows but does nothing.
+ plus = SidebarGlyphButton(symbol: "plus", size: 28, iconSize: 13, help: "New Space", colors: SidebarColors()) { [store, ui] in
+ guard !store.isBlank(window: ui.windowID) else { return }
+ actions.editSpace(nil)
+ }
super.init(frame: .zero)
addSubview(library)
addSubview(plus)
diff --git a/Sources/Cra/UI/Sidebar/List/SpaceColumnView.swift b/Sources/Cra/UI/Sidebar/List/SpaceColumnView.swift
index ea41def..86238a8 100644
--- a/Sources/Cra/UI/Sidebar/List/SpaceColumnView.swift
+++ b/Sources/Cra/UI/Sidebar/List/SpaceColumnView.swift
@@ -130,6 +130,9 @@ final class SpaceHeaderView: NSView, NSTextFieldDelegate {
/// to a space.
private var blank = false
private let moveTo = NSTextField.sidebarLabel(size: 11, weight: .medium)
+ /// Arc's pressed "Move to…": a pill behind it while its menu is open (white 10 % over the dark
+ /// sidebar, 27.5 pt tall, 11 pt before the text and 12.5 pt after it).
+ private let moveToPill = NSView()
private var columnHovering = false { didSet { if columnHovering != oldValue { refresh() } } }
private var hovering = false { didSet { if hovering != oldValue { refresh() } } }
/// Arc keeps the hover look while the space menu is open.
@@ -159,7 +162,10 @@ final class SpaceHeaderView: NSView, NSTextFieldDelegate {
symbol.imageScaling = .scaleNone
moveTo.stringValue = "Move to…"
moveTo.isHidden = true
- for v in [emoji, symbol, title, chevronBox, more, done, moveTo] { addSubview(v) }
+ moveToPill.wantsLayer = true
+ moveToPill.layer?.cornerRadius = 8
+ moveToPill.isHidden = true
+ for v in [emoji, symbol, title, chevronBox, more, done, moveToPill, moveTo] { addSubview(v) }
sync()
}
@@ -229,6 +235,8 @@ final class SpaceHeaderView: NSView, NSTextFieldDelegate {
done.isHidden = renameField == nil
moveTo.textColor = colors.textTertiary
moveTo.isHidden = !blank || !(columnHovering || hovering || menuOpen)
+ moveToPill.isHidden = !blank || !menuOpen
+ moveToPill.layer?.backgroundColor = (colors.isDark ? NSColor.white.withAlphaComponent(0.1) : colors.hoverFill).cgColor
if blank {
chevron.alphaValue = 0
layer?.backgroundColor = .clear
@@ -276,6 +284,8 @@ final class SpaceHeaderView: NSView, NSTextFieldDelegate {
let mw = ceil(moveTo.attributedStringValue.size().width) + 2 * SidebarText.inset
let mh = moveTo.intrinsicContentSize.height
moveTo.frame = NSRect(x: w - BlankHeader.moveToEnd - mw + SidebarText.inset, y: (h - mh) / 2, width: mw, height: mh)
+ let glyphs = moveTo.frame.insetBy(dx: SidebarText.inset, dy: 0)
+ moveToPill.frame = NSRect(x: glyphs.minX - 11, y: (h - 27.5) / 2, width: glyphs.width + 23.5, height: 27.5)
let x: CGFloat = blank ? BlankHeader.titleX : 36
let end = blank ? (moveTo.isHidden ? w - 8.5 : moveTo.frame.minX - 6)
: renameField != nil ? done.frame.minX - 6 : (more.isHidden ? w - 8.5 : w - 18.5 - 13 - 2)
@@ -344,9 +354,9 @@ final class SpaceHeaderView: NSView, NSTextFieldDelegate {
private func moveToMenu() -> NSMenu {
let m = NSMenu()
for space in store.orderedSpaces {
- let item = BlockMenuItem(title: space.emoji.isEmpty ? space.title : "\(space.emoji) \(space.title)") { [store, ui, spaceID] in
+ let item = BlockMenuItem(title: space.emoji.isEmpty ? space.title : "\(space.emoji) \(space.title)") { [store, actions, spaceID] in
guard store.isBlank(space: spaceID) else { return }
- store.moveBlankWindow(ui.windowID, toSpace: space.id)
+ actions.moveBlankWindow(space.id)
}
if let sym = space.symbol { item.image = SidebarSymbols.image(sym, size: 13, weight: .medium) }
m.addItem(item)
diff --git a/Sources/Cra/UI/SidebarUIState.swift b/Sources/Cra/UI/SidebarUIState.swift
index 831d87c..b8df9c7 100644
--- a/Sources/Cra/UI/SidebarUIState.swift
+++ b/Sources/Cra/UI/SidebarUIState.swift
@@ -189,6 +189,8 @@ final class SidebarActions {
/// A tab dragged out of every Cra window and let go there (screen point): Arc opens it in a
/// Blank Window where it was dropped (GitHub #219).
var tearOffTab: (UUID, NSPoint) -> Void = { _, _ in }
+ /// A Blank Window's "Move to…" picked a space (Arc: its tabs go there, the window closes).
+ var moveBlankWindow: (UUID) -> Void = { _ in }
var goBack: () -> Void = {}
var goForward: () -> Void = {}
var reload: () -> Void = {}
diff --git a/Sources/Cra/UI/Windows/MainWindowController.swift b/Sources/Cra/UI/Windows/MainWindowController.swift
index 38aec2a..47cc70e 100644
--- a/Sources/Cra/UI/Windows/MainWindowController.swift
+++ b/Sources/Cra/UI/Windows/MainWindowController.swift
@@ -256,6 +256,10 @@ final class MainWindowController: NSWindowController, NSWindowDelegate, BrowserM
sidebarActions.titleBarDoubleClick = { [weak self] in (self?.window as? CraWindow)?.performTitleDoubleClickAction() }
sidebarActions.openCommandBar = { [weak self] mode in self?.openCommandBar(mode) }
sidebarActions.closeTab = { [weak self] id in self?.closeTab(id) }
+ sidebarActions.moveBlankWindow = { [weak self] space in
+ guard let self else { return }
+ self.app.moveBlankWindow(self, toSpace: space)
+ }
sidebarActions.tearOffTab = { [weak self] id, point in
guard let self else { return }
self.app.tearOffTab(id, at: point, from: self)
diff --git a/Tests/Scenarios/blank-window.scenario b/Tests/Scenarios/blank-window.scenario
index bfbc2aa..ec857b8 100644
--- a/Tests/Scenarios/blank-window.scenario
+++ b/Tests/Scenarios/blank-window.scenario
@@ -1,8 +1,10 @@
# promise: #219 #220
# A tab dragged out of every window and let go (#219) moves into a new Blank Window, as in Arc
# 1.172: that window lists only it, under "This Window", in no space list; the page moves with
-# its state (no second load) and the window it left shows no tab. File ▸ Blank Window (⌃⌘N, #220)
-# opens an empty one, and a relaunch brings both back with their tabs.
+# its state (no second load) and the window it left shows no tab. Its "Move to…" picking the space
+# (Arc 1.172) puts the tab back at the top of the space's Today, open in the main window with its
+# page as it was, and closes the Blank Window. File ▸ Blank Window (⌃⌘N, #220) opens an empty one,
+# and a relaunch brings it back.
budget rss=700 stalls50=10
cra://debug?windowSize=1000x700
cra://open?url=${PAGE}?n=stays
@@ -23,6 +25,13 @@ expect-log takes over another window's page
# The page in the new window is the same page: what it held is still there.
cra://debug?cdp=Runtime.evaluate&params={"expression":"String(window.mark)"}
expect-log Cra cdp Runtime.evaluate .*"value":"kept-torn"
+cra://debug?blankMoveTo=1
+wait 2
+cra://debug?browserWindows=moved
+expect-log Cra browser windows moved: kind=normal .*listed=1 tabs=\[\S*n=torn \S*n=stays\] open=\S*n=torn page=1
+reject-log Cra browser windows moved: kind=blank
+cra://debug?cdp=Runtime.evaluate&params={"expression":"'again-'+String(window.mark)"}
+expect-log Cra cdp Runtime.evaluate .*"value":"again-kept-torn"
cra://action/newBlankWindow
wait 2
cra://debug?browserWindows=new
@@ -31,6 +40,6 @@ relaunch
wait 4
cra://debug?browserWindows=relaunched
# The relaunched Cra's lines reach cra.log only, which names no pages: kinds and counts.
-expect-log browser windows relaunched: kind=blank listed=0 tabs=1 open=1
expect-log browser windows relaunched: kind=blank listed=0 tabs=0 open=0
-expect-log browser windows relaunched: kind=normal listed=1 tabs=1 open=0
+expect-log browser windows relaunched: kind=normal listed=1 tabs=2 open=1
+reject-log browser windows relaunched: kind=blank listed=0 tabs=1
diff --git a/Tests/StoreTests.swift b/Tests/StoreTests.swift
index fead639..c5709a1 100644
--- a/Tests/StoreTests.swift
+++ b/Tests/StoreTests.swift
@@ -1383,13 +1383,19 @@ enum StoreTests {
"a window on the same space keeps it open")
store.removeWindow(third)
- store.moveBlankWindow(blank, toSpace: home)
- expect(!store.isBlank(window: blank) && store.focusedSpaceID(window: blank) == home && store.selectedTabID(window: blank) == torn.id
- && store.children(of: store.space(home)!.todayContainerID).first?.id == torn.id && store.space(own) == nil,
- "Move to… puts the window's tabs at the top of the space and the window on it")
+ // Arc 1.172's Move to…: the tabs go to the top of the space's Today, the window lets go of
+ // the open one (AppDelegate opens it in the main window), and closing it leaves them there.
+ let extra = store.createTab(url: "https://example.com/blank-second", window: blank)
+ store.selectTab(torn.id, window: blank)
+ let open = store.moveBlankWindowTabs(blank, toSpace: home)
+ expect(open == torn.id && store.selectedTabID(window: blank) == nil
+ && store.children(of: store.space(home)!.todayContainerID).prefix(2).map(\.id).sorted() == [torn.id, extra.id].sorted(),
+ "Move to… puts the window's tabs at the top of the space and hands over its open tab")
+ store.removeWindow(blank)
+ expect(store.item(torn.id) != nil && store.item(extra.id) != nil && store.space(own) == nil,
+ "and the Blank Window closing afterwards leaves them in the space")
expect(store.item(stays.id) != nil && store.integrityProblems().isEmpty, "and the sidebar stays sound")
store.removeWindow(second)
- store.removeWindow(blank)
store.saveAll()
}
diff --git a/Tests/promises.lock b/Tests/promises.lock
index 4b21cf6..8792ee9 100644
--- a/Tests/promises.lock
+++ b/Tests/promises.lock
@@ -333,15 +333,16 @@
#215 Tests/StoreTests.swift::arcLiveFolderImportsLive a5c462b3a9c7
#218 Tests/Scenarios/extension-popup-download.scenario ffb6285b0eee
#219 Packages/CraCore/Tests/CraCoreTests/TabTearOffTests.swift::aWindowLargerThanTheScreenShrinksToFit bb6acd6907ac
+#219 Packages/CraCore/Tests/CraCoreTests/TabTearOffTests.swift::arcsDropsInTheOpenCentreOnThePointer f1d51bb5e991
#219 Packages/CraCore/Tests/CraCoreTests/TabTearOffTests.swift::inTheOpenTheWindowCentresOnThePointer e47f49e23b09
#219 Packages/CraCore/Tests/CraCoreTests/TabTearOffTests.swift::nearTheTopLeftTheWindowStopsTwentyPointsInside 8d9c09f68118
#219 Packages/CraCore/Tests/CraCoreTests/TabTearOffTests.swift::onlyATabLetGoOutsideEveryWindowTearsOff 9ce1b7ae29d3
-#219 Tests/Scenarios/blank-window.scenario 03b91e82bef5
-#219 Tests/StoreTests.swift::tornOffTabMovesToABlankWindow 099430668766
+#219 Tests/Scenarios/blank-window.scenario cac94fd094a6
+#219 Tests/StoreTests.swift::tornOffTabMovesToABlankWindow 75f5e92c4e8a
#220 Packages/CraCore/Tests/CraCoreTests/BlankWindowTests.swift::aBlankSpaceWithoutItsWindowGoes 9471ebe5290e
-#220 Packages/CraCore/Tests/CraCoreTests/BlankWindowTests.swift::aBlankWindowsSpaceIsThisWindowAndBelongsToIt 308c89d42e0c
+#220 Packages/CraCore/Tests/CraCoreTests/BlankWindowTests.swift::aBlankWindowsSpaceIsThisWindowAndBelongsToIt 2469569cfc5f
#220 Packages/CraCore/Tests/CraCoreTests/BlankWindowTests.swift::noSpaceListShowsABlankWindowsSpace 2f45bf4e2cdd
#220 Packages/CraCore/Tests/CraCoreTests/BlankWindowTests.swift::sidebarWithABlankWindowLoadsAsRecorded 4076c30ec95c
-#220 Tests/Scenarios/blank-window.scenario 03b91e82bef5
+#220 Tests/Scenarios/blank-window.scenario cac94fd094a6
#220 Tests/StoreTests.swift::blankWindowWithoutItsWindow 0de383e3d544
#220 Tests/StoreTests.swift::blankWindows 2703cb42812a
diff --git a/docs/arc-reverse-engineering.md b/docs/arc-reverse-engineering.md
index f429897..87adf26 100644
--- a/docs/arc-reverse-engineering.md
+++ b/docs/arc-reverse-engineering.md
@@ -3327,18 +3327,25 @@ Read from the arm64 slice's Swift field metadata (`__swift5_fieldmd`, case and f
- [O] File ▸ Blank Window ⌃⌘N (AX mods 4), between New Window and New Incognito Window. It opens cascaded from the
window in use with the command bar up. Sidebar: "This Window" (13 pt semibold, glyphs 16.5 pt in, cap top 51.5 pt
from the window's top with the toolbar on), then New Tab (text 20 pt in, top 90 pt): no favorites or empty card, no
- pinned section, no line, no space icons; the Library button and + stay. Colours (window captures, dark, inactive):
- sidebar #313246 → #363247, the empty page area #4F4B5D → #584A5D.
+ pinned section, no line, no space icons; the Library button and + stay, and a click on + does nothing (no menu,
+ no editor, no window). Colours follow macOS (window captures, inactive; light forced with Arc's
+ NSRequiresAquaSystemAppearance): dark, sidebar #313246 → #363247 and the empty page area #4F4B5D → #584A5D;
+ light, sidebar #E3E3F4 → #E9E7F1 and page area #F8F7FA → #FCF9F9.
- [O] With the pointer over its sidebar the header shows "Move to…" (grey #7A7A86, glyphs 153.5–202.5 pt of a 228 pt
- sidebar) in place of the space's •••. [U] What its menu offers: not opened (the button is hover-only and AX
- presses didn't open it).
+ sidebar) in place of the space's •••. It is the Today section header's accessory (`moveToMainWindow`, tooltip "Move
+ to main window"). A click pops a menu up at the pointer listing the spaces as icon + name ("🧑‍💻 Victor"); while
+ it's open the button sits on a pill, white ~10 % over the sidebar (#474757 on #333247), 142.5–215 × 43–70.5 pt.
+ Picking a space moved the window's tab to the top of that space's Today, opened it in the main window (which came
+ forward) and closed the Blank Window.
- [O] Closing a Blank Window drops its standalone container and its tabs: nothing went to StorableArchive.json.
- [O] A sidebar tab dragged out and let go over another app (real HID drags, slow steps; a fast cliclick drag reads as
a click, a press on a non-key window drags the window): the tab leaves the global sidebar and opens alone in a new
- Blank Window the size of the window it came from; that window then showed no tab (the drag had selected it). Let go
- at (350, 300) from the top left with a 1000 × 760 window, the new one sat at (20, 53): 20 pt inside the visible frame
- on both sides. [U] Placement in the open (both later tries read as clicks); Cra centres on the pointer, which fits.
+ Blank Window the size of the window it came from; that window then showed no tab (the drag had selected it). The
+ window centres on where the pointer let go: 926 × 500 dropped at (1100, 700) and (500, 820) from the top left opened
+ at (637, 450) and (37, 570). Near an edge it stays inside: dropped at (350, 300), a 1000 × 760 window sat at
+ (20, 53), 20 pt inside the visible frame on both sides. Drags that read as clicks: the press selected an unloaded
+ tab; select it first, then drag (scratch tool: CGEvent drag with deltas at 60 Hz).
- [O] A tab dropped on a Blank Window's sidebar moved there out of the global sidebar.
- Cra: BlankWindow (Space.standaloneWindowID, saved in sidebar.json outside spaceOrder), SidebarStore.addBlankWindow /
- isStandalone, TabTearOff (decision + frame), SpaceListView.dragEnded, AppDelegate.tearOffTab. "Move to…" lists the
- spaces; picking one moves the window's tabs to the top of its Today and puts the window on it (Cra's choice, see [U]).
+ isStandalone, TabTearOff (decision + frame), SpaceListView.dragEnded, AppDelegate.tearOffTab and moveBlankWindow
+ ("Move to…", `cra://debug?blankMoveTo=<n>`), BlankWindow.theme (Auto).
diff --git a/docs/development.md b/docs/development.md
index bf193f3..5591967 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -171,6 +171,7 @@ opens Settings on a pane.
`cra://debug?dragEnd=<text>` ends a drag of the window's tab whose URL holds the text, let go
with nothing taking it, the way a drag out of the sidebar ends: outside every Cra window it opens
in a new Blank Window (`&at=x,y` picks the point, from the screen's top left).
+`cra://debug?blankMoveTo=<n>` picks the nth space in the Blank Window's "Move to…".
`cra://debug?browserWindows=<label>` logs each browser window's kind (normal, blank, incognito),
space, tabs, open tab and frame; cra.log gets the kinds and counts only.