Commit Graph

16666 Commits

Author SHA1 Message Date
Mitchell Hashimoto
66fed652a1 macOS: change split drag's point style to match HIG (#13433)
<img width="637" height="373" alt="image"
src="https://github.com/user-attachments/assets/bdcd25f1-7755-47d0-8582-26ea8a00a0ca"
/>

Previously there's mismatch with
[`CursorStyle.cursor`](15484b607e/macos/Sources/Helpers/Cursor.swift (L74-L109))

>
https://developer.apple.com/design/human-interface-guidelines/pointing-devices#Pointers
2026-07-25 08:54:57 -07:00
ghostty-vouch[bot]
4c725242b7 Update VOUCHED list (#13437)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/13436#discussioncomment-17759608)
from @jcollie.

Vouch: @SanJJ1

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-24 04:43:32 +00:00
Jeffrey C. Ollie
e6e26e165a Fix desktop detection tests when running from Gnome (#13434)
Environment variables from the "real" environment leaked into the test
after the Zig 0.16 update which would cause them to fail if you ran them
on a Gnome system.
2026-07-23 15:28:54 -05:00
Jeffrey C. Ollie
f8e13f31e6 Fix desktop detection tests when running from Gnome
Environment variables from the "real" environment leaked into the test
after the Zig 0.16 update which would cause them to fail if you ran them
on a Gnome system.
2026-07-23 14:47:06 -05:00
Lukas
fa3802a70e macOS: change split drag's point style to match HIG 2026-07-23 21:33:47 +02:00
Mitchell Hashimoto
15484b607e build: link libghostty-vt on Apple hosts with native linker (#13430)
Replaces: https://github.com/ghostty-org/ghostty/pull/13427

Zig's Mach-O linker does not emit LC_ENCRYPTION_INFO_64 for physical iOS
dylibs. This allows libghostty-vt to build successfully but causes
frameworks containing it to fail App Store validation.

I think it'd be cleaner to always just build Apple targets on Apple
hosts with the native linker. We don't need to rely on Zig being correct
and this helps ensure compatibility for details like this.
2026-07-23 06:59:56 -07:00
Mitchell Hashimoto
d65cb5128a build: link libghostty-vt on Apple hosts with native linker
Replaces: https://github.com/ghostty-org/ghostty/pull/13427

Zig's Mach-O linker does not emit LC_ENCRYPTION_INFO_64 for physical
iOS dylibs. This allows libghostty-vt to build successfully but causes
frameworks containing it to fail App Store validation.

I think it'd be cleaner to always just build Apple targets on Apple hosts
with the native linker. We don't need to rely on Zig being correct and 
this helps ensure compatibility for details like this.
2026-07-23 06:41:30 -07:00
Mitchell Hashimoto
30de782e8e fix(terminal): fix kitty temp directory copy length mismatch (#13424)
EDIT:
[exposed](https://github.com/elias8/libghostty/actions/runs/29996356691/job/89171182671?pr=113#step:12:447)
while syncing libghostty dart bindings to latest main.
2026-07-23 06:02:00 -07:00
Mitchell Hashimoto
4154185e23 os/hostname: switch to std.Io.net.HostName.validate (#13428)
Zig 0.16's hostname validation routine is RFC 1123-compliant, so we can
use it directly rather than rolling our own.

Ref:
efe649b13e
Ref: https://github.com/ziglang/zig/pull/25710
2026-07-23 05:48:20 -07:00
Jon Parise
e663d54051 os/hostname: switch to std.Io.net.HostName.validate
Zig 0.16's hostname validation routine is RFC 1123-compliant, so we can
use it directly rather than rolling our own.

Ref: efe649b13e
Ref: https://github.com/ziglang/zig/pull/25710
2026-07-23 08:15:06 -04:00
Elias Andualem
960c2cca5d fix: fix kitty temp directory copy length mismatch 2026-07-23 12:22:45 +03:00
Mitchell Hashimoto
ab0b9da9e8 pkg/apple-sdk: support Xcode 27 SDK headers (#13419)
Xcode 27's math.h uses the __need_infinity_nan protocol provided by
matching Clang resource headers. Zig 0.16's bundled float.h predates
that protocol, causing the bundled libc++ compilation to fail.

Overlay the SDK math.h through the Apple SDK libc include path and
provide the missing infinity and NaN definitions. The compatibility
header can be removed once Zig's bundled Clang headers support the
protocol.
2026-07-22 13:19:44 -07:00
Mitchell Hashimoto
d97a574242 ci: test with Xcode 27 2026-07-22 13:04:59 -07:00
Mitchell Hashimoto
1c861e3c47 pkg/apple-sdk: support Xcode 27 SDK headers
Xcode 27's math.h uses the __need_infinity_nan protocol provided by
matching Clang resource headers. Zig 0.16's bundled float.h predates
that protocol, causing the bundled libc++ compilation to fail.

Overlay the SDK math.h through the Apple SDK libc include path and
provide the missing infinity and NaN definitions. The compatibility
header can be removed once Zig's bundled Clang headers support the
protocol.
2026-07-22 12:58:19 -07:00
Mitchell Hashimoto
49a76f244d pkg/apple-sdk: enable libc++ availability annotations (#13418)
#13417

The bundled upstream libc++ headers in Zig 0.16 skip the
Apple-configured availability setting. This causes the headers to assume
every LLVM 21 ABI symbol is present in the target system libc++,
producing binaries that fail at launch on macOS versions without
`std::__hash_memory`.

Enable the Apple vendor availability table for compile steps configured
by the Apple SDK helper. libc++ now selects its inline compatibility
implementation when the target system dylib does not provide the symbol.

References in the mega comment
2026-07-22 11:31:24 -07:00
Mitchell Hashimoto
dac134d254 pkg/apple-sdk: enable libc++ availability annotations
#13417

The bundled upstream libc++ headers in Zig 0.16 skip the Apple-configured
availability setting. This causes the headers to assume every LLVM 21
ABI symbol is present in the target system libc++, producing binaries
that fail at launch on macOS versions without `std::__hash_memory`.

Enable the Apple vendor availability table for compile steps configured
by the Apple SDK helper. libc++ now selects its inline compatibility
implementation when the target system dylib does not provide the symbol.

References in the mega comment
2026-07-22 11:15:10 -07:00
Mitchell Hashimoto
7aa9591746 Update to Zig 0.16.0 (#12726)
Closes #12228
Supersedes #12388

**UPDATED** - Also check comments for additional details!

This commit represents the majority of the work necessary to upgrade
Ghostty to use Zig 0.16.0.

At this point, all tests pass under Linux, but more work may be
necessary to get them to build and function on other platforms.

There are some parts of this update that deserve commentary, so that
follows below:

## Expanded use of global state (IO/environment related)

Global state, once generally only used by the C library, has now been
expanded to be used across the project at large. The static local
variable that holds the state has been moved private in its source
container with all attributes that need to be accessed globally gated
behind accessors, most of which guard on testing and send test copies
instead. Use of the global state in non-testing scenarios asserts that
the state has been initialized through `init` naturally through the
optional assertion process.

The rationale for this change is to have a location to store a
general-purpose I/O implementation and environment variables, both of
which are now provided through [Juicy
Main](https://ziglang.org/download/0.16.0/release-notes.html#Juicy-Main)
and hence can no longer be accessed or mutated through stdlib without
use of lower-level system calls and hacks (some of which are employed,
but sparingly).

As the code matures, dependence on global state should naturally slim
down.

We do not allow global state to be used in libghostty-vt. There are
comptime guards that prevent this should compilation of libghostty-vt
end up pulling `global.zig`. This means that as per the last paragraph,
work has already begun to de-couple the codebase from global state where
necessary. Additionally, in some places where environment needs to be
updated and where it can be done in an isolated fashion, environment
maps are used - system-level injection of environment through the use of
`setenv` or `unsetenv` now only happens during early initialization (and
hopefully we can remove these in the future too, especially since they
require re-synchronization of the higher-level environment primitives
after this is done).

## The `lib/compat` Tree

Some stdlib features that have been removed but still either seem they
would be valuable to us or outright complex to move away from
(particularly `SegmentedList`) have been extracted from 0.15.2, updated
as needed, and placed in `src/lib/compat`. The intention again is to
allow for piecemeal migration to more modern implementations or possibly
straight local versions.

This paradigm has also allowed us to add `std.Io.Condition.waitTimeout`,
which incidentally was missed in the 0.16.0 shuffle and has been
re-added for 0.17.0. We can remove this in favor of the upstream when we
eventually migrate to that, obviously.

Note that there was a lot more of this extracted code when this work was
started, but a lot of said code has been removed (namely environment or
process/fd-related functionality).

## translate-c Issues (functional on Linux, Darwin WIP)

There have been a number of C translation issues that we have been
working through through submitted patches and the great help from folks
on the Arocc and Zig side. This is ongoing, with the remaining work to
getting things fixed mainly focused on the MacOS side. Stay tuned for
further developments.

As mentioned at the top, follow comments for more details!
2026-07-22 08:26:45 -07:00
Mitchell Hashimoto
b988efcfe5 fix some 0.16 translation regressions 2026-07-22 08:07:06 -07:00
Mitchell Hashimoto
a77c706a18 fix process and global error handling
Restore the error handling that the removed std.posix fork and waitpid
wrappers previously provided. Raw fork failures now propagate, waitpid
retries interruptions before reading status, and edit-config constructs the
sentinel-terminated argv required by execve.

Let global initialization own cleanup through its existing errdefer so
temporary paths are freed once. Report initialization failures with the
static synchronous I/O provider because global I/O has already been torn
down by that point.
2026-07-22 06:33:54 -07:00
Chris Marchesi
7121ab6c3f global: state should default to null 2026-07-21 23:14:34 -07:00
Chris Marchesi
4956668702 vt: get rid of log spam on tests
Zig 0.16.0 made the criteria for reporting "failed command" stricter (or
looser, depending on your perspective I guess...) - now, tests that
print anything to stderr cause the message to appear.

Note that in this instance tests still pass and you get a return code of
0, but nonetheless, it can be confusing.

Additionally, having spammy passing tests in general is not necessarily
a great experience, so this should help with that.

Note that this change was already done to the main tests. We can add a
build argument to control this if need be.
2026-07-21 22:05:33 -07:00
Chris Marchesi
048619a6bf global: take minimal instead of juicy main
The early-stage main Zig wrapper recognizes if main only needs the
minimal state (args and lower-level environment) and skips a bunch of
unneeded initialization (allocator, arena, threaded I/O, and the
higher-level environment map). Particularly, the fact that it does not
set up an I/O instance means that we won't have any unneeded signal
handlers set up for the unused threaded I/O implementation, which is
similar in spirit to the fixes we applied for the C VT implementation,
with the notable difference that we do actually set a threaded I/O up in
global state - hence, again, we don't want the duplicate unused one.
2026-07-21 22:05:33 -07:00
Chris Marchesi
da04b65d4c terminal: init_single_threaded for C API
The C API is assumed to be single-threaded per VT instance.
Additionally, using fully-threaded I/O instances registers signal
handlers, and would do a pair of registrations once per instance, which
could easily get out of hand (and is not really what we intend anyway).

init_single_threaded does not register signal handlers, so it does not
have this issue, and matches the execution model of the C VT API
(single-threaded/not thread-safe within a single VT instance).

This also fixes an initialization issue with the threaded I/O instance
in general (needs allocation as the memory location would have gone out
of scope before).
2026-07-21 21:35:35 -07:00
Mitchell Hashimoto
f2a7652aba mitchell's touchups
- benchmark: avoid buffers to avoid a memcpy
- build: keep frame pointers on macOS. There was some debug changes from
  Zig 0.15 and this helps. Also, Apple actually requires/expects x29 to
  always be a frame pointer.
- build/macos: force libSystem symbols instead of compiler-rt
- global: add InitOpts.tool so that ghostty-gen/bench can parse their
  own actions in `+action`
- quirks: provide our own vectorized memset. see the comment for more
  details why.
- synthetic: fix UB by accessing global.io before it was initialized
- terminal/hash_map: force inline for unique repr types. Zig 0.15
  inlined and 0.16 doesn't, measured a huge slowdown in hyperlink
  benchmarks.
- terminal: add explicit `@Vector` usage for storing a run of identical cells
  as well as for scanning printable cells. This auto-vectorized in Zig
  0.15 but not in Zig 0.16. This produces the same assembly.
- unicode: properties and LUT need power-of-two backing integer to avoid
  bad LLVM codegen
2026-07-21 17:19:16 -07:00
Chris Marchesi
e8525c0fd9 Update to Zig 0.16.0
This commit represents the majority of the work necessary to upgrade
Ghostty to use Zig 0.16.0.

Key parts:

* In addition to its previous responsibilities, the global state now
  houses state for global I/O implementations and the process
  environment. It is now also utilized in the main application along
  with the C library. Where necessary, global state is isolated from key
  parts of the implementation (e.g., in libghostty subsystems), and it's
  expected that this list will grow.

* We currently manage our own C translation layer where necessary. In
  these cases, cImport has been removed in favor of the new external
  translate-c package. Due to fixes that have needed be made to properly
  translate the dependencies that were swapped out, as mentioned, we
  have had to backport fixes from the current translate-c package (and
  the upstream Arocc dependency). We will host this ourselves until Zig
  0.17.0 is released with these fixes.

* Where necessary (only a small number of cases), some stdlib code from
  0.15.2 (and even from 0.17.0) has been taken, adopted, and vendored in
  lib/compat.

Co-authored-by: Leah Amelia Chen <hi@pluie.me>
2026-07-21 12:35:05 -07:00
Mitchell Hashimoto
88b4cd047f gitignore: add zig-pkg so switching between branches doesn't produce noise 2026-07-20 19:59:58 -07:00
Jeffrey C. Ollie
0a71d573d6 build(deps): bump actions/checkout from 7.0.0 to 7.0.1 (#13403)
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0
to 7.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v7.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>skip running unsafe pr check if input is default by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2518">actions/checkout#2518</a></li>
<li>trim only ascii whitespace for branch by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2521">actions/checkout#2521</a></li>
<li>escape values passed to --unset by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2530">actions/checkout#2530</a></li>
<li>Various dependency updates</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v7...v7.0.1">https://github.com/actions/checkout/compare/v7...v7.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v7.0.1</h2>
<ul>
<li>Skip running unsafe pr check if input is default by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2518">actions/checkout#2518</a></li>
<li>Trim only ascii whitespace for branch by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2521">actions/checkout#2521</a></li>
<li>Escape values passed to --unset by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2530">actions/checkout#2530</a></li>
<li>Various dependency updates</li>
</ul>
<h2>v7.0.0</h2>
<ul>
<li>Block checking out fork PR for pull_request_target and workflow_run
by <a href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2454">actions/checkout#2454</a></li>
<li>Various dependency updates</li>
</ul>
<h2>v6.0.3</h2>
<ul>
<li>Fix checkout init for SHA-256 repositories by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2439">actions/checkout#2439</a></li>
<li>fix: expand merge commit SHA regex and add SHA-256 test cases by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2414">actions/checkout#2414</a></li>
</ul>
<h2>v6.0.2</h2>
<ul>
<li>Fix tag handling: preserve annotations and explicit fetch-tags by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2356">actions/checkout#2356</a></li>
</ul>
<h2>v6.0.1</h2>
<ul>
<li>Add worktree support for persist-credentials includeIf by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2327">actions/checkout#2327</a></li>
</ul>
<h2>v6.0.0</h2>
<ul>
<li>Persist creds to a separate file by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li>
<li>Update README to include Node.js 24 support details and requirements
by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li>
</ul>
<h2>v5.0.1</h2>
<ul>
<li>Port v6 cleanup to v5 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li>
</ul>
<h2>v5.0.0</h2>
<ul>
<li>Update actions checkout to use node 24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li>
</ul>
<h2>v4.3.1</h2>
<ul>
<li>Port v6 cleanup to v4 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2305">actions/checkout#2305</a></li>
</ul>
<h2>v4.3.0</h2>
<ul>
<li>docs: update README.md by <a
href="https://github.com/motss"><code>@​motss</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li>
<li>Add internal repos for checking out multiple repositories by <a
href="https://github.com/mouismail"><code>@​mouismail</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li>
<li>Documentation update - add recommended permissions to Readme by <a
href="https://github.com/benwells"><code>@​benwells</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li>
<li>Adjust positioning of user email note and permissions heading by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li>
<li>Update CODEOWNERS for actions by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li>
<li>Update package dependencies by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li>
</ul>
<h2>v4.2.2</h2>
<ul>
<li><code>url-helper.ts</code> now leverages well-known environment
variables by <a href="https://github.com/jww3"><code>@​jww3</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li>
<li>Expand unit test coverage for <code>isGhes</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li>
</ul>
<h2>v4.2.1</h2>
<ul>
<li>Check out other refs/* by commit if provided, fall back to ref by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3d3c42e5aa"><code>3d3c42e</code></a>
prep v7.0.1 release (<a
href="https://redirect.github.com/actions/checkout/issues/2531">#2531</a>)</li>
<li><a
href="28802689a1"><code>2880268</code></a>
escape values passed to --unset (<a
href="https://redirect.github.com/actions/checkout/issues/2530">#2530</a>)</li>
<li><a
href="12cd2235ef"><code>12cd223</code></a>
trim only ascii whitespace for branch (<a
href="https://redirect.github.com/actions/checkout/issues/2521">#2521</a>)</li>
<li><a
href="62661c4e71"><code>62661c4</code></a>
skip running unsafe pr check if input is default (<a
href="https://redirect.github.com/actions/checkout/issues/2518">#2518</a>)</li>
<li><a
href="e8d4307400"><code>e8d4307</code></a>
Bump the minor-actions-dependencies group with 2 updates (<a
href="https://redirect.github.com/actions/checkout/issues/2499">#2499</a>)</li>
<li><a
href="631c942040"><code>631c942</code></a>
eslint 9 (<a
href="https://redirect.github.com/actions/checkout/issues/2474">#2474</a>)</li>
<li><a
href="4f1f4aec02"><code>4f1f4ae</code></a>
Bump actions/upload-artifact from 4 to 7 (<a
href="https://redirect.github.com/actions/checkout/issues/2476">#2476</a>)</li>
<li><a
href="ba097532fb"><code>ba09753</code></a>
Bump actions/checkout from 6 to 7 (<a
href="https://redirect.github.com/actions/checkout/issues/2488">#2488</a>)</li>
<li><a
href="b9e0990d21"><code>b9e0990</code></a>
Bump docker/login-action from 3.3.0 to 4.2.0 (<a
href="https://redirect.github.com/actions/checkout/issues/2479">#2479</a>)</li>
<li><a
href="e8cb398be4"><code>e8cb398</code></a>
Bump docker/build-push-action from 6.5.0 to 7.2.0 (<a
href="https://redirect.github.com/actions/checkout/issues/2478">#2478</a>)</li>
<li>Additional commits viewable in <a
href="9c091bb21b...3d3c42e5aa">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=7.0.0&new-version=7.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2026-07-20 20:15:12 -05:00
ghostty-vouch[bot]
30e1f3bb8c Update VOUCHED list (#13404)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/13402#discussioncomment-17707616)
from @jcollie.

Vouch: @carldaws

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-21 00:22:38 +00:00
dependabot[bot]
f5477459ea build(deps): bump actions/checkout from 7.0.0 to 7.0.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9c091bb21b...3d3c42e5aa)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-21 00:12:59 +00:00
ghostty-vouch[bot]
74d0c72fd9 Update VOUCHED list (#13401)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/13400#discussioncomment-17706483)
from @jcollie.

Vouch: @Ragnoroct

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-20 20:54:17 +00:00
Mitchell Hashimoto
ea7dc5c000 terminal: handle page capacity errors in eraseRow (#13397)
Re: #13160 (related but not that issue)

PageList eraseRow and eraseRowBounded have the same issue previously
fixed for cursorScrollAbove: when shifting rows up across a page
boundary, the top row of the next page is cloned into the last row of
the previous page, and that clone can fail if the destination page lacks
capacity for the row's managed memory.

Handle the errors the same way the other cross-page copies do: increase
the destination page capacity for the dimension that ran out and retry
the row copy.

This type of logic was repeated EVERYWHERE so I extracted this into a
helper in PageList and Screen. They're slightly different due to the
extra accounting that Screen has to do for the cursor.

Don't know of any scenario this actually happened in the real world but
it was trivially reproducible with tests.
2026-07-20 09:33:09 -07:00
Mitchell Hashimoto
ee9d5b352f terminal: handle page capacity errors in eraseRow
Re: #13160 (related but not that issue)

PageList eraseRow and eraseRowBounded have the same issue previously
fixed for cursorScrollAbove: when shifting rows up across a page boundary,
the top row of the next page is cloned into the last row of the
previous page, and that clone can fail if the destination page lacks
capacity for the row's managed memory.

Handle the errors the same way the other cross-page copies do:
increase the destination page capacity for the dimension that ran
out and retry the row copy.

This type of logic was repeated EVERYWHERE so I extracted this into a
helper in PageList and Screen. They're slightly different due to the extra
accounting that Screen has to do for the cursor.

Don't know of any scenario this actually happened in the real world but
it was trivially reproducible with tests.
2026-07-20 09:25:37 -07:00
Mitchell Hashimoto
ff8457b70f macOS: hide visible NSScrollPocket for hidden title bar (#13393)
Fixes https://github.com/ghostty-org/ghostty/issues/13390

Technically it would be safe to remove `#available(macOS 27, *)` check,
but I haven't tested all the os versions, so I kept it there.

### AI Disclosure

No AI is used for this one.
2026-07-20 08:17:19 -07:00
Mitchell Hashimoto
18d8303972 kitty images: add support for transient usage hints (#13389)
Kitty 0.48 added support for usage hints in the image protocol,
specifically for marking images as "transient", meaning that they should
be prioritized for eviction if there is memory pressure.

https://sw.kovidgoyal.net/kitty/graphics-protocol/#image-usage-hints

Also changed the eviction algorithm to use an allocated array for
organizing the images to be evicted rather than using an ArrayList to
minimize the number of allocations made (no real memory savings though).
2026-07-20 08:16:52 -07:00
Mitchell Hashimoto
56b086bd93 terminal: handle page capacity errors in cursorScrollAbove (#13394)
Re: #13160

When cursorScrollAbove rotates rows across a page boundary, the last row
of the previous page is cloned into the destination page. That can cause
capacity failures we didn't previously handle.

The error propagated out of the operation after rows had already been
rotated, leaving the page list half-mutated. Subsequent operations on
the corrupted state can cause crashes since the state was incoherent.

Handle these errors the same way insertLines and deleteLines already do
for their cross-page copies: increase the destination page capacity for
the dimension that ran out and retry the row copy.
2026-07-20 08:16:09 -07:00
Mitchell Hashimoto
0433262493 terminal: handle page capacity errors in cursorScrollAbove
Re: #13160

When cursorScrollAbove rotates rows across a page boundary, the last
row of the previous page is cloned into the destination page. That can
cause capacity failures we didn't previously handle.

The error propagated out of the operation after rows had already been rotated, 
leaving the page list half-mutated. Subsequent operations on the corrupted state
can cause crashes since the state was incoherent.

Handle these errors the same way insertLines and deleteLines already
do for their cross-page copies: increase the destination page capacity
for the dimension that ran out and retry the row copy.
2026-07-20 08:03:57 -07:00
Lukas
2104e0749c macOS: hide visible NSScrollPocket for hidden title bar
Fixes https://github.com/ghostty-org/ghostty/issues/13390
2026-07-20 14:30:43 +02:00
Jeffrey C. Ollie
a65e11cc92 kitty images: add support for transient usage hints
Kitty 0.48 added support for usage hints in the image protocol,
specifically for marking images as "transient", meaning that they
should be prioritized for eviction if there is memory pressure.

https://sw.kovidgoyal.net/kitty/graphics-protocol/#image-usage-hints

Also changed the eviction algorithm to use an allocated array for
organizing the images to be evicted rather than using an ArrayList to
minimize the number of allocations made (no real memory savings though).
2026-07-19 23:28:50 -05:00
Leah Amelia Chen
2511abe3dd config: update background-blur to reflect growing adoption (#13384)
`ext-background-effect-v1` is finally seeing major adoption throughout
KWin, Mutter, cosmic-comp, Niri, etc. and we should update our comments
on that.
2026-07-20 01:06:58 +08:00
Leah Amelia Chen
2da02f4d28 config: update background-blur to reflect growing adoption
`ext-background-effect-v1` is finally seeing major adoption throughout
KWin, Mutter, cosmic-comp, Niri, etc. and we should update our comments
on that.
2026-07-20 00:34:56 +08:00
ghostty-vouch[bot]
c9c017e8e5 Update VOUCHED list (#13383)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/13376#discussioncomment-17684953)
from @jcollie.

Vouch: @bousii

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-19 15:34:29 +00:00
Mitchell Hashimoto
77c65cb5fe Update iTerm2 colorschemes (#13377)
Upstream release:
https://github.com/mbadolato/iTerm2-Color-Schemes/releases/tag/release-20260713-155359-c3968b3
2026-07-19 06:16:05 -07:00
mitchellh
b513f1b209 deps: Update iTerm2 color schemes 2026-07-19 00:28:19 +00:00
Mitchell Hashimoto
f3c9a2b726 terminal: move cursor defaults into terminal state (#13370)
Cursor defaults were duplicated across stream handlers and it was a
pretty significant amount of simple and yet non-trivial logic to
understand.

Store these on Terminal itself and have methods to route things like
DECSCUSR through for consistent behaviors.

No AI usage here.
2026-07-17 20:16:21 -07:00
Mitchell Hashimoto
c594031d50 terminal: move cursor defaults into terminal state
Cursor defaults were duplicated across stream handlers and it was a
pretty significant amount of simple and yet non-trivial logic to
understand.

Store these on Terminal itself and have methods to route things like
DECSCUSR through for consistent behaviors.
2026-07-17 15:27:34 -07:00
Mitchell Hashimoto
6711672dec libghostty: mark semantic stream failures (#13369)
The libghostty-vt stream is made to be infallible: in the case of any
error it just logs and moves on. That's because a terminal can't
really... stop, under normal operations. But, under special operations
(fuzzing, replays, etc.) it can and should stop!

Rather than make the operation fallible, its simply enough for me at
least to know that something went wrong. This is a simple change that
adds a simple flag that is flagged to true when such a scenario happens.

For normal Ghostty GUI operations, this isn't used at all. For
libghostty consumers they can choose to read it if they want, but don't
have to.

This also adds a C API to read it.
2026-07-17 12:51:41 -07:00
Mitchell Hashimoto
439d35e27c libghostty: mark semantic stream failures
The libghostty-vt stream is made to be infallible: in the case of any error
it just logs and moves on. That's because a terminal can't really... stop,
under normal operations. But, under special operations (fuzzing, replays,
etc.) it can and should stop!

Rather than make the operation fallible, its simply enough for me at least
to know that something went wrong. This is a simple change that adds a simple
flag that is flagged to true when such a scenario happens.

For normal Ghostty GUI operations, this isn't used at all. For libghostty
consumers they can choose to read it if they want, but don't have to.

This also adds a C API to read it.
2026-07-17 12:29:11 -07:00
Mitchell Hashimoto
d7e9773329 terminal: make resize handling error-safe, handle more logic (#13367)
This makes error returns in `Screen.resize` and `Terminal.resize` safe:
they leave the terminal/screen in its prior state (with one exception,
noted below). Previously, both were documented as leaving the terminal
in a garbage stage on error.

Unit tests with tripwire added to verify errdefer behaviors.

This also includes a refactor: the common behaviors that resize needs
such as updating cell size in pixels, disabling synchronized output,
handling mode 2048, are now pulled into libghostty-vt. This will make it
easier for downstream libghostty users to make proper terminals.

**The one perfect undo exception:** If the primary screen can resize but
the alt screen cannot, then we try our best to do something reasonable,
in order:

1. If we're on the primary screen, we just deallocate the alt screen.
It'll be reallocated lazily (and may fail) in the future. Worst case
here is we lose screen data if the future TUI doesn't expect a clear on
enter/exit.

2. If we're on the alt screen, we deallocate to try recover memory, then
reinitialize eagerly at the new size hoping to at least have a blank alt
screen. Similar to 1, we lose screen data here, but its likely screen
data that mattered since we were actively on the alt screen.

3. If the eager reinit fails, we switch to the primary screen. This is
the biggest issue, cause the TUI program won't know this happened and
probably do some crazy stuff on the primary screen. But, its also a
super exceptional situation.

In every case though, the terminal is consistent and safe to use.

**LLM notes:** Only used as a judge and to assist with test writing, not
used at all for commit messages, PR, or non-test logic.
2026-07-17 10:39:38 -07:00
ghostty-vouch[bot]
f21d376883 Update VOUCHED list (#13368)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/13366#discussioncomment-17675218)
from @jcollie.

Vouch: @AprilNEA

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-17 17:36:17 +00:00
Mitchell Hashimoto
a3c1caba54 terminal: resize failures are now almost fully safe
Terminal resize could leave tab stops, pixel geometry, synchronized output, 
or screen dimensions partially updated when a later allocation failed. This
is now safe. There is one exception, see the code comments.
2026-07-17 10:21:01 -07:00