diff --git a/docs/log.md b/docs/log.md index 0a82447..e7e649b 100644 --- a/docs/log.md +++ b/docs/log.md @@ -213,3 +213,29 @@ Append-only. Newest entries at the bottom. A trap: a new target or scheme in `project.yml` is as stale-making as a new Swift file, because the committed project holds `xcshareddata/xcschemes/` - workbench-shell: unchanged. Its hover-at-opacity-0 trap is linked, not copied +## [2026-11-21] sync after 0.6.0: citations, the held tab, CI's seventh job + +Run after the v0.6.0 release. Code had moved under eight pages since each was last checked +(#102, #103, #104, #107, #109). + +- Citations: about 65 `file:line` references pointed at the wrong line and were re-pointed, most of + them in `Sources/App/Workbench.swift`, which had gained about 60 lines. Checked by reading + the line each one names against the symbol the sentence is about +- workbench-shell: the Seal trap named `sealHeldFrontTab`, which #107 removed. Rewritten, and + a trap added for what replaced it: the held picture is an animation anchor only, and the + address row, the lock and the selection follow `benchTab` (manifest v2.1.1) +- accessibility: the held-tab trap says the same in a sentence and links there +- building-without-a-mac: CI runs seven things, not six. A trap: `ui-tests` has no + `needs:`/`if:` pair, so a docs-only pull request still takes an `xcode-27` runner for it +- zest-sound: two traps were wrong. The suites allow no outside host now (fonts and + libraries are vendored), and the kit does ship in the Mac app since ADR 0033 +- zest-window: the two menu routes the accessibility pass added stand down with the rest. + Its `verified_at` named a commit that isn't in the repository; it names one that is now +- releasing-a-preview: where the run says Pro is unlocked, and a trap from this release: + notes and a changelog date written three days early were wrong by the day of the tag +- privacy-and-sandbox: the fixture's Debug-only `UserDefaults` suite, noted as not shipped +- rearranging: citations only +- Not done: no new pages. The commit hook asks for one covering + `Tests/NetRelishTests/Accessibility/UITestFixtureAccessibilityTests.swift`; [[accessibility]] + already describes that test in its fixture trap, so it is added there as a source + diff --git a/docs/operations/building-without-a-mac.md b/docs/operations/building-without-a-mac.md index 1829bdb..c354b30 100644 --- a/docs/operations/building-without-a-mac.md +++ b/docs/operations/building-without-a-mac.md @@ -2,7 +2,7 @@ title: Building without a Mac — CI is the compiler type: operation created: 2026-11-13 -updated: 2026-11-18 +updated: 2026-11-21 sources: - code: .github/workflows/ci.yml - code: .github/workflows/codeql.yml @@ -16,7 +16,7 @@ sources: - code: design/NetRelish.json - code: Resources/PrivacyInfo.xcprivacy - code: Sources/ShareExtension/PrivacyInfo.xcprivacy -verified_at: def9940 +verified_at: 0d45775 --- # Building without a Mac @@ -35,22 +35,22 @@ CI is the compiler and the test runner. This page is the routine, and what goes | If a Swift file was added, removed or moved: regenerate the Xcode project | `.github/workflows/regen-project.yml`, started by hand with the branch name (`.github/workflows/regen-project.yml:19`) | | Read the result of each job and fix | `.github/workflows/ci.yml` | -`.github/workflows/ci.yml` runs six things. Three are free: "What changed" -(`.github/workflows/ci.yml:47`), "Generated files match their sources" -(`.github/workflows/ci.yml:152`) and the CodeQL gate self-test -(`.github/workflows/ci.yml:334`). The two builds (`.github/workflows/ci.yml:194`), the tests -(`.github/workflows/ci.yml:260`) and the PantryKit package -(`.github/workflows/ci.yml:296`) run on `xcode-27`, the only image with the macOS 27 SDK, -and can sit in the queue for a long time. +`.github/workflows/ci.yml` runs seven things. Three are free: "What changed" +(`.github/workflows/ci.yml:48`), "Generated files match their sources" +(`.github/workflows/ci.yml:153`) and the CodeQL gate self-test +(`.github/workflows/ci.yml:390`). The two builds (`.github/workflows/ci.yml:195`), the tests +(`.github/workflows/ci.yml:261`), the UI tests (`.github/workflows/ci.yml:297`) and the +PantryKit package (`.github/workflows/ci.yml:352`) run on `xcode-27`, the only image with +the macOS 27 SDK, and can sit in the queue for a long time. -**Those four paid `xcode-27` jobs now run only when the commit can change what they -compile** (ADR 0037). "What changed" diffs against the base and sets one output the four +**The builds, the tests and the PantryKit package run only when the commit can change what +they compile** (ADR 0037). "What changed" diffs against the base and sets one output they depend on, through the `needs:`/`if:` pair on each of them -(`.github/workflows/ci.yml:200`); a commit touching nothing but `docs/`, `zest/`, +(`.github/workflows/ci.yml:201`, `:210`); a commit touching nothing but `docs/`, `zest/`, `.claude/`, a root `*.md` or the other workflows skips them, and the three free jobs still run. CodeQL skips the same kind of commit through its own `paths-ignore` (`.github/workflows/codeql.yml:241`), analyzes one flavour on a pull request and both on -`main` and in the weekly scan, and CI (`.github/workflows/ci.yml:31`), CodeQL +`main` and in the weekly scan, and CI (`.github/workflows/ci.yml:32`), CodeQL (`.github/workflows/codeql.yml:273`), the Zest suites (`.github/workflows/zest-tests.yml:24`) and the disk-image preview (`.github/workflows/dmg-preview.yml:36`) each cancel a superseded pull-request run. @@ -76,6 +76,13 @@ suites do run in the session. > accepts. The CodeQL workflow does use `paths-ignore`, so **the day `Analyze (swift)` is made a > required check, that filter has to become a job-level gate too** (ADR 0037). +> ⚠️ **`ui-tests` is not behind the gate.** It has no `needs:`/`if:` pair +> (`.github/workflows/ci.yml:297`), so it takes an `xcode-27` runner on every pull request, +> a docs-only one included: it ran on the release-notes pull request for 0.6.0 while the +> builds and the tests were skipped. The gate was written on one branch and the job on +> another, and ADR 0037 says the job takes the same pair when it lands. It hasn't yet. +> Giving it the pair is a change to CI, and Ryan's to approve. + > ⚠️ **"What changed" must fail open.** Every path through its filter either names the files > it found or sets `code=true`: no usable base, a diff that will not run, a bad regex. Being > wrong there costs minutes; being wrong the other way skips the compiler on a commit that @@ -110,7 +117,7 @@ suites do run in the session. > not tell you. > ⚠️ **Only the app's privacy manifest goes in `Resources/`.** Everything in `Resources/` is -> copied flat into the app's Contents/Resources (`project.yml:84`), so a second +> copied flat into the app's Contents/Resources (`project.yml:85`), so a second > `PrivacyInfo.xcprivacy` anywhere in the app's folders fails the build with "Multiple > commands produce". XcodeGen treats a `.xcprivacy` it doesn't know as a resource of the > target whose folder holds it: the Share extension's sits in `Sources/ShareExtension`, the diff --git a/docs/operations/releasing-a-preview.md b/docs/operations/releasing-a-preview.md index 4633bae..6d1c79f 100644 --- a/docs/operations/releasing-a-preview.md +++ b/docs/operations/releasing-a-preview.md @@ -2,7 +2,7 @@ title: Releasing a preview — the Direct build as a disk image type: operation created: 2026-11-13 -updated: 2026-11-18 +updated: 2026-11-21 sources: - code: .github/workflows/release.yml - code: scripts/release_notes.py @@ -10,7 +10,7 @@ sources: - code: Sources/App/License.swift - code: Sources/App/NetRelishApp.swift - code: CHANGELOG.md -verified_at: 2c4c510 +verified_at: 0d45775 --- # Releasing a preview @@ -47,7 +47,10 @@ launch (`Sources/App/License.swift:153`, `Sources/App/NetRelishApp.swift:43`): The workflow's **Leave Pro unlocked** switch builds that one release with an empty address (ADR 0031). It then reads the built app and fails the run if the app does not match the -switch. +switch. When they match it says so as a notice on the build job, "Pro is unlocked in this +build: it has no license address" (`.github/workflows/release.yml:217`). The notice is in +the job's annotations, which can be read without signing in, so a release can be checked +for it afterward. > ⚠️ **`main` has the license address set.** A release started without the switch locks > Pro for everyone who installs it. Until the Creem store issues keys (ADR 0027's last @@ -73,6 +76,13 @@ switch. > next section. The first changelog left #78 to #90 under Unreleased although `v0.5.0` > already contained them, because the 0.5.0 notes named only its headline features. +> ⚠️ **Notes and a changelog date written early are wrong by the time of the tag.** The +> 0.6.0 notes and its changelog section were merged on 2026-11-18, three days and four +> commits before the release: they left out the accessibility pass and dated the release +> the 18th. A second pull request brought both up to `main` on the 21st. Write them last, +> or check both against `git log ..main` and today's date on the day the +> run starts. + > ⚠️ **A job that fails in seconds with no runner and no log never ran.** It says nothing > about the commit. Every workflow failed that way on 2026-11-18, on every runner image at > once, while `main` had passed on the same commit that morning. GitHub's reason is in the diff --git a/docs/reference/privacy-and-sandbox.md b/docs/reference/privacy-and-sandbox.md index 5ef4ab2..666f58e 100644 --- a/docs/reference/privacy-and-sandbox.md +++ b/docs/reference/privacy-and-sandbox.md @@ -2,7 +2,7 @@ title: Privacy and sandbox — what each bundle declares type: reference created: 2026-11-13 -updated: 2026-11-18 +updated: 2026-11-21 sources: - code: Resources/PrivacyInfo.xcprivacy - code: Sources/ShareExtension/PrivacyInfo.xcprivacy @@ -14,7 +14,7 @@ sources: - code: Sources/App/Workbench.swift - code: scripts/tests/test_privacy_manifests.py - code: .github/workflows/ci.yml -verified_at: 38edcae +verified_at: 0d45775 --- # Privacy and sandbox @@ -27,7 +27,7 @@ How the files get into the bundles is [[building-without-a-mac]]. | Bundle | Manifest | UserDefaults reasons | Why | |---|---|---|---| -| NetRelish.app | `Resources/PrivacyInfo.xcprivacy` | `CA92.1`, `1C8F.1` | Tab icons (`Sources/App/Workbench.swift:962`), the Panel's open or closed (`Sources/App/Workbench.swift:1386`), the Brine pill's last-seen date, `brine.seenAt` (`Sources/App/Workbench.swift:1042`), the Direct build's revoked activations (`Sources/App/License.swift:102`); the App Group suite through Pantry | +| NetRelish.app | `Resources/PrivacyInfo.xcprivacy` | `CA92.1`, `1C8F.1` | Tab icons (`Sources/App/Workbench.swift:998`), the Panel's open or closed (`Sources/App/Workbench.swift:1445`), the Brine pill's last-seen date, `brine.seenAt` (`Sources/App/Workbench.swift:1096`), the Direct build's revoked activations (`Sources/App/License.swift:102`); the App Group suite through Pantry | | NetRelishShare.appex | `Sources/ShareExtension/PrivacyInfo.xcprivacy` | `1C8F.1` | Leaves shared pages in the App Group suite (`Sources/Pantry/Store/ShareInbox.swift:33`) | | Pantry.framework, PantryKit | `Sources/Pantry/PrivacyInfo.xcprivacy` | `1C8F.1` | ShareInbox, compiled into the framework; the package lists it as a resource (`Package.swift`) | @@ -37,6 +37,10 @@ How the files get into the bundles is [[building-without-a-mac]]. > for that reason (`Sources/Bench/WindowChrome.swift:139`). A read of a system key needs a > reason the manifest declares, or it doesn't ship. +One more `UserDefaults` use is in Debug builds only: the UI test's fixture empties and opens +a suite of its own (`Sources/App/UITestFixture.swift:87`). The whole file is inside +`#if DEBUG`, so no released build has it ([[accessibility]]). + All three: no tracking, no tracking domains, nothing collected. No other required-reason API is used. `scripts/tests/test_privacy_manifests.py` sweeps each bundle's Swift for them. @@ -56,7 +60,7 @@ is used. `scripts/tests/test_privacy_manifests.py` sweeps each bundle's Swift fo |---|---| | `app-sandbox` | Everything. The Pantry, saved copies and each jar's website data live in the container | | `network.client` | Page loads, StoreKit, the timestamp authority, the Direct build's license relay | -| `files.user-selected.read-write` | Export Proof's save panel (`Sources/App/Workbench.swift:467`) | +| `files.user-selected.read-write` | Export Proof's save panel (`Sources/App/Workbench.swift:488`) | | `print` | File › Print… for the Zest tool in front: Zest MD's Print and Save as PDF (ADR 0033) | | `personal-information.addressbook` | Import from my card, once (ADR 0006); paired with `NSContactsUsageDescription` | | `application-groups` | The Share extension's hand-off (ShareInbox) | @@ -77,7 +81,7 @@ The Share extension has the sandbox and the App Group only. Both builds use the | Request | 1.0 | |---|---| -| Camera, microphone | Refused in the app before macOS is asked (`Sources/Bench/WebView.swift:205`) | +| Camera, microphone | Refused in the app before macOS is asked (`Sources/Bench/WebView.swift:211`) | | Location | Refused: no entitlement | | Passkeys, security keys | Fail until Apple grants the browser passkey entitlement (ADR 0032, open item 1) | | Local network devices | macOS asks, with the line above | diff --git a/docs/subsystems/accessibility.md b/docs/subsystems/accessibility.md index 0018b92..b9aa5ed 100644 --- a/docs/subsystems/accessibility.md +++ b/docs/subsystems/accessibility.md @@ -18,7 +18,8 @@ sources: - code: Sources/Shelf/ShelfView.swift - code: Sources/App/UITestFixture.swift - code: Tests/NetRelishUITests/CaptureJarSealUITests.swift -verified_at: def9940 + - code: Tests/NetRelishTests/Accessibility/UITestFixtureAccessibilityTests.swift +verified_at: 0d45775 --- # Accessibility @@ -32,21 +33,21 @@ forced, are in ADR 0036. This page is how it is put together. The window it sits | Piece | Where | What it does | |---|---|---| -| `NRAnnounce.post(_:priority:)` | `Sources/UI/Accessibility.swift:13` | Speaks a result nothing on screen announces. Posts `.announcementRequested` against the key window, so it is silent when no window is up. | +| `NRAnnounce.post(_:priority:)` | `Sources/UI/Accessibility.swift:15` | Speaks a result nothing on screen announces. Posts `.announcementRequested` against the key window, so it is silent when no window is up. | | `nrSystemAccessibility()` | `Sources/UI/Accessibility.swift:40` | Hands SwiftUI's live `accessibilityReduceMotion` to the design system's `\.nrReduceMotion`. Applied once per window root (`Sources/App/NetRelishApp.swift:93`, `:215`, `:222`). | | `nrFocusRing(cornerRadius:inset:)` | `Sources/UI/Components.swift:114` | The one `--nr-focus` ring (manifest §4, placement 7), with its own `@FocusState` and `focusEffectDisabled()`. `NRFocusRing` (`:82`) is the same ring where the caller already tracks focus. | ## What gets spoken, and by whom Spoken lines are user-facing copy and live as named statics beside the code that fires -them, so a test pins each one: `Workbench.capturedLine` (`Sources/App/Workbench.swift:1611`), +them, so a test pins each one: `Workbench.capturedLine` (`Sources/App/Workbench.swift:1586`), `sealedLine(jarName:)` (`:1210`), `sankLine(titles:)` (`:1074`), `ShelfView.boardLine(jarName:)`, `JarTile.movedLine(jarName:)`, `SmartJarRowView.restoreAnnouncement(jarName:)` (`Sources/Bench/BrineView.swift:207`), `CommandSpeech` (`Sources/App/NetRelishApp.swift:324`). > ⚠️ **A result is spoken once, by one owner.** The address row's status line speaks every -> `fillStatus` change itself (`Sources/Bench/ShellRows.swift:157`), so nothing may also +> `fillStatus` change itself (`Sources/Bench/ShellRows.swift:156`), so nothing may also > announce what `Workbench.report(_:)` already showed. A second announcement is not a > duplicate word on screen — VoiceOver says the whole sentence twice. @@ -74,7 +75,9 @@ hint says what pressing it does. > ⚠️ **The held sealed tab is hidden from VoiceOver.** During Seal's phase B the strip draws > a copy of the sealed tab (`Workbench.sealHeldTab`). It is `accessibilityHidden(true)` as > well as hit-test-free, or VoiceOver finds two tabs with one title and offers actions on a -> tab that is already gone. +> tab that is already gone. The copy is a picture and nothing else: since the v2.1.1 +> security correction the address row, its spoken connection hint and the selected tab all +> follow the page in front, never the copy ([[workbench-shell]]). > ⚠️ **The address field's real `TextField` must stay in the tree and keep the click.** The > styled host and path are an overlay that takes no hits. At opacity 0 VoiceOver loses @@ -99,12 +102,12 @@ at both ends rather than wrapping. The tab strip has the same shape with `focusSection()` so focus arrives as a whole. New keys and menu items are the table in ADR 0036. ⌘L goes through -`Workbench.focusAddress()` (`Sources/App/Workbench.swift:1583`), a counter the address row -watches (`Sources/Bench/ShellRows.swift:161`), because the field is in another view. +`Workbench.focusAddress()` (`Sources/App/Workbench.swift:1558`), a counter the address row +watches (`Sources/Bench/ShellRows.swift:160`), because the field is in another view. > ⚠️ **Every menu route into a jar must play the jar fill.** Tab › Move Tab to Jar > (`Sources/App/NetRelishApp.swift:186`), the tab's own Move to Jar -> (`Sources/Bench/TabStrip.swift:270`) and Brine's Restore all take the drop's path so +> (`Sources/Bench/TabStrip.swift:269`) and Brine's Restore all take the drop's path so > `fillJar(_:)` runs exactly once. A plain `moveTab` is silent and leaves the jar unfilled. > The same trap, from the drag side, is in [[rearranging]]. @@ -112,7 +115,7 @@ watches (`Sources/Bench/ShellRows.swift:161`), because the field is in another v Reduce Motion, Reduce Transparency, Increase Contrast and Differentiate Without Color each change something; the table is in ADR 0036. The alternates are picked per surface — -`ShellInk` (`Sources/Bench/ShellRows.swift:618`) is the shared pair for hairlines and edges +`ShellInk` (`Sources/Bench/ShellRows.swift:609`) is the shared pair for hairlines and edges — because `tokens.css` carries no contrast set yet. > ⚠️ **Read the settings from SwiftUI's environment, not once at launch.** diff --git a/docs/subsystems/rearranging.md b/docs/subsystems/rearranging.md index 27183ea..0822b8f 100644 --- a/docs/subsystems/rearranging.md +++ b/docs/subsystems/rearranging.md @@ -2,7 +2,7 @@ title: Rearranging — right-click and drag on the Shelf and tab strip type: subsystem created: 2026-11-13 -updated: 2026-11-18 +updated: 2026-11-21 sources: - code: Sources/App/Workbench.swift - code: Sources/App/NetRelishApp.swift @@ -12,7 +12,7 @@ sources: - code: Sources/Bench/BrineView.swift - code: Sources/UI/Components.swift - code: Tests/NetRelishTests/RearrangeTests.swift -verified_at: def9940 +verified_at: 0d45775 --- # Rearranging @@ -25,18 +25,18 @@ and tested, see [[building-without-a-mac]]. ## The split: views ask, the Workbench decides The views carry no rules. They call one of a handful of functions on `Workbench`, under -`// MARK: Rearranging` (`Sources/App/Workbench.swift:809`), and those decide what moves +`// MARK: Rearranging` (`Sources/App/Workbench.swift:845`), and those decide what moves and what is left behind. That is why the tests in `Tests/NetRelishTests/RearrangeTests.swift` drive the Workbench directly and never a view. | Gesture | View | Workbench | |---|---|---| -| Slide a jar along the Shelf | `slideGesture` (`Sources/Shelf/ShelfView.swift:178`) | `moveJar(_:to:)` (`Sources/App/Workbench.swift:817`) | -| Move Up, Move Down, color | jar menu (`Sources/Shelf/ShelfView.swift:140`) | `moveJar(_:by:)`, `setTint` | -| Tab onto a tab | `.draggable` + `.dropDestination` on `TabChip` (`Sources/Bench/TabStrip.swift:191`) | `drop(_:onTab:)` (`Sources/App/Workbench.swift:945`) | -| Tab or Brine row onto a jar | `.dropDestination` on `JarTile` (`Sources/Shelf/ShelfView.swift:99`) | `drop(_:onJar:)` (`Sources/App/Workbench.swift:925`) | -| Tab menu | `menu(for:)` (`Sources/Bench/TabStrip.swift:206`) | `togglePin`, `setGlyph`, `copyLink`, `moveTab(_:toJar:)`, `closeOtherTabs` | +| Slide a jar along the Shelf | `slideGesture` (`Sources/Shelf/ShelfView.swift:327`) | `moveJar(_:to:)` (`Sources/App/Workbench.swift:853`) | +| Move Up, Move Down, color | jar menu (`Sources/Shelf/ShelfView.swift:244`) | `moveJar(_:by:)`, `setTint` | +| Tab onto a tab | `.draggable` + `.dropDestination` on `TabChip` (`Sources/Bench/TabStrip.swift:233`) | `drop(_:onTab:)` (`Sources/App/Workbench.swift:981`) | +| Tab or Brine row onto a jar | `.dropDestination` on `JarTile` (`Sources/Shelf/ShelfView.swift:190`) | `drop(_:onJar:)` (`Sources/App/Workbench.swift:961`) | +| Tab menu | `menu(for:)` (`Sources/Bench/TabStrip.swift:248`) | `togglePin`, `setGlyph`, `copyLink`, `moveTab(_:toJar:)`, `closeOtherTabs` | | Jars › Move Jar Up / Down, Tab › Move Tab Left / Right, Tab › Move Tab to Jar | menu bar (`Sources/App/NetRelishApp.swift`) | `moveJar(_:by:)`, `moveTab(_:onto:)`, `drop(_:onJar:)` | > ⚠️ **Every drag and every right-click item needs a menu-bar route too.** A right-click @@ -55,7 +55,7 @@ offset, held to the two ends of the list of jars, and the order is written once `DragPayload.init?(_:)`; anything else dragged in (a link, text from another app) reads as nil and nothing happens. -The thing a drag would land on shows `NRDropMark` (`Sources/UI/Components.swift:147`), +The thing a drag would land on shows `NRDropMark` (`Sources/UI/Components.swift:203`), relish placement 9 in the manifest. A tab or Brine row that lands on a jar also plays the jar-fill drip on its tile: `drop(_:onJar:)` calls `fillJar(_:)` once something landed. The drip itself is [[workbench-shell]]'s. @@ -76,7 +76,7 @@ drip itself is [[workbench-shell]]'s. > ⚠️ **A web view left behind in another window is still a live page.** Until that window > lets it go, it can navigate and report back by tab id. So `tabDidNavigate` -> (`Sources/App/Workbench.swift:987`) is told which jar's web view is reporting and +> (`Sources/App/Workbench.swift:1023`) is told which jar's web view is reporting and > ignores one that isn't the tab's jar, and each window drops moved tabs' web views in > `forgetStale` (`Sources/Bench/BenchView.swift:69`) when the open tabs change. The same > function lets go of pages whose tab was closed in the other window. A new @@ -84,27 +84,27 @@ drip itself is [[workbench-shell]]'s. > ⚠️ **`moveTab(_:toJar:)` clears `interactionState` deliberately.** History and form > state were made with the old jar's sign-ins. The same rule is in -> `restore(_:into:)` (`Sources/App/Workbench.swift:1590`): a Brine row gets its history +> `restore(_:into:)` (`Sources/App/Workbench.swift:1655`): a Brine row gets its history > back only in the jar it sank from. Both look like lost data. Both are the rule. > ⚠️ **Anything that awaits and then acts on a tab must check the tab's jar again.** A > move keeps the tab's id and address, so a check on those two alone passes for a tab that > is now somewhere else. Seal froze a page, came back, and closed the tab in the jar it -> had just been moved to. `closeIfStillOn` (`Sources/App/Workbench.swift:1294`) now -> requires the same jar as well, and so does `toggleReader` (`Sources/App/Workbench.swift:1464`), +> had just been moved to. `closeIfStillOn` (`Sources/App/Workbench.swift:1352`) now +> requires the same jar as well, and so does `toggleReader` (`Sources/App/Workbench.swift:1522`), > which would otherwise lay the old jar's article over the tab in its new jar. > ⚠️ **`sortOrder` has gaps.** Closing or moving a tab does not renumber the strip. A new -> tab takes `max + 1` (`Sources/App/Workbench.swift:741`), never the count of tabs. The +> tab takes `max + 1` (`Sources/App/Workbench.swift:777`), never the count of tabs. The > count put new tabs in the middle of a strip that had lost its first tabs. > ⚠️ **Do not call `load()` after reordering jars.** `load()` resets the active jar from > the database, which throws the user out of Brine or any other smart jar. Use -> `reloadJars()` (`Sources/App/Workbench.swift:812`), which re-reads the order and +> `reloadJars()` (`Sources/App/Workbench.swift:848`), which re-reads the order and > nothing else. > ⚠️ **Every way into a jar plays the jar fill, through `fillJar(_:)`.** A drop on a jar -> calls it in `drop(_:onJar:)` (`Sources/App/Workbench.swift:939`), and Seal's overlay calls +> calls it in `drop(_:onJar:)` (`Sources/App/Workbench.swift:975`), and Seal's overlay calls > it when its chip lands. A new path that puts something in a jar (a menu item, a Shortcut > with a window) must call it too, once, after the write, or the jar's level changes with no > drip and no count badge. @@ -119,7 +119,7 @@ drip itself is [[workbench-shell]]'s. > ⚠️ **Tab icons live in `UserDefaults`, not the Pantry**, because `Tab` has no field for > them (ADR 0028). They are pruned in `forgetGlyphsOfGoneTabs` -> (`Sources/App/Workbench.swift:966`) against every open tab in the database. A test that +> (`Sources/App/Workbench.swift:995`) against every open tab in the database. A test that > sets an icon must give its `Workbench` its own `UserDefaults`, or another test's > Workbench on a different Pantry prunes it. diff --git a/docs/subsystems/workbench-shell.md b/docs/subsystems/workbench-shell.md index c8663c8..cd04f4a 100644 --- a/docs/subsystems/workbench-shell.md +++ b/docs/subsystems/workbench-shell.md @@ -2,7 +2,7 @@ title: Workbench shell — the window's chrome, the Shelf's tiles, Seal's overlay and the jar fill type: subsystem created: 2026-11-18 -updated: 2026-11-18 +updated: 2026-11-21 sources: - code: Sources/App/NetRelishApp.swift - code: Sources/App/Workbench.swift @@ -19,7 +19,7 @@ sources: - code: Sources/UI/FloatShadow.swift - code: Tests/NetRelishTests/ShellMeasureTests.swift - code: Tests/NetRelishTests/Seal/SealPhaseTests.swift -verified_at: 38edcae +verified_at: 0d45775 --- # Workbench shell @@ -36,17 +36,17 @@ copy either. Moving tabs and jars with the mouse is [[rearranging]]; compiling a | Part | Code | |---|---| -| The window's rows, the Panel's slide, ⌘K as an overlay | `ContentView` (`Sources/App/NetRelishApp.swift:187`) | +| The window's rows, the Panel's slide, ⌘K as an overlay | `ContentView` (`Sources/App/NetRelishApp.swift:366`) | | The measures that aren't tokens | `NRShell` (`Sources/Bench/ShellRows.swift:15`), pinned by `ShellMeasureTests` | | Title strip, address row and field, bottom bar | `TitleRow`, `SearchRow`, `AddressField`, `BottomBar` (`Sources/Bench/ShellRows.swift:40`, `:94`, `:182`, `:366`) | | The tabs, their widths, the jar's chip | `TabStrip` (`Sources/Bench/TabStrip.swift:63`), `TabStripLayout` (`Sources/Bench/TabStrip.swift:15`) | | The window's buttons on the 44pt strip | `WindowButtons.place` (`Sources/Bench/WindowChrome.swift:97`) | -| The Shelf's tiles | `JarTile` (`Sources/Shelf/ShelfView.swift:289`) | +| The Shelf's tiles | `JarTile` (`Sources/Shelf/ShelfView.swift:460`) | | The drawn jar and its shades | `NRFilledJar` (`Sources/UI/JarGlyph.swift:255`), `JarPaint.edge300` / `edgeInk` (`Sources/UI/JarGlyph.swift:70`, `:88`) | -| The float shadow | `nrFloat(cornerRadius:)` (`Sources/UI/FloatShadow.swift:33`) | -| Seal's phases | `Workbench.sealActiveTab` (`Sources/App/Workbench.swift:1075`), `sealPhase` (`:1059`) | -| Seal's one overlay | `SealOverlay` (`Sources/Bench/Seal/SealOverlay.swift:27`), placed by `sealOverlay(_:)` and fed by `sealAnchor(_:)` (`Sources/Bench/Seal/SealAnchors.swift:42`, `:34`) | -| The jar-fill drip | `JarFillDriver` (`Sources/Shelf/JarFill.swift:27`), started by `Workbench.fillJar(_:)` (`Sources/App/Workbench.swift:1186`) | +| The float shadow | `nrFloat(cornerRadius:)` (`Sources/UI/FloatShadow.swift:47`) | +| Seal's phases | `Workbench.sealActiveTab` (`Sources/App/Workbench.swift:1129`), `sealPhase` (`:1113`) | +| Seal's one overlay | `SealOverlay` (`Sources/Bench/Seal/SealOverlay.swift:27`), placed by `sealOverlay(_:)` and fed by `sealAnchor(_:)` (`Sources/Bench/Seal/SealAnchors.swift:43`, `:34`) | +| The jar-fill drip | `JarFillDriver` (`Sources/Shelf/JarFill.swift:27`), started by `Workbench.fillJar(_:)` (`Sources/App/Workbench.swift:1244`) | ## Seal: the Workbench decides, the overlay presents @@ -63,16 +63,24 @@ has already happened when it starts B. The overlay only paces the picture, then > Non-negotiable 3. The comp closes it at +640ms; the app can't, because the write can fail > and Seal from Shortcuts has no motion. So the Workbench keeps a picture of the closed tab, > `sealHeldTab`, which the strip draws at its old place through `stripTabs` -> (`Sources/App/Workbench.swift:1162`), and `sealHeldFrontTab` (`:1179`) keeps that picture -> in front and the address field on its address until the chip leaves. A 4s safety task -> (`endSealLater`, `:1141`) lets go of it if no overlay does. - -> ⚠️ **The failure line waits for phase B.** `reportSealFailure` (`Sources/App/Workbench.swift:1127`) +> (`Sources/App/Workbench.swift:1230`). A 4s safety task (`endSealLater`, `:1209`) lets go of it +> if no overlay does. + +> ⚠️ **The held picture is an animation anchor and nothing else.** It is never the selected +> tab, and the address row never reads it: the address, the lock and its spoken hint, and +> the selection all follow the live Bench content, `benchTab` (`Sources/App/Workbench.swift:206`), +> from the moment the tab closes (manifest v2.1.1, a security correction). Before it, +> `sealHeldFrontTab` kept the sealed page's address and lock in the row while another page +> was already in front. Don't bring it back, and don't count a tab's place in `stripTabs`: +> the strip counts places in `workbench.tabs` (`Sources/Bench/TabStrip.swift:107`), so the +> picture is never one of them. `SealPhaseTests` holds this. + +> ⚠️ **The failure line waits for phase B.** `reportSealFailure` (`Sources/App/Workbench.swift:1185`) > says "Couldn’t seal this page" no sooner than 700ms after the press. A test that checks > `fillStatus` after a failed Seal must wait for it, as `SealPhaseTests` does. > ⚠️ **`.sealOverlay(workbench)` must stay before `.ignoresSafeArea`** in `ContentView` -> (`Sources/App/NetRelishApp.swift:227`). Inside the safe-area change, the overlay covers +> (`Sources/App/NetRelishApp.swift:422`). Inside the safe-area change, the overlay covers > the title strip and reads every anchor in the window's own space. Move it after, and the > overlay no longer spans the title strip, so the band and the drops are drawn against a > space that doesn't match where the tabs are (`(unverified)` in a running build). @@ -98,16 +106,16 @@ has already happened when it starts B. The overlay only paces the picture, then > ⚠️ **The address field's real `TextField` must keep the click and stay in the > accessibility tree.** Idle with a page in front, its text is clear and the styled host and -> path are an overlay that takes no hits (`AddressField`, `Sources/Bench/ShellRows.swift:182`). +> path are an overlay that takes no hits (`AddressField`, `Sources/Bench/ShellRows.swift:231`). > At opacity 0, VoiceOver loses "Address" and a click can't place the caret. > ⚠️ **The Panel's inset changes once, after the slide** (`ContentView`'s -> `.task(id: workbench.showPanel)`, `Sources/App/NetRelishApp.swift:236`). A real page +> `.task(id: workbench.showPanel)`, `Sources/App/NetRelishApp.swift:431`). A real page > reflows once and never per frame. Animating the inset itself would resize the web view on > every frame. > ⚠️ **⌘K is an overlay, not a sheet, so nothing gives the keyboard back when it closes.** -> `ContentView` hands it to the page in front (`Sources/App/NetRelishApp.swift:295`). A new +> `ContentView` hands it to the page in front (`Sources/App/NetRelishApp.swift:502`). A new > overlay with a text field needs the same, or typing goes nowhere until the page is > clicked. @@ -118,4 +126,4 @@ has already happened when it starts B. The overlay only paces the picture, then > ⚠️ **A view at opacity 0 leaves the accessibility tree.** A smart-jar row's Restore or Open > button fades in on hover, so the row carries the action itself (`SmartJarRowView`, -> `Sources/Bench/BrineView.swift:219`). Any hover-only control needs the same. +> `Sources/Bench/BrineView.swift:343`). Any hover-only control needs the same. diff --git a/docs/subsystems/zest-sound.md b/docs/subsystems/zest-sound.md index 6191036..1a529bf 100644 --- a/docs/subsystems/zest-sound.md +++ b/docs/subsystems/zest-sound.md @@ -2,7 +2,7 @@ title: Zest sound — one kit, four tools type: subsystem created: 2026-11-13 -updated: 2026-11-13 +updated: 2026-11-21 sources: - code: zest/apps/zest/index.html - code: zest/apps/mail/index.html @@ -11,7 +11,7 @@ sources: - code: zest/tests/sound.js - code: zest/tests/run.js - code: zest/README.md -verified_at: 2c4c510 +verified_at: 0d45775 --- # Zest sound @@ -76,14 +76,17 @@ the toast function takes a sound name, and the copy and download helpers play `d > `offsetParent` and a non-zero box. Ask Playwright (`isVisible`) instead. Two checks > passed for the wrong reason before this was found. -> ⚠️ **The suites allow three outside hosts and no others.** The tools already ask for -> Google Fonts, and Zest MD for cdnjs; the tests abort those requests and fail on any -> other host. Adding a host to that list is a change to what the tools reach, not a test -> fix. - -> ⚠️ **None of this is in the Mac app.** Zest opens inside NetRelish in 1.1 -> (`docs/adr/0015-zest-inside-netrelish.md`). Until then a Zest change is demonstrated in -> a browser, not in the built app. +> ⚠️ **The suites allow no outside host at all.** The fonts and Zest MD's libraries are +> vendored and load from the machine, so `zest/tests/sound.js` aborts every request that +> isn't to `localhost` and fails if one was made. There is no list of known hosts to add to +> any more: a tool that reaches for a host fails the suite, and making it pass means +> vendoring the file, not loosening the test. + +> ⚠️ **The kit ships in the Mac app, unheard.** Since ADR 0033 the tools are bundled in +> NetRelish.app under Window › Zest ([[zest-window]]), and the app's copy carries the same +> kit: `zest/build.sh --app` writes it into `Resources/Zest/`. Whether the sounds play in +> the Zest window has not been listened to `(unverified)`. A change to the kit is still +> proved in a browser by the suites, and reaches the app only through that build. ## Not yet judged diff --git a/docs/subsystems/zest-window.md b/docs/subsystems/zest-window.md index f0b9c5b..d1605e5 100644 --- a/docs/subsystems/zest-window.md +++ b/docs/subsystems/zest-window.md @@ -2,7 +2,7 @@ title: The Zest window — four tools, offline, beside the Bench type: subsystem created: 2026-11-13 -updated: 2026-11-18 +updated: 2026-11-21 sources: - code: Sources/Zest/ZestFiles.swift - code: Sources/Zest/ZestSchemeHandler.swift @@ -20,7 +20,7 @@ sources: - code: Tests/NetRelishTests/Zest/ZestFilesTests.swift - code: Tests/NetRelishTests/Zest/ZestHostTests.swift - code: Tests/Fixtures/zest-fixture.html -verified_at: 74b9df2 +verified_at: 0d45775 --- # The Zest window @@ -46,15 +46,15 @@ and tested only in CI ([[building-without-a-mac]]). | A tool's view | `Sources/Zest/ZestWebView.swift:72` | Every Zest web view's configuration: Zest's store, the scheme, the rule list, the frozen `window.netrelish` stub, and a script in every frame that takes the peer-connection (WebRTC) constructors away | | Where links go | `Sources/Zest/ZestWebView.swift:112` | A pure routing function: a clicked web link opens in the active jar, a link to another tool moves the switcher, blob: and data: pages download, other apps follow the Bench's handoff. It decides downloads too: only the tool's own files, blob: and data: are ever downloaded | | The window | `Sources/Zest/ZestWindow.swift:17` | The tool table, and the window with its segmented switcher; each tool's view is made on first use and kept | -| Gating | `Sources/App/Workbench.swift:240` | While the Zest window is main, `pageInFront` is nil, and Seal, Capture, Reader, Fill from Me, Pin and Close Tab stand down | +| Gating | `Sources/App/Workbench.swift:261` | While the Zest window is main, `pageInFront` is nil, and Seal, Capture, Reader, Fill from Me, Pin and Close Tab stand down. So do the accessibility pass's Tab › Move Tab to Jar, which reads `pageInFront`, and Show Next and Previous Tab, which read `zestInFront` (`Sources/App/NetRelishApp.swift:186`, `:312`) | | Printing | `Sources/Zest/ZestWindow.swift:76` | File › Print… (⌘P) prints the tool in front through WebKit's print operation, Save as PDF included. It stands down while a jar's page is in front | | Acknowledgments | `Sources/App/Acknowledgments.swift:14` | Help › Acknowledgments: a small window with the bundle's copy of `NOTICE`, which lists every third-party library, font and Swift package in the app | ## What leaves a tool - A clicked http(s) link: a new tab in the active jar, in the main window, which is brought - forward or opened (`Sources/Zest/ZestWindow.swift:150`). The main window is the one - `ContentView` registers (`Sources/App/NetRelishApp.swift:250`), never Settings or the + forward or opened (`Sources/Zest/ZestWindow.swift:162`). The main window is the one + `ContentView` registers (`Sources/App/NetRelishApp.swift:443`), never Settings or the Design Kit. It is an ordinary page load, which non-negotiable 5 already allows. - A download (`a[download]` of the tool's own file, a blob: or data: page, a file WebKit can't show): the save panel, through `WKDownload` (`Sources/Zest/ZestWebView.swift:291`). @@ -103,7 +103,7 @@ and tested only in CI ([[building-without-a-mac]]). > (`project.yml:89`). After changing either, the Xcode project is regenerated. > ⚠️ **`zestInFront` only changes once a Zest window has registered.** Any window becoming -> main reaches every `Workbench`; without that guard (`Sources/App/Workbench.swift:268`), a +> main reaches every `Workbench`; without that guard (`Sources/App/Workbench.swift:289`), a > test's window, or the app's own main window appearing, would switch gating off in the > middle of another test.