Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
49f5c06
linux: initial project scaffold (Rust + GTK4/libadwaita)
shuhei0866 Mar 4, 2026
ade6375
linux: add ghostty-sys FFI bindings crate
shuhei0866 Mar 4, 2026
5501f49
linux: add ghostty-gtk safe Rust wrapper crate
shuhei0866 Mar 4, 2026
663497e
linux: add cmux model layer (workspace, panel, layout tree)
shuhei0866 Mar 4, 2026
934303c
linux: add GTK4/libadwaita UI layer
shuhei0866 Mar 4, 2026
7ecfe21
linux: add Unix socket server with v2 JSON protocol
shuhei0866 Mar 4, 2026
9391757
linux: add session persistence and notification store
shuhei0866 Mar 4, 2026
97a020f
linux: add app entry point and cmux-cli client
shuhei0866 Mar 4, 2026
74a8a95
linux: fix socket permissions and enforce authentication
shuhei0866 Mar 4, 2026
11eaf87
linux: unify UI/socket state and fix review feedback
shuhei0866 Mar 4, 2026
1360304
linux: address CodeRabbit review feedback
shuhei0866 Mar 4, 2026
e18ba25
linux: fix macOS protocol compat, bounded reads, and CLI robustness
shuhei0866 Mar 4, 2026
6c8da21
linux: sync sidebar and content on workspace mutations
shuhei0866 Mar 4, 2026
92e87df
linux: fix deadlock, validate inputs, add defensive fallbacks
shuhei0866 Mar 4, 2026
83e6ac2
linux: harden socket server, bound collections, fix FFI safety
shuhei0866 Mar 4, 2026
3b50ac9
linux: tighten XDG mode check, add client idle timeout
shuhei0866 Mar 4, 2026
e89d32c
linux: harden MutexGuard scopes, defense-in-depth truncation, remove …
shuhei0866 Mar 6, 2026
75c5966
linux: rename CLAUDE.md to README.md, fix reference paths
shuhei0866 Mar 6, 2026
9197081
linux: wire Ubuntu MVP runtime and attention loop
shuhei0866 Mar 8, 2026
9004c24
fix: stabilize Ubuntu MVP runtime
shuhei0866 Mar 8, 2026
7886d37
fix: scope split divider updates to workspace
shuhei0866 Mar 8, 2026
a1d411f
fix: bundle Ghostty resources and clipboard callbacks
shuhei0866 Mar 8, 2026
a70a8e5
fix: harden Ubuntu MVP compatibility and runtime loading
shuhei0866 Mar 8, 2026
e1aed9e
linux: harden Ubuntu MVP review branch
shuhei0866 Mar 10, 2026
0ece797
linux: harden GTK callback lifecycle
shuhei0866 Mar 10, 2026
eaaec9e
linux: buffer deferred terminal input
shuhei0866 Mar 10, 2026
664fefd
Merge upstream main into linux-port
shuhei0866 Mar 11, 2026
ab4b201
Add Linux port Ghostty-linked demo captures
shuhei0866 Mar 11, 2026
00ef0d5
Make Linux capture demo script portable and socket-safe
shuhei0866 Mar 12, 2026
638ccb8
Anonymize Linux port demo captures
shuhei0866 Mar 13, 2026
253929d
Quote anonymized Linux demo path
shuhei0866 Mar 13, 2026
44f7cbc
Escape shell-special chars in display_quoted_path
shuhei0866 Mar 13, 2026
6ed720c
Address cubic review: 14 issues across linux/ codebase
shuhei0866 Mar 13, 2026
d53f5e0
Address round 2 review findings
shuhei0866 Mar 13, 2026
df00870
Address round 3 review findings
shuhei0866 Mar 13, 2026
edd38e1
Address cubic re-review (3 issues)
shuhei0866 Mar 13, 2026
7b0d415
Trigger GitHub merge status recalculation
shuhei0866 Mar 13, 2026
c5a31cc
Harden against cubic review findings
shuhei0866 Mar 14, 2026
b31ca7d
Harden FFI trampolines, UUID validation, and remaining lock safety
shuhei0866 Mar 14, 2026
ea1e719
Merge main into linux-port
da-beda Mar 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .claude/reviews/2026-03-14-pr828-cubic-r2-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Review Loop Summary — PR #828 Cubic Issues (Round 2)

