Skip to content

Add Ghostty to the terminal app picker - #2831

Open
darwinz wants to merge 1 commit into
steipete:mainfrom
darwinz:feature/ghostty-terminal-support
Open

Add Ghostty to the terminal app picker#2831
darwinz wants to merge 1 commit into
steipete:mainfrom
darwinz:feature/ghostty-terminal-support

Conversation

@darwinz

@darwinz darwinz commented Aug 10, 2026

Copy link
Copy Markdown

Summary

Add Ghostty 1.3+ as a third option in Settings → General → Default terminal so shared “Open Terminal” and provider login actions can launch commands in the user’s configured Ghostty shell.

  • add TerminalApp.ghostty with bundle ID com.mitchellh.ghostty
  • use Ghostty’s AppleScript new window with configuration {initial input:… & linefeed} path
  • generalize the unavailable-app fallback from iTerm-only to every non-Terminal selection
  • preserve Terminal.app fallback when Ghostty is absent, too old, has AppleScript disabled, or the script fails
  • retain existing picker/persistence/icon behavior through the shared CaseIterable terminal abstraction

This branch is rebased onto current main; the public commit metadata is human-only and contains no model attribution.

Compatibility decision

Ghostty documents AppleScript support starting in 1.3.0 and still describes the interface as preview. Merging this PR makes Ghostty 1.3+ an explicitly supported terminal choice while retaining Terminal.app as the compatibility fallback.

Recommendation: accept the bounded integration. It uses the existing launcher boundary, has direct signed-app proof, and degrades to established behavior on unsupported installations.

Validation

  • CODEXBAR_SUPPRESS_TEST_KEYCHAIN_ACCESS=1 swift test --filter 'TerminalAppTests|PreferencesPaneSmokeTests' — 38 tests passed
  • make check — passed
  • structured autoreview — secret scan clean; no accepted/actionable findings
  • Developer-ID-signed debug bundle exercised the actual StatusItemController.openTerminalNSAppleScript path against installed Ghostty 1.3.1 on macOS 26.6.1

Signed-app proof

The signed CodexBar bundle selected Ghostty in-process, called its real openTerminal method, created a Ghostty window, and executed:

printf ghostty-proof > /tmp/codexbar-ghostty-proof.txt

The marker file contained ghostty-proof, and the captured Ghostty accessibility tree showed the command in the terminal content followed by the returned shell prompt. No standalone osascript substitute was used for this proof.

The same signed bundle opened Settings with Ghostty detected and selected:

Ghostty selected in CodexBar Settings

The original contributor transcript and redacted Ghostty screenshot remain useful independent corroboration.

Fixes #2830

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed August 12, 2026, 11:56 AM ET / 15:56 UTC.

ClawSweeper review

What this changes

The PR adds Ghostty to CodexBar’s default-terminal picker and launches menu and provider-login commands through Ghostty’s AppleScript interface with a Terminal.app fallback.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

This PR remains necessary because current main still offers only Terminal and iTerm. The focused implementation has no code-level finding; accepting Ghostty’s preview AppleScript API is the remaining maintainer compatibility decision. Likely related people: steipete (high confidence).

Priority: P3
Reviewed head: c63162ebfe7331347389cb6fbfc62c9b338419d8
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, proof-backed implementation whose remaining question is the product decision to support a preview third-party automation interface.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR documents an after-fix signed CodexBar bundle using the production launcher with Ghostty 1.3.1, verified by a marker file and accessibility output; the Settings screenshot corroborates selection.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR documents an after-fix signed CodexBar bundle using the production launcher with Ghostty 1.3.1, verified by a marker file and accessibility output; the Settings screenshot corroborates selection.
Evidence reviewed 6 items Current-main gap: Current main defines only Terminal and iTerm, so it does not provide the requested Ghostty picker option.
Focused integration: The branch adds Ghostty’s bundle identifier and AppleScript launch path at the existing terminal abstraction boundary.
Fallback preserved: The shared launcher generalizes the preflight fallback from iTerm-only to every non-Terminal selection; later AppleScript errors already fall back to Terminal.app.
Findings None None.
Security None None.

How this fits together

