Skip to content

Let the terminal application be chosen in the preferences - #667

Merged
hannesa2 merged 1 commit into
masterfrom
choose-terminal-application
Sep 18, 2026
Merged

hannesa2 merged 1 commit into
masterfrom
choose-terminal-application

Conversation

@goneng

@goneng goneng commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Fixes #637.

GitX has been able to drive iTerm2 for years, but the choice was reachable only
through defaults write, so in practice nobody could find it.

Changes

  • Offer the handlers GitX can actually drive in the Integration pane, greying
    out one that is not installed and saying so in its tooltip. A third terminal
    cannot be added by listing it: each needs its own Scripting Bridge header and
    its own API.
  • Move the handler list, display names and installed check into
    PBTerminalUtil, beside the code that drives them, and settle an
    unrecognized preference there, so the run path no longer logs and guesses at
    the point of use.
  • Add PBTerminalHandlerPreferenceTests over that choice, which is where a
    preference written by hand can hold anything at all.

Test plan

  • 137 tests, 0 failures, 8 of them new
  • Preference set to each handler in turn, and to a value that is neither, which
    settles to the default rather than reaching the run path unrecognized

Opened from a branch on gitx/gitx rather than the fork, so CI has the signing
secrets and produces an installable dmg and zip. Replaces #665, which could not
build one.

GitX has been able to drive iTerm2 for years, but the choice was
reachable only through defaults write, so nobody could find it.

* Offer the handlers GitX can actually drive in the Integration pane,
  greying out one that is not installed and saying so in its tooltip.
  A third terminal cannot be added by listing it: each needs its own
  Scripting Bridge header and its own API.
* Move the handler list, display names and installed check into
  PBTerminalUtil, beside the code that drives them, and settle an
  unrecognized preference there, so the run path no longer logs and
  guesses at the point of use.
* Add PBTerminalHandlerPreferenceTests over that choice, which is where
  a preference written by hand can hold anything at all.
@goneng
goneng force-pushed the choose-terminal-application branch from 81492dc to e7f1523 Compare September 18, 2026 07:15
@hannesa2

Copy link
Copy Markdown
Contributor

Screenshot differs: emulatorApi=arm64 with 4 screenshot(s)

setpoint (old) | diff | actual screenshot (new)

00-commit-context-menu.pngscreenshot

01-history-view.pngscreenshot

02-main-window.pngscreenshot

03-staging-view.pngscreenshot

@hannesa2
hannesa2 merged commit a996171 into master Sep 18, 2026
3 checks passed
@hannesa2
hannesa2 deleted the choose-terminal-application branch September 18, 2026 07:59
@goneng goneng mentioned this pull request Sep 18, 2026
goneng added a commit that referenced this pull request Sep 18, 2026
Compare against the commit the pull request is actually being merged
into, so intervening merges to master stop counting as its changes.

* github.event.pull_request.base.sha is master as GitHub recorded it
  when the pull request last changed base, not the base branch's head.
  On run 35328811182 it read a921dbd while master was a996171, so the
  baseline was a merge behind and #667 counted as #661's work.
* The checkout is refs/pull/N/merge, whose first parent is the commit
  the merge was computed against. Resolve it with rev-parse HEAD^1 and
  use that for the gate, the cache key and the baseline checkout.
* Print both values, so the next run says whether they agree.
hannesa2 pushed a commit that referenced this pull request Sep 18, 2026
Compare against the commit the pull request is actually being merged
into, so intervening merges to master stop counting as its changes.

* github.event.pull_request.base.sha is master as GitHub recorded it
  when the pull request last changed base, not the base branch's head.
  On run 35328811182 it read a921dbd while master was a996171, so the
  baseline was a merge behind and #667 counted as #661's work.
* The checkout is refs/pull/N/merge, whose first parent is the commit
  the merge was computed against. Resolve it with rev-parse HEAD^1 and
  use that for the gate, the cache key and the baseline checkout.
* Print both values, so the next run says whether they agree.
hannesa2 pushed a commit that referenced this pull request Sep 19, 2026
Compare against the commit the pull request is actually being merged
into, so intervening merges to master stop counting as its changes.

* github.event.pull_request.base.sha is master as GitHub recorded it
  when the pull request last changed base, not the base branch's head.
  On run 35328811182 it read a921dbd while master was a996171, so the
  baseline was a merge behind and #667 counted as #661's work.
* The checkout is refs/pull/N/merge, whose first parent is the commit
  the merge was computed against. Resolve it with rev-parse HEAD^1 and
  use that for the gate, the cache key and the baseline checkout.
* Print both values, so the next run says whether they agree.
hannesa2 pushed a commit that referenced this pull request Sep 19, 2026
Compare against the commit the pull request is actually being merged
into, so intervening merges to master stop counting as its changes.

* github.event.pull_request.base.sha is master as GitHub recorded it
  when the pull request last changed base, not the base branch's head.
  On run 35328811182 it read a921dbd while master was a996171, so the
  baseline was a merge behind and #667 counted as #661's work.
* The checkout is refs/pull/N/merge, whose first parent is the commit
  the merge was computed against. Resolve it with rev-parse HEAD^1 and
  use that for the gate, the cache key and the baseline checkout.
* Print both values, so the next run says whether they agree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No way to choose iTerm2 as the terminal application

2 participants