**Date:** 2026-03-14
**Rounds:** 2/3
**Status:** Converged (zero new findings in Round 2)
**Reviewers:** Security(opus) + Logic(opus) + Completeness(opus)

## Issues by Round
| Round | Reviewers | Found | Fixed | Skipped | Cross-validated |
|-------|-----------|-------|-------|---------|-----------------|
| 0 | cubic | 11 | 6 | 5 | - |
| 1 | 3 | 2 | 2 | 0 | 2 |
| 2 | 1 | 0 | - | - | Converged |

## Cubic Issues Disposition (11 total)

### Fixed (8):
1. **callbacks.rs** - All 6 FFI trampolines wrapped with `catch_unwind` + panic logging (P1)
2. **v2.rs:560** - `surface.send_input` UUID validation added (P1, cross-validated in R1)
3. **v2.rs:622** - `notification.create` UUID validation added (P2)
4. **window.rs:62** - `lock().unwrap()` → `lock_or_recover` (P2)
5. **window.rs:280** - Additional `lock().unwrap()` found by reviewers (cross-validated, elevated to high)
6. **main.rs:90** - `wrap` bool flag fixed with `action = Set, default_value_t = true` (P2)
7. **demo.sh:66** - Non-socket file check added (P2)
8. **demo.sh:120** - nc timeout `-w 5` added (P2)

### Skipped with rationale (3):
- **server.rs:70** - Already fixed in prior round (stale socket detection is correct)
- **app.rs:45 RuntimeCallbacks** - False positive (callbacks stored in `state._callbacks`)
- **store.rs:24 dead code** - Intentional MVP scaffolding

### Not in scope (medium, no fix needed):
- **build.rs:164** - `.flatten()` in build script is acceptable
- **GHOSTTY_APP_PTR lock().unwrap()** - Static mutex for raw pointer; crash-on-poison is safer than recovery

## Changes Made
```
linux/cmux-cli/src/main.rs | 6 ++-
linux/cmux/src/socket/v2.rs | 46 ++++++++++++++----
linux/cmux/src/ui/window.rs | 14 +-----
linux/ghostty-gtk/src/callbacks.rs | 98 ++++++++++++++++++++++++-
scripts/capture-linux-port-demo.sh | 8 +++-
5 files changed, 110 insertions(+), 62 deletions(-)
```

## Build Verification
- `cargo check`: pass (26 pre-existing dead code warnings, no new warnings)
58 changes: 9 additions & 49 deletions docs/ghostty-fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ When we change the fork, update this document and the parent submodule SHA.

## Current fork changes

Fork rebased onto upstream `v1.3.0` plus newer `main` commits as of March 12, 2026.
Fork rebased onto upstream `v1.3.0` plus newer `main` commits as of March 9, 2026.

### 1) OSC 99 (kitty) notification parser

Expand Down Expand Up @@ -45,10 +45,6 @@ Fork rebased onto upstream `v1.3.0` plus newer `main` commits as of March 12, 20

### 4) macOS resize stale-frame mitigation

Sections 3 and 4 are grouped by feature, not by commit order. The section 4 resize commits were
applied earlier than the section 3 copy-mode commit, but they are kept together here because they
touch the same stale-frame mitigation path and tend to conflict in the same files during rebases.

- Commits:
- `769bbf7a9` (macos: reduce transient blank/scaled frames during resize)
- `9efcdfdf8` (macos: keep top-left gravity for stale-frame replay)
Expand All @@ -63,44 +59,14 @@ touch the same stale-frame mitigation path and tend to conflict in the same file
- Replays the last rendered frame during resize and keeps its geometry anchored correctly.
- Reduces transient blank or scaled frames while a macOS window is being resized.

