Skip to content

refactor: merge duplicated helpers - #421

Merged
arzafran merged 2 commits into
mainfrom
chore/dedupe-helpers
Oct 9, 2026
Merged

arzafran merged 2 commits into
mainfrom
chore/dedupe-helpers

Conversation

@arzafran

@arzafran arzafran commented Oct 9, 2026

Copy link
Copy Markdown
Member

What this does

Merges copies of the same helper into one, with no behavior change. Copies that differ in timeout or output stay separate.

  • App: the three identical shell single-quote helpers become one in GhosttyTerminalSupport.swift. The two Workspace initializers share their Bonsplit setup. TypingProfiler's run-loop label, the AgentTaskState mapping in telemetry, and the review error mapping each exist once.
  • Swift tests: duplicate makeTemporaryDirectory, waitForCondition and git runners collapse into one each.
  • tests_v2: 22 copies of _find_cli_binary and identical local wait helpers move into v2_support.py.

Review order

  1. Sources/Workspace.swift (init extraction)
  2. Sources/GhosttyTerminalSupport.swift, TerminalSurface.swift, CLIInstaller.swift (shell quoting)
  3. tests_v2/v2_support.py, then the callers

Test plan

  • CI passes (unit tests, tests_v2 subset, UI regressions)

@arzafran
arzafran merged commit a0f9727 into main Oct 9, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant