Repository navigation
Restore canonical memory graph boundary - #11089
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c060c162c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if catalogNodes != nil { return nodes } | ||
| return nodes.filter { !$0.id.hasPrefix("memory:") } |
There was a problem hiding this comment.
Preserve legacy-node filtering across mixed page formats
During a rolling backend deployment, sequential pagination requests can hit both response formats because the old and new implementations use compatible cursors. If any page includes catalog_nodes, the accumulator produces a non-nil catalogNodes value, so this branch returns every accumulated node—including synthetic memory: nodes received from older pages—and the disconnected-dot regression reappears for accounts spanning multiple pages. Track whether every page used the new format, or filter legacy synthetic nodes before losing their page provenance.
Useful? React with 👍 / 👎.
| isEmpty = response.atlasNodes.isEmpty | ||
| hasLoadedCanonicalAtlas = true |
There was a problem hiding this comment.
Cache successfully loaded catalog-only atlas responses
For an account whose eligible memories are all unlinked, the new response has an empty atlasNodes array but a nonempty catalogNodes array, so this marks the load empty despite setting hasLoadedCanonicalAtlas. On every subsequent page/tab activation, the existing cooldown guard is bypassed because graphResponse.nodes is empty, and the spinner plus the complete paginated fetch run again even within the cooldown. Treat a successfully loaded catalog-only response as cached while still rendering an empty relationship map.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
4 issues found across 14 files
Confidence score: 3/5
- In
desktop/macos/Desktop/Sources/MainWindow/Pages/MemoryGraph/MemoryGraphPage.swift, the rebuild polling can report success beforeatlasNodesis actually populated, so the page may render as if rebuild finished while the atlas is still missing data; gate success on assertion/atlas readiness, not just durable catalog presence. - In
desktop/macos/Desktop/Sources/MainWindow/Pages/MemoryGraph/MemoryGraphPage.swift, derivingisEmptyfrom rebuilt node arrays can misclassify catalog-only (fully unlinked) accounts as empty, which can show the wrong empty state and hide valid catalog content; base emptiness on the canonical response shape that includescatalog_nodes. - In
desktop/macos/Desktop/Sources/Services/APIClient/APIClient+KnowledgeGraph.swift,atlasNodesfallback uses merged accumulator state instead of per-page payloads, so mixed old/new pagination responses during rollout can produce inconsistent merged graph data; apply fallback logic per page before merge to avoid rollout-time regressions. - In
desktop/macos/Desktop/Tests/MemoryAtlasLayoutTests.swift, the added assertion is effectively non-functional because it only re-checks a locally constructed value, leaving these graph-shape edge cases unguarded; replace it with an assertion on observable snapshot/output behavior.
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/Tests/MemoryAtlasLayoutTests.swift">
<violation number="1" location="desktop/macos/Desktop/Tests/MemoryAtlasLayoutTests.swift:39">
P3: This assertion just re-reads the catalogNodes value you constructed two lines earlier — makeSnapshot receives the struct by value and cannot alter the local `response`, so the check can never fail and adds no coverage for the catalog-preservation behavior the test name claims. The meaningful guarantees (snapshot excludes the catalog node, keeps david/omi, edges==1) are the assertions that follow; consider dropping the self-referential check or deriving it from a produced value instead.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/Pages/MemoryGraph/MemoryGraphPage.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Pages/MemoryGraph/MemoryGraphPage.swift:335">
P2: When every eligible memory for an account is unlinked (catalog-only, no assertions), the canonical response now returns an empty `nodes`/`atlasNodes` array with a non-empty `catalog_nodes` array. Setting `isEmpty = response.atlasNodes.isEmpty` here marks this as an empty load even though `hasLoadedCanonicalAtlas` is set and the load succeeded. If the load-cooldown/cache check elsewhere keys off `graphResponse.nodes.isEmpty` rather than `hasLoadedCanonicalAtlas`, a catalog-only-eligible account will bypass the cooldown guard on every page/tab activation, retriggering the spinner and a full paginated refetch even within the cooldown window. Treat a successfully loaded catalog-only response as cached rather than empty.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/MainWindow/Pages/MemoryGraph/MemoryGraphPage.swift:381">
P2: The rebuild poll exits early (and reports success) as soon as durable catalog records are present, even when atlasNodes is still empty because the assertion graph hasn't finished rebuilding. That can leave the atlas permanently empty after a successful-looking rebuild; consider keeping the poll gated on atlasNodes only (returning true for catalog-only accounts via a separate isEmpty/message path) so a mid-rebuild catalog-only response doesn't terminate the poll.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/Services/APIClient/APIClient+KnowledgeGraph.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/Services/APIClient/APIClient+KnowledgeGraph.swift:169">
P2: The `atlasNodes` fallback logic keys off whether `catalogNodes` is non-nil on the *merged* accumulator response, not per-page. During a rolling deploy where pagination requests can hit a mix of old (no `catalog_nodes`) and new response formats with compatible cursors, one new-format page (even with an empty `catalog_nodes` array) makes the accumulated `catalogNodes` non-nil, so `atlasNodes` then returns every accumulated node — including synthetic `memory:` nodes contributed by the older-format pages — bringing back the disconnected-dot regression for accounts whose pagination spans the deployment boundary. Consider tracking per-page format provenance, or filtering legacy `memory:`-prefixed nodes before merging, rather than gating the filter on the merged `catalogNodes` presence.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| } | ||
|
|
||
| if !response.nodes.isEmpty { | ||
| if !response.atlasNodes.isEmpty || !(response.catalogNodes?.isEmpty ?? true) { |
There was a problem hiding this comment.
P2: The rebuild poll exits early (and reports success) as soon as durable catalog records are present, even when atlasNodes is still empty because the assertion graph hasn't finished rebuilding. That can leave the atlas permanently empty after a successful-looking rebuild; consider keeping the poll gated on atlasNodes only (returning true for catalog-only accounts via a separate isEmpty/message path) so a mid-rebuild catalog-only response doesn't terminate the poll.
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/Pages/MemoryGraph/MemoryGraphPage.swift, line 381:
<comment>The rebuild poll exits early (and reports success) as soon as durable catalog records are present, even when atlasNodes is still empty because the assertion graph hasn't finished rebuilding. That can leave the atlas permanently empty after a successful-looking rebuild; consider keeping the poll gated on atlasNodes only (returning true for catalog-only accounts via a separate isEmpty/message path) so a mid-rebuild catalog-only response doesn't terminate the poll.</comment>
<file context>
@@ -378,20 +378,20 @@ class MemoryGraphViewModel: ObservableObject {
}
- if !response.nodes.isEmpty {
+ if !response.atlasNodes.isEmpty || !(response.catalogNodes?.isEmpty ?? true) {
let givenName = AuthService.shared.givenName.trimmingCharacters(in: .whitespacesAndNewlines)
let projection = await Task.detached(priority: .userInitiated) {
</file context>
| canonicalAtlasProjection = projection | ||
| graphResponse = response | ||
| isEmpty = response.nodes.isEmpty | ||
| isEmpty = response.atlasNodes.isEmpty |
There was a problem hiding this comment.
P2: When every eligible memory for an account is unlinked (catalog-only, no assertions), the canonical response now returns an empty nodes/atlasNodes array with a non-empty catalog_nodes array. Setting isEmpty = response.atlasNodes.isEmpty here marks this as an empty load even though hasLoadedCanonicalAtlas is set and the load succeeded. If the load-cooldown/cache check elsewhere keys off graphResponse.nodes.isEmpty rather than hasLoadedCanonicalAtlas, a catalog-only-eligible account will bypass the cooldown guard on every page/tab activation, retriggering the spinner and a full paginated refetch even within the cooldown window. Treat a successfully loaded catalog-only response as cached rather than empty.
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/Pages/MemoryGraph/MemoryGraphPage.swift, line 335:
<comment>When every eligible memory for an account is unlinked (catalog-only, no assertions), the canonical response now returns an empty `nodes`/`atlasNodes` array with a non-empty `catalog_nodes` array. Setting `isEmpty = response.atlasNodes.isEmpty` here marks this as an empty load even though `hasLoadedCanonicalAtlas` is set and the load succeeded. If the load-cooldown/cache check elsewhere keys off `graphResponse.nodes.isEmpty` rather than `hasLoadedCanonicalAtlas`, a catalog-only-eligible account will bypass the cooldown guard on every page/tab activation, retriggering the spinner and a full paginated refetch even within the cooldown window. Treat a successfully loaded catalog-only response as cached rather than empty.</comment>
<file context>
@@ -325,17 +325,17 @@ class MemoryGraphViewModel: ObservableObject {
canonicalAtlasProjection = projection
graphResponse = response
- isEmpty = response.nodes.isEmpty
+ isEmpty = response.atlasNodes.isEmpty
hasLoadedCanonicalAtlas = true
lastLoadedAt = Date()
</file context>
| /// `nodes` field is assertion-backed; older canonical payloads that predate | ||
| /// `catalog_nodes` may still have isolated catalog nodes folded into it, so | ||
| /// those are excluded by their stable `memory:` id prefix. | ||
| var atlasNodes: [KnowledgeGraphNode] { |
There was a problem hiding this comment.
P2: The atlasNodes fallback logic keys off whether catalogNodes is non-nil on the merged accumulator response, not per-page. During a rolling deploy where pagination requests can hit a mix of old (no catalog_nodes) and new response formats with compatible cursors, one new-format page (even with an empty catalog_nodes array) makes the accumulated catalogNodes non-nil, so atlasNodes then returns every accumulated node — including synthetic memory: nodes contributed by the older-format pages — bringing back the disconnected-dot regression for accounts whose pagination spans the deployment boundary. Consider tracking per-page format provenance, or filtering legacy memory:-prefixed nodes before merging, rather than gating the filter on the merged catalogNodes presence.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/Services/APIClient/APIClient+KnowledgeGraph.swift, line 169:
<comment>The `atlasNodes` fallback logic keys off whether `catalogNodes` is non-nil on the *merged* accumulator response, not per-page. During a rolling deploy where pagination requests can hit a mix of old (no `catalog_nodes`) and new response formats with compatible cursors, one new-format page (even with an empty `catalog_nodes` array) makes the accumulated `catalogNodes` non-nil, so `atlasNodes` then returns every accumulated node — including synthetic `memory:` nodes contributed by the older-format pages — bringing back the disconnected-dot regression for accounts whose pagination spans the deployment boundary. Consider tracking per-page format provenance, or filtering legacy `memory:`-prefixed nodes before merging, rather than gating the filter on the merged `catalogNodes` presence.</comment>
<file context>
@@ -152,6 +159,30 @@ struct KnowledgeGraphResponse: Codable, Equatable, Sendable {
+ /// `nodes` field is assertion-backed; older canonical payloads that predate
+ /// `catalog_nodes` may still have isolated catalog nodes folded into it, so
+ /// those are excluded by their stable `memory:` id prefix.
+ var atlasNodes: [KnowledgeGraphNode] {
+ if catalogNodes != nil { return nodes }
+ return nodes.filter { !$0.id.hasPrefix("memory:") }
</file context>
| var atlasNodes: [KnowledgeGraphNode] { | |
| var atlasNodes: [KnowledgeGraphNode] { | |
| nodes.filter { !$0.id.hasPrefix("memory:") } | |
| } |
|
|
||
| let snapshot = MemoryAtlasLayoutEngine.makeSnapshot(graph: response, userName: "David") | ||
|
|
||
| XCTAssertEqual(response.catalogNodes?.map(\.id), ["memory:unlinked"]) |
There was a problem hiding this comment.
P3: This assertion just re-reads the catalogNodes value you constructed two lines earlier — makeSnapshot receives the struct by value and cannot alter the local response, so the check can never fail and adds no coverage for the catalog-preservation behavior the test name claims. The meaningful guarantees (snapshot excludes the catalog node, keeps david/omi, edges==1) are the assertions that follow; consider dropping the self-referential check or deriving it from a produced value instead.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Tests/MemoryAtlasLayoutTests.swift, line 39:
<comment>This assertion just re-reads the catalogNodes value you constructed two lines earlier — makeSnapshot receives the struct by value and cannot alter the local `response`, so the check can never fail and adds no coverage for the catalog-preservation behavior the test name claims. The meaningful guarantees (snapshot excludes the catalog node, keeps david/omi, edges==1) are the assertions that follow; consider dropping the self-referential check or deriving it from a produced value instead.</comment>
<file context>
@@ -20,6 +20,44 @@ final class MemoryAtlasLayoutTests: XCTestCase {
+
+ let snapshot = MemoryAtlasLayoutEngine.makeSnapshot(graph: response, userName: "David")
+
+ XCTAssertEqual(response.catalogNodes?.map(\.id), ["memory:unlinked"])
+ XCTAssertEqual(snapshot.nodes.map(\.id), ["david", "omi"])
+ XCTAssertNil(snapshot.nodeByID[catalogNode.id])
</file context>
… dedup re-ported 22 upstream commits. New pure-logic module utils/memory/graph_enrichment.py (fenced canonical graph enrichment BasedHardware#11095) — no storage, no port needed. Two conflicts resolved keeping product logic verbatim, storage delta preserved: - database/user_usage.py: upstream's single-read all-time dedup (BasedHardware#11062) — _read_all_time_usage building total + yearly history in one pass — re-expressed on the store port (_store().query), not raw db.collection().stream(). - utils/memory/canonical_graph.py (auto-merged): upstream's catalog_nodes boundary (BasedHardware#11089) kept; storage stays document_store.query_collection (our delta). 0 raw firestore. Tests re-expressed on the neutral seam (no db_client, ADR-0028), no test removed: - test_knowledge_graph_canonical_pagination: adopts upstream's linked/unlinked catalog_nodes assertions via _fake_db_for (dropped the raw db_client _FakeDB setup). - test_user_usage: the all-time dedup test moved from the mock_db raw-Firestore fixture to the FakeDocumentStore store seam; kept the single-read invariant (record_firestore_read once, count 2), dropped the raw .stream() assertion. Audit ADR-0030: guard 0 · storage port byte-identical (empty diff on database/store/ + document_store.py) · sweep file-isolated 64/64 green · contract dual-backend 66 passed (Firestore emulator + Mongo real).
The PR was CONFLICTING, so GitHub could not build a merge commit and never ran a single check on it. This unblocks CI as much as it integrates upstream. Two files conflicted; a third broke the build without conflicting. - Ratchet baseline: both sides had ratcheted. Resolved to the max of each pair, then lowered by the checker itself. `MemoryAtlasForceLayout.swift` is set to upstream's 1636 by hand — this branch never touched it, so the updater cannot lower it and leaves our stale-high value behind. - `CanonicalMemoryAtlasView.swift` label drawing: BasedHardware#11089 added label truncation while this branch swapped the palette. Both halves are required — `displayLabel` feeds `estimatedLabelWidth` two lines down. - Same file, the two `Canvas` catalog fills: BasedHardware#11089 introduced new references to `OmiColors.textTertiary`, a type this branch deletes. Git merged them cleanly into a compile error. Mapped to `Ink.secondary`, not `Ink.tertiary`, because `Ink.tertiary` at 5.5% alpha is invisible on the light ground. Verification: - `swift build --package-path Desktop` — Build complete, 1652 modules - `grep -rn "OmiColors\." Sources/` — no matches - line-count ratchet — OK across 228 changed product source files - Also clears two failures the branch inherited rather than caused: `agents-md-lean` (backend/AGENTS.md was 39089 bytes at the merge base and is 38990 upstream; this branch has no commit touching it) and the ratchet's merge-base artifacts.
…x onboarding's dead ends (#11117) 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 `OmiColors` was 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-window `NSVisualEffectView(.hudWindow)` pinned to `.aqua`, 0.14 scrim, 22pt continuous corners, ambient shadow (r34 / 0.24 / y−10), and a semantic palette of `labelColor × alpha` so 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 pins `systemBlue` rather than `controlAccentColor`, 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 `AVAudioEngine` ambient 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 `PushToTalkManager` rather 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, and `ChatProvider.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 (`NSAppleScript` on `@MainActor`); a grant landing after the 20s poll was never detected (no reactivation re-check, and Allow was `.disabled` while waiting); a Screen Recording grant never offered the relaunch it needs, so capture stayed dead while `.screenDemo` claimed "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 `.lock` into any active turn, but the reducer only accepts `.lock` from `.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; `opaqueGround` multiplied into existing alpha so Reduce Transparency never 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. ## 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.panelGap` is *derived* from `RewindSearchLayout.panelGap` rather than restated, so the product has one 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 answer thread 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* handed an `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 `AVAudioPlayer` nor `AVAudioEngine` consults 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 tested `press.modifiers.contains(.command)` inside `onKeyPress`, but AppKit routes Command-modified keys to key-equivalent handling before `onKeyPress` sees them. Unreachable code that looks right. Now a real `keyboardShortcut`. - **The Ask button was unpressable** — a whole-bar `contentShape` + `onTapGesture` (tap anywhere to focus) is the outermost gesture and won every click landing on a button. - **`ChatProvider.errorMessage` was surfaced nowhere in `MainWindow`.** The provider has two error shapes; only `currentError` had a renderer. A crashed agent runtime takes the other 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. - **Archived memories leaked onto Home.** The archive and device-scope guardrails lived inside one page's private recompute, so a second reader structurally could not obey them. Fixed by ownership — `MemoryVisibilityGuardrails` is now the single policy with two published projections — not by a call-site filter. - **A day read before Rewind's database opened was cached as "no capture" forever**, which is why the moment count read low. Bounded readiness wait; the count now agrees with the database (569 screenshots, 135 today, 419 yesterday). - **The Rewind search surface was dead code.** `RewindSearchBar`, `SearchResultsFilmstrip`, and `ScreenshotThumbnailView` had zero references outside a lint 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: | | before | after | |---|---|---| | Rewind scrub, per chunk | 728.4 ms | **59.3 ms** (12.3×) | | `AG::Graph::UpdateStack::update()` under typing | 5752 ms | **3083 ms** (−46%) | | `DashboardPage.body` per keystroke | 309 ms | **0 ms** | | Timeline drag, main-thread busy samples | 825 / 4931 | **174 / 5085** | Causes: `extractFrameWithAVFoundation` reopened an `AVAssetReader` and walked from frame 0 per request (quadratic in chunk length), and handed frames to the UI as re-encoded JPEG; the composer draft was `@Published` on the object the whole shell observes; and every `mouseMoved` rebuilt an `NSWindow` + `NSHostingView` for the timeline tooltip. ## Invariants - **INV-UI-1** — purple and `Color.accentColor` removed from the converted surfaces; the ratchet passes across 172 changed UI files. `FolderColors` dropped its Indigo/Purple swatches (stored user data keeps its hex — repainting it is the worse defect). - **INV-NAV-1** — nav chrome was restyled, not reduced; parity guards green. - **INV-6 / INV-VOICE-1** — no second `ChatProvider`, transcript, or turn handler; the mic button is a trigger, not a write path. ## Product invariants affected - INV-AUTH-1 - INV-CHAT-1 - INV-VOICE-1 - INV-INT-1 - INV-MEM-1 Merging `upstream/main` pulled the branch across four more locked path globs than the pre-merge diff touched. Naming them is path-based, per `AGENTS.md`; none of the four has a behavior change here: - **INV-AUTH-1** — `SessionRecoveryView`, `OmiApp`, `ChatProvider`, `FileIndexerService` were restyled onto `Ink`/`InkGlass`. No change to session acquisition, storage, refresh, or the recovery path. - **INV-CHAT-1** — the composer's draft moved off `ChatProvider`'s `@Published` surface into `ChatComposerDraft` for the keystroke-invalidation fix. `ChatProvider.draftText` is still the accessor and still the single owner; one transcript, one send path. - **INV-INT-1** — connector chrome (`ConnectorBrandIcon`, the guidance overlay, the memory export sheet) repainted only. No connector added, removed, or re-scoped. - **INV-MEM-1** — the Brain Map's atlas view takes upstream #11089's label truncation and 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** (`TasksPage` 6633→6618, `OnboardingChatView` 2182→2156, `MemoriesPage` 3630→3605, `DesktopHomeView` 1885→1869, `SidebarView` 1616→1611, `CanonicalMemoryAtlasView` 4427→4425, `ChatBubble` 1998→1997). - `check-e2e-flow-coverage.py --strict` — 181 covered, **0 uncovered**. - The cinematic was **run and captured frame by frame** across all six beats. - Zero new `TODO`/`FIXME`/`HACK` markers. **Two tests were rewritten in this PR** (AGENTS.md treats that as suspect, so stating both explicitly): 1. `ChatPromptTimelineTests.testTheActiveMarkIsLitRatherThanResized` asserted `markColor == .white`. External source: `InkGlass`'s pinned-`.aqua` decision makes `labelColor` resolve 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. 2. `MemoryGraphRevisitTests.testMemoryDropdownPillsUseAnOpaqueOmiSurface` pinned retired palette token names. It now asserts the contract its own comment states — occlusion plus neutral pill styling — against the shared `GlassPillBackground`. ## 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.md` was 39089 bytes at the merge base and is 38990 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, no workflow 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: - **Ask mode's success path has never rendered an answer on this branch.** Every chat turn in the local bundle dies with `pi-mono process exited (code 1)` — a bundled agent-runtime fault, not this change. Its *failure* path is verified live. Citation chips are code-live but unverified for that reason. - Dark Mode, a real trackpad pinch (gesture `NSEvent`s cannot be synthesised), and the what's-new / usage-limit sounds (not triggerable on demand) were not exercised. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Bro5DpYLqufeFKMYRbdY3Q <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/11117?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Summary
Separates canonical memory catalog records from assertion-backed graph entities in the canonical graph response and desktop atlas.
Root cause
The prior synthetic
memory:nodes made every canonical memory render as a graph node although historical items did not have graph assertions. With only one real edge, the atlas correctly laid out a dense field of isolates.Impact
The atlas now renders only evidence-fenced assertion-backed entities and edges. Catalog memories remain available in the paginated response for the catalog experience rather than being dropped.
Validation
backend/.venv/bin/pytest -q backend/tests/unit/test_knowledge_graph_canonical_pagination.pyxcrun swift test --package-path desktop/macos/Desktop --filter 'KnowledgeGraphPaginationTests|MemoryAtlasLayoutTests'make preflightProduct invariants affected
Failure-Class: none