Repository navigation
fix(desktop): prevent SelectionOverlay chat freezes - #10904
Merged
Merged
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2d6c57194
ℹ️ 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".
Keep native SwiftUI selection out of the live transcript, add a manifest-backed static boundary with adversarial fixtures, and exercise completed Markdown across repeated layout widths. Failure-Class: FC-selection-overlay-layout-loop
Update the existing renderer contract test to assert the disabled-only live transcript boundary introduced by the SelectionOverlay freeze repair. Failure-Class: FC-selection-overlay-layout-loop
Restore manifest-owned named check selection, Windows Job Object process ownership, safe output handling, and linked-worktree root fallbacks required by the dedicated portability lane. Failure-Class: none
Git-on-my-level
force-pushed
the
codex/fix-selection-overlay-loop
branch
from
July 30, 2026 17:41
f2d6c57 to
3d1bab2
Compare
kodjima33
added a commit
that referenced
this pull request
Jul 30, 2026
…ection test (#10912) PR #10904 replaced the source-inspection test testChatSelectionIsLimitedToSettledMessageBodies with the manifest-backed .github/scripts/check_chat_selection_boundary.py, leaving testCompletedChatTranscriptLayoutConvergesAcrossRepeatedResizes as the behavioral coverage in ChatTimelineContinuityTests. The INV-6 hermetic contract self-check still required the removed name, so every desktop release-candidate run has failed the M1 pre-tag readiness gate since. Failure-Class: none
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
Root cause
Omi Beta 0.12.146 reintroduced
.textSelection(.enabled)for completed messages in PR #10834. Completed messages are not actually layout-static: loading history, scrolling, resizing the window, and parent-state changes still relayout them.On the affected running bundle, every sampled main-thread stack was inside
SelectionOverlay.updateNSView,setFont, intrinsic-size invalidation,AttributeGraph, andGraphHost.flushTransactions. The app reached roughly 8.8 GB resident memory, 8.6 GB swapped memory, and 90.6 million allocations while remaining unresponsive.This is a recurrence of
FC-selection-overlay-layout-loop, previously addressed by PRs #9267 and #10471. An Equatable content boundary reduces ordinary rebuilds, but cannot make an AppKit-backed selection overlay safe inside a live scrolling transcript.Fix
OmiMarkdownnow always applies.textSelection(.disabled)and no longer accepts an initializer or property that can opt live chat back into selection. Existing whole-message, code-block, and table copy actions remain available. A future selectable reading experience must use a separate non-live renderer.The new
desktop-chat-selection-boundarymanifest check protects the three authoritative live-transcript render files. This static tripwire is necessary because SwiftUI provides no type-level exclusion forSelectionOverlay; it is paired with a behavioral test that renders 16 completed messages and requires layout to converge when widths repeat across a resize sequence.CI and review follow-up
AgentPillLifecycleTestsrenderer assertion to enforce the disabled-only selection contract--check-idselection and missing Windows check registrationsVerification
python3 .github/scripts/check_chat_selection_boundary.pypython3 .github/scripts/test_check_chat_selection_boundary.pypython3 .github/scripts/test_preflight_runner.py(23 tests)python3 .github/scripts/test_pr_preflight.py(36 tests)python3 desktop/macos/scripts/check_desktop_test_quality.pypython3 .github/scripts/test_run_checks.pyxcrun swift test --package-path desktop/macos/Desktop --filter AgentPillLifecycleTests.testOmiMarkdownParsesGFMTablesWithoutGeometryFeedbackxcrun swift test --package-path desktop/macos/Desktop --filter ChatTimelineContinuityTests(37 tests)desktop/macos/scripts/agent-logic-harness.sh --cross-surface-smokedesktop/macos/scripts/omi-macos-dev doctoromi-selection-loop-fix(com.omi.omi-selection-loop-fix) against the development backendsnapshotStale=false, 0.0% CPU, 138 MB RSS; in-process main-window capture succeededscripts/pr-preflight --pr-body-file /tmp/omi-selection-overlay-pr.md(90 selected checks against the rebased branch)Product invariants
INV-CHAT-1Failure-Class: FC-selection-overlay-layout-loop