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.
Download bin fills its square again; tidy-downloads sets itself up with scenario lines
Victor9bd7b7a30b66
diff --git a/Sources/Cra/App/AppDelegate.swift b/Sources/Cra/App/AppDelegate.swiftindex 7d12063..25b630f 100644--- a/Sources/Cra/App/AppDelegate.swift+++ b/Sources/Cra/App/AppDelegate.swift@@ -692,6 +692,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuItemValidation {}// Opens what normally needs a pointer or a held key, for screenshots.if let v = dict["downloads"] { main.sidebarUI.downloadsListOpen = v == "1"; return }+ // The sidebar as if Cra were in front (1) or behind (0), until the app's next activation change:+ // a background test copy is in either state depending on what it was sent.+ if let v = dict["appActive"] { main.sidebarUI.appActive = v == "1"; return }if let v = dict["banner"] { SoftwareUpdater.shared.debugUpdated(v == "none" ? nil : v); return }if let v = dict["bannerReady"] { SoftwareUpdater.shared.debugReady(v == "none" ? nil : v); return }if dict["switcher"] != nil { main.debugTabSwitcher(); return }diff --git a/Sources/Cra/UI/Sidebar/DownloadRenameCard.swift b/Sources/Cra/UI/Sidebar/DownloadRenameCard.swiftindex 7bf8101..5809f19 100644--- a/Sources/Cra/UI/Sidebar/DownloadRenameCard.swift+++ b/Sources/Cra/UI/Sidebar/DownloadRenameCard.swift@@ -66,6 +66,7 @@ final class DownloadRenameCard: NSView {override var isFlipped: Bool { true }/// Arc drew it navy on a dark space; a light space's card is white (Arc's Max picture), not measured.+ /// Arc's #343BD1 text read at 2.6:1 on the navy card; Cra uses #929BFF there (8:1; Victor, 5 Nov 2026).private func style() {let blue = NSColor(hex: dark ? "#929BFF" : "#343BD1")shape.fillColor = (dark ? NSColor(srgbRed: 0x03 / 255, green: 0x06 / 255, blue: 0x1F / 255, alpha: 1) : .white).cgColordiff --git a/Sources/Cra/UI/Sidebar/List/SidebarView.swift b/Sources/Cra/UI/Sidebar/List/SidebarView.swiftindex f9c9dae..46bfcb2 100644--- a/Sources/Cra/UI/Sidebar/List/SidebarView.swift+++ b/Sources/Cra/UI/Sidebar/List/SidebarView.swift@@ -1071,7 +1071,7 @@ final class LibraryButtonView: NSView {binImage.cornerRadius = 8binImage.cornerCurve = .continuousbinImage.masksToBounds = true- binImage.contentsGravity = .resizeAspect+ binImage.contentsGravity = .resizeAspectFillbin.layer?.addSublayer(binImage)bin.addSubview(binTip)bin.isHidden = truediff --git a/Tests/Scenarios/tidy-downloads.scenario b/Tests/Scenarios/tidy-downloads.scenarioindex 030ef4d..9a86801 100644--- a/Tests/Scenarios/tidy-downloads.scenario+++ b/Tests/Scenarios/tidy-downloads.scenario@@ -1,3 +1,7 @@+home+env CRA_TIDY_FAKE_MODEL=1+seed settings.json {"hasSeenImportPrompt": true, "toolbarDefaultMigrated": true, "tidyDownloads": true}+seed windows.json {"sidebarWidth": 266}# A long original name is truncated in a narrow sidebar. Its animated strike must end# inside the card's right padding; the short name below should only be struck through its text.cra://open?url=file://${FIXTURES}/Pages/downloads.html@@ -13,8 +17,10 @@ expect-log Tidy Downloads: renamed a download \(11wait 1snapshot DownloadRenameCard download-rename-short# After the rename card leaves, the download preview still sits over the Library button.-# Both ends of the wide swatch must reach past the edges of the underlying glyph.+# The Library button must not clip it: the bin reaches past the glyph's top and right edges.cra://debug?cdp=Input.dispatchMouseEvent¶ms={"type":"mousePressed","x":36,"y":88,"button":"left","clickCount":1}cra://debug?cdp=Input.dispatchMouseEvent¶ms={"type":"mouseReleased","x":36,"y":88,"button":"left","clickCount":1}wait 9+# A background copy may or may not have been made active: draw the bin as in front (not dimmed).+cra://debug?appActive=1snapshot SpaceDockView download-preview-dockdiff --git a/Tests/Snapshots/download-preview-dock.png b/Tests/Snapshots/download-preview-dock.pngindex 5581420..d67eb92 100644Binary files a/Tests/Snapshots/download-preview-dock.png and b/Tests/Snapshots/download-preview-dock.png differdiff --git a/Tests/Snapshots/download-rename-long.png b/Tests/Snapshots/download-rename-long.pngindex 5bd2440..22790c2 100644Binary files a/Tests/Snapshots/download-rename-long.png and b/Tests/Snapshots/download-rename-long.png differdiff --git a/Tests/Snapshots/download-rename-short.png b/Tests/Snapshots/download-rename-short.pngindex b85dd93..95f6457 100644Binary files a/Tests/Snapshots/download-rename-short.png and b/Tests/Snapshots/download-rename-short.png differdiff --git a/docs/arc-reverse-engineering.md b/docs/arc-reverse-engineering.mdindex 83eb287..0df0a6b 100644--- a/docs/arc-reverse-engineering.md+++ b/docs/arc-reverse-engineering.md@@ -3121,7 +3121,8 @@ Arc Max's renameDownloads: a finished download is renamed on disk and a card abo(FoundationModels, renames the file, DownloadHistory.move, revert), DownloadRenameCard (SidebarView, over the bin).Settings ▸ Max ▸ Tidy Downloads, off by default. Deviations Victor asked for (5 Nov 2026): the body is 71 pt(the old name's baseline as far from the bottom as the label's cap top from the top), and the card stays while the- pointer is on it, then for what was left of its 8 s but at least 3 s.+ pointer is on it, then for what was left of its 8 s but at least 3 s. On a dark space the label and the old name are #929BFF, not+ Arc's #343BD1, which reads at 2.6:1 on the card (PR #197, Quinn Battersby; Victor, 5 Nov 2026).## Little Arc over a full-screen app (Arc 1.171, 5 Nov 2026, issue #186, Victor's Arc + a test full-screen app)diff --git a/docs/development.md b/docs/development.mdindex 3da6669..f076f47 100644--- a/docs/development.md+++ b/docs/development.md@@ -111,7 +111,8 @@ behave. Check those by hand, and say how in the PR.Scenario hooks for a command file (`cra://debug?…`): `checkStore=1` logs a fault per brokensidebar link, `pageJS=<js>` runs script in the focused page, `installExtension=<folder>` and-`removeExtension=<id>`, `extensionAction=<id>`, `fullscreen=1|0`, `windowSize=1280x800`,+`removeExtension=<id>`, `extensionAction=<id>`, `fullscreen=1|0`, `appActive=1|0` (the sidebar drawn as if+Cra were in front or behind, e.g. the download bin's dimming), `windowSize=1280x800`,`snapshot=<ViewClass[,n]>&out=<png>`, `sleepTabs=<seconds>` (the 10 tabs used last too), `memoryPressure=warning|critical` (onememory-pressure sweep at that level, if Settings ▸ Tabs has it on), `stall=<ms>` (blocks the mainthread), `perfReport=<path>` (the recorder's perf.json now), `systemAppearance=light|dark|system`diff --git a/docs/testing.md b/docs/testing.mdindex 54a1b63..81225ab 100644--- a/docs/testing.md+++ b/docs/testing.md@@ -96,7 +96,7 @@ one. Every launch checks the sidebar and logs a fault for each broken link.scripts/scenario.sh all # every one, about 6 minutesA scenario (`Tests/Scenarios/*.scenario`) is a list of `cra://` commands plus a few-directives (`wait`, `repeat`, `budget`, `helpers`, `relaunch`, `expect-log`, `snapshot`;+directives (`wait`, `repeat`, `budget`, `helpers`, `relaunch`, `expect-log`, `snapshot`, `seed`, `env`, `home`;the header of `scripts/scenario.sh` lists them). It runs `build/Cra.app` on a throwaway datafolder, behind your windows (`CRA_TEST_BACKGROUND`), with the fixture pages served from127.0.0.1. Logs, hitch log and snapshots land in `build/scenarios/<name>/`. Adding a journeydiff --git a/scripts/scenario.sh b/scripts/scenario.shindex 1654402..eeb184e 100755--- a/scripts/scenario.sh+++ b/scripts/scenario.sh@@ -27,6 +27,10 @@# snapshot <View[,n]> <name> the nth visible view of that class drawn to PNG and compared with# Tests/Snapshots/<name>.png (CRA_SNAPSHOT_RECORD=1 records it)# fresh no seeded settings: onboarding shows, as on a new Mac+# seed <file> <json> that data-folder file before launch (a seeded settings.json+# replaces the default one)+# env <NAME=value> passed to Cra+# home a throwaway home folder, so downloads stay out of ~/Downloads# requires screen# port <n> serve ${PAGE} on a fixed port (snapshots show the address)# ${FIXTURES}, ${PAGE} (Tests/Fixtures/Pages/page.html from a local server, so it has a host@@ -68,15 +72,16 @@ LOG="$DATA/cra.log": > "$CMD"STARTED="$OUT/started"touch "$STARTED"-# Past onboarding, and nothing taken from this Mac's Arc (its toolbar default) unless asked.+# The scenario's own data files, environment and home folder.app_env=(env)-if [ "$NAME" = "tidy-downloads" ]; then- # Use a disposable Downloads folder as well as a disposable browser profile.+while read -r _ seed json; do echo "$json" > "$DATA/$seed"; done < <(grep '^seed ' "$FILE")+while read -r _ kv; do app_env+=("$kv"); done < <(grep '^env ' "$FILE")+if grep -q '^home$' "$FILE"; thenmkdir -p "$DATA/home/Downloads"- app_env+=(CFFIXED_USER_HOME="$DATA/home" CRA_TIDY_FAKE_MODEL=1)- echo '{"hasSeenImportPrompt": true, "toolbarDefaultMigrated": true, "tidyDownloads": true}' > "$DATA/settings.json"- echo '{"sidebarWidth": 266}' > "$DATA/windows.json"-elif ! grep -q '^fresh' "$FILE"; then+ app_env+=(CFFIXED_USER_HOME="$DATA/home")+fi+# Past onboarding, and nothing taken from this Mac's Arc (its toolbar default) unless asked.+if ! grep -q '^fresh' "$FILE" && [ ! -f "$DATA/settings.json" ]; thenecho '{"hasSeenImportPrompt": true, "toolbarDefaultMigrated": true, "showToolbar": false}' > "$DATA/settings.json"fi@@ -196,7 +201,7 @@ while IFS= read -r raw || [ -n "$raw" ]; do[ -x "$OUT/compare-png" ] || xcrun swiftc -O "$ROOT/scripts/compare-png.swift" -o "$OUT/compare-png" 2>"$OUT/compare-png.log"verdict=$("$OUT/compare-png" "$ref" "$shot" "$OUT/snapshots/$3.diff.png" 2>&1) || problem "snapshot $3: $verdict"fi ;;- fresh|requires|port) ;;+ fresh|requires|port|seed|env|home) ;;*) problem "unknown scenario line: $line" ;;esacdone < "$FILE"