Skip to content

refactor: remove unused imports, stale comments and stray prints - #422

Merged
arzafran merged 1 commit into
mainfrom
chore/deslop-imports-comments-logs
Oct 12, 2026
Merged

arzafran merged 1 commit into
mainfrom
chore/deslop-imports-comments-logs

Conversation

@arzafran

Copy link
Copy Markdown
Member

What this does

Cleans up leftovers that make the code harder to read without changing what the app does. Unused imports go away, comments that narrate old behaviour ("used to", "previously", "ported from cmux") now describe the current code in present tense, and stray print calls on error paths become NSLog so they still land in the system log in Release builds.

Summary

  • Removes unused import lines across 74 files (Sources, CLI, tests, vendored bonsplit).
  • Rewords historical comments to present tense per the "history belongs in git" rule. Comments that carry a "why" keep the mechanism and lose the framing.
  • Converts error-path print(...) calls in ghostty init and the socket listener to NSLog. No dilog diagnostics were touched.
  • scripts/gen-v2-contract.py comment wording changed and Sources/V2CommandCatalog.swift regenerated to match.

Review order: nothing here is load-bearing. Skim Sources/TerminalController.swift and Sources/GhosttyApp.swift for the print to NSLog swaps; the rest is import and comment fallout.

Test plan

  • CI workflow green (build, unit, socket, UI jobs).
  • python3 scripts/check-structural-budgets.py prints structural budgets: PASS.
  • scripts/check-v2-contract.sh prints v2 contract check: OK.
  • python3 scripts/check-settings-docs.py prints ok:.

Drop unused import lines across Sources, CLI, tests and vendored bonsplit.
Reword comments that narrate old behaviour into present tense, keeping
the mechanism where it guards a future edit. Error-path print calls in
ghostty init and the socket listener become NSLog so they still reach
the system log in Release builds. Regenerate V2CommandCatalog.swift for
the generator comment change and delete one dead local in TabBarView.
@arzafran
arzafran merged commit 720985c into main Oct 12, 2026
13 checks passed
@arzafran
arzafran deleted the chore/deslop-imports-comments-logs branch October 12, 2026 16:46
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