### 5) zsh prompt redraw markers use OSC 133 P

- Commit: `8ade43ce5` (zsh: use OSC 133 P for prompt redraws)
- Files:
- `src/shell-integration/zsh/ghostty-integration`
- Summary:
- Emits one `OSC 133;A` fresh-prompt mark for real prompt transitions.
- Uses `OSC 133;P` markers for prompt redraws so async zsh themes do not look like extra prompt lines.

### 6) zsh Pure-style multiline prompt redraws

- Commits:
- `0cf559581` (zsh: fix Pure-style multiline prompt redraws)
- `312c7b23a` (zsh: avoid extra Pure continuation markers)
- `404a3f175` (Fix Pure prompt redraw markers)
- Files:
- `src/shell-integration/zsh/ghostty-integration`
- Summary:
- Handles multiline prompts that use `\n%{\r%}` to return to column 0 before the visible prompt line.
- Keeps redraw-safe prompt-start markers for async themes.
- Avoids inserting an explicit continuation marker after Pure's hidden carriage return, because Ghostty already tracks the newline as prompt continuation and the extra marker duplicates the preprompt row.
- Restores that prompt-marker behavior on top of the current Ghostty `main` base after the older redraw fix drifted out during later submodule updates.

The fork branch HEAD is now the section 6 zsh redraw follow-up commit.

### 7) cmux theme picker helper hooks
### 5) Linux embedded resize stale-frame guard scoping

- Commit: `0c52c987b` (Add cmux theme picker helper hooks)
- Commit: `9b0febb59` (embedded: scope stale-frame guard override to Linux)
- Files:
- `build.zig`
- `src/cli/list_themes.zig`
- `src/main_ghostty.zig`
- `src/renderer/generic.zig`
- Summary:
- Adds a `zig build cli-helper` step so cmux can bundle Ghostty's CLI helper binary on macOS.
- Lets `+list-themes` switch into a cmux-managed mode via env vars, writing the cmux theme override file and posting the existing cmux reload notification for live app-wide preview.
- Fixes the helper-only `app-runtime=none` stdout path so the Ghostty CLI binary builds with the current Zig toolchain.

The fork branch HEAD is now the section 7 cmux theme picker helper commit.
- Limits the embedded resize stale-frame override to Linux `libghostty` builds.
- Preserves the existing synchronous resize guard for other embedded hosts such as GhosttyKit on Darwin.

## Upstreamed fork changes

Expand All @@ -120,14 +86,8 @@ These files change frequently upstream; be careful when rebasing the fork:
- `src/terminal/osc.zig`
- OSC dispatch logic moves often. Re-check the integration points for the OSC 99 parser.

- `src/shell-integration/zsh/ghostty-integration`
- Prompt marker handling is easy to regress when upstream adjusts zsh redraw behavior. Keep the
`OSC 133;A` vs `OSC 133;P` split intact for redraw-heavy themes. Pure-style `\n%{\r%}`
prompt newlines should not get an extra explicit continuation marker after the hidden CR.

- `src/cli/list_themes.zig`
- cmux now relies on the upstream picker UI plus local env-driven hooks for live preview and restore.
If upstream reorganizes the preview loop or key handling, re-check the cmux mode path and keep the
stock Ghostty behavior unchanged when the cmux env vars are absent.
- `src/renderer/generic.zig`
- Upstream already carries resize-flash mitigation logic around the sync display path.
- Keep the Linux embedded override narrow so GhosttyKit/macOS retains the stale-frame replay behavior.

If you resolve a conflict, update this doc with what changed.
6 changes: 6 additions & 0 deletions linux/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/target
/ghostty
*.swp
*.swo
*~
.DS_Store
Loading
Loading