Skip to content

Delete hand-rolled UI superseded by native SwiftUI APIs - #553

Merged
bradleymackey merged 1 commit into
mainfrom
native-standardization-dead-code
Sep 14, 2026
Merged

bradleymackey merged 1 commit into
mainfrom
native-standardization-dead-code

Conversation

@bradleymackey

Copy link
Copy Markdown
Member

Removes six view files and two Color members that reimplement SwiftUI
APIs the app already uses elsewhere. Every one has zero call sites
outside its own file, so this is deletion only — no behaviour change.

Deleted Superseded by
SearchTextField.swift .searchable, already used at VaultItemFeedView.swift:80
TextArea.swift TextEditor, already used in three places
TextEditingView.swift + TextViewViewController.swift TextEditor
OTPCodeLabels.swift the inline labelsStack copies that replaced it
View+Center.swift .frame(maxWidth:)
Color.contrastingForegroundColor / .contrastingBackgroudColor unreferenced

TextEditingView carried a doc comment explaining it existed to dodge
"bugs we've experienced with raw SwiftUI text editors". That workaround
was never in service — SecureNoteDetailView and BackupCreatePDFView
both use a plain TextEditor — so nothing regresses by removing it.

HorizontallyCenter (HStack { Spacer(); content; Spacer() }) is
replaced at its nine call sites by .frame(maxWidth: .infinity), which
centres its child at its ideal size the same way. Six of those sites are
buttons whose pill chrome is applied by an inner modifier, so the button
keeps its intrinsic size rather than stretching.

Verification

Local, iPhone 18 Pro Max / iOS 27.0:

  • xcodebuild build-for-testing — TEST BUILD SUCCEEDED, no warnings
    (-warnings-as-errors is on package-wide)
  • Full suite, -parallel-testing-enabled NO — TEST EXECUTE SUCCEEDED,
    2834 passed, 0 failures (1417 tests across 12 bundles, run under both
    the Default and TSAN configurations)
  • Zero snapshots re-recorded. That is the check that matters here: if
    any of these types had still been reachable, an image would have moved.
  • make format + make lint — clean

⚠️ Automatic CI is still disabled (#548), so this is local verification only.

🤖 Generated with Claude Code

Removes six view files and two `Color` members that reimplement SwiftUI
APIs the app already uses elsewhere. Every one has zero call sites
outside its own file, so this is deletion only — no behaviour change.

| Deleted | Superseded by |
| --- | --- |
| `SearchTextField.swift` | `.searchable`, already used at `VaultItemFeedView.swift:80` |
| `TextArea.swift` | `TextEditor`, already used in three places |
| `TextEditingView.swift` + `TextViewViewController.swift` | `TextEditor` |
| `OTPCodeLabels.swift` | the inline `labelsStack` copies that replaced it |
| `View+Center.swift` | `.frame(maxWidth:)` |
| `Color.contrastingForegroundColor` / `.contrastingBackgroudColor` | unreferenced |

`TextEditingView` carried a doc comment explaining it existed to dodge
"bugs we've experienced with raw SwiftUI text editors". That workaround
was never in service — `SecureNoteDetailView` and `BackupCreatePDFView`
both use a plain `TextEditor` — so nothing regresses by removing it.

`HorizontallyCenter` (`HStack { Spacer(); content; Spacer() }`) is
replaced at its nine call sites by `.frame(maxWidth: .infinity)`, which
centres its child at its ideal size the same way. Six of those sites are
buttons whose pill chrome is applied by an inner modifier, so the button
keeps its intrinsic size rather than stretching.

## Verification

Local, iPhone 18 Pro Max / iOS 27.0:

- `xcodebuild build-for-testing` — `TEST BUILD SUCCEEDED`, no warnings
  (`-warnings-as-errors` is on package-wide)
- Full suite, `-parallel-testing-enabled NO` — `TEST EXECUTE SUCCEEDED`,
  2834 passed, 0 failures (1417 tests across 12 bundles, run under both
  the Default and TSAN configurations)
- **Zero snapshots re-recorded.** That is the check that matters here: if
  any of these types had still been reachable, an image would have moved.
- `make format` + `make lint` — clean

⚠️ Automatic CI is still disabled (#548), so this is local verification only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bradleymackey
bradleymackey merged commit 426e0e9 into main Sep 14, 2026
@bradleymackey
bradleymackey deleted the native-standardization-dead-code branch September 14, 2026 16:41
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