Skip to content

Fix minimal UI terminal top-row hit testing#6073

Merged
austinywang merged 15 commits into
mainfrom
issue-6066-minimal-ui-toolbar-hittest
Jun 14, 2026
Merged

Fix minimal UI terminal top-row hit testing#6073
austinywang merged 15 commits into
mainfrom
issue-6066-minimal-ui-toolbar-hittest

Conversation

@austinywang

@austinywang austinywang commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep terminal subviews clickable when minimal UI extends terminal content into the fixed titlebar interaction band.
  • Preserve titlebar/chrome pass-through only when no hosted terminal view is actually hit.
  • Add a regression test for terminal top-row hit testing inside the titlebar band.

Fixes #6066

Reproduction

  • Local repro in existing cmux app with Minimal UI enabled using the Textual click-row repro.
  • Automated local probe clicked row centers in the top terminal pane and logged delivered Textual on_click events.
  • Observed: row 0 and row 1 clicks did not reach Textual; row 2 and row 4 did reach Textual, matching the fixed-height dead-zone report.
  • Evidence saved locally under cmux-assets/issue-6066-minimal-ui-toolbar-hittest/local-repro/.

Root Cause

WindowTerminalHostView.performHitTest unconditionally passed through points in the fixed titlebar interaction band. In minimal UI, terminal content can extend into that band, so top terminal rows were treated as titlebar/chrome instead of terminal content.

Verification

  • Local manual/probe repro confirmed the bug before relying on the fix.
  • Added XCTest coverage for a hosted terminal view occupying the titlebar band.
  • Did not run local tests or reload.sh per issue instructions; CI is the validation gate.

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Fixes #6066. Keeps terminal top-row clicks working in Minimal UI and defers synthetic titlebar double‑clicks when terminal content is under the cursor.

  • Bug Fixes
    • Hit testing: lazily resolve and cache a hosted-terminal hit per point; pass through to titlebar/pane tabs only on registered control hits or when no terminal is under the point; align shouldPassThroughToChrome with the same logic.
    • Double‑clicks: centralize deferral in minimalModeTitlebarDoubleClickShouldDefer using window‑scoped terminal detection; apply in titlebar monitors and WindowDecorationsController.
    • Tests: add WindowTerminalHostViewTitlebarHitTests; update TitlebarInteractiveControlTests.

Written for commit 0288a7f. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved hit-testing for window chrome: titlebar and pane tab bar pass-through now consider whether hosted terminal content is underneath the interaction point, preventing incorrect routing when there’s overlap.
    • Updated minimal-mode titlebar double-click behavior to defer/suppress synthetic handling only when the minimal-mode control region is actually hit or a hosted terminal is present at that location.
  • Tests
    • Added/extended coverage for titlebar hit-testing, terminal overlap routing, registered interactive controls, and minimal-mode double-click deferral behavior.

@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Jun 14, 2026 4:15am
cmux-staging Building Building Preview, Comment Jun 14, 2026 4:15am

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

WindowTerminalHostView hit-testing now checks for hosted terminal overlap before allowing titlebar pass-through, preventing the invisible titlebar band from swallowing top-row terminal clicks. Double-click deferral logic is consolidated into a single minimalModeTitlebarDoubleClickShouldDefer helper that unifies registered-control and terminal-presence checks. A comprehensive regression test suite verifies correct routing when terminals and titlebar controls coexist in the fixed titlebar interaction band. The Xcode project is updated with the new hit-testing and test files.

Changes

Titlebar pass-through and double-click deferral refactor

