Port the top fixes from upstream cmux#130
Merged
Merged
Conversation
…off-thread Port of upstream cmux c30733e (GhosttyTitleUpdateDispatcher: at most one .ghosttyDidSetTitle post per surface per 50ms, last value always delivered) and cb2129a (BackgroundLogWriter: single serial queue + long-lived FileHandle instead of per-call open/seek/write/close under a lock). Shells and agent CLIs that rewrite the title on every render no longer flood the main actor during typing, and logBackground callers no longer block on file I/O.
…S 26+ launch crash Port of upstream cmux 5d79094/cb509ee745: Image(systemName:) sized only via .font(.system(size:)) can rasterize at 0x0 during a window's pre-visible layout pass, and macOS 26+ throws an uncaught NSInvalidArgumentException (targetSizeInPoints must be > 0) instead of warning. Adds RenderableSystemSymbol.clampedRasterPointSize + Image.symbolRasterSize and converts 15 font-only-sized symbol sites. Six matching sites inside TabItemView's equatable body are deliberately left alone (typing-latency guardrail); same rendered size at every converted site.
…l; safe log FileHandle APIs Two small upstream ports: - cmux 0bdf694: a ring-only state change no longer forces a portal resynchronize in GhosttyTerminalView's update pass. Rebinding while SwiftUI is invalidating notification UI could leave the terminal hidden (blank) until the next tab switch. - bonsplit cffd9a6: DebugEventLog now uses the throwing FileHandle APIs instead of the deprecated seekToEndOfFile/write/closeFile trio, which raise ObjC exceptions (uncatchable from Swift) if the log file disappears.
Port of upstream cmux 4afeef6. The tmux-compat format context emitted hardcoded values for every pane and window: session_id was always $0, window_active always 1, window_flags always *. Scripts and statuslines parsing format strings across panes saw identical fake session ids and every window claiming to be active. Session/window/pane ids now derive from a stable FNV hash of the workspace id, active/focused state is wired through from the real workspace list, and selectors round-trip through the numeric ids. The fake TMUX_PANE an agent sees now matches the format context. Also folds in the bundled fix that stops an opencode.json parse error from leaking the user's home path. Verified: go build, go vet, go test, gofmt all clean.
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.
What this does
Brings over the five most valuable fixes upstream cmux has shipped since we forked in April. Typing under a title-spamming CLI (like a progress spinner or an agent) no longer lags, the app no longer risks a launch crash on macOS 26+, terminals no longer go blank after a completion notification, and tmux-format scripts finally see real session and window state instead of hardcoded fakes.
Summary
GhosttyTitleUpdateDispatcher;logBackgroundfile I/O moved to a serial background queue (BackgroundLogWriter). Ports of upstream c30733e / cb2129a..font(.system(size:))can rasterize at 0×0 in a pre-visible layout pass, which macOS 26+ treats as a fatalNSInvalidArgumentException. NewsymbolRasterSizehelper drives raster size from an explicit frame; 15 sites converted. Six matching sites insideTabItemView's equatable body were deliberately left alone (typing-latency guardrail). Port of upstream 5d79094.DebugEventLogswitched off deprecated ObjC-exception-throwing FileHandle APIs (upstream bonsplit cffd9a6).$0/ always-active for every pane; the fakeTMUX_PANEagents see now matches. Includes upstream's bundled fix for an opencode.json parse error leaking the home path. Port of upstream 4afeef6.Deliberately not ported after investigation: upstream's divider-drag resize coalescing (a5a70ff) — it depends on a pixel-vs-cell sizing gate and bonsplit drag-end delegate hooks that don't exist in our architecture; porting it partially risks panes stuck at a stale size. Needs its own design if drag-resize perf ever becomes a complaint.
Test Plan
PROGRAMA_SKIP_ZIG_BUILD=1local build, per-commit)go build,go vet,go test(incl. new regression tests for the tmux identity fix),gofmtcleanhitTest,forceRefresh,TabItemView) untouched — verified per commit