fix: close remaining gaps found by the completeness audit

Addresses the partial ports listed in
docs/rewrite/notes/review-completeness-codex.md (details in
docs/rewrite/notes/gaps-X2.md):
- Flatpak: the exit watcher no longer consumes the host command; a
  shared FlatpakSignalHandle lets closing a surface still SIGHUP the
  host process group.
- Child environment is byte-preserving end to end (ghostty_os::EnvMap
  of OsStrings) and Snap paths are filtered like filterSnapPaths.
- argv handling no longer panics on non-UTF-8 arguments.
- URI percent-decoding keeps raw bytes; OSC 7 pwd is passed through
  without lossy conversion.
- Keybinding comparison/hashing uses full Unicode case folding from a
  table generated from CaseFolding.txt (Unicode 17.0.0).
- Link regexes set Oniguruma's whole-search retry limit through the new
  minimal ghostty-onig crate (one SAFETY-commented FFI call).
- OSC 9 NUL-capacity check ordering matches Zig.
- Wayland registry binds/clears globals advertised after startup.
- Custom shaders may pass sampler2D to helper functions (naga adapter).
- +list-themes preview renders OSC 8 links, styled underlines and
  follows color-scheme reports.

Also includes the inspector's integration edits in shared files
(renderer state hook, termio VT recording, core/apprt-gtk wiring), X1's
config/input/cli additions for completion generation, and a fix for a
race in the termio backpressure test (it wrote before `stty raw`
applied, so the cooked line discipline dropped bytes past MAX_CANON).

Test Plan:
- cargo test --workspace
- cargo clippy --workspace --all-targets -- -D warnings
This commit is contained in:
ddidderr committed 2026-10-12 04:39:24 +02:00
1 parent 90ad602969
commit f4c020101c
61 files changed
+4210 -298

No files matched your search

Generated
+110
View File
@@ -664,6 +664,51 @@ dependencies = [
"syn 3.0.8",
]
[[package]]
name = "dear-imgui-build-support"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "728af47c10cb2b12aa36b942e610f894ecafc5d61d0056ab61f9629f02b3d5dc"
dependencies = [
"cc",
"serde",
"serde_json",
]
[[package]]
name = "dear-imgui-glow"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39146f8b48d335ed4bc3e40e6c216fe3dfc8d3e1da4d1ea1550d4545b339d117"
dependencies = [
"dear-imgui-rs",
"glow",
"thiserror 2.0.21",
]
[[package]]
name = "dear-imgui-rs"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40f283479a70f65bb3f1239b48116a65272a51c7d1cda718b6149823fb0f2444"
dependencies = [
"bitflags 2.13.2",
"dear-imgui-sys",
"parking_lot",
"thiserror 2.0.21",
]
[[package]]
name = "dear-imgui-sys"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c70a5f41bba03683065fd068881da406d1dfe76ec47fe276837017ac210a46f8"
dependencies = [
"cc",
"dear-imgui-build-support",
"mint",
]
[[package]]
name = "defmt"
version = "1.1.1"
@@ -1208,6 +1253,7 @@ dependencies = [
"ghostty-config",
"ghostty-datastruct",
"ghostty-input",
"ghostty-inspector",
"ghostty-renderer",
"ghostty-terminal",
"ghostty-vt",
@@ -1219,6 +1265,7 @@ name = "ghostty-apprt-gtk"
version = "0.1.0"
dependencies = [
"bitflags 2.13.2",
"dear-imgui-glow",
"env_logger",
"gdk4-wayland",
"gdk4-x11",
@@ -1226,6 +1273,7 @@ dependencies = [
"ghostty-config",
"ghostty-datastruct",
"ghostty-input",
"ghostty-inspector",
"ghostty-os",
"ghostty-vt",
"glib-build-tools",
@@ -1255,6 +1303,17 @@ dependencies = [
"log",
]
[[package]]
name = "ghostty-build-data"
version = "0.1.0"
dependencies = [
"ghostty-cli",
"ghostty-config",
"ghostty-input",
"ghostty-os",
"ghostty-termio",
]
[[package]]
name = "ghostty-cli"
version = "0.1.0"
@@ -1269,6 +1328,7 @@ dependencies = [
"log",
"ratatui",
"tempfile",
"termina",
"thiserror 2.0.21",
"unicode-width",
]
@@ -1298,6 +1358,7 @@ dependencies = [
"ghostty-datastruct",
"ghostty-font",
"ghostty-input",
"ghostty-inspector",
"ghostty-os",
"ghostty-renderer",
"ghostty-terminal",
@@ -1341,11 +1402,33 @@ dependencies = [
name = "ghostty-input"
version = "0.1.0"
dependencies = [
"ghostty-unicode",
"ghostty-vt",
"indexmap",
"thiserror 2.0.21",
]
[[package]]
name = "ghostty-inspector"
version = "0.1.0"
dependencies = [
"dear-imgui-rs",
"ghostty-font",
"ghostty-input",
"ghostty-renderer",
"ghostty-terminal",
"ghostty-vt",
"log",
]
[[package]]
name = "ghostty-onig"
version = "0.1.0"
dependencies = [
"onig",
"onig_sys",
]
[[package]]
name = "ghostty-os"
version = "0.1.0"
@@ -1392,6 +1475,7 @@ dependencies = [
"ghostty-cli",
"ghostty-config",
"ghostty-core",
"ghostty-os",
"log",
]
@@ -1404,6 +1488,7 @@ dependencies = [
"flate2",
"ghostty-config",
"ghostty-datastruct",
"ghostty-onig",
"ghostty-unicode",
"ghostty-vt",
"log",
@@ -2147,6 +2232,12 @@ dependencies = [
"simd-adler32",
]
[[package]]
name = "mint"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff"
[[package]]
name = "mio"
version = "1.2.4"
@@ -2955,6 +3046,19 @@ dependencies = [
"syn 3.0.8",
]
[[package]]
name = "serde_json"
version = "1.0.154"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
dependencies = [
"itoa",
"memchr",
"serde",
"serde_core",
"zmij",
]
[[package]]
name = "serde_repr"
version = "0.1.21"
@@ -4074,6 +4178,12 @@ version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
[[package]]
name = "zmij"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
[[package]]
name = "zvariant"
version = "5.15.0"