Layer / File(s) Summary
Hit-testing infrastructure for hosted terminals
Sources/WindowTerminalHostViewHitTesting.swift
New WindowTerminalHostView extension adds visibility-aware helpers (hasHostedTerminal(at:), hasHostedTerminal(atWindowPoint:in:)) to detect hosted GhosttySurfaceScrollView at a given point, converting window coordinates and recursively searching subviews in reverse order. minimalModeTitlebarDoubleClickShouldDefer combines minimal-mode control hit detection with hosted-terminal presence via the new helpers.
Portal hit-test integration with hosted-terminal overlap guard
Sources/TerminalWindowPortal.swift
performHitTest now computes hostedTerminalHitView(at:) once and threads it into shouldPassThroughToTitlebar and shouldPassThroughToPaneTabBar. Titlebar pass-through is blocked when a hosted terminal hit exists (except when minimal-mode titlebar control is hit). Pane-tab-bar pass-through gates on hostedTerminalHitView == nil, ensuring terminal content in the titlebar band receives clicks instead of chrome.
Double-click deferral consolidation
Sources/WindowDragHandleView.swift, Sources/WindowDecorationsController.swift, cmuxTests/TitlebarInteractiveControlTests.swift
titlebarDoubleClickMonitorShouldDeferToRegisteredControl helper is removed. Both TitlebarDoubleClickMonitorView and MinimalModeTitlebarEventSurfaceView now use the consolidated minimalModeTitlebarDoubleClickShouldDefer helper for deferral decisions. WindowDecorationsController and existing test assertions are updated to validate via the new unified helper.
Regression test suite
cmuxTests/WindowTerminalHostViewTitlebarHitTests.swift
New @MainActor @Suite test class verifies four scenarios: terminal top-row clicks inside the titlebar band resolve to terminal views; minimal-mode double-click deferral detects terminal presence; synthesized double-click events do not consume terminal top-row interactions in minimal mode; and registered titlebar controls retain click priority when positioned above the terminal. Helpers construct hosted GhosttySurfaceScrollView hierarchies and synthesize left-mouse-down NSEvent for hit-test assertion.
Project registration
cmux.xcodeproj/project.pbxproj
Xcode project is updated with PBXBuildFile, PBXFileReference, group children, and source-phase entries for WindowTerminalHostViewHitTesting.swift (main app target) and WindowTerminalHostViewTitlebarHitTests.swift (UI test target).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • manaflow-ai/cmux#3720: Both PRs update Sources/TerminalWindowPortal.swift hit-testing/pass-through routing to account for an overlapping hosted terminal surface (via hostedTerminalHitView(...)) so clicks are delivered to the terminal top rows instead of being consumed by tab/titlebar chrome.
  • manaflow-ai/cmux#5101: Both PRs modify titlebar hit-testing and double-click suppression in minimal-mode via the shared minimalModeTitlebarDoubleClickShouldDefer helper, with this PR adding hosted-terminal-aware passthrough while accounting for interactive titlebar control registration.
  • manaflow-ai/cmux#5005: Both PRs adjust titlebar hit-testing/event routing so titlebar controls suppress synthetic titlebar double-click/drag handling—main PR routes deferral through minimalModeTitlebarDoubleClickShouldDefer, while retrieved PR adds titlebarInteractiveControl() and tests to ensure those controls are treated as titlebar interactive.

Suggested reviewers

  • lawrencecchen

Poem

🐇 A click at the top of the terminal pane,
Once swallowed by titlebar, lost in the chain.
Now the rabbit checks: "Is a terminal there?"—
And defers to it with holistic care.
Controls still win when no terminal's near! 🎉


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 errors, 1 warning)