CodexBar’s terminal launcher receives commands from menu and provider-login actions, then dispatches them through the terminal selected in Settings. The selected terminal’s AppleScript opens a shell window and falls back to Terminal.app when the non-default app is unavailable or rejects automation.

flowchart LR
A[Menu and login actions] --> B[Terminal launcher]
B --> C[Saved terminal choice]
C --> D{Selected app available?}
D -->|Yes| E[Terminal AppleScript]
D -->|No or script fails| F[Terminal.app fallback]
E --> G[Command shell window]
F --> G
Loading

Decision needed

Question Recommendation
Should CodexBar explicitly support Ghostty 1.3+ through its preview AppleScript interface while retaining Terminal.app fallback? Accept bounded Ghostty support: Merge the focused integration and retain Terminal.app fallback for unsupported or failing Ghostty installations.

Why: The implementation and signed-app evidence support the path, but accepting a preview third-party automation API is a product compatibility commitment.

Before merge

  • Resolve merge risk (P1) - Merging makes Ghostty 1.3+’s preview AppleScript interface and Terminal.app recovery on unsupported or failed Ghostty automation an ongoing compatibility contract.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Focused change production +15/-2; tests +13/-2; 3 files affected The change stays in the existing terminal abstraction, shared launcher fallback, and focused terminal tests.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #2830
Summary: This PR is the concrete candidate fix for the open Ghostty terminal-picker report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Accept the fallback contract (recommended)
    Merge with Ghostty 1.3+ supported and Terminal.app retained as fallback for missing, incompatible, disabled, or failed Ghostty automation.
  2. Pause pending API stability
    Keep the existing picker until maintainers are comfortable supporting Ghostty’s preview AppleScript API.

Technical review

Best possible solution:

Support Ghostty through the existing terminal abstraction while retaining Terminal.app as the recovery path for unavailable, incompatible, disabled, or failing Ghostty automation.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a bug reproduction: the PR body supplies after-fix evidence from a signed CodexBar bundle using the production launcher with Ghostty 1.3.1.

Is this the best way to solve the issue?

Yes, conditionally: extending the shared terminal abstraction and preserving its fallback is the narrowest maintainable approach, subject to accepting Ghostty’s preview API contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against c4ed34d0e44a.

Labels

Label changes:

  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is live_output.

Label justifications:

  • P3: This is an optional terminal integration with a bounded compatibility decision, not a regression in the current default.
  • merge-risk: 🚨 compatibility: Ghostty’s preview AppleScript API and the Terminal.app fallback become behavior CodexBar must preserve for selected Ghostty users.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR documents an after-fix signed CodexBar bundle using the production launcher with Ghostty 1.3.1, verified by a marker file and accessibility output; the Settings screenshot corroborates selection.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR documents an after-fix signed CodexBar bundle using the production launcher with Ghostty 1.3.1, verified by a marker file and accessibility output; the Settings screenshot corroborates selection.

Evidence

What I checked:

Likely related people:

  • steipete: Current terminal abstraction and launcher lines blame to Peter Steinberger, and terminal-picker history includes his prior focused maintenance. (role: feature owner and recent area contributor; confidence: high; commits: 330ae4384b18, 27658771715f; files: Sources/CodexBar/TerminalApp.swift, Sources/CodexBar/StatusItemController+Actions.swift)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Make the Ghostty 1.3+ compatibility decision visible before merge.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-08-10T05:56:07.014Z sha c7dd91b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-10T07:12:44.640Z sha c7dd91b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-10T07:44:01.915Z sha c7dd91b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-10T15:35:17.772Z sha c63162e :: needs maintainer review before merge. :: none

darwinz added a commit to darwinz/CodexBar that referenced this pull request Aug 10, 2026
darwinz added a commit to darwinz/CodexBar that referenced this pull request Aug 10, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 10, 2026
@darwinz

darwinz commented Aug 10, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review — runtime proof added to the PR body: transcript of the generated AppleScript run against Ghostty 1.3.1 (returns the new window id) plus a redacted screenshot of the resulting window running claude in the repo directory.

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the feature/ghostty-terminal-support branch from c7dd91b to c63162e Compare August 10, 2026 15:22
@steipete

Copy link
Copy Markdown
Owner

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ghostty missing from terminal app picker — Open Terminal and login actions always fall back to Terminal.app

2 participants