Skip to content

refactor: remove all Builder classes#230

Merged
codebutler merged 9 commits intomasterfrom
refactor/remove-builders
Feb 17, 2026
Merged

refactor: remove all Builder classes#230
codebutler merged 9 commits intomasterfrom
refactor/remove-builders

Conversation

@codebutler
Copy link
Owner

Summary

  • Remove all Builder classes in favor of idiomatic Kotlin patterns (data class constructors with named parameters, DSL builders)
  • FareBotUiTree.Builder + Item.Builder: Replaced with uiTree { } DSL that builds items directly. Changed Item.title from String to FormattedString, deferring resolution to the UI layer. Removed unnecessary @Serializable annotation.
  • ClipperTrip.Builder: Replaced with constructor defaults + named params
  • SeqGoTrip.Builder: Replaced with constructor defaults + named params
  • Station.Builder: Removed (zero direct usages). Replaced all Station.Builder() MDST lookup patterns across 13 transit modules with direct Station(...) constructor calls.

Test plan

  • All JVM tests pass (16 failures are pre-existing UnsatisfiedLinkError from native protobuf libs in ARM64 devcontainer, not related to this change)
  • ktlintFormat clean — no formatting issues
  • Zero remaining .builder() / .Builder() references to removed classes
  • Verified no data loss — all UI tree items, titles, and values preserved

🤖 Generated with Claude Code

Claude and others added 9 commits February 16, 2026 15:49
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ses and DSL

- FareBotUiTree: remove @serializable, Builder, companion objects; Item.title
  is now FormattedString (deferred resolution) instead of String
- UiTreeBuilder: uiTree() is no longer suspend; DSL builds Item objects directly;
  ItemScope.title accepts Any? (String/StringResource/FormattedString);
  add addChildren() for pre-built item lists
- CardAdvancedScreen: item.title.orEmpty() -> item.title.resolve() since title
  is now FormattedString

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Missed call sites in clipper, easycard, ezlink, kmt, orca, podorozhnik,
seqgo, smartrider, suica, tfi-leap, and troika modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codebutler codebutler force-pushed the refactor/remove-builders branch from c0b22c4 to 8122462 Compare February 16, 2026 23:55
@codebutler codebutler merged commit 557ca26 into master Feb 17, 2026
6 checks passed
@codebutler codebutler deleted the refactor/remove-builders branch February 17, 2026 00:01
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

Comments