Skip to content

Fix FileDropOverlay recursion crash on mouse events - #79

Closed
austinywang wants to merge 2 commits into
mainfrom
cmux/infinite-recursion-bug
Closed

austinywang wants to merge 2 commits into
mainfrom
cmux/infinite-recursion-bug

Conversation

@austinywang

@austinywang austinywang commented Feb 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • resolve merge conflicts in Sources/ContentView.swift
  • keep file-drag-only overlay hit-testing (.fileURL) so non-file interactions pass through normally
  • replace recursive event forwarding with direct target dispatch guarded by isForwarding to prevent stack overflow in FileDropOverlayView.mouseDown(with:)

Validation

  • xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug -destination 'platform=macOS' build CODE_SIGNING_ALLOWED=NO (passes)

@cmux-agent

cmux-agent Bot commented Feb 19, 2026 •

Copy link
Copy Markdown
Contributor

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Screenshot capture was skipped.

No UI changes detected - screenshots skipped


Generated by manaflow preview system

@vercel

vercel Bot commented Feb 19, 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 Feb 19, 2026 1:50am

austinywang added a commit that referenced this pull request Jun 5, 2026
… on a link

Final review round (codex): the latched link-open path opened the link under the
release cursor for any in-flight ctrl/super click, so a chord drag that started
off a link and released over one opened that link (its press was suppressed).
ghostty #79 captures whether the press was over a link (link_press_over_link) and
only opens via the latched path when it was, so an off-link-started drag is
swallowed rather than opening a link it merely released over.

