Commit Graph

14674 Commits

Author SHA1 Message Date
ghostty-vouch[bot]
2e172eeb60 Update VOUCHED list (#10927)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10920) from
@mitchellh.

Vouch: @sunshine-syz

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-21 17:18:28 +00:00
Mitchell Hashimoto
4581392625 macos: fix new tab crash (#10924)
It was introduced in 2a81d8cd2910b12fe007f0bc5fb5d6be57f0f0fe[0]. We
lost the subview. prefix of from the contains() call.


Fixes: https://github.com/ghostty-org/ghostty/issues/10923
Link:
2a81d8cd29
[0]
2026-02-21 07:25:24 -08:00
Tristan Partin
407b3c082f macos: fix new tab crash
It was introduced in 2a81d8cd2910b12fe007f0bc5fb5d6be57f0f0fe[0]. We
lost the subview. prefix of from the contains() call.

Co-authored-by: Brent Schroeter <github@brentsch.com>
Fixes: https://github.com/ghostty-org/ghostty/issues/10923
Link: 2a81d8cd29 [0]
2026-02-21 09:08:04 -06:00
Kat
02ca33d119 i18n/zh: update strings (#10844)
See #10632
2026-02-21 08:02:15 +00:00
Mitchell Hashimoto
2a81d8cd29 macos: swiftlint 'for_where' rule (#10909) 2026-02-20 21:06:47 -08:00
Mitchell Hashimoto
c17844c2db ci: use explicit PAT with path-filter for higher rate limits (#10915) 2026-02-20 21:06:39 -08:00
Mitchell Hashimoto
7c504649fd ci: use explicit PAT with path-filter for higher rate limits 2026-02-20 21:05:54 -08:00
Mitchell Hashimoto
ce46caeacb macos: swiftlint 'switch_case_alignment' rule (#10908) 2026-02-20 21:02:46 -08:00
Mitchell Hashimoto
6ec8744b16 macOS: expand tilde in file paths before opening (#10863)
## Summary

Cmd-clicking a file path containing `~` (e.g. `~/Documents/file.txt`)
fails to open the file on macOS because `URL(filePath:)` treats `~` as a
literal directory name rather than the user's home directory.

This uses `NSString.expandingTildeInPath` to resolve `~` before
constructing the file URL.

## Root Cause

In `openURL()`, when the URL string has no scheme it falls through to:

```swift
url = URL(filePath: action.url)
```

Swift's `URL(filePath:)` does not perform tilde expansion. A path like
`~/Documents/file.txt` produces a URL pointing to a non-existent file,
and `NSWorkspace.open` silently fails.

## Fix

```swift
let expandedPath = NSString(string: action.url).expandingTildeInPath
url = URL(filePath: expandedPath)
```

## Reproduction

1. Have a terminal application (e.g. Claude Code) that outputs file
paths with `~` prefixes
2. Cmd-click the path in Ghostty on macOS
3. The file does not open (fails silently)

With this fix, the path resolves correctly and opens in the default
editor.
2026-02-20 20:56:27 -08:00
Alex Feijoo
b65261eb66 macOS: expand tilde in file paths before opening
`URL(filePath:)` treats `~` as a literal directory name, so
cmd-clicking a path like `~/Documents/file.txt` would fail to
open because the resulting file URL doesn't point to a real file.

Use `NSString.expandingTildeInPath` to resolve `~` to the user's
home directory before constructing the file URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 20:37:54 -08:00
ghostty-vouch[bot]
e7b8e731eb Update VOUCHED list (#10914)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10581) from
@mitchellh.

Vouch: @neo773

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-21 04:31:43 +00:00
Mitchell Hashimoto
1e7f470eb8 ci: use every to filter vouch paths (#10913)
The prior filter wasn't working because the default quantifier is `any`.
2026-02-20 20:30:23 -08:00
Mitchell Hashimoto
07a68b3e65 ci: use every to filter vouch paths
The prior filter wasn't working because the default quantifier is
`any`.
2026-02-20 20:28:15 -08:00
ghostty-vouch[bot]
3404595c72 Update VOUCHED list (#10912)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10906) from
@mitchellh.

Vouch: @NateSmyth

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-21 04:15:38 +00:00
Jon Parise
2d6fa92d78 macos: swiftlint 'for_where' rule 2026-02-20 19:42:48 -05:00
Jon Parise
f7e6639c43 macos: swiftlint 'switch_case_alignment' rule 2026-02-20 19:18:40 -05:00
Mitchell Hashimoto
5db9f03f62 macos: swiftlint 'no_fallthrough_only' rule (#10899)
This rule is generally trying to be helpful, but it doesn't like a few
places in our code base where we're intentionally listing out all of the
well-known cases. Given that, just disable it.

https://realm.github.io/SwiftLint/no_fallthrough_only.html
2026-02-20 13:39:31 -08:00
Mitchell Hashimoto
2ed341495f macos: optimize secure input overlay animation (#10903)
Addresses discussion in #3729 and issues relating to #7333, #9590, and
#9617.

Rendering the Secure Keyboard Input overlay using innerShadow() can
strain the resources of the main thread, leading to elevated CPU load
and in some cases extended disruptions to the main thread's
DispatchQueue that result in lag or frozen frames. This change achieves
the same animated visual effect with ~35% lower CPU usage and resolves
most or all of the terminal rendering issues associated with the
overlay.
2026-02-20 13:39:14 -08:00
Mitchell Hashimoto
db1e31c7a6 ci: Add a skips job where we can accumulate skip conditions (#10901)
This adds a new job that we can use to set outputs to accumulate skip
conditions for other tests. The major change here is skipping all tests
if we're only updating vouches, to save our CI.

I also included a number of minor skips based on filepaths.
2026-02-20 11:03:00 -08:00
Mitchell Hashimoto
8699a67ecf ci: Add a skips job where we can accumulate skip conditions
This adds a new job that we can use to set outputs to accumulate skip
conditions for other tests. The major change here is skipping all tests
if we're only updating vouches, to save our CI.

I also included a number of minor skips based on filepaths.
2026-02-20 10:57:05 -08:00
Jeffrey C. Ollie
8e862e611b GTK: Pass parent's computed default/min sizes to the new window (#10805)
Fixes for #10532
2026-02-20 12:16:43 -06:00
Jon Parise
3d3ea3fa59 macos: swiftlint 'no_fallthrough_only' rule
This rule is generally trying to be helpful, but it doesn't like a few
places in our code base where we're intentionally listing out all of the
well-known cases. Given that, just disable it.

https://realm.github.io/SwiftLint/no_fallthrough_only.html
2026-02-20 13:01:30 -05:00
Ēriks Remess
727446fa8b gtk: for a new window's first tab, inherit the parent's initial size hints 2026-02-20 20:01:22 +02:00
ghostty-vouch[bot]
89e06a8402 Update VOUCHED list (#10898)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10863#issuecomment-3936322278)
from @mitchellh.

Vouch: @AlexFeijoo44

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-20 17:58:30 +00:00
Mitchell Hashimoto
3ba6d8174d macos: swiftlint 'unused_enumerated' rule (#10888) 2026-02-20 09:43:38 -08:00
Mitchell Hashimoto
6ca80091c5 macos: add root-level .swiftlint.yml (#10890)
In order to support running from both the repository root and from
within Xcode project, and to keep things generally organized, our
primary .swiftlint.yml configuration file lives under macos/.

This change introduces a root-level .swiftlint.yml which limits the file
scope to macos/ and then includes macos/.swiftlint.yml for the rest of
the directives.

This unlocks a few benefits:

- We no longer need to pass an explicit `macos` path argument in any of
our invocations. SwiftLint will do the right thing when run either from
the repository root or from within the macos/ directory.
- It lets us easily exclude the macos/build/ directory (and re-enable
the 'deployment_target' rule). In the previous setup, this was more
challenging than you'd expect due to SwiftLint's path resolution rules
and required passing even more arguments like `--working-directory`.

The only downside is adding a new file to the repository root, but that
feels like the right trade-off given the benefits and conveniences.
2026-02-20 09:43:13 -08:00
Mitchell Hashimoto
d4e5ba8c16 macos: ignore swiftlint 'line_length' rule (#10893)
Also, there are no more outstanding 'mark' issues.
2026-02-20 09:43:02 -08:00
Mitchell Hashimoto
0ac810461a deps: Update uucode to v0.2.0 (with unicode 17) (#10895)
This PR updates `uucode` to v0.2.0, with several new Unicode files being
parsed, various fixes (not affecting Ghostty), `wcwidth` grapheme
support, code point iteration, and finally an upgrade to Unicode 17. As
far as this impacting Ghostty, the Unicode 17 upgrade is the biggest
change, and even that is relatively minor.


31655fba3c...v0.2.0

The only needed change to the configuration is to revert `prepend`
characters to being non-zero width for Ghostty. See the comment.

No AI was used except to check the grammar of the comment. AI was used a
bit in the `uucode` changes, but mostly done by hand and closely
reviewed when used.
2026-02-20 09:42:30 -08:00
ghostty-vouch[bot]
125e96ff9e Update VOUCHED list (#10896)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10895#issuecomment-3936131923)
from @trag1c.

Vouch: @jacobsandlund

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-20 17:16:14 +00:00
Jacob Sandlund
e06ac6d33e Force prepend to use wcwidth_standalone 2026-02-20 12:12:26 -05:00
Jacob Sandlund
add991b66a Merge remote-tracking branch 'upstream/main' into uucode-unicode-17 2026-02-20 11:55:16 -05:00
Jeffrey C. Ollie
5008d7eb93 Add ghostty_config_get tests (#10891)
I mostly did this to familiarize myself with the codebase and figured it
doesn't hurt to cover this with tests if more added logic in this area,
despite this logic receiving indirect coverage elsewhere. [Here's my
related
proposal](https://github.com/ghostty-org/ghostty/discussions/10807).

I gave more thought around how to expose some of these config values and
their metadata in the C api to eventually drive a settings UI and was
hoping for feedback before I proceed.

The cleanest path forward feels like annotating config values with
formal metadata around things like: supported platforms, whether or not
a restart is required, presentation metadata like grouping + ordering,
tolerated ranges for values, possible enum values, etc. My intent is
that Swift & other consumers can enumerate potential settings values
with metadata such as to drive the UI from the metadata.

---

AI Disclosure: I used Codex 5.3 to help me understand how the config
subsystem in zig is exposed to Swift via the C API. Codex wrote these
tests; but we brainstormed on a pragmatic coverage balance and I
understand how the tests work.
2026-02-20 10:16:21 -06:00
Jon Parise
454d53e264 macos: ignore swiftlint 'line_length' rule
Also, there are no more outstanding 'mark' issues.
2026-02-20 10:35:10 -05:00
Jon Parise
c2eab3b43d macos: add root-level .swiftlint.yml
In order to support running from both the repository root and from
within Xcode project, and to keep things generally organized, our
primary .swiftlint.yml configuration file lives under macos/.

This change introduces a root-level .swiftlint.yml which limits the file
scope to macos/ and then includes macos/.swiftlint.yml for the rest of
the directives.

This unlocks a few benefits:

- We no longer need to pass an explicit `macos` path argument in any of
  our invocations. SwiftLint will do the right thing when run either
  from the repository root or from within the macos/ directory.
- It lets us easily exclude the macos/build/ directory (and re-enable
  the 'deployment_target' rule). In the previous setup, this was more
  challenging than you'd expect due to SwiftLint's path resolution rules
  and required passing even more arguments like `--working-directory`.

The only downside is adding a new file to the repository root, but that
feels like the right trade-off given the benefits and conveniences.
2026-02-20 09:21:04 -05:00
Jon Parise
e887527e59 macos: swiftlint 'unused_enumerated' rule 2026-02-20 08:03:05 -05:00
ghostty-vouch[bot]
b6c1a26437 Update VOUCHED list (#10887)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10882) from
@jcollie.

Vouch: @brentschroeter

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-20 12:37:50 +00:00
Alan Moyano
585bf3fcd2 Update es_AR translations with additional strings for 1.3 (#10861)
- Adds the three new string
- Changes one string for better wording
2026-02-20 09:55:39 +00:00
Brent Schroeter
7e90e26ae1 macos: optimize secure input overlay animation
Rendering the Secure Keyboard Input overlay using
innerShadow() can strain the resources of the main
thread, leading to elevated CPU load and in some
cases extended disruptions to the main thread's
DispatchQueue that result in lag or frozen frames.

This change achieves the same animated visual
effect with ~35% lower CPU usage and resolves most
or all of the terminal rendering issues associated
with the overlay.
2026-02-19 22:03:54 -08:00
Nico Ritschel
b0f00a65ed Add ghostty_config_get tests
I mostly did this to familiarize myself with the codebase and figured it
doesn't hurt to cover this with tests if I add more in this area,
despite receiving indirect coverage elsewhere.
2026-02-19 20:45:52 -08:00
Mitchell Hashimoto
1fa4e787eb ci: pass milestone token via github-token parameter (#10881)
If I am reading the upstream action right, even if you set GITHUB_TOKEN
env var its defaulting to `github.token`, so we need to specify as a
param.
2026-02-19 20:40:50 -08:00
Mitchell Hashimoto
a6b6033852 ci: pass milestone token via github-token parameter
If I am reading the upstream action right, even if you set GITHUB_TOKEN
env var its defaulting to `github.token`, so we need to specify as a
param.
2026-02-19 20:39:53 -08:00
Mitchell Hashimoto
df47dc1a98 ci: milestone workflow should use our vouch app token
This increases our rate limits and the vouch app already has the
permissions required for the milestone workflow.
2026-02-19 20:35:00 -08:00
Mitchell Hashimoto
c316472362 ci: milestone workflow should use our vouch app token (#10879)
This increases our rate limits and the vouch app already has the
permissions required for the milestone workflow.

cc @trag1c
2026-02-19 20:30:33 -08:00
Mitchell Hashimoto
2863849fca ci: milestone workflow should use our vouch app token
This increases our rate limits and the vouch app already has the
permissions required for the milestone workflow.
2026-02-19 20:28:30 -08:00
Mitchell Hashimoto
0eaf77da5f WIP: Make palette inversion opt-in (#10877)
From #10554

> I can see there being space for some kind of new sequence that tells
the terminal that "hey, I want a semantic palette" or something, that is
better adjusted to themes automatically. But, I don't think we should
this by default.

> So my concrete proposal is to eliminate the inversion and bg => fg
ramp and do a more typical dark => light ramp (still taking into account
bg/fg, but keeping 16 black and 231 white). I think this is the only way
we can really make this a default on feature. I think this would address
all the negative reactions we've gotten to it.

This adds a new `palette-harmonious`, disabled by default, which allows
generated light themes to be inverted.
2026-02-19 20:24:42 -08:00
TicClick
acf8cc7419 i18n: Update and slightly clean up Russian translation (#10633)
as per #10632
2026-02-20 04:24:29 +00:00
Jake Stewart
f66a84b18a improve light theme detection 2026-02-19 20:17:47 -08:00
Mitchell Hashimoto
a6fcb46e18 macos: autofixable swiftlint rules (#10878)
Apply fixes for all of the SwiftLint rules that can be automatically
fixed (`--fix`) or addressed via some minor reformatting.

Each rule is in its own commit for easier review.
2026-02-19 19:57:39 -08:00
trag1c
42c81dbccc bg_BG additional strings for 1.3 (#10836) 2026-02-20 01:28:54 +01:00
Jon Parise
dbf2e0e087 macos: swiftlint 'vertical_parameter_alignment' rule 2026-02-19 19:11:36 -05:00