Check name Status Explanation Resolution
Cmux Swift Actor Isolation ❌ Error The new function minimalModeTitlebarDoubleClickShouldDefer calls MainActor-bound WindowTerminalHostView.hasHostedTerminal but is not marked nonisolated, causing implicit MainActor isolation when ca... Mark minimalModeTitlebarDoubleClickShouldDefer as nonisolated or explicitly @MainActor to resolve actor isolation issues.
Cmux Algorithmic Complexity ❌ Error PR calls hostedTerminalHitView (full subview scan) from updateDividerCursor, invoked on EVERY mouseMoved/cursorUpdate event, violating the "repeated sorting/filtering in hot UI paths" rule. Cache hostedTerminalHitView result or optimize shouldPassThroughToChrome to avoid re-scanning subviews on every mouse movement; the scan should be computed once per point and cached/reused.
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (18 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix minimal UI terminal top-row hit testing' clearly and specifically summarizes the main change: fixing hit-test behavior for terminal rows in Minimal UI mode.
Linked Issues check ✅ Passed The changes directly address issue #6066 by fixing hit-test logic to allow terminal content in top rows to be clickable when extended into the titlebar band, matching the expected behavior described in the issue.
Out of Scope Changes check ✅ Passed All code changes are focused on fixing terminal hit-testing behavior and double-click deferral when terminal content extends into the titlebar band, with no unrelated modifications detected.
Cmux Swift Blocking Runtime ✅ Passed No blocking or timing-based synchronization introduced. Changes are pure synchronous hit-testing utilities with optimized parameter threading; pre-existing NSLock instances unchanged.
Cmux Expensive Synchronous Load ✅ Passed PR adds view hierarchy traversal operations for hit-testing (hasHostedTerminal, minimalModeTitlebarDoubleClickShouldDefer), not expensive synchronous loaders. No file I/O, disk access, sysctl, or d...
Cmux Cache Substitution Correctness ✅ Passed All new code computes fresh authoritative values used transiently for UI decisions; no values are cached in persistent, history, undo, or snapshot paths. hostedTerminalHitView() is computed once pe...
Cmux No Hacky Sleeps ✅ Passed PR contains only Swift and Xcode project configuration changes; the no-hacky-sleeps rule applies only to TypeScript, JavaScript, shell scripts, and non-Swift build/runtime code.
Cmux Swift Concurrency ✅ Passed All code changes are synchronous and appropriate for hit-testing. No new async/await, background DispatchQueue, Combine, or fire-and-forget Tasks introduced. Allowed AppKit/XCTest boundaries respec...
Cmux Swift @Concurrent ✅ Passed All Swift changes are synchronous hit-testing helpers with no async/concurrent annotations required. Functions perform lightweight UI coordinate checks without CPU, file, or network operations.
Cmux Swift File And Package Boundaries ✅ Passed New file WindowTerminalHostViewHitTesting.swift (52 lines) is under 400-line limit with single responsibility (AppKit hit-testing glue). Changes to oversized files are balanced (+10/-10 in Terminal...
Cmux Swift Logging ✅ Passed All Swift production and test files in the PR comply with swift-logging.md rules: no print/debugPrint/dump/NSLog calls, no ad hoc logging, no MainActor-coupled Logger declarations, and no secret/pe...
Cmux User-Facing Error Privacy ✅ Passed PR contains no user-facing error messages, alerts, or sensitive information; all strings are test assertions (developer-only) and code changes are internal hit-testing logic.
Cmux Full Internationalization ✅ Passed PR contains only internal hit-testing logic, test code, and debug logging—no user-facing text requiring localization per full-internationalization.md allowed cases.
Cmux Swiftui State Layout ✅ Passed PR introduces only AppKit hit-testing logic and utilities with no new SwiftUI state patterns; existing legacy @Published ObservableObject class untouched.
Cmux Architecture Rethink ✅ Passed PR introduces a small correctness fix with clear owners (hit-test logic) and invariants (terminal content hittable in titlebar band). No timing repairs, new state, observers, locks, or split lifecy...
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PR does not add new standalone cmux windows or window controllers. Changes are to hit-testing/event handling of existing UI and helper functions. Test files contain only test-fixture NSWindow insta...
Cmux Source Artifacts ✅ Passed All 7 changed files are hand-written source code, tests, or Xcode build configurations (project.pbxproj). No artifacts, logs, build output, caches, or scratch directories added.
Description check ✅ Passed The PR description comprehensively covers the issue, root cause, fix, testing approach, and includes reproduction details and demo evidence location.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-6066-minimal-ui-toolbar-hittest

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a dead-zone regression in Minimal UI where terminal top-row clicks were silently dropped because shouldPassThroughToTitlebar unconditionally forwarded any point in the fixed titlebar interaction band to macOS chrome, even when a hosted terminal extended into that band.

  • Hit-test fix: shouldPassThroughToTitlebar and shouldPassThroughToPaneTabBar now share a lazy-evaluated, cached hostedTerminalHitViewResolver closure; pass-through is suppressed when a terminal is under the cursor unless a registered titlebar control takes priority.
  • Double-click fix: minimalModeTitlebarDoubleClickShouldDefer is consolidated in the new WindowTerminalHostViewHitTesting.swift extension and expanded to defer synthetic zoom/minimize when any hosted terminal occupies the click point, keeping all three call sites (TitlebarDoubleClickMonitorView, MinimalModeTitlebarEventSurfaceView, WindowDecorationsController) consistent.
  • Tests: Four new @Suite tests cover the terminal top-row click regression, double-click deferral, WindowDecorationsController pass-through, and registered-control priority over underlapping terminals.

Confidence Score: 5/5

Safe to merge — the change is tightly scoped to the titlebar hit-test and double-click deferral paths, all three call sites are updated consistently, and four focused regression tests validate the fix and its boundary conditions.

The fix correctly narrows the unconditional titlebar pass-through to only fire when no hosted terminal is under the cursor, with registered controls still taking priority. The lazy resolver avoids double-traversal in the common case. The new hasHostedTerminal recursive helper and the direct-subview hostedTerminalHitView serve two different callers with intentionally different search depths, and the tests exercise both paths. No production paths are left in an incorrect state.

No files require special attention.

Important Files Changed

Filename Overview
Sources/WindowTerminalHostViewHitTesting.swift New file extracting hit-testing helpers into a focused extension; introduces lazy-caching resolver, recursive hasHostedTerminal traversal, and the consolidated minimalModeTitlebarDoubleClickShouldDefer free function.
Sources/TerminalWindowPortal.swift Core hit-test routing updated to share a lazy resolver and now correctly guards titlebar pass-through against hosted terminal presence, fixing the minimal-UI top-row dead zone.
Sources/WindowDecorationsController.swift Titlebar double-click guard updated to call the consolidated minimalModeTitlebarDoubleClickShouldDefer, which now also defers when a hosted terminal occupies the click point.
Sources/WindowDragHandleView.swift Removes the redundant titlebarDoubleClickMonitorShouldDeferToRegisteredControl wrapper and migrates both monitor sites to the new consolidated minimalModeTitlebarDoubleClickShouldDefer.
cmuxTests/WindowTerminalHostViewTitlebarHitTests.swift New regression test suite covering four scenarios: terminal top-row clicks in the titlebar band, double-click deferral, WindowDecorationsController pass-through, and registered-control priority over underlapping terminals.
cmuxTests/TitlebarInteractiveControlTests.swift Existing test sites updated to call the renamed minimalModeTitlebarDoubleClickShouldDefer; semantics under the test conditions (no hosted terminal present) are unchanged.
cmux.xcodeproj/project.pbxproj Adds WindowTerminalHostViewHitTesting.swift to the app target and WindowTerminalHostViewTitlebarHitTests.swift to the test target; no structural changes.

Sequence Diagram

sequenceDiagram
    participant AppKit as AppKit Event Dispatch
    participant WTHV as WindowTerminalHostView
    participant Resolver as HitViewResolver (lazy)
    participant TitlebarCheck as shouldPassThroughToTitlebar
    participant TabBarCheck as shouldPassThroughToPaneTabBar
    participant Terminal as GhosttySurfaceScrollView

    AppKit->>WTHV: "hitTest(point)"
    WTHV->>WTHV: "performHitTest(at:currentEvent:)"
    WTHV->>Resolver: "hostedTerminalHitViewResolver(at: point)"

    WTHV->>TitlebarCheck: "shouldPassThroughToTitlebar(at:hostedTerminalHitView:)"
    alt "NOT in titlebar band"
        TitlebarCheck-->>WTHV: "false - continue"
    else "in titlebar band AND registered control hit"
        TitlebarCheck-->>WTHV: "true - return nil (pass through to chrome)"
    else "in titlebar band, no registered control"
        TitlebarCheck->>Resolver: "invoke resolver (lazy eval)"
        Resolver->>WTHV: "hostedTerminalHitView(at:)"
        WTHV->>Terminal: "search direct subviews"
        Terminal-->>Resolver: "NSView or nil"
        alt "terminal found under cursor"
            TitlebarCheck-->>WTHV: "false - terminal keeps click"
        else "no terminal"
            TitlebarCheck-->>WTHV: "true - pass through to titlebar"
        end
    end

    WTHV->>TabBarCheck: "shouldPassThroughToPaneTabBar(at:eventType:hostedTerminalHitView:)"
    alt "registry hit"
        TabBarCheck-->>WTHV: "true - pass through"
    else "no registry hit"
        TabBarCheck->>Resolver: "invoke resolver (cached, no re-eval)"
        Resolver-->>TabBarCheck: "cached hit view"
        TabBarCheck-->>WTHV: "result based on terminal presence"
    end

    WTHV-->>AppKit: "hit view (terminal subview or nil)"
Loading

Reviews (8): Last reviewed commit: "perf: lazily resolve terminal titlebar h..." | Re-trigger Greptile

Comment thread cmuxTests/TerminalAndGhosttyTests.swift Outdated
Comment on lines +3832 to +3841
XCTAssertGreaterThanOrEqual(
pointInWindow.y,
BonsplitTabBarPassThrough.titlebarInteractionBandMinY(in: window),
"The regression point must exercise the fixed-height titlebar pass-through band"
)
assertHitFallsInsideHostedTerminal(
host.performHitTest(at: pointInHost, currentEvent: event),
hostedView: hostedView,
message: "Minimal-mode terminal content that extends into the titlebar band should keep receiving top-row mouse-downs"
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Guard assertion does not exit on failure

XCTAssertGreaterThanOrEqual records a failure but does not stop execution. If the window geometry unexpectedly places pointInWindow.y below titlebarInteractionBandMinY, the guard assertion fires but assertHitFallsInsideHostedTerminal is still evaluated. Because the hosted terminal fills the entire host.bounds, a click anywhere on it would route to the terminal even without the fix — so the second assertion would likely pass on the old code as well, making the regression test give a false sense of coverage while only the guard shows as failing. Adding a return (or using XCTSkipIf) after the guard assertion ensures the test aborts rather than silently exercising the wrong scenario.

Suggested change
XCTAssertGreaterThanOrEqual(
pointInWindow.y,
BonsplitTabBarPassThrough.titlebarInteractionBandMinY(in: window),
"The regression point must exercise the fixed-height titlebar pass-through band"
)
assertHitFallsInsideHostedTerminal(
host.performHitTest(at: pointInHost, currentEvent: event),
hostedView: hostedView,
message: "Minimal-mode terminal content that extends into the titlebar band should keep receiving top-row mouse-downs"
)
guard pointInWindow.y >= BonsplitTabBarPassThrough.titlebarInteractionBandMinY(in: window) else {
XCTFail("The regression point must exercise the fixed-height titlebar pass-through band")
return
}
assertHitFallsInsideHostedTerminal(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b6198ed by converting the titlebar-band preconditions to guard/return checks in the new focused test file, so the assertions cannot continue on the wrong geometry.

— Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded in the current test file: the titlebar-band geometry check now uses Swift Testing , so the test exits before evaluating the hit assertion if the point is outside the fixed band.

— Claude Code

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Sources/TerminalWindowPortal.swift`:
- Line 126: The hit-test path is calling hostedTerminalHitView(at:) multiple
times redundantly - once within shouldPassThroughToTitlebar and again within
shouldPassThroughToPaneTabBar. To fix this, compute hostedTerminalHitView(at:)
once before calling these helper methods and cache the result. Then refactor
both shouldPassThroughToTitlebar and shouldPassThroughToPaneTabBar to accept the
precomputed hosted terminal view as an optional parameter instead of computing
it internally. Update all existing call sites of these helpers to pass either
the precomputed view or nil (for backward compatibility where the optimization
is not applicable) to eliminate the redundant scans in the pointer event hot
path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8f21802a-85d9-4388-8e2d-3a9b701ca368

📥 Commits

Reviewing files that changed from the base of the PR and between 45049b3 and 7a74b84.

📒 Files selected for processing (3)
  • Sources/TerminalWindowPortal.swift
  • cmux.xcodeproj/project.pbxproj
  • cmuxTests/WindowTerminalHostViewTitlebarHitTests.swift

Comment thread Sources/TerminalWindowPortal.swift Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Sources/WindowTerminalHostViewHitTesting.swift`:
- Around line 4-34: The `hasHostedTerminal(at:)` method only checks direct
subviews, missing hosted terminals wrapped by intermediate views - refactor this
method to be recursive, so it also checks nested subviews that aren't
GhosttySurfaceScrollView instances. In the private static
`hasHostedTerminal(atWindowPoint:in:)` method, the recursion loop starting at
line 30 traverses every subview without checking whether the point is inside
them first, causing broad tree walks - add a bounds check for each subview
before recursing into it, ensuring only subviews that actually contain the point
are traversed to improve performance and properly bound the hit-test search.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6ecdf5dc-7bff-4ce3-9b1b-5791bf12121a

📥 Commits

Reviewing files that changed from the base of the PR and between 7a74b84 and 293b605.

📒 Files selected for processing (5)
  • Sources/WindowDragHandleView.swift
  • Sources/WindowTerminalHostViewHitTesting.swift
  • cmux.xcodeproj/project.pbxproj
  • cmuxTests/TitlebarInteractiveControlTests.swift
  • cmuxTests/WindowTerminalHostViewTitlebarHitTests.swift

Comment thread Sources/WindowTerminalHostViewHitTesting.swift

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Sources/TerminalWindowPortal.swift`:
- Around line 203-207: The `shouldPassThroughToTitlebar` function's default
parameter of `hostedTerminalHitView = nil` makes titlebar-band pass-through
unconditional when callers omit this argument, diverging from the overlap-aware
behavior in `performHitTest`. Update the calls to `shouldPassThroughToTitlebar`
at lines 239-242 to explicitly pass the appropriate `hostedTerminalHitView`
value instead of relying on the `nil` default, ensuring consistent titlebar
routing behavior over hosted terminal content.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 42f9339e-cb81-460a-b5d0-b64c91d590c8

📥 Commits

Reviewing files that changed from the base of the PR and between 293b605 and 44e1711.

📒 Files selected for processing (2)
  • Sources/TerminalWindowPortal.swift
  • cmux.xcodeproj/project.pbxproj

Comment thread Sources/TerminalWindowPortal.swift Outdated
@austinywang austinywang merged commit 400a736 into main Jun 14, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Top approx 30 pixels of terminal aren't registering mouse clicks in TUIs in Minimal UI mode

1 participant