Re-pins the ghostty submodule from 9f014e9 to df789cd and repoints the
prebuilt GhosttyKit release/checksum + docs. df789cd is an ancestor of
manaflow-ai/ghostty main once #79 merges.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
austinywang added a commit that referenced this pull request Jun 10, 2026
…ex) (#5406)

* Bump ghostty to 55d154a: open links on cmd-click under mouse reporting

Fixes #5128. Clicking a link inside a fullscreen alternate-screen TUI
(Claude Code, Codex) opened the OS default browser instead of honoring the
configured cmux link-open target. cmux's GHOSTTY_ACTION_OPEN_URL handler is
already mode-independent (resolveTerminalOpenURLTarget routes per
BrowserAvailabilitySettings, no mouse-mode branch); the gap was in ghostty
core, where link hover state was refreshed only when mouse reporting was off
or shift released capture, so a Cmd-click under a mouse-grabbing TUI never
fired open_url.

Bumps the ghostty submodule to 55d154a (previous pin 176bd55 + the two
link-fix commits from manaflow-ai/ghostty#71, merged into fork main). The fix
also evaluates links locally when the ctrl/super link modifier is held, using
the effective mouse-reporting state, matching iTerm2 and macOS Terminal.

Publishes and pins the matching GhosttyKit xcframework
(xcframework-55d154a...-crashsubdir-cmux-crash-v1) and updates docs/ghostty-fork.md.
No cmux Swift change is required (no cmux-only gap), so there are no new
user-facing strings to localize.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Re-pin ghostty to d1dbbec: suppress half-click leak on cmd-clicked links

Addresses codex/greptile review of the link fix: under mouse reporting a
Cmd-click over a link still leaked a half-click to the program because
mouseButtonCallback reported the press (link-open runs only on release). The
ghostty follow-up (manaflow-ai/ghostty#74) suppresses the whole click — press
and release — whenever the ctrl/super link chord is held, keyed on the modifier
like the existing shift-release path so cursor jitter can't leak a press or a
release. Eliminates the half-click in both directions.

Re-pins the ghostty submodule from 55d154a to d1dbbec, repoints the prebuilt
GhosttyKit release/checksum, and updates docs/ghostty-fork.md. d1dbbec is an
ancestor of manaflow-ai/ghostty main (PR #71 and #74 merged).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Re-pin ghostty to 76ead3e: full click+drag suppression for cmd-clicked links

Final review iteration (codex P2). After #74 suppressed the press/release of a
ctrl/super-chord link click, cursorPosCallback could still emit .motion reports
during a Cmd-held drag (click_state == .press), leaking button-motion to a
mouse-grabbing program. ghostty #75 mirrors the shift "grab override" for the
ctrl/super chord in the motion path, so the link chord now suppresses the whole
click+drag — press, release, and motion — consistently.

Re-pins the ghostty submodule from d1dbbec to 76ead3e and repoints the
prebuilt GhosttyKit release/checksum + docs. 76ead3e is an ancestor of
manaflow-ai/ghostty main (PR #71, #74, #75 merged).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Re-pin ghostty to f241952: scope link suppression + clear stale hover

Final review iteration (codex P2 x2). After #74/#75 suppressed the whole click+
drag for the ctrl/super link chord, two edges remained: the suppression fired for
any button (swallowing ctrl/super right/middle clicks instead of delivering them
to the program), and a stale link highlight/cursor could persist when the chord
was released through cursorPosCallback's mods. ghostty #76 scopes the suppression
to the left button and clears the hover by refreshing when over_link is set
(mirroring keyCallback's existing reset branch).

Re-pins the ghostty submodule from 76ead3e to f241952 and repoints the
prebuilt GhosttyKit release/checksum + docs. f241952 is an ancestor of
manaflow-ai/ghostty main (PR #71, #74, #75, #76 merged).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Re-pin ghostty to 59fb750: clear link-click latch unconditionally

Addresses the final review round on the link-under-mouse-reporting fix:
- codex P2: the suppression re-checked live modifiers, so releasing ctrl/super
  before the mouse button could leak the release. ghostty #77 latches the
  decision at left-button press (mouse.link_click_active) and applies it through
  the release.
- greptile P2: the latch was cleared only inside the mouse-reporting block, so
  toggling reporting off mid-click could leave it stale; it is now cleared
  unconditionally on left release.

Re-pins the ghostty submodule from f241952 to 59fb750 and repoints the
prebuilt GhosttyKit release/checksum + docs. 59fb750 is an ancestor of
manaflow-ai/ghostty main once #77 merges.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Re-pin ghostty to 9f014e9: unify link-click suppression and open

Final review round on the link-under-mouse-reporting fix (codex P2/P3): the
report-suppression latched at press but the link-open path re-derived from live
modifiers, so releasing ctrl/super before the button swallowed the click, and
the latch reset wasn't reached on the link-open early return. ghostty #78 makes
linkAtPos use the latched chord and attempts processLinks whenever the click is
latched, and clears the latch via a function-level defer. One press-time
decision now drives press/drag/release suppression and link opening.

Re-pins the ghostty submodule from 59fb750 to 9f014e9 and repoints the
prebuilt GhosttyKit release/checksum + docs. 9f014e9 is an ancestor of
manaflow-ai/ghostty main once #78 merges.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Re-pin ghostty to df789cd: only open latched link clicks that started on a link

Final review round (codex): the latched link-open path opened the link under the
release cursor for any in-flight ctrl/super click, so a chord drag that started
off a link and released over one opened that link (its press was suppressed).
ghostty #79 captures whether the press was over a link (link_press_over_link) and
only opens via the latched path when it was, so an off-link-started drag is
swallowed rather than opening a link it merely released over.

Re-pins the ghostty submodule from 9f014e9 to df789cd and repoints the
prebuilt GhosttyKit release/checksum + docs. df789cd is an ancestor of
manaflow-ai/ghostty main once #79 merges.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: pin merged GhosttyKit artifact

* Pin GhosttyKit checksum for merged ghostty 34cbf18 (#5128 + #5458)

Pins the SHA256 of the published prebuilt
xcframework-34cbf180d8917b802d61d9929cfb493594f2ab52-crashsubdir-cmux-crash-v1
that merges the surface registry serialization (#5458) into the alt-screen
Cmd-click link fix (#5128).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Refresh Swift file-length budget for ContentView/SessionIndexView

The origin/main merge (sidebar scroll + macOS 27 crash fixes, PR #5670) grew
Sources/ContentView.swift to 19161 and Sources/SessionIndexView.swift to 2877,
which exceed the inherited budget. Bump only those two entries to match; this is
upstream main debt surfaced by the merge, not a change from the ghostty bump.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — cd23bf74 Deployed Feb 19, 2026 by vercel[bot]
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.

1 participant