Commit Graph

13366 Commits

Author SHA1 Message Date
Mitchell Hashimoto
dc7bc3014e add apprt action to notify apprt of surface readonly state 2025-12-12 13:13:54 -08:00
Mitchell Hashimoto
0bf3642939 core: manage read-only through queueIo 2025-12-12 13:08:03 -08:00
Mitchell Hashimoto
29fdb541d5 make all IO message queueing go through queueIo so we can intercept 2025-12-12 12:00:28 -08:00
Mitchell Hashimoto
b58ac983cf docs changes 2025-12-12 07:29:46 -08:00
Matthew Hrehirchuk
6369aaa93e Merge branch 'main' of github.com:ghostty-org/ghostty into feat/read-only 2025-12-12 07:24:48 -08:00
Matthew Hrehirchuk
547bcd261d fix: removed apprt action for toggle_readonly 2025-12-12 07:24:22 -08:00
Matthew Hrehirchuk
12bb2f3f47 feat: add readonly surface mode 2025-12-12 07:24:22 -08:00
Mitchell Hashimoto
dd06d8a13b os/shell: introduce ShellCommandBuilder (#9881)
This builder is an efficient way to construct space-separated shell
command strings.

We use it in setupBash to avoid using an intermediate array of arguments
to construct our bash command line.
2025-12-12 07:09:58 -08:00
Mitchell Hashimoto
c95801db85 CONTRIBUTING: limit AI assistance to code only (#9882)
I think at this point all moderators and helpers can agree with me in
that LLM-generated responses are a blight upon this Earth.

Also probably worth putting in a clause against AI-generated assets
2025-12-12 07:09:35 -08:00
Jon Parise
04fecd7c07 os/shell: introduce ShellCommandBuilder
This builder is an efficient way to construct space-separated shell
command strings.

We use it in setupBash to avoid using an intermediate array of arguments
to construct our bash command line.
2025-12-12 08:59:44 -05:00
Leah Amelia Chen
315c8852a8 CONTRIBUTING: reorganize paragraphs 2025-12-12 18:59:22 +08:00
Leah Amelia Chen
8a1bb215c1 CONTRIBUTING: further clarifications 2025-12-12 18:56:24 +08:00
Leah Amelia Chen
5e049e1b3a CONTRIBUTING: AI-assisted != AI-generated 2025-12-12 18:53:10 +08:00
Leah Amelia Chen
65539d0d54 CONTRIBUTING: limit AI assistance to code only
I think at this point all moderators and helpers can agree with me in
that LLM-generated responses are a blight upon this Earth.

Also probably worth putting in a clause against AI-generated assets
(cf. the Commit Goods situation)
2025-12-12 18:43:51 +08:00
Mitchell Hashimoto
5aefb4b0a8 build(deps): bump cachix/install-nix-action from 31.8.4 to 31.9.0 (#9877)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 31.8.4 to 31.9.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v31.9.0</h2>
<h2>What's Changed</h2>
<ul>
<li>nix: 2.32.4 -&gt; 2.33.0 by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>[bot]
in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/264">cachix/install-nix-action#264</a></li>
<li>chore(deps): bump peter-evans/create-pull-request from 7 to 8 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/263">cachix/install-nix-action#263</a></li>
<li>chore(deps): bump actions/checkout from 5 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/262">cachix/install-nix-action#262</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/cachix/install-nix-action/compare/v31.8.4...v31.9.0">https://github.com/cachix/install-nix-action/compare/v31.8.4...v31.9.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4e002c8ec8"><code>4e002c8</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/262">#262</a>
from cachix/dependabot/github_actions/actions/checkout-6</li>
<li><a
href="65fe36965b"><code>65fe369</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/263">#263</a>
from cachix/dependabot/github_actions/peter-evans/cre...</li>
<li><a
href="c61d28fbcf"><code>c61d28f</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/264">#264</a>
from cachix/create-pull-request/patch</li>
<li><a
href="72e7d4072f"><code>72e7d40</code></a>
nix: 2.32.4 -&gt; 2.33.0</li>
<li><a
href="15a7ab2c66"><code>15a7ab2</code></a>
chore(deps): bump peter-evans/create-pull-request from 7 to 8</li>
<li><a
href="523410fd45"><code>523410f</code></a>
chore(deps): bump actions/checkout from 5 to 6</li>
<li><a
href="7e5978947b"><code>7e59789</code></a>
ci: drop macos-13 runner</li>
<li>See full diff in <a
href="0b0e072294...4e002c8ec8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=31.8.4&new-version=31.9.0)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-12-11 16:54:02 -08:00
Mitchell Hashimoto
cba82e976c macOS: Change Tab Title (#9879)
This adds the ability to change a _tab_ title. The previous
functionality was tied to a specific _surface_. A tab title will stick
to the current tab regardless of active splits and so on.

This follows the nomenclature that macOS terminal app does which is
"title vs terminal title" (although we explicitly use "tab" in various
places, I may remove that in the future).

**This is macOS only. GTK is tracked here: #9880**. I did macOS only
because thats the machine I'm on. It'll be trivial to add this to GTK,
too.

## Demo


https://github.com/user-attachments/assets/d9446785-d919-4212-8553-db50c56c8c2f

(The option is also in the main menu, the context menu, and the command
palette)

## AI Disclosure

This PR was done fully with Amp, I didn't write a single line of code at
the time of writing this PR description. I reviewed everything though
and fully understand it all. Its a mimic more or less of the prompt
surface title work (although we did unify some stuff like the apprt
action).
2025-12-11 16:53:50 -08:00
Mitchell Hashimoto
50bbced0c9 macos: add title override to restorable state 2025-12-11 16:40:09 -08:00
Mitchell Hashimoto
6105344c31 macos: add change tab title to right click menu 2025-12-11 16:30:06 -08:00
Mitchell Hashimoto
65c5e72d3e macos: add tab title change to tab context menu 2025-12-11 16:24:50 -08:00
Mitchell Hashimoto
7b48eb5c62 macos: add change tab title to menu 2025-12-11 16:16:12 -08:00
Mitchell Hashimoto
65cf124e2c core: change apprt action to enum value instead of a new one 2025-12-11 16:09:45 -08:00
dependabot[bot]
1f05625d3f build(deps): bump cachix/install-nix-action from 31.8.4 to 31.9.0
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.8.4 to 31.9.0.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](0b0e072294...4e002c8ec8)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-12 00:06:57 +00:00
Mitchell Hashimoto
e93a4a911f macos: implement prompt_tab_title 2025-12-11 16:03:30 -08:00
Mitchell Hashimoto
32033c9e1a core: prompt_tab_title binding and apprt action 2025-12-11 16:03:19 -08:00
Mitchell Hashimoto
2448a90c30 bash: use a shell command for shell integration (#9875)
Prior to #7044, on macOS, our shell-integrated command line would be
executed under `exec -l`, which causes bash to be started as a login
shell. This matches the macOS platform norms.

The change to direct command execution meant that we'd skip that path,
and bash would start as a normal interactive (non-login) shell on macOS.
We fixed this in #7253 by adding `--login` to the `bash` direct command
on macOS.

This avoided some of the overhead of starting an extra process just to
get a login shell, but it unfortunately doesn't quite match the bash
environment we get when shell integration isn't enabled (namely, `$0`
doesn't get the login-shell-identifying `-` prefix).

Instead, this change implements the approach proposed in #7254, which
switches the bash shell integration path to use a `.shell` command,
giving us the same execution environment as the non-shell-integrated
command.
2025-12-11 15:41:29 -08:00
Mitchell Hashimoto
4d757f0f28 macos: show tab color as header for menu item so its not grey 2025-12-11 14:43:26 -08:00
Mitchell Hashimoto
89bdee447f macos: selected color in tab color menu should use target's color 2025-12-11 14:33:50 -08:00
Mitchell Hashimoto
d77b7c32f9 feat(macos): add tab color picker to tab context menu (#9784)
<img width="1824" height="1488" alt="image"
src="https://github.com/user-attachments/assets/4a77f743-9eae-40bf-8cb4-d45d884a85a5"
/>
2025-12-11 14:27:25 -08:00
Mitchell Hashimoto
2331e17835 macos: change tab color label to circle 2025-12-11 14:18:57 -08:00
Jon Parise
c0deaaba4e bash: use a shell command for shell integration
Prior to #7044, on macOS, our shell-integrated command line would be
executed under exec -l, which causes bash to be started as a login
shell. This matches the macOS platform norms.

The change to direct command execution meant that we'd skip that path,
and bash would start as a normal interactive (non-login) shell on macOS.
We fixed this in #7253 by adding `--login` to the `bash` direct command
on macOS.

This avoided some of the overhead of starting an extra process just to
get a login shell, but it unfortunately doesn't quite match the bash
environment we get when shell integration isn't enabled (namely, $0
doesn't get the login-shell-identifying "-" prefix).

Instead, this change implements the approach proposed in #7254, which
switches the bash shell integration path to use a .shell command, giving
us the same execution environment as the non-shell-integrated command.
2025-12-11 17:02:14 -05:00
Mitchell Hashimoto
6332fb5c01 macos: some cleanup 2025-12-11 13:59:06 -08:00
Mitchell Hashimoto
f71a25a621 macos: make the tab color indicator SwiftUI 2025-12-11 13:57:39 -08:00
Mitchell Hashimoto
c83bf1de75 macos: simplify terminal controller a bunch 2025-12-11 13:50:24 -08:00
Mitchell Hashimoto
1073e89a0d macos: move context menu stuff in terminal window down to an ext 2025-12-11 13:40:01 -08:00
Mitchell Hashimoto
f559bccc38 macos: clean up setting up the tab menu by using an NSMenu extension 2025-12-11 13:36:49 -08:00
Mitchell Hashimoto
a0089702f1 macos: convert tab color view to SwiftUI 2025-12-11 13:27:51 -08:00
Jeffrey C. Ollie
5dd4e60c31 Fix typo in po/README_TRANS (#9870)
via the its -> via its
2025-12-11 10:06:54 -06:00
Mitchell Hashimoto
04913905a3 macos: tab color is codable for restoration 2025-12-11 07:24:46 -08:00
Mitchell Hashimoto
51589a4e02 macos: move TerminalTabColor to its own file 2025-12-11 07:23:51 -08:00
George Papadakis
1a65c1aae2 feat(macos): add tab color picker to tab context menu 2025-12-11 07:16:26 -08:00
Mitchell Hashimoto
c45a762031 fix(terminal): increase grapheme_bytes instead of hyperlink_bytes during reflow (#9866)
Fixed: When reflowing content with many graphemes, the code incorrectly
increased hyperlink_bytes capacity
instead of grapheme_bytes, causing GraphemeMapOutOfMemory errors.

Added: An unit test for this specific issue. 

This PR was written primarily by Opus.

Closes: #9863
2025-12-11 07:06:51 -08:00
Devzeth
b224b69054 fix(terminal): increase grapheme_bytes instead of hyperlink_bytes during reflow
When reflowing content with many graphemes, the code incorrectly increased hyperlink_bytes capacity
instead of grapheme_bytes, causing GraphemeMapOutOfMemory errors.
2025-12-11 07:03:12 -08:00
Mitchell Hashimoto
86503045e9 fix: prevent integer overflow in hash_map layoutForCapacity (#9871)
Closes #9862
2025-12-11 06:57:23 -08:00
benodiwal
0d8c193bda fix(terminal): prevent integer overflow in hash_map layoutForCapacity
Co-Authored-By: Sachin <sachinbeniwal0101@gmail.com>
2025-12-11 16:43:16 +05:30
Felipe M.B.
3b2f551dc0 Fix typo in po/README_TRANS
via the its -> via its
2025-12-11 07:54:20 -03:00
Jeffrey C. Ollie
dd4493b153 Fix typo in po/README_CONTRIB (#9869)
Change translable to translatable.
2025-12-11 01:54:50 -06:00
Felipe M.B.
f96aca7a3f Fix typo in po/README_CONTRIB
Change translable to translatable.
2025-12-11 04:13:19 -03:00
Mitchell Hashimoto
669733d597 macos: remove iOS signing (dev team) 2025-12-10 21:21:05 -08:00
Mitchell Hashimoto
4a6d551941 macos: don't put NSMenu extension in iOS build 2025-12-10 21:20:39 -08:00
Mitchell Hashimoto
a531ea8b08 Add close tabs on the right action (#9783)
<img width="1694" height="1146" alt="image"
src="https://github.com/user-attachments/assets/f9e1e7e6-7cfe-4760-85fe-def7c10f4110"
/>
2025-12-10 21:09:13 -08:00