Skip to content

refactor: split ConnectionFormView into SSH, SSL, and Advanced subviews#536

Merged
datlechin merged 2 commits intomainfrom
refactor/split-connection-form
Mar 31, 2026
Merged

refactor: split ConnectionFormView into SSH, SSL, and Advanced subviews#536
datlechin merged 2 commits intomainfrom
refactor/split-connection-form

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

Splits ConnectionFormView.swift from 1795 lines (exceeded SwiftLint error limit) into 4 focused files:

File Lines Purpose
ConnectionFormView.swift 1277 (-518) Parent coordinator: General tab, footer, save/test/delete, validation
ConnectionSSHTunnelView.swift 405 (new) SSH toggle, profiles, inline fields, TOTP, jump hosts
ConnectionSSLView.swift 90 (new) SSL mode picker, CA cert, client cert/key
ConnectionAdvancedView.swift 152 (new) Plugin fields, startup commands, pre-connect script, AI policy

All @State remains in the parent ConnectionFormView and is passed as @Binding to subviews. No behavior changes.

Test plan

  • Create new MySQL connection — verify General tab fields work
  • Enable SSH tunnel, configure profile — verify SSH tab works
  • Set SSL to Verify CA, browse for cert — verify SSL tab works
  • Add startup commands, set AI policy — verify Advanced tab works
  • Test connection with SSH+SSL — verify test button reads all fields correctly
  • Edit existing connection — verify all fields populate across tabs
  • Save connection — verify all fields persist

@datlechin datlechin merged commit 22d9b1a into main Mar 31, 2026
2 checks passed
@datlechin datlechin deleted the refactor/split-connection-form branch March 31, 2026 08:00
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