Repository navigation
feat(desktop): add clickable source citations - #11519
Merged
Git-on-my-level merged 4 commits intoAug 13, 2026
Merged
Git-on-my-level merged 4 commits into
Git-on-my-level merged 4 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 32 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Git-on-my-level
force-pushed
the
codex/clickable-citations
branch
3 times, most recently
from
August 13, 2026 21:52
73ef10d to
e9afb6f
Compare
Git-on-my-level
force-pushed
the
codex/clickable-citations
branch
from
August 13, 2026 22:22
e9afb6f to
4b7dac2
Compare
This was referenced Aug 14, 2026
kodjima33
added a commit
that referenced
this pull request
Aug 14, 2026
…nner's defaults The fourth failure in the red lane, and the last one: `testRewindCitationFocusIsOneShotAndPreservesExactScreenshotID` has failed on every CI run since #11519 landed while passing locally. `RewindCaptureOwnerSnapshot` resolves an owner id two different ways. `capture()` prefers the authorization snapshot's owner, which comes from the persistent `auth_userId` default; `isCurrent()` compares against `RewindDatabase.currentUserId ?? "anonymous"`, which is in-memory and starts nil in a fresh process. `swift-test-suites.sh` runs each suite in its own process, but UserDefaults is on disk and outlives all of them, so on a runner where an earlier suite left `auth_userId` set the focus request captured owner "X" and `consume()` compared it against "anonymous" and refused — one-shot handoff lost, on an assertion that has nothing to say about owner plumbing. Reproduced exactly, locally: setting `auth_userId` before the same test turns it red with CI's message ("nil" is not equal to "Optional(42)"). Pinning `RewindDatabase.currentUserId` to `currentOwnerId()` for the duration turns it green with that default still set — 18/18 — and green again with it cleared. The divergence between the two owner sources is a real product defect (any snapshot captured before `currentUserId` is resolved at launch can never validate), but narrowing a fail-closed ownership fence is not a change to make alongside a CI unblock; filed separately. Verification: `swift test --filter` on all four suites the lane reports — ChatCitationTests 18/18, ShellModalScrimTests 7/7, GlassSurfaceReviewRegressionTests 3/3, ProactiveLaneClientTests 11/11, InkGlassHitRegionReporterTests 2/2. 77 failures -> 0. Failure-Class: none
This was referenced Aug 14, 2026
This was referenced Aug 15, 2026
kodjima33
added a commit
that referenced
this pull request
Aug 15, 2026
…#11596) Three Swift suites have died with SIGSEGV on the macos-15 CI runner since 2026-08-14, leaving the desktop lane red on every run that executes desktop tests: AgentPillLifecycleTests, ChatTimelineContinuityTests, MarkdownNestedScrollTests. The crash report surfaced by #11589 names the cause. It is a stack overflow, not a bad pointer: the faulting address sits 80 bytes below thread 0's stack limit inside the guard region, and the backtrace is 511 frames of one repeating unit -- OmiMarkdownContent -> _ConditionalContent -> OmiMarkdownCitationContent -> _ConditionalContent -> OmiMarkdownContent -> ... all of it `View._viewListCount(inputs:)`. That is a *static* walk: SwiftUI resolves it from view types alone and never evaluates a body, so the cycle is in the type graph, not in any value. `OmiMarkdownContent.body` reaches `OmiMarkdownCitationContent` through both `textView` and `OmiMarkdownTableView`, and the citation view's mask-failure fallback named `OmiMarkdownContent` -- closing two cycles on one back-edge. The fallback almost never executes at runtime, which is why this looked value-dependent for two days; the static walk recurses regardless of whether that branch is ever taken. Erasing that one back-edge with `AnyView` terminates the walk (`AnyView` resolves its count dynamically) and leaves the graph acyclic. The cycle was closed by 00cc9ed "feat(desktop): add clickable source citations (#11519)" (David Zhang, 2026-08-13), which introduced `OmiMarkdownCitationContent` and its fallback. Not CI-only: the production transcript hosts the same tree (ChatMessagesView.scrollContent -> ScrollView -> VStack -> ChatBubble -> OmiMarkdown), so a macOS 15 user on a build carrying #11519 hits the same recursion. Changelog entry added. Verified: - desktop/macos/scripts/swift-test-suites.sh over the three crashing suites plus OmiMarkdownCitationInteractionTests and OmiMarkdownLineSpacingTests. - New regression test measures a cited answer inside a ScrollView/LazyVStack host -- the container that forces the static count. Pre-fix that shape is what kills the process on macOS 15; it cannot fail an assertion, so the suite's survival on the macos-15 runner is the assertion. - The macos-15 CI lane is the authority here: the crash does not reproduce on macOS 26, so lane-green on this PR is the proof. Failure-Class: new
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
xcrun swift build -c release --package-path desktop/macos/Desktop --jobs 1— passedbackend/.venv/bin/pytest -q backend/tests/unit/test_tools_router.py backend/tests/unit/test_tools_agent_route_response_shape.py— 97 passedbackend/.venv/bin/python -m pytest -q backend/tests/unit/test_chat_memory_tool_caller.py— 6 passedscripts/pr-preflight --base origin/main --head HEAD --lane local --pr-body-file ...— 112 checks passeddesktop/macos/scripts/agent-logic-harness.sh --cross-surface-smoke— passed/Applications/omi-clickable-citations-v2.apppassed strict code-signature verification and automation health checksWhat should I work on next? Give me citations.produced inline markers and persisted 12 matching typed citation blocks with canonical IDsProduct invariants
Failure-Class: none
Line-count exceptions
Line-Count-Exception: desktop/macos/Desktop/Sources/MainWindow/Components/ChatBubble.swift | 2023 -> 2050 | Threads settled typed citation references through the existing assistant-text rendering seams while keeping provenance and layout implementation extracted.
Line-Count-Exception: desktop/macos/Desktop/Sources/MainWindow/Components/OmiMarkdown.swift | 1262 -> 1636 | Citation controls must participate in the existing attributed Markdown flow so prose, tables, keyboard actions, and hover previews share one wrapping geometry owner.
Line-Count-Exception: desktop/macos/Desktop/Sources/Onboarding/OnboardingChatView.swift | 2156 -> 2157 | Keeps the new invisible citation provenance block exhaustive in onboarding's existing block-visibility switch.
Line-Count-Exception: desktop/macos/Desktop/Sources/Providers/ChatProvider.swift | 6757 -> 6889 | Citation finalization remains beside streaming acceptance and journal terminalization so revoked runs cannot persist stale or incomplete click targets.
Line-Count-Exception: desktop/macos/Desktop/Sources/Providers/ChatToolExecutor.swift | 3242 -> 3411 | Typed source registration remains at each owner-fenced tool result boundary so canonical IDs are never reconstructed from prose.
Notes