Repository navigation
feat(desktop): rebuild the macOS app on a glass design system, and fix onboarding's dead ends - #11117
Conversation
Ports the glass vocabulary the app is being restyled onto: behind-window NSVisualEffectView(.hudWindow) pinned to .aqua, a 0.14 scrim, 22pt continuous corners, a broad ambient shadow (r34/0.24/y-10) and a semantic palette built from labelColor x alpha so one value works on any ground. Two rules the system enforces rather than documents: on glass the type ladder has two rungs, not three (tertiary fails AA on the shipped ground), and the accent pins systemBlue rather than controlAccentColor, which macOS lets users set to an off-brand hue that no rendered-pixel check can catch (INV-UI-1). Diverges from the reference implementation in one place: the panel sheen is clipped by the panel's own shape, so it cannot square off the top corners. Open Runde ships with its OFL-1.1 licence text; font registration now sweeps .otf alongside .ttf, and the retired OmiColors palette is deleted rather than recoloured so nothing can reach for an invisible token by accident. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…an exit that explains itself The intro is a six-beat cinematic built on the eight-dot Omi mark: the dots arrive one at a time on their own spring and click, then hand off to the mark's comet pulse. Reduce Motion swaps a different timing table rather than branching, so the eight cues do not become a rattle. It plays once — never on a resume (granting Screen Recording restarts the process by design) and never on a second run — and the flag is written before playback so a crash cannot re-arm it. Sound is an AVAudioEngine graph with the bed on its own mixer, equal-power fades, and recovery on device change. Every asset is generated by a committed script, so nothing here is licensed. The bed carries from the intro into the chat onboarding rather than stopping and restarting. Six proven permission defects are fixed: the Automation prompt no longer blocks the main thread behind a modal dialog; a grant landing after the 20s poll is now detected on reactivation instead of being lost; a Screen Recording grant offers the relaunch it needs to take effect rather than silently claiming success; system audio no longer loops with no escape; Automation state is read fresh rather than one cycle stale; and the AX/event-tap/filesystem probes moved off the main thread. Finishing setup now answers 'what do I do now'. PostOnboardingPromptSuggestions was only ever written by the retired onboarding, so the dashboard guard could never fire and the Chat tab's starter chips were built from an empty array. Both exit paths now save setup-aware guidance, and the orientation card reads the user's real shortcut chords rather than naming defaults they may have rebound. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Push-to-talk was reachable only by holding a modifier. The mic button drives the
same PushToTalkManager rather than opening a second audio path: a click has no
hold, so it takes the double-tap's locked path — click to start, click to send.
It stays live when the shortcut is disabled, because that setting is a shortcut
picker ('Disable' next to the key chooser) and users often turn it off because
the modifier interferes with typing — exactly the people who need a visible
affordance. Blocked-by-quota keeps the button clickable so the upgrade prompt
still appears; .disabled would swallow the click into silence.
Fixes a latent reducer bug found while wiring it: enterLockedListening published
.lock into any active turn, but the reducer only accepts .lock from recording or
pendingLockDecision. From a response phase it was an invalid transition and the
manager still opened a mic for a turn that never entered a recording phase — rare
via double-tap, constant via a button sitting in the composer you watch while the
answer plays.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
The conversion is not cosmetic. OmiColors was a hardcoded dark palette, so on the light-pinned panel every one of ~1,900 call sites resolved to the panel's own colour — surfaces that compiled, drew, and were blank. Sign-in and the chat onboarding were worse: each painted a full-bleed dark photograph over the shell's ground, and their white type survived only because that art hid the panel, so neither could be removed alone. Shell, chat, conversations, memories, tasks, focus, insights, rewind, settings, apps, permissions, the floating bar and every overlay now share one vocabulary (GlassShell / PageGlass / NotchGlass / SettingsGlassKit / OnboardingGlass). The notch pill stays black glass in both themes, and the floating panel keeps its fixed-frame content-morph contract. Bugs found on the way: three filter rows had silently lost their active state when two dark tokens collapsed onto one wash; OmiToggleStyle's 'on' track was white, so every switch in Settings read as off; opaqueGround multiplied into existing alpha so Reduce Transparency never actually became opaque; the markdown renderer drew assistant text white on a light bubble; and DesktopHomeView re-stamped .darkAqua on every window, unpinning the glass it had just set. Purple and Color.accentColor are gone from these surfaces (INV-UI-1) — macOS lets users pick the off-brand hue as their system accent, which no pixel check would have caught. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
There was a problem hiding this comment.
11 issues found across 226 files
Confidence score: 2/5
- In
desktop/macos/Desktop/Sources/MainWindow/Components/ChatInputView.swift, push-to-talk is enabled in the shared composer for task chat, so voice input can be sent to the floating/main-chat flow instead of the selected task thread, risking messages landing in the wrong context — explicitly opt out of push-to-talk at the task call site until task-thread routing is supported. - In
desktop/macos/Desktop/Sources/Onboarding/SecondBrain/SBOnboardingModel+Steps.swift, onboarding resume/advance still performs expensive permission probes on the main actor and Automation checks can run from stale fire-and-forget state, which can cause UI stalls and incorrect step gating — move probes fully off-main and await/serialize Automation state updates before evaluating step progression. - Visual system regressions across
desktop/macos/Desktop/Sources/Theme/InkType.swift,desktop/macos/Desktop/Sources/Theme/InkGlass.swift, anddesktop/macos/Desktop/Sources/FloatingControlBar/NotchGlassChrome.swiftcan lock first-render typography to SF Pro and clip intended glow/rounded panel bounds, weakening status visibility and polish — register fonts before SwiftUI role resolution and apply clipping to the composed panel/content layers (not just backgrounds). - Layout/affordance issues in
desktop/macos/Desktop/Sources/MainWindow/DesktopHomeView.swift,desktop/macos/Desktop/Sources/Onboarding/OnboardingGlassChrome.swift,desktop/macos/Desktop/Sources/MainWindow/Pages/MemoriesPage.swift, anddesktop/macos/Desktop/Sources/FloatingControlBar/PushToTalkButtonTrigger.swiftleave headers under traffic lights, ship dead onboarding progress UI, hide active button labels, and show stale mic-enabled state at quota limits — wire the new progress band into production views, fix contrast tokens, and publish quota-state changes so controls refresh correctly.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="desktop/macos/Desktop/Sources/Onboarding/SecondBrain/SBOnboardingModel+Steps.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/Onboarding/SecondBrain/SBOnboardingModel+Steps.swift:167">
P2: Resuming or advancing through onboarding still runs the expensive permission probes on the main actor despite the off-main refactor, and Automation can be evaluated from stale state because its check is fire-and-forget. Make the first-unasked-step scan asynchronous and await `refreshPermCheckOffMain` before deciding which step to show.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/Theme/InkType.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/Theme/InkType.swift:137">
P2: The first-rendered display roles stay in SF Pro instead of switching to Open Runde because SwiftUI resolves them before `OmiFontRegistration.registerAll()` runs and this cache retains the fallback. Register the fonts before constructing the view tree, or invalidate the resolver cache after registration and trigger a redraw.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/Theme/InkGlass.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/Theme/InkGlass.swift:575">
P2: Rounded clipping currently applies only to the glass background, allowing panel content or modifiers chained after `inkGlassPanel()` to draw through the rounded corners. Apply the shape to the returned panel view as well as the background layers so the glass surface clips its content and overlays consistently.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/Onboarding/OnboardingGlassChrome.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/Onboarding/OnboardingGlassChrome.swift:93">
P2: The new height-relative step transition is never applied to the onboarding flow, so changing steps does not receive the transition this helper defines. Applying it to the current-step container with a stable `.id` and the gated animation would connect the tested behavior to production.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/Onboarding/OnboardingGlassChrome.swift:109">
P2: The new progress band is not wired into any production onboarding view, so the promised dots and fixed-height reservation are dead code and cannot provide the collision/jump fix described in this file. Integrating this band into the real step layouts, or removing it in favor of the existing bar, would make the tested behavior apply to users.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/RewindOnlyView.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/RewindOnlyView.swift:52">
P2: The Rewind Settings window has no glass ground after this replacement, so its content renders directly over the desktop instead of the intended panel. `glassContent()` only pins the color scheme; the settings root should wear the actual titled-window glass surface with `inkGlassPanel(cornerRadius: 0, shadow: nil)`.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/FloatingControlBar/NotchGlassChrome.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/FloatingControlBar/NotchGlassChrome.swift:228">
P2: The collapsed pill's voice/agent glow is clipped off, so the response/status indicator loses its intended halo even though the window reserves glow outsets. Keep the rounded clipping on the surface/content that needs it without clipping these effects, or move the effects outside this modifier.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/Components/ChatInputView.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Components/ChatInputView.swift:86">
P1: Voice input in the task-chat composer is routed to the floating/main-chat flow rather than the selected task thread because this shared composer enables push-to-talk by default. The task call site should opt out until push-to-talk carries the task owner/context, or the voice path should dispatch through `TaskChatState.sendMessage`.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/Pages/MemoriesPage.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Pages/MemoriesPage.swift:3512">
P2: When the user enters memory text, the Add Memory Save button becomes white text on a white surface and its primary action appears blank. Using `Ink.primary` for the active label preserves the intended contrast against the existing `Ink.surface` fill.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/FloatingControlBar/PushToTalkButtonTrigger.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/FloatingControlBar/PushToTalkButtonTrigger.swift:96">
P2: The mic button can remain visually enabled after a quota refresh reaches the monthly limit because this projection depends on limiter state that does not publish changes. Publishing the quota state (or explicitly notifying observers from `applyQuota`/`recordQuery`) would keep the blocked treatment synchronized with the gate.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/DesktopHomeView.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/DesktopHomeView.swift:1457">
P2: In the legacy shell, the title-bar clearance is applied only to `mainContentContainer`, not to its sibling sidebar. With the hidden title bar, the sidebar and settings header still begin in the traffic-light band, so the logo/back button and first controls can sit under the colored window buttons. Applying the clearance to the shared `legacyMainContent` container (and removing the child-only inset) keeps both shell columns clear.</violation>
</file>
Note: This PR contains a large number of files. cubic only reviews up to 200 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
Re-trigger cubic
| var onAttachmentRemoved: ((String) -> Void)? = nil | ||
| /// Shows the push-to-talk mic button. Clicking it drives the same | ||
| /// `PushToTalkManager` turn the keyboard shortcut does. | ||
| var showsPushToTalk: Bool = true |
There was a problem hiding this comment.
P1: Voice input in the task-chat composer is routed to the floating/main-chat flow rather than the selected task thread because this shared composer enables push-to-talk by default. The task call site should opt out until push-to-talk carries the task owner/context, or the voice path should dispatch through TaskChatState.sendMessage.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/MainWindow/Components/ChatInputView.swift, line 86:
<comment>Voice input in the task-chat composer is routed to the floating/main-chat flow rather than the selected task thread because this shared composer enables push-to-talk by default. The task call site should opt out until push-to-talk carries the task owner/context, or the voice path should dispatch through `TaskChatState.sendMessage`.</comment>
<file context>
@@ -76,6 +81,9 @@ struct ChatInputView: View {
var onAttachmentRemoved: ((String) -> Void)? = nil
+ /// Shows the push-to-talk mic button. Clicking it drives the same
+ /// `PushToTalkManager` turn the keyboard shortcut does.
+ var showsPushToTalk: Bool = true
@AppStorage("askModeEnabled") private var askModeEnabled = false
</file context>
| /// so a button can render the blocked treatment without posting the popup. | ||
| /// Posting stays a side effect of actually attempting a turn. | ||
| var isPushToTalkUsageLimitBlocked: Bool { | ||
| !APIKeyService.isByokActive && FloatingBarUsageLimiter.shared.isLimitReached |
There was a problem hiding this comment.
P2: The mic button can remain visually enabled after a quota refresh reaches the monthly limit because this projection depends on limiter state that does not publish changes. Publishing the quota state (or explicitly notifying observers from applyQuota/recordQuery) would keep the blocked treatment synchronized with the gate.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/FloatingControlBar/PushToTalkButtonTrigger.swift, line 96:
<comment>The mic button can remain visually enabled after a quota refresh reaches the monthly limit because this projection depends on limiter state that does not publish changes. Publishing the quota state (or explicitly notifying observers from `applyQuota`/`recordQuery`) would keep the blocked treatment synchronized with the gate.</comment>
<file context>
@@ -0,0 +1,125 @@
+ /// so a button can render the blocked treatment without posting the popup.
+ /// Posting stays a side effect of actually attempting a turn.
+ var isPushToTalkUsageLimitBlocked: Bool {
+ !APIKeyService.isByokActive && FloatingBarUsageLimiter.shared.isLimitReached
+ }
+
</file context>
| /// | ||
| /// Plain `.opacity` under Reduce Motion: the setting is about movement, and a cross-fade is not | ||
| /// movement. Removing the fade too would leave the cards snapping, which is not what was asked for. | ||
| static func onboardingStep(in size: CGSize) -> AnyTransition { |
There was a problem hiding this comment.
P2: The new height-relative step transition is never applied to the onboarding flow, so changing steps does not receive the transition this helper defines. Applying it to the current-step container with a stable .id and the gated animation would connect the tested behavior to production.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/Onboarding/OnboardingGlassChrome.swift, line 93:
<comment>The new height-relative step transition is never applied to the onboarding flow, so changing steps does not receive the transition this helper defines. Applying it to the current-step container with a stable `.id` and the gated animation would connect the tested behavior to production.</comment>
<file context>
@@ -0,0 +1,163 @@
+ ///
+ /// Plain `.opacity` under Reduce Motion: the setting is about movement, and a cross-fade is not
+ /// movement. Removing the fade too would leave the cards snapping, which is not what was asked for.
+ static func onboardingStep(in size: CGSize) -> AnyTransition {
+ guard !InkReduceMotion.isEnabled else { return .opacity }
+ return .opacity.combined(with: .offset(y: OnboardingGlass.stepOffset(inHeight: size.height)))
</file context>
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for the very cohesive macOS design/onboarding push — the direction is understandable, and I’m not asking for this to be split just because it is broad. I do need to hold it before merge because the current head is not buildable and a few user-facing regressions look real on static review.
Blocking items I verified:
- The Desktop Swift release compile currently fails in CI in
OmiOnboardingSound.swift:static let canonicalFormat = AVAudioFormat(...)is rejected under Swift concurrency becauseAVAudioFormatis non-Sendable. That needs to be fixed and the desktop Swift build/test jobs need to go green before this can land. ChatInputViewnow defaultsshowsPushToTalkto true, andTaskChatPaneluses the shared composer without opting out. That makes the task-thread composer show a mic button that drives the globalPushToTalkManager/floating-bar flow instead ofTaskChatState.sendMessage, so voice input can land in the wrong conversation context until task routing is explicitly supported.- Several selected/primary controls are rendering the same token for foreground and fill. For example,
RewindSearchBarusesInk.primaryfor both selected filter text and selected chip backgrounds, and the Rewind retry button usesInk.primaryonInk.primary; those states become unreadable depending on appearance. Please audit the primary/selected states touched by the glass rewrite and use the inverted foreground token where the fill is primary. - The new push-to-talk quota projection depends on
FloatingBarUsageLimiter.serverQuota/optimisticDelta, but those are not published;recordQuery()andapplyQuota()can change the blocked state without causing existing mic buttons to re-render. Please make quota changes observable or explicitly notify before relying on that state for UI.
Also: this PR updates desktop/macos/AGENTS.md with bundled-resource guidance for coding agents. The guidance looks plausible and useful, but because it changes instructions that future AI coding/review agents will load, a human maintainer should confirm the resource-location and manifest-cache guidance is accurate enough to become repo policy.
Once the compile failure and these concrete behavior/contrast issues are fixed, this should be much easier to review as a coherent macOS surface redesign.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
…es legible Walked every settings section, Permissions, Apps and Help in a named local bundle (omi-ui-settings) and looked at each one. Six defects were text that had ended up the colour of its own ground, and they share a cause: the dark palette these surfaces were written against let a saturated system hue carry a word, and on the light panel those hues are *light*. - `SettingsStatusChip` set its label in the tint over 14% of the same tint. `systemGreen` has a relative luminance of ~0.45, so `Granted` measured about 1.6:1 — present and unreadable; `systemOrange` ~2.2:1, `systemRed` ~3.5:1. Every state was under AA and the healthy one was worst. The hue cannot be darkened (these are named system colours by construction), so it moves to a 6 pt disc — a graphical object, which clears 3:1 — and the word takes `Ink.primary`. - Permissions had three badge designs across four rows: Microphone and Notifications each hand-rolled a capsule while Screen Recording and System Audio already used the chip. All four now go through the chip (-97 lines). - `BrowserExtensionSetup.stepBadge` drew a white numeral on `Ink.hairline` — `Ink.surface` is the *inverted* label and is only legible over `Ink.primary`. - `FileIndexingView`'s brain-map phase has two grounds: a black SceneKit scene, or the light panel when the graph is empty. Its white headline, placeholder, glyph and gesture hints were written for the scene and rendered white-on-white in the empty state — the state a first-run user is most likely to hit. - Two state ternaries had collapsed onto one token, so the state was gone: connector rows read the same connected or not, and the Project/Global skill badge was one chip drawn twice over washes 0.015 apart. - The frequency and voice-speed readouts were set in `Ink.accent` on 15% accent (~2.8:1) — the number a slider exists to report was the faintest thing on it. Two are layout rather than colour. General's row icons were bare SF Symbols, so five glyphs of different optical width stepped the title column left and right down the page while Notifications & Privacy next door already used `SettingsIconTile`; they now share the tile, which also stops spending the one accent on decoration that the sidebar's selection needs. Help served Crisp's opaque white page full-bleed with `ignoresSafeArea`, square against the shell's 22 pt corners; it is now inset to the pane gutters and cut to the card corner. Verification — `xcrun swift build -c debug --package-path Desktop` clean; every section walked and every screenshot viewed, before and after. Controls exercised live through the automation bridge and confirmed both in the returned state and in the rendered pixels: notification frequency 0/Off -> 4/High (slider and chip follow), transcription language en -> es, Open Omi shortcut ⌘O -> ⌘J (registered; selection moves in the recorder), plus about / advanced / privacy / rewind snapshots. `AppsPage.swift` stays at 3558 lines; no purple, no `Color.accentColor`. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…rs the whole window
The shell's ground was a SwiftUI `.background { … }` at the root of
`DesktopHomeView`. A SwiftUI background is laid out inside the hosting view's
safe area, and this window is `.hiddenTitleBar`, so its `NSHostingView` reports
`safeAreaInsets.top == 32` — the band the traffic lights sit in. The ground
therefore began 32 pt below the top of the window, and the strip above it was
bare: no material, no scrim, straight through to whatever is behind the app.
`.ignoresSafeArea()` on the content does not move it, because the inset belongs
to the hosting view rather than to anything the content can opt out of.
The owner was the defect, not the drawing. `InkGlassView` already exists to *be*
a ground and host content inside it — the floating bar and the onboarding cards
reach it that way. `ShellGlassGround.dress(_:)` now pairs `WindowGlass.wear`
with installing that view as the window's `contentView` and re-parenting the
`NSHostingView` into it, so the window has one ground by construction: nothing
above it to paint a second, no safe area to be inset by, and autoresizing keeps
it exactly the size of the content view through every resize.
`glassShellGround()` is deleted rather than left as an alias — there is no shape
of the old call that is correct now.
Verification:
- Measured on the running named bundle (omi-glass) over a solid black backdrop
window ordered directly beneath it: before, y = 0...31 pt read (0,0,0) — the
backdrop through bare window — with the ground only starting at y = 32.
- Reproduced hermetically: mounting the shipped chain
Color.clear.inkGlassPanel(cornerRadius: 0, shadow: nil).frame(...) as the
contentView of a 900x600 .fullSizeContentView window puts the material at
(0,0,900,568) — 32 pt short. The new tests assert (0,0,900,600).
- xcrun swift build -c debug --package-path Desktop clean.
- xcrun swift test --package-path Desktop --filter ShellGlassGround — 5 passed.
Failure-Class: none
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Home's palette was mapped onto Ink in the glass conversion, so every colour on the page resolves dark against the light-pinned panel — but the page still painted its own near-black canvas underneath them (HomeCanvasBackground, a literal 0.056/0.058/0.065 gradient with .ignoresSafeArea()). Dark type on a dark canvas inside a light window: the transcript, the greeting, the knows list and the whole connect tray were laid out, hit-testable and unreadable. Screenshots before/after are in the PR body. The canvas is gone; the shell's glassShellGround() is the one ground, which is what HomePalette.paper already documented. Everything the canvas was hiding then had to be converted for real: filled controls picked for a black page (a white Send disc with a black arrow, a white Connect capsule, a white-on-white Stop), white 2–8% tile fills, white "glow" hover strokes and shadows, and hairlines thinned to 30–90% of a separator that is already faint on light. The ask bar's action button is now a value (HomeAskBarPalette) rather than statements inside a view, for the reason OmiToggleStyle.trackFill is one: the failure is a contrast ratio, so it belongs where a hermetic test can measure it. Stop takes the same filled ink disc as Send — a control that thins to a wash the moment a turn starts is a button that disappears exactly when it is the only one. Its resting/engaged wells were one wash 8% apart (~0.4/255 composited), i.e. a focus state nobody could see; they are now the two washes the rest of the glass chrome uses. Also fixes ChatBubble's "Show less", left .white by the conversion, so expanding a long reply offered no way back. Its neighbouring Color.clear-on-both-branches strokes are deleted rather than restyled. Verified on a real build (omi-ui-chat named bundle, automation bridge on 47911): - xcrun swift build -c debug --package-path Desktop — clean - xcrun swift test --filter GlassLegibilityTests — 10 passed - Home/chat, connect tray, dedicated Chat page and the 800pt-wide compact top bar read correctly on the panel (captures attached) - Exercised: send (real turn, reply received), Stop, push-to-talk (ptt_start -> green listening ring -> ptt_stop finalized), Connect toggle and gear by click, Memory pill by click, every /navigate destination, Show more/Show less by click - Not exercised: the hub resting mode (needs an empty chat; reaching it would have deleted real chat history) and the Listening/Capture toggles (starting a real capture on this account); both were read on screen and their actions are untouched by this change. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Conversations, memories, tasks, focus, insights, goals, rewind and the live transcript views still carried the dark-design vocabulary under the converted type, so rows, chips, badges and empty states resolved close to their own ground. The chip ladder is the one worth naming: the filter rows on Conversations, Memories and Tasks had silently lost their active state when two different dark tokens collapsed onto a single glass wash — a filter whose state you cannot see lies about what the list contains. The active chip now takes the same ink its label is set in, at a heavier alpha, so 'on' reads as one object darkening rather than as a second colour. Its test now asserts the ordering rather than the identity of the token that produces it. Pinning the active fill to a named token is exactly what let the defect through the first time: two tokens collapsed onto one wash and the equality assertion still passed. The contract is that active is visibly heavier than rest, so the test measures alpha and requires a real gap. Salvaged from an audit agent that died mid-run; build, brand ratchet, line-count ratchet and the Tasks/Conversations/Memory-atlas parity guards are green. The visual pass over these pages is NOT complete — see the PR body. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…pup on glass The remaining first-run and overlay surfaces still carried dark-design chrome under the converted type. Salvaged from an audit agent that was terminated by an API error after it reported both fixes verified. The onboarding step suites and the two brittle source-scrapes over SBOnboardingView still pass, and the brand ratchet is flat. The visual pass over the floating bar, the notch pill and the full onboarding walkthrough is NOT complete — see the PR body. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
desktop-e2e-flow-coverage --strict requires every changed Sources file to appear in a flow's covers: list. ShellGlassGround owns the window's one ground, so it belongs to the dashboard flow; HelpPage to settings-basic. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Update — the first version of this PR was broken, and here is what was wrongThe original PR was opened having visually verified exactly one screen (sign-in, a self-contained centred card — the least representative surface in the app). Running it revealed the app was unusable. Two distinct root causes, both found by looking rather than reasoning: 1. Home rendered as a black slab with black text. 2. Every window had a 32pt bare strip at the top. The window is Also fixed after looking
Controls were exercised live, not read: a real send returning a reply, push-to-talk start→recording→finalized, nav pills, gear, show more/less, notification frequency 0→4, language en→es, shortcut ⌘O→⌘J. Still open — do not treat this as finished
Operational note worth capturing in the runbook: the documented Sparkle re-sign fix (re-sign frameworks and app with |
… safe Walking all 17 steps of the Second Brain onboarding end to end on a cold first run turned up two defects a new user meets in their first five minutes. The Files step's Continue rendered below the card's lower edge. The card is a fixed 540 x 640 with a bottom-anchored column, and every scroll trigger the view had keys off the conversation (thread, showWidget, streamingText) rather than the widget. A finished file scan swaps a two-line "scanning" widget for a four-element "your profile is ready" one without touching the thread, so nothing scrolled and the step's only proceed action was off the card. showAIAssistants already carried a bespoke onChange for exactly this; SBOnboardingWidgetShape generalises it to every widget that grows in place, so the permission row becoming the relaunch offer and the demo arming its chord are covered too. Onboarding would also persist a bare, unmodified key as the global Ask-Omi hotkey. The shortcut step's global monitor observes keystrokes typed in other applications, which is right for the "press it to test" phase and a hazard while recording: in the walkthrough a bare L typed in a terminal became the chord and was confirmed with "Perfect, that works.". askOmiShortcut is a global hotkey, so that makes every L typed anywhere on the Mac open Omi. Recording now listens only while Omi is active and only accepts a chord carrying at least one modifier — both offered open chords are Command-based and every talk chord is modifier-only, so nothing the step presents is rejected. Finally, SBOnboardingIntroGate.playedKey is named in OnboardingFlow's persisted-key list as a deliberate exclusion: the intro is install-scoped by design, and that file's own contract says every persisted onboarding key must be listed or explained. Verification: built and installed the named bundle omi-v-onboard, drove it through the automation bridge (/health confirmed com.omi.omi-v-onboard before every capture) and cliclick. All six cinematic beats render in order on a genuine first run and the intro does not replay on the second; all 17 steps walked and screenshotted; Allow -> "Waiting for macOS... check again" stays interactive and re-arms after the 20s poll; the drag-to-grant helper appears; both chords were picked, pressed and persisted; the orientation card shows the real Command-O and Option chords with the meetings-only listening line. swift build -c debug clean; swift test --filter "OnboardingFlowTests|SBOnboarding|OmiCinematic|OmiOnboardingSound" -> 139 tests, 0 failures. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
The light glass redesign was reported as laggy, and "the `.behindWindow` blur is expensive" is the hypothesis everyone reaches for first. It is wrong, and it cost a day to establish, so the numbers go in the file rather than in a thread. No behaviour change: comments only. This lands as documentation because the measurement found nothing in the compositing stack worth fixing — shipping a speculative change against a disproven hypothesis would have traded visuals for nothing. Method. The machine is shared with other build agents (load average 18), so absolute timings of the same configuration drift ~50% between runs. Every number below is a *paired* difference: one process alternating between two configurations every 2 s, both arms seeing the same load, thermal state and window-server contention. Harnesses drive real layout + display + commit passes and, for the scroll case, a real NSScrollView. the ground's .behindWindow blur, on vs off +0.065 ms/frame (+0.9%) 3 further .behindWindow panels nested in it +0.13 ms/frame (+1.8%) glassScrollFade's mask, real NSScrollView +0.002 ms/frame (+2.3%) 3 x SwiftUI .shadow(radius: 17) +0.03 ms/frame (+0.5%) WindowServer CPU over the same paired run went 78.9% -> 78.0% with the ground's material hidden, i.e. the ground is inside the noise. The window server caches a blurred backdrop and re-derives it when the backdrop moves, not when the window's own content redraws, so scrolling and navigating cost the blur nothing. The one real cost is mounting rather than drawing: each .behindWindow view registers a sampling region with the window server as it enters a window, ~0.9 ms. Five of them on a navigation is +3.6-4.9 ms (+14% median, reproduced over three runs) against a 27-50 ms page mount, so the glass is a few percent of a navigation and the rest is the view tree being built. A view pool recovers ~1%, confirming the cost is the registration and not the allocation. Also recorded on InkGlassBackdrop: nesting one inside a window that already has a glass ground does not stack two materials, it replaces one with the other, because .behindWindow samples behind the *window*. That is a question about how the surface looks, not about frame rate. Verification: - paired harnesses (ground/panels/shadow, real-scroll, mount, pool), 3 repetitions each; numbers above are medians across repetitions - swift-format-wrapper.sh format -i (clean) - swiftc -parse Desktop/Sources/Theme/InkGlass.swift (no errors) - check_product_file_line_count_ratchet.py --changed-files desktop/macos/Desktop/Sources/Theme/InkGlass.swift: no violation - INV-UI-1: diff names no banned hue Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
`barNotification` dispatches to five cards and exactly one of them — the generic `notificationView` — wore `floatingBackground()` itself. Docked to the notch that costs nothing: every card there sits on `unifiedFloatingSurface`'s opaque black dock shape. Undocked, the notification is a bare sibling of the pill in a `VStack` with no shared ground at all, so the receipt, reach-error, end and suggestion cards each painted their white type straight onto the desktop. Measured on the running bundle over a light window: card text (255,255,255) on a ground of (182,182,182) — 2.03:1, and 1.1:1 on the body copy. Over a dark desktop it looks perfect and nothing logs, which is why it survived the conversion. The ground moves to the one call site that knows which presentation is on screen, so there is one scrim and a sixth card cannot be born invisible. Net zero lines in the ratcheted `FloatingControlBarView.swift` (2666). Verified on the named bundle `omi-v-float`: the same card now renders at 19.16:1, and the notch presentation is unchanged. The new test mounts the real view over a white backdrop and reads back what each of the five cards is drawn on; reverting only the view change fails it on three of them. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…tates visible Six defects left open during the light-glass conversion, all found by looking at the running app rather than at the diff. 1. **Disabled buttons were a smudge, not a button that is off.** `OmiButtonStyle` dimmed the whole control to 0.45, which composites the fill *and* the label toward the same panel, so the pair converges on it. On the light-pinned glass a disabled `.primary` measured 3.36:1 label-on-fill and `.destructive` 1.86:1 — under the 4.5:1 WCAG 2.2 SC 1.4.3 asks of a 13 pt label. Seen live on Settings → About → "Check Now": a grey pill with grey words on it. Disabled is now a named three-token palette (fill / outline / label) measured at 10.1:1, with the retired model kept as the witness that the new bar is not vacuous. 2. **28 dead `Divider().background(Ink.hairline)` calls.** `.background` paints behind the line a `Divider` draws rather than through it, so every one of them silently rendered the untinted system separator while reading like a choice. All 28 — plus the 13 other spellings in the same tree — are now the existing `GlassSeparator`, so a rule in Settings has one name. 3. **The plan chooser nested a card inside a card.** Each plan tile draws its own fill, corner and selected border, and the row was wrapped in a `settingsCard` too. The wrapper is now `settingsGroup`, which carries the `settingId` anchor without the chrome; the tile takes the standard card recipe at rest. 4. **Multi-row cards had no row rules.** Five notification rows and the excluded- app list ran together. 5. **`ChatPromptTimeline` read as a dashed second scrollbar.** `restOpacity` 0.18 of near-black composites ~2x darker than `Ink.separator`; pinned to AppKit's own rule weight instead. 6. **Settings sidebar was on the main sidebar's 260 pt.** Now derived from the longest label rather than chosen. The kit's nominal 196 truncates "Notifications & Privacy", and so does a 4 pt-clearance 216 — both seen on a build — so the width carries explicit slack and the guard asserts the slack. Also fixed while in these files: plan eyebrow, price, "Current Plan" and the Apps connector count were set in `systemGreen`/`systemBlue` on light cards (~1.6-2.4:1); the tint moves to a disc or glyph and the words take ink, which is the fix `SettingsStatusChip` already documents. Verification: built and ran `/Applications/omi-v-polish.app`, walked home/chat, conversations, memories, brain map, tasks, rewind, apps and all nine settings sections through the automation bridge, and opened every capture. Exercised nav pills, gear, chat send/stop/idle, drafts, push-to-talk stop, settings toggles, frequency slider, the shortcut recorder (⌘O→⌘J→⌘O, re-registered), memory search, tag filter, conversation search and selection, and task reorder — all fired. Guard suites: GlassButtonPrimitiveTests (13), ChatPromptTimelineMetricsTests (18), SettingsSidebarItemLayoutTests (2), GlassLegibilityTests (10), SettingsGlassChromeTests (6), GlassContentChromeTests (10) — all pass. Line-count ratchet and e2e flow coverage pass for the touched files. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Profiling the idle glass build showed the unsmoothness is not the glass. On a
static screen with nothing happening, 71% of the main thread's non-idle time was
one 1 Hz timer's gate checks.
`sample <pid> 20 1` on omi-perf-clock (com.omi.omi-perf-clock), app open and
untouched, Rewind capture running in both runs. Main-thread occupancy is the
metric rather than whole-process CPU, which was unusable on a machine running
three parallel agent builds.
before after
main-thread samples 17167 17427
idle (run-loop wait) 16968 17392
BUSY 199 -> 35 (1.16% -> 0.20% of wall, -82%)
119 ProactiveAssistantsPlugin.isInSpecialSystemMode -> 0 on main
22 ConferencingApps.activeScreenSharePresent -> 0 on main
19 RewindOCRService.dHash -> 0 on main
~12 FloatingControlBarWindow.checkCursorScreen -> ~5 (2 displays here)
All three now run on com.apple.root.user-initiated-qos.cooperative. ~20 of the
35 remaining samples are another agent's untracked PerfProbe instrumentation in
this shared worktree, not part of this change; without it the reduction is ~92%.
Measured per-call on this machine (74 on-screen windows):
CGWindowListCopyWindowInfo([.optionOnScreenOnly]) 1.87 ms
CGPreflightScreenCaptureAccess() 6.07 ms
NSWorkspace.frontmostApplication / NSScreen.screens 0.000 ms
The capture tick made two CGWindowListCopyWindowInfo calls per second on the
main actor: ~7 ms of contiguous main-thread block every second, longer than a
120 Hz frame and 42% of a 60 Hz one — a dropped frame every second in any
animation or scroll.
- ProactiveCaptureSystemProbe takes both window-server scans and the TCC
preflight off the main actor in one hop per tick. Every decision is unchanged:
the Mission Control / Exposé / Notification Centre rules moved out verbatim
into a pure function over a window-list snapshot, which the new tests state.
The two failure/recovery paths that cannot await keep a synchronous reading;
they run at most every 5 s and only once capture is already broken.
- RewindOCRService.dHash of the full-screen CGImage — a real decode and
downscale — moved off the main actor. CGImage is immutable and the hash is a
pure function of it.
- CursorScreenTracker arms the floating bar's 250 ms main-queue cursor poll only
while a second screen exists. It started unconditionally and never stopped:
on a single-screen Mac, four run-loop wake-ups a second, forever, to read
NSScreen.screens.count and return. Re-decided from the screen-parameters
notification the bar already observes; multi-screen behaviour is unchanged,
which is why this machine (2 displays) still shows the poll.
- OmiSoundEngine stops its AVAudioEngine once the onboarding bed has faded and
no one-shot voice is playing. It was started and, by design, never stopped —
and the controller is a process singleton, so every session after the intro
held a HAL I/O proc and a render thread open for an engine rendering silence.
The graph stays wired and prepareEngineOnQueue restarts it, so a later cue
still sounds.
Nothing was deleted to save cycles: the waveform still animates while listening,
the response glow still sweeps while Omi speaks, the cursor still follows across
monitors, the bed still plays. Audited and left alone as already correctly
gated: VoiceWaveformBars and NotchVoiceMorphMark (paused: when idle),
ChatOmiMark (static Canvas when not working), NotchResponseGlowView's 24 fps
sweep, the cinematic mark/caret/window-drift clocks, StreamingPCMPlayer's engine.
Verification: swift build -c debug (clean, -warnings-as-errors, Swift 6);
swift test --filter "CursorScreenTrackerTests|ProactiveCaptureSystemProbeTests"
— 12 tests, 0 failures; built and ran the real app and re-took the same sample.
Ratchet: FloatingControlBarWindow 4919 -> 4908, ProactiveAssistantsPlugin
1687 -> 1681; both shrank, baselines lowered with the source.
Failure-Class: none
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
The composer draft was a `@Published` property on `ChatProvider`, which the whole shell observes. Every character typed therefore published on the provider and re-evaluated the entire Home page body and the chat transcript's body. SwiftUI's own change dumper named it as the shell's dominant invalidation source: `DashboardPage: _chatProvider changed` fired 979 times against 129 for navigation, more than every other cause combined. Home compounded it: `homeAskBarWidth(for:)` read the draft and measured the string with AppKit on every page body evaluation, so each keystroke also relaid out the ask bar's whole column. `ChatComposerDraft` now owns the composer text, its draft key and its persistence. `ChatProvider.draftText` stays the accessor, so the provider is still the single owner and the ChatDraftStore write path is unchanged — it just no longer publishes. The views that genuinely track the live text (the input field, and Home's hub column whose width follows the typed string) subscribe through `ChatDraftScope`, which confines per-keystroke invalidation to the composer. Measured (omi-perf-state bundle, real signed-in profile, 800 draft mutations driven through the automation bridge, 30s Time Profiler attach, same machine and driver before and after): main-thread running total 10028ms -> 6682ms (-33%) AG::Graph::UpdateStack::update() 5752ms -> 3083ms (-46%) GraphHost.flushTransactions() 5828ms -> 3235ms (-44%) DashboardPage.body.getter 309ms -> 0ms ChatMessagesView.body.getter 242ms -> 0ms ChatMessagesView.scrollContent 156ms -> 0ms HomeAskBar.body.getter 117ms -> 130ms (unchanged; it must update) Harness overhead was comparable in both traces (bridge 797ms -> 683ms, ChatDraftStore.flush 652ms -> 576ms — the flush is the automation action's, not the typing path's), so the comparison is like for like. A body-evaluation counter compiled into both builds measured 20 keystrokes as +21 `DashboardPage.body` and +21 `ChatMessagesView.body` before, and +0 / +0 after. The counter was removed before this commit. Verified on the real path: built and installed the named bundle `omi-perf-state`, signed in with the real profile, typed into the Home ask bar via the composer, confirmed the draft round-trips (`chat_drafts_snapshot` returns the typed text) and that all five routes still navigate. `ChatErrorStateTests.testSendPreservesDraftUntilTurnIsAccepted` is a static source tripwire; its assertion follows the revision property to its new home and pins the identical guard. The revision semantics it only asserted textually now have behavioral coverage in `ChatComposerDraftTests`. Tests: 152 passed across ChatComposerDraftTests, ChatDraftStoreTests, ChatTimelineContinuityTests, KernelTurnRecordedProjectionTests, FloatingControlBarStateTests and ChatErrorStateTests — the INV-6 continuity guards included. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
`mainContentPresentation`, `mainContentStartupLifecycle` and `mainContentWithLifecycle` each wrapped the entire app content in an `AnyView`, and `authEntryShell` / `shellContent` used `AnyView` returns for what are plain conditionals. Three layers of type erasure sat between `DesktopHomeView.body` and every page, so SwiftUI could not diff the shell structurally across the body evaluations that navigation triggers. The unconditional wrappers become `some View` and the conditional ones `@ViewBuilder`; the modifier chains, lifecycle hooks and branch order are unchanged. Net -19 lines, so the file's ratchet baseline drops to 1849. Honest scope note: this is a structural fix I could not independently measure. Navigation timing through the automation bridge was 71ms median before and 85ms after, but the machine was running five other agents' app bundles at load average 9.5-14 with the window server at 43% CPU, so that delta is noise, not a regression signal — the per-symbol profiler attribution used for the composer fix is load-insensitive in a way wall-clock navigation is not. Kept because it removes a known SwiftUI diffing barrier at the shell root and cannot change behavior. Verified: built clean, launched the `omi-perf-state` named bundle, signed in on the real profile, and navigated Home / Memories / Tasks / Conversations / Settings — every route mounts. Continuity guards pass (152 tests). Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
The draft moved off ChatProvider's published surface into its own owner, so the two new files need a covers: entry or desktop-e2e-flow-coverage --strict fails. chat-hermetic is the flow that exercises the composer. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Home's ask bar is the app's primary composer and shipped missing two of the three controls the other composers carry. There was no microphone at all — push-to-talk reached ChatInputView and AskAIInputView but this third input surface was missed — and Send existed only once you had already typed. Before the first keystroke the bar rendered a paperclip and a Connect chip: a chat box with no visible way to chat, and no way to talk to it. The mic is `PushToTalkMicButton`, the same trigger the other two composers click, so Home enters the one `PushToTalkManager` turn rather than growing a second microphone lifecycle or transcript writer (INV-6). It joins the leading cluster beside the paperclip, matching ChatInputView; the floating bar has no leading cluster to join, so its mic stays beside Send. Send is now always mounted, armed only when there is something to send, and it still routes through the same `handleSubmit` the Return key does — one submit path, not two. Connect keeps its slot only while the bar is at rest, so Send is never competing with a second filled capsule for the same corner. The old rule had a fourth branch that resolved to `EmptyView()`, which is invisible to every check except the eye. It is now a value, `HomeAskBarControls.resolve`, so "Send is always on screen" is a unit test rather than a screenshot. Extracting the cluster into its own file also keeps DashboardPage.swift under its line-count baseline. Verification: - swift build --package-path Desktop — clean - new HomeAskBarControlsTests pin Send in all four non-sending states, Stop during a turn, and Connect yielding the slot once engaged Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
The main window had two chat surfaces. The second one carried its own header
row — a Home pill, an app dropdown, a model chip and copy / clear / settings
icons — stacked under the real navigation, so reaching it showed the user two
navigation bars, two chats and two composers for one conversation.
It was also unreachable. `SidebarNavItem.chat` (index 2) is absent from
`mainItems`, from `TopNavigationRoutes.primaryItems` and from the sidebar rail;
no keyboard shortcut binds it; nothing in the app assigns that index; and
`.navigateToChat` already routed to Home in the legacy shell ("Legacy Home owns
the historic Chat notification contract"). The chat-first shell never hosted it
at all — its `.chat` route renders DashboardPage. The only way in was the
automation bridge's `navigate {"target":"chat"}`, which is how it ended up on
screen during review.
So this removes a destination no navigation offered, not an established one —
INV-NAV-1's "reduced copy" concern does not apply. `navigate {"target":"chat"}`
keeps working and now lands on Home, matching `.navigateToChat`, so every e2e
flow that navigates there still resolves.
Nothing is carried over, because nothing was reachable to carry: the page's
clear-chat, copy-conversation, chat-app picker and AI-settings jump were its
only call sites in the app, so they were already dead to users before this
change. Tracked separately rather than smuggled into a deletion — see the
report; Home should grow an overflow menu for clear/copy.
Also removed in the same change, so nothing is left orphaned: the
`SidebarNavItem.chat` case and its adapters, both ViewExporter registry
entries, the tests that scraped ChatPage.swift by path, and the stale
`covers:` entry that would have failed `desktop-flow-lint.py`. Comments naming
the deleted type are corrected. INV-6's path globs now name DashboardPage,
which is the main-window chat surface they were describing.
Verification:
- swift build --package-path Desktop — clean, no references remain
(`grep -rn ChatPage Desktop/Sources` is empty)
- product-file line-count ratchet re-run and shard lowered
Failure-Class: none
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Rewind's per-app colour came from `abs(appName.hashValue) % 360` at saturation 0.3. Three things follow, and all three were visible on a real day's timeline: - `String.hashValue` is seeded per process in Swift, so an app drew blue this morning and orange after a relaunch. Recognising a day by its shape depends on the colours meaning the same thing tomorrow, so a colour that moves is worse than no colour at all. - A uniform sweep of the wheel spends 90 degrees on one green family and crosses the yellow-green transition, which at that saturation renders khaki. Adjacent segments were routinely indistinguishable. - A third of the wheel is a family INV-UI-1 forbids, and a uniform sweep handed it to a third of all apps. `RewindPalette` replaces the sweep with seven separated hue bands, FNV-1a written out in full so the constants are visible and pinned to this source rather than to the standard library's per-process seed, and one saturation (0.92) with a per-band brightness. Hue never reaches 220 degrees, a clear distance short of where the forbidden family begins. There is deliberately no yellow band: under the luminance cap the white monogram imposes, the best a yellow can do is olive, and a yellow vivid enough to read as gold leaves white type on it at 1.74:1 - so orange to lime is a 54 degree gap the palette never emits from. Wired into `AppIconView`, which is what draws the timeline badge, the filmstrip badge and the search-bar badge. An app whose icon cannot be resolved now gets a monogram disc in its own colour instead of the same grey square as every other unresolvable app. Real icons state their rendering mode rather than letting SwiftUI infer it from an asset that no longer exists after `resizeIcon`, and `resizeIcon` carries `isTemplate` across so the stencil branch is reachable at all. The icon cache is keyed on rendered size as well as name; Rewind draws one app at five different sizes and a name-only key served whichever was requested first, so a 24 pt badge could be a 14 pt render upscaled. Verification: - `xcrun swift test --package-path Desktop --filter "Rewind"` - 105 tests, 0 failures, including 10 new `RewindPaletteTests`. - The brand and legibility assertions run over the palette's whole output domain (all 2503 buckets) and measure the *rendered* colour through both AppKit and SwiftUI, not the constants: max emitted hue 217.97 degrees, worst contrast against white type 3.03:1, luminance 0.151-0.296. - The 14 everyday app names in the test spread across 5 of the 7 families. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…crub A `sample` of the live app during an arrow-key scrub found the main thread 98.1% idle in its event wait (5550 of 5656 samples), with zero SQLite and zero image-decode frames on it. So the scrub was never a main-thread cost: it was latency, and every step paid two avoidable costs on the storage actor before the frame reached the stage. **Rescanning.** A Rewind chunk is inter-frame compressed, so reaching frame n means decoding everything before it. `extractFrameWithAVFoundation` opened a fresh `AVAssetReader` per request and walked from frame 0 every time, making a scrub through a chunk quadratic in its length - frame 0 was decoded again on every single step. `RewindVideoFrameCursor` keeps that reader parked between calls, so a forward step costs one `copyNextSampleBuffer()`. Backward steps and chunk changes reopen, which is what happened on every request before. **Re-encoding.** `loadScreenshotImage(for:)` reached the UI through `loadScreenshotData`, which exists for OCR and therefore re-encoded the decoded frame to JPEG at quality 1.0 so the caller could decode it again. That is paid on every load including frame-cache hits. Video-backed frames now hand the decoded `CGImage` straight across in a `Sendable` box; `CGImage` is immutable once created, so there is nothing to race on. OCR keeps the encoded path it actually wants. Measurement (paired: both configurations alternated inside one process, on a real 18-frame 1512x948 chunk from local capture, so a loaded machine biases both arms equally): scrub all 18 frames, as shipped : 728.4 ms (40.5 ms/frame) scrub all 18 frames, warm cursor : 59.3 ms ( 3.3 ms/frame) 12.3x jpeg round trip, per load : 14.4 ms (paid on cache hits too) cursor vs rescan, centre pixel over all 18 frames: 0 mismatches Also measured and deliberately NOT changed: - One shared `CIContext` instead of one per frame: 22.8 ms vs 23.0 ms for a single decode. Noise. The cursor owns one because it has an obvious lifetime there, not because it is faster. - `RewindViewModel`'s 3-second timeline poll: 0 SQLite frames on the main thread across an 8-second sample. It runs on the database actor and is not what a scrub feels. - `TimeBasedTimelineNSView.draw(_:)`: 70 of 5656 main-thread samples, ~1.75 ms per redraw. Under a frame; left alone. - `RewindOCRService.dHash`: confirmed still off the main actor - it is a static on an actor, and the sample found it only on cooperative pool threads. Verification: - `xcrun swift test --package-path Desktop --filter "Rewind"` - 105 tests, 0 failures, including 6 new `RewindVideoFrameCursorTests` that drive real decoded pixels through `RewindStorage` for forward scrub, backward scrub, out-of-order seeks, concurrent loads (the actor is reentrant while the cursor opens), past-the-end absence, and the main-actor image path. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…al bar `ChatPromptTimeline` drew one hairline mark per user prompt in a gutter the transcript reserved beside its scroller. `positions(count:railHeight:)` spaces those marks 9pt apart and compresses to fit, so a long history painted a dashed column down the full viewport height — a second scrollbar next to the real one. An earlier pass tuned `restOpacity` down to the app's rule weight; a fainter second scrollbar is still a second scrollbar. Delete it rather than dim it: the rail view and its overlay, the mark/active- mark model, `ChatTranscriptGeometry`, the per-row `ChatPromptRowAnchorReporter` that measured prompts for it, and `ScrollPositionDetector`, whose only production consumer was that geometry. Cmd-Up / Cmd-Down prompt stepping goes with it: it lived on the rail's own overlay, had no menu item or other discoverable surface, and does not justify measuring every user row on every layout pass. Closing the rail's gutter fixes the misalignment it caused. The message column was capped at 760pt inside a panel up to 900pt wide, so Home's transcript sat ~55pt inside the ask bar it is supposed to line up with. Rows now use the whole column. (The Home/ChatPage call sites and the flow `covers:` entries for the deleted files landed with the chat-page removal commits ahead of this one.) Tests: `ChatPromptTimelineTests` is deleted with the view it rendered. `ScrollPositionDetectorTests` is deleted with the detector. `ChatTranscriptGestureHarnessTests` loses its rail-tracking case, asserts the burst case through the mounted scroll view instead of through the detector, and gains `testTranscriptRowsReachTheContainerEdgeWithNoReservedGutter` — a behavioral case that reads the mounted transcript's own bitmap, because the reserved gutter was only ever visible as painted pixels; the stack's frame was full width throughout. The static tripwires in `DesktopChatDriftGuardTests` and `AgentPillLifecycleTests` drop their references to the deleted symbols. Verified locally on the omi-scroll named bundle, signed in with real chat history: before/after captures of Home chat show the rail's marks gone from the trailing edge and rows starting flush with the ask bar's left edge. `xcrun swift build -c debug --package-path Desktop` clean; `xcrun swift test --filter "ChatTranscriptGestureHarness|ChatScrollLiveEdge| UserScrollDetector|DesktopChatDriftGuard|ShellGlassChrome|ChatTimelineContinuity| AgentPillLifecycle|GlassContentChrome"` — 182 tests, 0 failures. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…ger asks `ChatMarkMotion.forTool` existed to answer one question — which way should the mark move for the tool that is running — and the previous commit retired the question: the mark does not report tool activity at all now, the card does. The function has no callers left in sources or tests. The `.wave` motion itself stays. It is a capability of the mark's renderer rather than a policy, and unpicking it would take the model's motion parameter, `pendingMotion` hand-off, and snapshot with it — a rewrite of the mark, not a deletion. Verification: xcrun swift build -c debug --package-path Desktop -> Build complete xcrun swift test --filter ChatWorkingIndicatorTests -> 14/14 passed grep -rn forTool Desktop/Sources Desktop/Tests -> no matches The pinned-Xcode-16.4 CI lane is unverified locally. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…eady prints Home rendered the same day name twice, side by side, in two cases: the rail's scope line said "Yesterday" and the results list's pinned day header said "YESTERDAY", on the same baseline about 120 pt apart. It read as one duplicated label. This is fallout from 30d4f9d, which was itself the right fix — two counters ~200 pt apart counted different scopes (the rail counts one day of screen capture, the panel corner counts the whole account) and neither said which. The rail gaining a scope line is correct. Its placement, at the top of the column, put it on the header's baseline. So the scope moves under the caption: the headline group now reads "0 / screen moments / Yesterday". The number still arrives inside its own explanation — 2 pt from the noun, 12 pt from the bars — and nothing of the rail's shares a baseline with the header. Deleting the day word would have reintroduced the defect 30d4f9d fixed, so the word stays and only its position changes. `readAloud` is untouched and still leads with the scope. Speech has no baselines to collide on and no grouping either: a listener gets one linear sentence with no way to glance back, so the scope has to frame the number before the number arrives. Verification: - xcrun swift build -c debug --package-path Desktop — Build complete - xcrun swift test --filter SpineCompositionTests — 29 tests, 0 failures. No test changed: they assert the strings and the spoken order, neither of which this moves. The collision is a stack-order fact with no hermetic seam, so it is held by the comment on `headlineScope` and by a headless render of the rail beside the header at the real 154 pt content width, not by a source-order tripwire. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…it fits
The scope line has to fit the rail's 154 pt column on one line, and 1,808
of the 10,234 day forms `SpineFormat.day` can emit did not. Its widest,
"Wednesday 30 September 2026", is 183 pt — 29 pt of overhang, wrapping to
two lines. Under the caption that orphans "Wednesday 30" directly above
the bars, where a bare number-and-word line reads as another count, which
is the exact confusion this line exists to prevent.
The bug is not the number in the old comment, it is that a width contract
was asserted from a hand-picked example: "Wednesday 6 August 2025" at
153 pt does fit, so the line was declared to fit. Picking a better example
leaves the same mistake available to the next format or font change, so
the fit is now enforced instead. `contentWidth` is one named value that
both the frame and the check read, and `headlineScope` measures the title
through `InkFonts.role` — the same resolution `.inkStyle(.statusLabel, …)`
draws with, so measurement cannot drift from drawing.
When the title does not fit, the weekday is dropped: it is the one word
carrying nothing the rest of the line does not already say, the date alone
identifies the day, and the list header beside the rail still prints the
day in full. That takes the widest scope this can render from 183 pt to
118 pt. A title with no weekday to drop keeps its full text and wraps — a
wrapped day is bad, a silently wrong day is worse.
The `nil` vs `0` distinction is untouched: `headlineScope("")` still
returns nil, so an account with no days claims no scope, and a day nobody
has read still renders "—" over "counting screen moments".
Verification:
- xcrun swift build -c debug --package-path Desktop — Build complete
- xcrun swift test --filter SpineCompositionTests — 31 tests, 0 failures
- The new sweep test asserts the invariant over all 4,327 forms the
formatter emits rather than over another example; run against the
pre-fix `headlineScope` it reports 515 failures, worst 182.7 pt.
- python3 scripts/check_desktop_test_quality.py — OK, at or below baseline
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
`DesktopAutomationSnapshot.homeMode` answered `hub` on every shell that was neither chat-first nor legacy — permanently, for a surface that has no stage. The guard read `!usesChatFirstShell && onDashboard && !useLegacyHomeDesign`, which named `DashboardPage` exactly on the day it was written. Home then became `QueryShellHome` (74436d6), which renders the query surface and never writes the field, so the shell's own `?? "hub"` default became the entire answer. `DashboardPage` owns the stage and is its only writer, so the shell now carries that value or reports nothing. `HomeStageAutomationPolicy` holds the rule: the two chat-first routes that mount `DashboardPage` have a stage and nothing else does — including both halves of the legacy shell, whose Home is the query surface and whose `useLegacyHomeDesign` branch renders `legacyHome`. A fabricated reading is worse than a missing one, because `hub` is plausible. Nothing looked broken while `/state` described a surface that was not mounted: a flow waiting for `chat` waited for a transition that could not arrive, a flow asserting `hub` passed without touching the app, and an agent reading the bridge drew a confident wrong conclusion from healthy-looking evidence. `nil` is what legacy Home has always reported, so every reader already handles it. Failure-Class: FC-unestablished-capability-default Verification: - `xcrun swift test --package-path Desktop --filter "TopNavigationBarLayoutTests| ChatFirstDestinationParityTests|ChatFirstShellTests|MemoryHubBrainMapRoutingTests| TaskReorderMirroredArraysTests|ConversationMergeSelectionTests| HomeRedesignRegressionTests|HomeStageCloseSemanticsTests|DashboardCaptureStateTests| CrispManagerLifecycleTests"` — 102 tests, 2 failures, both pre-existing stale source-scrapes in DashboardCaptureStateTests left behind by cbcc9e6: they assert `.onTapGesture { dismissAppsPopup()`, which that commit replaced with `ShellModalScrim(onTap:)`. DashboardPage.swift is untouched here. - Three new behavioral tests: the legacy shell reports nil whatever it was last told, the chat-first shell carries the owner's value unchanged (and nil before the owner has published anything), and only `.chat` / `.more(.dashboard)` report a stage — every other route clears the field rather than leaving the last mode standing. - `./scripts/swift-format-wrapper.sh lint` on the changed files — exit 0. - `python3 scripts/check_desktop_test_quality.py` — at or below baseline. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
`Apps` is one of the five top-bar pills and the only door to connectors and MCP export destinations — and it was the one destination the bar reaches that `ShellDestination` did not know about, so `unreachable()` could say nothing about it either way. That gap had already been exercised. Home used to carry a second, smaller door: the ask bar's `Connect` tray, whose two `More` buttons opened this same `AppsPage` as a bounded card. It disappeared with the hub when Home became the query surface (74436d6). Nothing was stranded, because this pill was already on the bar — but nothing could have *said* so, and deleting the pill instead would have stranded the catalog in exactly the silence INV-NAV-1 exists to prevent. Proving that took an hour of tracing; the checker should answer it. `reach = .topBar`, `navItem = .apps` — the established page, never a shell-local copy of it. `unreachable()` stays empty today, and removing the pill is now a test failure. INV-NAV-1: touches `TopNavigationDestinations.swift`; guard test `TopNavigationBarLayoutTests` extended in the same commit, and the invariant's Surfaces list now names Apps. The MUST clauses are unchanged — they are already generic over every `ShellDestination` case. Verification: - `xcrun swift test --package-path Desktop --filter TopNavigationBarLayoutTests` — 16 tests, 0 failures, including the new negative proof that a bar without the Apps pill reports `[.apps]` as unreachable. - `./scripts/swift-format-wrapper.sh lint` on the changed files — exit 0. - `python3 scripts/check-swiftlint-baseline.py` — baseline down-only, clean. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
`home-stage.yaml` failed by default. It drove `home_*` bridge actions and waited on `state.homeMode`, but the stage is rendered by `DashboardPage`, which the legacy shell stopped mounting when Home became the query surface (74436d6). S2 passed only off the hardcoded `hub` fallback removed in the previous commit; S3-S6 waited for `chat` / `connect` transitions nothing could produce and timed out, so the flow was red rather than vacuous. The stage still ships — the chat-first shell mounts `DashboardPage` on its Chat route — so the guarantee is real and kept whole. What the flow lacked was the precondition saying which shell it needs. It now takes `chat_first_cohort_named_bundle`, the same one `chat-first.yaml` uses, and S1 asserts `shellVariant: chat_first` before any mode assertion, so a legacy bundle fails immediately and says why instead of timing out on a fabricated field. S1 targets `chat`, not `dashboard`, deliberately: `dashboard` resolves to the More/Dashboard route, where `DashboardPage` is handed an `onOpenPrimaryChat` and `home_open_chat` navigates away to the Chat route rather than opening the inline chat — S3 would have asserted against a page it had just left. New S7 asserts the field clears on navigating away, so the fix in the previous commit has an end-to-end witness and not just unit coverage: a stale `connect` left standing after leaving the stage is the same class of lie as the `hub` the legacy shell used to report. `covers:` gains the three files that now decide whether a stage exists at all. Verification: - `python3 desktop/macos/scripts/desktop-flow-lint.py` — OK (68 flows, 152 registered actions). - `python3 desktop/macos/scripts/check-e2e-flow-coverage.py --strict` — the files this flow covers are all covered; the 8 uncovered entries are other in-flight work (Rewind, Memory hub, shell modal chrome), unchanged by this. - Not executed live: it requires a chat-first cohort bundle, and this branch's live verification is being serialized into one pass. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…s list `desktop-flow-lint` has been red on this branch since 80f55a5 deleted `SBWallpaper.swift` without updating the flow that claimed to cover it. The lint runs in `scripts/pre-push` under CI prediction, so it only wakes when a flow or desktop source changes — which the neighbouring `home-stage.yaml` fix does, surfacing a failure it did not cause. Verification: - `python3 desktop/macos/scripts/desktop-flow-lint.py` — was `1 error(s)`, now `OK (68 flows, 152 registered actions)`. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
… tray `home_connect_toggle` answered "ok" and did nothing on the query-shell Home from the moment that surface landed. It posts a notification only `DashboardPage` observes, and the legacy shell stopped mounting `DashboardPage` in 74436d6. It is the fifth of the `home_*` set. The other four were re-hosted in `QueryShellHome` — whose own comment names this bug, "the bridge answered 'ok' and nothing happened, which is worse than an error" — because that surface still owns what each of them acts on: a chat to open, a panel to close, a question to send, a file to stage. This one has no counterpart there. The query shell has no Connect tray and no control that opens one; `QueryShellRoute` is conversation / memories / brainMap / rewind, with no Apps case at all. Connectors and export destinations live on the Apps page, which has its own top-bar pill and its own bridge route (`navigate apps`). So it refuses instead of pretending, and names the page that does own them. Re-pointing it at Apps was the alternative and is worse: it would keep the "toggle" name over a different destination, so a flow asserting a Connect tray would watch the wrong surface and call it a pass — the same lie in new clothes, and a nav affordance this shell does not offer. The guard reads `homeMode`, which is written only by the view that renders the stage and is nil everywhere else. That is trustworthy only because 5acaeca stopped the shell fabricating `hub` for surfaces with no stage — so the action's refusal and the state a flow asserts on cannot disagree. Where a stage does exist (the chat-first shell's Chat and More/Dashboard routes) the action is unchanged: the guard gates it, it does not retire it. Failure-Class: FC-nonexecuting-verification-command The registry is a verification surface: "a registered verification command must execute the cases it claims to verify; an invocation that can exit 0 without evaluating a single assertion must never report success." A bridge action that posts to nobody and answers ok is that exact shape, and its canonical prevention is what this does — assert the invocation contract where the action is registered, rather than trusting the ok it returns. Verification: - `xcrun swift test --package-path Desktop --filter "HomeStageCloseSemanticsTests| ChatFirstShellTests|TopNavigationBarLayoutTests|ChatDraftStoreTests| HomeRedesignRegressionTests"` — 57 tests, 0 failures. - Two new behavioral tests drive the real `DesktopAutomationActionRegistry` (`registry.perform`): with no stage it returns an error naming the Apps page and an inverted expectation proves the notification is not posted; with a stage it posts and returns no error. - home-stage.yaml S8 asserts the refusal end to end, on the shell state S7 has just established, so the guard has a live-bridge witness and not only unit coverage. The error wording stays pinned in the test, not the flow. - `python3 desktop/macos/scripts/desktop-flow-lint.py` — OK (68 flows, 152 registered actions). - `python3 desktop/macos/scripts/check_desktop_test_quality.py` — at or below baseline; no new source-inspection sites. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Rewind's timestamp pill, zoom cluster and segment chevrons are an overlay on the stage, so they pin to the stage's edges. That is only correct while the photograph fills the stage, and it does not: measured on the running app at its default 1450 pt window, the stage is 2.55 wide while a screen capture is 1.81, so the picture is height-bound with ~201 pt of empty glass down each side. The chevron sat that far from the frame it steps through. This adds the geometry the chrome will pin to instead, as a value rather than arithmetic inside a body: RewindStageFit.pictureRect fits and centres the picture, stageRect names the 18/12 inset both callers were repeating, and pictureRectInStage composes the two so a caller cannot apply one and forget the other. No view changes yet - the chrome and the header weld follow once RewindPage.swift is free. Verification: cd desktop/macos && ./scripts/dev-feedback.py --once swift 'RewindStageFitTests' -> Executed 12 tests, with 0 failures (0 unexpected). PASS in 202.97s The tests assert relations, not pixels: aspect preserved within epsilon at seven ratios across three stages, contained, centred, touching the edge that binds it, the two coordinate spaces exactly one inset apart, and no degenerate input producing NaN or a negative size. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Clicking Filter in Rewind's results drew a 1 pt system-accent rectangle along the window's left, right and bottom edges with a full-width line under the top bar. Same defect class as tonight's modal dim (cbcc9e6) and a different mechanism, which is why the shared scrim could not have caught it: a dim is a *fill*, and this is a *stroke*. `RewindPage` is `focusable()` so its `onKeyPress`/`onScrollWheel` handlers fire wherever the pointer is, and it takes focus back whenever the search field loses it — which is exactly what clicking Filter does. AppKit then strokes a focus effect around whatever holds focus. Around a control that is the point of the effect; around this container it is the shell's whole content area, and the window has no visible extent (`ShellWindowChrome`), so the ring lands on the wallpaper. It is also the system accent, the one hue this product uses nowhere (INV-UI-1). `shellPageKeyboardTarget` names the pair that has to travel together — `focusable()` + `focusEffectDisabled()` + `focused(_:)` — because one half is invisible until it is wrong. The onboarding host reached the same conclusion independently and writes it inline; Rewind wrote only the focusable half. Keyboard focus itself is untouched: the page still takes it and every handler still fires. What is removed is a paint. Also in Rewind's search surface, since these are the files: - **`↵ Search` is gone.** `RewindViewModel` debounces `$searchQuery` and runs `performSearch` 300 ms after you stop typing, so the results have already narrowed by the time a hand reaches Return — and no call site ever passed `onSubmit`, so the button ran an empty closure. `⏎` does nothing different in Rewind, so the dead parameter goes with the hint. Same removal and reason as the home composer's (979a110). - **The day picker's retention note was on the third type rung**, which measures under WCAG AA on glass (`GlassContentChromeTests`). Promoting it alone would have flattened the pair into one voice, so the span line it explains takes the rung above it and medium weight instead: two levels, both legible. - **Two force-unwraps in `historyReach`** collapse into one `atOldestCapture` binding. They could not actually trap — `||` short-circuits before the unwrap — so this is a readability fix, not a crash fix; the real defect was the same predicate written twice, for `disabled` and for the dimming that shows it. Verification: - `xcrun swift build -c debug --package-path Desktop` clean. - `swift test --filter "GlassContentChromeTests|PageGlassLaneTests|ShellModalScrimTests|ShellPageKeyboardTargetTests|RewindHistoryReachTests"` — 34/34. - Mutation-checked both directions. Drop `focusEffectDisabled()` from the primitive and `testAPageScaleKeyboardTargetDrawsNoSystemFocusEffect` fails; `testAnOrdinaryFocusableViewKeepsItsFocusEffect` is the control that stops the first from passing against a harness with no focus effects at all. - `swiftlint-wrapper.sh lint`: the two `RewindPage` violations are gone (14 left, all in another agent's Rewind test files). - `check_desktop_test_quality.py` OK — no new source-inspection sites. `check_brand_ui.py --base origin/main` OK. - **Not exercised in a running app.** The coordinator is serializing live verification into one final pass on `omi-final2`, so no bundle was built. A focus ring has no offscreen seam — `ImageRenderer` has no focus — so the guard is on the environment the effect reads, through a real layout pass. The ring's absence is what the integrated build should confirm. - **CI's pinned Xcode 16.4 lane is unverified locally**; this machine is on Swift 6.2.3 and 16.4 is not installed. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…s them Six source files created tonight had no `covers:` entry, so `check-e2e-flow-coverage.py --strict` was red. Each is routed to the flow that already walks its surface, and where no step actually pressed the control, the step is added rather than the path pasted under the nearest heading. - `MemoryHubPage` / `MemoryEditorSheets` -> `memories.yaml`. S1/S3/S5/S6 already walk the hub's three views; S2c is new, because `memory-crud` writes straight to the view model and never opens the Add/Edit sheets. It stops short of Save: the form, the disabled-Save gate, the pre-filled Edit and both ways out are what has no other coverage, and this flow runs against a real account. - `DismissableSheet` / `ShellModalScrim` -> `apps.yaml` S5b. Apps rides on `PageGlassLane`'s panel, so its connector sheet inherits `.ownSurface` — the tightest paint bound, and the one with the most wallpaper left outside it. S5c pins the log line the barrier emits. - `RewindHistoryReach` / `RewindDatabase+Embeddings` / `ShellPageKeyboardTarget` -> `rewind.yaml` S2b / S3c / S3d. - `ShellConfirmationDialog` -> `settings-basic.yaml` S9b, open-and-cancel only. Three `covers:` claims were false and are corrected in passing. The flow lint only checks `covers:` paths on non-manual tiers, so manual flows can hold a deleted file indefinitely: `onboarding-flow.yaml` still listed `OnboardingWalkthroughOverlay.swift`, deleted in c7d1e6c. And the step text in `memories.yaml` and `apps.yaml` still drove a sidebar and a `Memory` hover menu that no longer exist — `sidebar_apps` and `sidebar_dashboard` match nothing in Sources, and the hub's three views moved onto the page's own switcher. A covers entry whose steps describe a retired control is the same dead claim as a deleted path. Verification: `desktop/macos/scripts/check-e2e-flow-coverage.py --strict` goes 8 uncovered -> 1, the remainder being `DesktopAutomationHomeStageActions.swift`, extracted by another agent after this run began. `desktop-flow-lint.py` is red on `home-stage.yaml` from that same extraction (the `home_*` actions left `DesktopAutomationBridge.swift`, which is the only path `desktop_flow_contract.py` looks in); confirmed pre-existing by stashing this diff and re-running, which reproduces all six errors. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…t the window Settings → Advanced → Reset Onboarding put a dark rectangle on the user's wallpaper — the fourth report of that shape tonight, and the one on the path to the onboarding cinematic. Unlike the previous three it was not a dim anyone in this repo wrote, which is why `ShellModalScrim` could not have caught it and why this site was not in cbcc9e6's migrated-caller list. `.alert` is presented *by AppKit against the host window*, and the backdrop it raises is that window's size. On a titled window that is exactly right: the frame is the app's edge, so dimming to it dims the app. `ShellWindowChrome` took this shell's ground away, so the window is a transparent rectangle noticeably larger than the panels inside it — and the system's own backdrop is then a hard-edged rounded rectangle, window shadow and all, stamped on the desktop. Measured on the live build's captures, dialog closed vs open: every pixel inside the window frame changed, including the wallpaper between the panels and the drag band above the top bar, out to the shadow at x=16…1274 / y=8…814 around a window at 22…1258 / 32…800. Nothing beyond the shadow changed. That is the window, drawn. So the shell draws its own. `ShellConfirmationDialog` is a card over a `ShellModalScrim`: modality stays host-scale (an invisible barrier that swallows clicks and carries cancel), the paint is surface-scale, and which surface that is still comes from the environment `PageGlassLane` publishes — no call site chooses, and this dialog inherits correct bounds anywhere it is mounted. The dim is bounded, not deleted: Escape and click-outside both cancel, which is the only part of `.alert`'s cancel role worth reproducing by hand. The flag moves from `SettingsContentView` to `SettingsPage` because a modal's dim is an overlay and an overlay's extent is the view it is attached to. The card that raises it is a row inside the pane's scroll view; mounted there the dim would have darkened one row. The pane is the deepest surface in the shell that is a laid-out rectangle rather than a scrolling column. Its section list is a sibling outside it and stays clickable, so leaving the section cancels rather than stranding a destructive confirmation over a page it no longer belongs to. `OverlayModalEscapeCatcher` moves onto the card for the same reason it is worth having a rule about: it is a key monitor that registers against the window and returns `nil` from `hitTest`, so the host's extent bought it nothing — and it is the reason the first version of the guard below could not see the dim. Brand: one neutral `Ink` dim, `OmiButtonStyle(.destructive)` on the destructive verb, no hue introduced (INV-UI-1). Verification: - `xcrun swift build -c debug --package-path Desktop` clean. - `swift test --filter "GlassContentChromeTests|PageGlassLaneTests|ShellModalScrimTests|ShellPageKeyboardTargetTests"` — 28/28. - The guard is the existing one extended, on rendered pixels at four window sizes, mutation-checked in both directions and in the direction specific to this defect: * full-bleed the dim → 40 failures; * delete the dim and keep the card → 24; * present nothing at all, which is what a system alert paints into the app's own render tree → the unwrap fails with "the confirmation painted nothing into the app". - `check_desktop_test_quality.py` OK — no source-inspection sites added. `check_brand_ui.py --base origin/main` OK. `swiftlint-wrapper.sh lint`: no violations in these files. - **Not exercised in a running app.** The coordinator is serializing live verification into one final pass on `omi-final2`, so no bundle was built here. The bounds are asserted on pixels rather than on a screenshot; what the integrated build should confirm is the part with no hermetic seam — that the barrier still swallows clicks and that Escape still cancels. - **CI's pinned Xcode 16.4 lane is unverified locally**; this machine is on Swift 6.2.3 and 16.4 is not installed. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…stage Rewind's timestamp pill, zoom cluster and segment chevrons are an overlay on the stage, so they took the stage's edges. That is only correct while the picture fills the stage, and it does not: measured on the running app at a 1450x900 window, the stage is 1382x541 (aspect 2.55) while a screen capture is 1.81, so the picture is height-bound at 979x541 with ~201 pt of empty glass down each side. The left chevron therefore sat ~201 pt from the frame it steps through, reading as a control floating on nothing, and the pill and zoom buttons hugged the panel rather than the picture. RewindStageChrome now takes the frame's size and lays its controls out inside RewindStageFit.pictureRectInStage, so all four sit on the photograph at any aspect ratio. The chevrons move from Ink.rowFill to .regularMaterial for the reason the pill and zoom buttons already had one: they now sit over a picture that can be any colour, and a flat fill legible over a dark editor disappears over a white document. Chrome hides itself until a frame has decoded rather than parking in a corner and jumping. RewindPage stops recomputing the same aspect-fit inline and stops restating the 18/12 stage inset, so the picture and its chrome cannot disagree about where the picture is. Scope: this does not change how much glass sits beside the picture - that is the stage's aspect ratio, and reducing it needs the header rework that is deliberately not in this commit. Separately, ~21% of the stored frame's width is a black band baked into the capture (issue BasedHardware#11207); no layout change can reclaim it. Verification: xcrun swift build -c debug --package-path Desktop -> Build complete (30.04s) ./scripts/dev-feedback.py --once swift \ 'RewindStageFitTests|RewindSurfaceLayoutTests|RewindSearchLayoutTests' -> Executed 36 tests, with 0 failures (0 unexpected). PASS in 42.85s python3 scripts/check_desktop_test_quality.py -> OK, at or below baseline Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…or its gesture
`cbcc9e67ba` replaced Home's `.onTapGesture { dismissAppsPopup() }` and
`{ dismissHomeConnectSheet() }` with `ShellModalScrim(onTap:)`. The
click-outside-to-dismiss contract survived inside the scrim, but the two
tripwires greped `DashboardPage.swift` for the old gesture text, so a
behaviour-preserving change turned them red.
The half those greps were really reaching for -- that a click on the dim runs
the caller's dismiss -- turns out to be observable after all, so it stops being
a string. `ShellModalScrimDismissTests` dispatches a real `leftMouseDown` /
`leftMouseUp` pair into a window hosting the real `ShellModalScrim` and asserts
the caller's action ran. That holds the property the paint tests structurally
cannot: **modality is host scale while only the paint is bounded**. A barrier
clamped to the dim would satisfy every "does not reach the window's edge"
assertion in `ShellModalScrimTests` and leave the undimmed band beside the panel
-- exactly where a user clicks to close something -- inert. Three cases: a click
beside and above the paint still dismisses, a decorative dim
(`blocksInteraction: false`, the goal celebration) does not swallow the pointer,
and end to end through `dismissableSheet` a presented sheet's binding goes false
when you click beside it.
What is left at each Home call site is the wiring only -- that Home hands its
dim a dismiss action at all. That is not observable: `isShowingAppsPopup` and
`selectedImportConnector` are private `@State` on a view needing five live
providers to mount, so the popup cannot be raised and clicked from the test
host. Both assertions stay source reads of `DashboardPage.swift`, which is the
file that owns the wiring, but they now name the primitive and the exact action
(`ShellModalScrim(onTap: dismissAppsPopup)`) rather than a gesture shape, each
with an `omi-test-quality: source-inspection` reason and a failure message
saying what breaks for the user. Nothing was deleted, so no guarantee was lost.
Verification (Swift 6.2.3 locally; the pinned Xcode 16.4 CI lane is not
installed on this machine and is unverified here):
- `xcrun swift build -c debug --package-path Desktop` -- clean.
- `swift test --filter 'DashboardCaptureStateTests|RewindAllTimeSearchTests|
RewindHistoryReachTests|RewindRetentionCleanupTests|PageGlassLaneTests|
ShellModalScrimTests|ShellModalScrimDismissTests'` -- 48 executed, 0 failures.
Before: `testHomeMoreUsesAppsPopup` and
`testHomeConnectSheetsUseHomeScopedPresentation` failed.
- Mutation-checked the new tests, both caught: clamp the barrier to the painted
frame -- the "beside"/"above" clicks and the end-to-end sheet fail while the
centre click still passes, proving the harness sees taps at all; drop
`onTap?()` from the barrier -- all four dismiss assertions fail.
- Deterministic: SwiftUI recognises the tap inside `sendEvent`, so there is no
sleep and no run-loop pump; the suite runs in 0.09s.
- `python3 scripts/check_desktop_test_quality.py` -- OK, at baseline
(55 files / 148 sites / 19 waits): the behavioural file reads no source and
adds no wait, and the two Home tests reuse the existing reader.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Tonight's Rewind commits added 14 force-unwraps and implicitly unwrapped optionals across three test files, and this is not a lint nit here: a bare `firstPage[0]` in this exact suite trapped on an empty array and killed the `xctest` process, hiding every result after it. That is why nobody had a complete suite run until an hour ago. A trap takes the run down; `XCTUnwrap` reports one failure and lets the other 4,000 tests finish. - `RewindAllTimeSearchTests` (10): seven date-arithmetic `!`s become `XCTUnwrap`, including the one inside the `expected` map, which becomes a throwing map. `testUserId` and `userDir` were only ever used where they were made, so they stop being suite state and become `setUp` locals; `storageRoot` is the one `tearDown` needs back and becomes a plain optional, which `tearDown` already read with `if let`. - `RewindHistoryReachTests` (2): the `day(_:_:_:)` fixture builder now throws rather than traps, so its two callers become `throws` tests. Its timezone force-unwrap goes away entirely -- `TimeZone.gmt` is non-optional and above the macOS 14 deployment floor. - `RewindRetentionCleanupTests` (2): the year-old fixture date becomes `XCTUnwrap`, and `storageRoot` follows the same local-plus-optional shape as above. The remaining implicitly unwrapped optionals in that file are the committed SwiftLint baseline's, not this change's, and are left alone. No unwrap here was load-bearing in a way `XCTUnwrap` changes: every one is calendar arithmetic or a fixture path whose failure means the test's own setup is broken, which is precisely what should be reported as a failure rather than a crash. Verification (Swift 6.2.3 locally; the pinned Xcode 16.4 CI lane is not installed on this machine and is unverified here): - `desktop/macos/scripts/swiftlint-wrapper.sh lint` -- 0 violations in 1,153 files, down from 14. (The two in `Sources/Rewind/UI/RewindPage.swift` that were outstanding when this started are another agent's and already landed.) - `swift test --filter 'RewindAllTimeSearchTests|RewindHistoryReachTests| RewindRetentionCleanupTests'` -- green, inside a 48-test run with 0 failures. - `xcrun swift build -c debug --package-path Desktop` -- clean. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…vocabulary out Two extractions, both cohesive units that were buried in files big enough to be pinned by the line-count ratchet, and both taking their file back under baseline. **The five `home_*` bridge actions** → `Automation/DesktopAutomationHomeStageActions.swift`. They share a failure mode, not just a prefix: the stage is rendered by one view, so when a shell stops mounting it every one of them posts into an empty room. Four were re-hosted on the query-shell Home when that happened and `home_connect_toggle` was not — a divergence that is obvious when the five sit on one page and invisible when they are spread through a 4,400-line registry, which is exactly how the inert one stayed inert. Registered from `registerBuiltins()` the same way `registerOpenOmiShortcutActionsForQA()` already is. **`resolvedAutomationTarget`** → `SidebarNavItem.automationDestination(named:)`. Pure string→destination mapping with no shell state, and the exact counterpart of `ChatFirstRoute.automationVisibilityDestination(named:)`, which already lives as a static on its route type. A vocabulary two shells must agree on belongs to the destination, not to whichever view is holding the `switch`. As a `private func` inside `DesktopHomeView` nothing could call it and no test could reach it; it now has one, covering every name the bridge advertises. I first tried moving the whole automation surface (`reportAutomationState` and the navigation handlers) into a `DesktopHomeView` extension. That reaches ~20 private stored properties, so it would have widened the shell's entire private state to the module — far too much encapsulation for the four lines it was worth. Reverted in favour of the pure seam above. Baselines lowered to the true counts, by hand rather than `--update-baseline`: that mode rewrites every entry in the shard, including files belonging to other in-flight work whose sources are not in this diff, which the checker then rejects. DesktopAutomationBridge.swift 4478 -> 4430 DesktopHomeView.swift 1666 -> 1641 No behavior change; both extractions are moves. Verification: - `python3 .github/scripts/check_product_file_line_count_ratchet.py --changed-files <full PR diff> --base origin/main` — "OK: no line-count increase across 304 changed product source file(s)." - `xcrun swift build -c debug --package-path Desktop` — Build complete. - `xcrun swift test --package-path Desktop --filter "HomeStageCloseSemanticsTests| TopNavigationBarLayoutTests|ChatFirstShellTests|ChatDraftStoreTests| AgentContinuityGauntletTests|ChatFirstDestinationParityTests"` — 67 tests, 0 failures. The gauntlet and draft-store suites are in there because both assert against the action registry the first extraction moved code out of. - `./scripts/swift-format-wrapper.sh lint` on both new files — exit 0. - `python3 scripts/check_desktop_test_quality.py` — at or below baseline. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…on routes
Moving the five `home_*` actions into their own file took them out of view of the
two checks that police bridge actions, because both resolve action names from a
pinned path list rather than by scanning the tree:
- `desktop-flow-lint` reported `unknown bridge action 'home_connect_toggle'` for
every step that drives one — 152 registered actions became 147, and a flow
asserting a real action looked like a typo.
- `desktop-e2e-flow-coverage --strict` had no flow claiming the new file.
Both are one-line registrations: the source path joins
`ACTION_SOURCE_RELATIVE_PATHS`, whose own comment asks for exactly this ("keep
the flow lint reader and CI impact resolver on this single list so an added
bridge action cannot skip its flow validation route"), and the file joins the
`covers:` list of `home-stage.yaml`, the flow that drives all five.
Verification:
- `python3 desktop/macos/scripts/desktop-flow-lint.py` — was `6 error(s)`, now
`OK (68 flows, 152 registered actions)`, the same count as before the move.
- `python3 desktop/macos/scripts/check-e2e-flow-coverage.py --strict --base
origin/main` — `Uncovered: 0`.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
…e pointer
The metadata band under an assistant reply was zero-height at rest and took its
intrinsic height on reveal, so a hovered row was ~16 pt taller than the same row
unhovered and every row below it shifted down. Scrolling happens with the
pointer over the transcript, so rows entered and left hover continuously during
a gesture and the document reflowed under the cursor.
The band now always measures zero and draws out of that frame into the 16 pt gap
the transcript already keeps after an assistant row — which is what
`ChatTranscriptLayout` already documented as the intent ("the row whose
hover-revealed metadata band draws into the space below it, so that space has to
exist"). Only the layout height was wrong. No height is re-reserved, so the
~20 pt per assistant turn that 36060d4 deliberately removed stays removed.
The comment claiming the band "only grows downward, into a row the pointer is
inside, so it cannot flicker" was reasoning about painting, not layout, and is
corrected. Because the controls now sit outside the row's bounds, the band
carries its own hover so it stays open while the pointer is on them; that hover
is inside `allowsHitTesting`, so a hidden band can never reveal itself.
`ChatTranscriptGestureHarnessTests.testFastTraversalKeepsTheTranscriptDocumentHeightStable`
was the symptom, and it was not hermetic: the same binary passed or failed
depending on where the physical mouse was — 7789 pt with the pointer over the
harness window, 7773 pt with it on another display. Its docstring blamed
materializing off-screen rows. Both are corrected. Height is now hover-invariant
by construction, so the deterministic guard is a new hermetic test that reveals
the band through a seam and measures the row in both states; hover itself is not
drivable from a test process, which is never the active application.
Verification (local, Swift 6.2.3 — the pinned Xcode 16.4 CI lane is not
installed on this machine and is unverified locally):
- `xcrun swift build -c debug --package-path Desktop` — clean.
- New guard against the pre-fix frame: 37.0 pt revealed vs 21.0 pt collapsed,
the same +16 pt the harness measured. Against the fix: equal within 0.5 pt,
and the revealed band still paints (>20 pixels differ from the hidden render).
- `--filter ChatTranscriptGestureHarnessTests` — 16/16 green on two runs, both
with the physical pointer inside the harness window (cursor at 450,780 and
551,614; the window occupies x 0…900, y 480…1080 on the main display). That
is the case that failed before this change.
- `--filter "ChatTimelineContinuity|DesktopChatDriftGuard|ChatSurfaceBoundsTests|QueryComposerTests"`
plus the new tests — 85/85 green.
- `scripts/check_desktop_test_quality.py` and the product line-count ratchet
(baseline raised 1994 → 2020 with a justification) both pass.
Failure-Class: none
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Resolves one conflict in Rewind/Core/RewindModels.swift: upstream landed the same PersistableRecord -> MutablePersistableRecord fix for Screenshot's rowid independently. The declaration is identical on both sides and merged cleanly; only the doc comment conflicted. Kept this branch's wording, which states the mechanism (a mutating didInsert is not a witness for the non-mutating requirement, so it compiles, never runs, and every insert returns id == nil). Verified: xcrun swift build -c debug --package-path Desktop -> Build complete (81.76s) with the merge applied. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
… suite `test_unknown_declaration_fails` errored in tearDown, not in its assertions: `TemporaryDirectory.cleanup()` raised `OSError: [Errno 66] Directory not empty` on the synthetic repo's `.git`, which can still be receiving background writes when the test finishes. A strict rmtree races those writes. Cleanup says nothing about what the test verified, so a temp directory the OS will reclaim anyway must not be able to fail the suite. Uses `shutil.rmtree(ignore_errors=True)` and detaches the finalizer so the same race cannot resurface at interpreter exit. Verified: python3 scripts/test_failure_class.py -> Ran 17 tests, OK (previously: FAILED (errors=1)). Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q
Failure-Class: none
Failure-Class: none
Failure-Class: none
`?lab=1` already indexes every production surface and deterministic state with a mobile/desktop compare view. The four surfaces added tonight were reachable only by hand-typed URL, which in practice means not reachable. This is deliberately the lab and NOT the navigation island. Chat, Settings and Listen have no visible nav destination, and inventing a slot for them in the shipped chrome is a design decision belonging to the Ink/WindowGlass source of record (PR #11117), not to a surface author at 4am. Widening the chrome route union so they stop borrowing Home's highlight was the correct scope; adding destinations is not. Flagged in status/FE-SURFACES.md as the last gap between "built" and "a person can navigate to it". The lab is dev-only (`?lab=1`), outside the i18n AST gate's production scope, and adds no shipped-chrome risk. `pnpm verify` exit 0, run by me: surfaces 74/74, i18n parity 49 locales / 291 messages, isolation, barrels, structure pass. Looked at the result at 1280x900: all 8 surfaces listed, Listen's 8 states selectable, mobile 390x844 and desktop rendering side by side, fixture badge visible in both.
`?lab=1` already indexes every production surface and deterministic state with a mobile/desktop compare view. The four surfaces added tonight were reachable only by hand-typed URL, which in practice means not reachable. This is deliberately the lab and NOT the navigation island. Chat, Settings and Listen have no visible nav destination, and inventing a slot for them in the shipped chrome is a design decision belonging to the Ink/WindowGlass source of record (PR #11117), not to a surface author at 4am. Widening the chrome route union so they stop borrowing Home's highlight was the correct scope; adding destinations is not. Flagged in status/FE-SURFACES.md as the last gap between "built" and "a person can navigate to it". The lab is dev-only (`?lab=1`), outside the i18n AST gate's production scope, and adds no shipped-chrome risk. `pnpm verify` exit 0, run by me: surfaces 74/74, i18n parity 49 locales / 291 messages, isolation, barrels, structure pass. Looked at the result at 1280x900: all 8 surfaces listed, Listen's 8 states selectable, mobile 390x844 and desktop rendering side by side, fixture badge visible in both.
`?lab=1` already indexes every production surface and deterministic state with a mobile/desktop compare view. The four surfaces added tonight were reachable only by hand-typed URL, which in practice means not reachable. This is deliberately the lab and NOT the navigation island. Chat, Settings and Listen have no visible nav destination, and inventing a slot for them in the shipped chrome is a design decision belonging to the Ink/WindowGlass source of record (PR BasedHardware#11117), not to a surface author at 4am. Widening the chrome route union so they stop borrowing Home's highlight was the correct scope; adding destinations is not. Flagged in status/FE-SURFACES.md as the last gap between "built" and "a person can navigate to it". The lab is dev-only (`?lab=1`), outside the i18n AST gate's production scope, and adds no shipped-chrome risk. `pnpm verify` exit 0, run by me: surfaces 74/74, i18n parity 49 locales / 291 messages, isolation, barrels, structure pass. Looked at the result at 1280x900: all 8 surfaces listed, Listen's 8 states selectable, mobile 390x844 and desktop rendering side by side, fixture badge visible in both.
Rebuilds the macOS app on a glassmorphic design system modelled on the Context-for-Claude UI, and fixes three product defects found while doing it.
Why this is not a reskin
OmiColorswas a hardcoded dark palette (textPrimary#FFFFFF, grounds near-black). On a light-pinned glass panel every one of its ~1,900 call sites resolved to the panel's own colour — surfaces that compiled, drew, and were blank. So the conversion had to be total: a half-converted app is an invisible app, not an inconsistent one.Sign-in and the chat onboarding were the sharpest case. Each painted a full-bleed dark photograph over the shell's ground, and their white type survived only because that art hid the panel. Removing either alone yields an empty screen; both had to go together.
What changed
The design system (
Sources/Theme/{Ink,InkType,InkGlass,WindowGlass}.swift) — behind-windowNSVisualEffectView(.hudWindow)pinned to.aqua, 0.14 scrim, 22pt continuous corners, ambient shadow (r34 / 0.24 / y−10), and a semantic palette oflabelColor × alphaso one value works on any ground. Two rules are enforced rather than documented: on glass the type ladder has two rungs, not three (tertiary fails AA on the shipped ground), and the accent pinssystemBluerather thancontrolAccentColor, which macOS lets users set to the off-brand hue — a defect no rendered-pixel check can catch.Diverges from the reference in one place, deliberately: the panel sheen is clipped by the panel's own shape so it cannot square off the top corners.
Typography — Open Runde for display (≥22pt), SF Pro for reading, em-based tracking recomputed per size. Bundled with its OFL-1.1 licence text; the reference implementation ships these faces without one.
Onboarding — a six-beat cinematic on the eight-dot Omi mark (dots arrive one at a time on their own spring and click, then hand off to the comet pulse), an
AVAudioEngineambient bed that carries from the intro into the chat onboarding, and an exit that finally answers "what do I do now". Reduce Motion swaps a different timing table rather than branching. The intro plays once — never on a resume (granting Screen Recording restarts the process by design), never on a second run — and the flag is written before playback so a crash cannot re-arm it. All audio is generated by a committed script; nothing is licensed.Push-to-talk is now clickable from the composer and the ask bar, driving the existing
PushToTalkManagerrather than a second audio path.Defects fixed (each was proven from code before it was fixed)
Post-onboarding dead end.
PostOnboardingPromptSuggestions.save(…)was called only from the retired onboarding (OnboardingView.swift:632), so the live flow left the array empty,DashboardPage.swift:489's guard could never fire, andChatProvider.presentOnboardingOpener()built the Chat tab's starter chips from nothing. The feature existed and was orphaned. Guidance is now setup-aware and reads the user's real shortcut chords, so someone who rebound Ask-Omi is not told to press ⌘O, and the hold-to-talk cue is suppressed entirely if the mic was denied.Six onboarding permission defects. The Automation prompt blocked the main thread behind a modal dialog (
NSAppleScripton@MainActor); a grant landing after the 20s poll was never detected (no reactivation re-check, and Allow was.disabledwhile waiting); a Screen Recording grant never offered the relaunch it needs, so capture stayed dead while.screenDemoclaimed "I can see it"; system audio looped with no escape; Automation state was read one cycle stale so an existing grant was re-asked; and AX / event-tap / filesystem probes ran on the main thread every 500ms. The pre-existing tests here asserted source strings against a view the app never renders.A latent voice-turn bug, found while wiring the button:
enterLockedListening()published.lockinto any active turn, but the reducer only accepts.lockfrom.recording/.pendingLockDecision. From a response phase it was an invalid transition and the manager still opened a mic for a turn that never entered a recording phase.Also fixed on the way: three filter rows had silently lost their active state when two dark tokens collapsed onto one wash;
OmiToggleStyle's "on" track was white, so every switch in Settings read as off;opaqueGroundmultiplied into existing alpha so Reduce Transparency never became opaque; the markdown renderer drew assistant text white on a light bubble; andDesktopHomeViewre-stamped.darkAquaon every window, unpinning the glass it had just set.Home was rebuilt on top of the design system
The glass work above landed first; the surfaces below were built on it afterwards.
Home is a query surface, not a hub. Two glass objects with 12pt between them — a
query bar you type into, and a results panel that answers.
QueryShellLayout.panelGapis derived from
RewindSearchLayout.panelGaprather than restated, so the product hasone opinion about how far apart its glass sits, and both panels take the top bar's own
lane so all three share a leading edge.
⌘⏎swaps the panel body in place for an answerthread through the one
ChatProvider; the top bar's right side is icons only.The results panel is one chronological spine. Conversations, memories, and screen
moments interleave by time under sticky day headers, with an hour rail that tracks the
topmost visible row. They are siblings rather than separate tabs because a conversation,
the memory it produced, and the screenshot from that minute belong together.
Rewind's timeline is time-linear. The old strip mapped a pixel to an array index,
so a three-hour gap occupied the same width as a three-second one. X now maps to the
capture's timestamp and the frame under the pointer comes from a binary search. Apps get
a deterministic colour identity (FNV-1a over the app name into seven bands, all outside
the forbidden hue range, every swatch ≥3:1 against white type) replacing a
hashValue-seeded full-wheel mapping that changed colours on every relaunch and handedan
INV-UI-1-forbidden hue to roughly a third of all apps.Interface sounds, gated three ways: chrome cues honour macOS's own "Play user
interface sound effects" (read by hand — neither
AVAudioPlayernorAVAudioEngineconsults it), content cues ignore it, motion-tied cues respect Reduce Motion, and one
Settings switch silences everything including onboarding. No new assets.
Defects the build surfaced that reading could not
These were all found by driving the running app, and are recorded because each one
compiles and reads correctly:
⌘⏎never fired. The branch testedpress.modifiers.contains(.command)insideonKeyPress, but AppKit routes Command-modified keys to key-equivalent handling beforeonKeyPresssees them. Unreachable code that looks right. Now a realkeyboardShortcut.contentShape+onTapGesture(tapanywhere to focus) is the outermost gesture and won every click landing on a button.
ChatProvider.errorMessagewas surfaced nowhere inMainWindow. The provider hastwo error shapes; only
currentErrorhad a renderer. A crashed agent runtime takes theother branch, so the panel showed the question and sat silent forever. Both shapes now
render through the shared
AgentErrorClassifier. This silence was app-wide, not new here.inside one page's private recompute, so a second reader structurally could not obey them.
Fixed by ownership —
MemoryVisibilityGuardrailsis now the single policy with twopublished projections — not by a call-site filter.
which is why the moment count read low. Bounded readiness wait; the count now agrees
with the database (569 screenshots, 135 today, 419 yesterday).
RewindSearchBar,SearchResultsFilmstrip, andScreenshotThumbnailViewhad zero references outside alint baseline; the live surface was inline in
RewindPage. Rebuilt and rewired.Performance
Measured, not asserted. Glass compositing was profiled and found innocent
(+0.065 ms/frame — the blur is WindowServer work, not app work). The real costs were
elsewhere:
AG::Graph::UpdateStack::update()under typingDashboardPage.bodyper keystrokeCauses:
extractFrameWithAVFoundationreopened anAVAssetReaderand walked from frame 0per request (quadratic in chunk length), and handed frames to the UI as re-encoded JPEG;
the composer draft was
@Publishedon the object the whole shell observes; and everymouseMovedrebuilt anNSWindow+NSHostingViewfor the timeline tooltip.Invariants
Color.accentColorremoved from the converted surfaces; the ratchet passes across 172 changed UI files.FolderColorsdropped its Indigo/Purple swatches (stored user data keeps its hex — repainting it is the worse defect).ChatProvider, transcript, or turn handler; the mic button is a trigger, not a write path.Product invariants affected
Merging
upstream/mainpulled the branch across four more locked path globs than thepre-merge diff touched. Naming them is path-based, per
AGENTS.md; none of the four hasa behavior change here:
SessionRecoveryView,OmiApp,ChatProvider,FileIndexerServicewere restyled onto
Ink/InkGlass. No change to session acquisition, storage, refresh,or the recovery path.
ChatProvider's@Publishedsurfaceinto
ChatComposerDraftfor the keystroke-invalidation fix.ChatProvider.draftTextis still the accessor and still the single owner; one transcript, one send path.
ConnectorBrandIcon, the guidance overlay, the memoryexport sheet) repainted only. No connector added, removed, or re-scoped.
this branch's palette swap. Tier assignment and graph boundary are untouched.
Failure-Class: none
Verification
xcrun swift build -c debug --package-path Desktop— clean, no warnings from changed files.xcrun swift test --filter "Glass|Ink|Onboarding|PushToTalk|ChatFirst|MemoryGraph|ChatPromptTimeline|Markdown|Apps"— 416 tests, 0 failures.make preflight— 10 diff-scoped checks pass (diff-hygiene,architecture-guardrails,product-invariants,failure-class-protocol,deferred-work-markers,lifecycle-headers, …).check_brand_ui.py— OK, no purple increase across 172 UI files.check_product_file_line_count_ratchet.py— OK across 184 files. Every baseline moved down, none up (TasksPage6633→6618,OnboardingChatView2182→2156,MemoriesPage3630→3605,DesktopHomeView1885→1869,SidebarView1616→1611,CanonicalMemoryAtlasView4427→4425,ChatBubble1998→1997).check-e2e-flow-coverage.py --strict— 181 covered, 0 uncovered.TODO/FIXME/HACKmarkers.Two tests were rewritten in this PR (AGENTS.md treats that as suspect, so stating both explicitly):
ChatPromptTimelineTests.testTheActiveMarkIsLitRatherThanResizedassertedmarkColor == .white. External source:InkGlass's pinned-.aquadecision makeslabelColorresolve near-black, so a white literal was only ever correct because the rail sat on a near-black page. It now asserts the two states are the same colour — the invariant the test's own name claims.MemoryGraphRevisitTests.testMemoryDropdownPillsUseAnOpaqueOmiSurfacepinned retired palette token names. It now asserts the contract its own comment states — occlusion plus neutral pill styling — against the sharedGlassPillBackground.Two "inherited failures" resolved
An earlier revision of this description listed two failures as inherited from
main.Both are now settled and neither needs an exception:
check_agents_md_lean.py—backend/AGENTS.mdwas 39089 bytes at the merge base and is38990 on
upstream/main. Merging fixed it. This branch has no commit touching the file.check-sources-root-layout.py— not wired into any CI lane (no manifest entry, noworkflow reference, not in the Makefile), so it gates nothing. Of the four files above
its stale baseline, one was ours; it now lives in a feature directory.
Verified live, and what still is not
Every surface here was driven in a named local bundle on the real account, not just built:
the query bar and its controls, the chip seam, push-to-talk, the spine against 973 real
conversations and 569 screen captures, Rewind's track and search grid, and the onboarding
cinematic frame by frame.
Two gaps stated plainly rather than implied:
in the local bundle dies with
pi-mono process exited (code 1)— a bundled agent-runtimefault, not this change. Its failure path is verified live. Citation chips are code-live
but unverified for that reason.
NSEvents cannot be synthesised), and thewhat's-new / usage-limit sounds (not triggerable on demand) were not exercised.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q