Skip to content

feat(ios): mark synced connections that open only on a Mac - #3680

Merged
datlechin merged 2 commits into
mainfrom
feat/ios-mac-only-connections
Oct 20, 2026
Merged

datlechin merged 2 commits into
mainfrom
feat/ios-mac-only-connections

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • iOS decides once whether it can open a connection: DriverFactory.refusal(for:), from the iOS driver list plus the Mac socket check.
  • ConnectionManager.connect checks it first, before the keychain read and the SSH tunnel. That covers list taps, restore, links, Spotlight, Handoff, Shortcuts, reconnect and Test Connection.
  • Connection list: a Mac-only row is dimmed, has no chevron and reads "Opens on Mac only". A tap shows an alert instead of connecting. The row stays editable, movable and deletable; its context menu drops Open.
  • Connect screen: a refusal reads "Opens on Mac Only" with no Retry.
  • Import sheet: Mac-only rows read "Opens on Mac only". SAP HANA, Elasticsearch, Typesense and PGlite are recognized instead of unsupported.
  • Engine names read MongoDB and ClickHouse, not MONGODB and CLICKHOUSE.
  • Connection form: a Mac-only type shows as a read-only row, and Test Connection is hidden. Saving keeps the type and every field.
  • Sync fix: iOS wrote SSL as require or disable and left out unset paths. The Mac cannot decode that and skipped the record. iOS now writes the Mac's mode names and every path key, and writes a Mac Preferred back as Preferred (iCloud, local storage, .tablepro export).
  • ConnectionError messages are localized. A port of 0 no longer shows in the detail line.
  • Changed on purpose: ConnectionErrorClassifierTests pinned "Driver Unavailable"; it now expects "Opens on Mac Only".
  • Catalog keys were inserted add-only instead of written by the sync tool, which re-sorts the iOS catalog's unsorted keys.

Test plan

  • Fail on main, pass here: ConnectionManagerTests (a MongoDB connect with SSH on throws before any tunnel), SSLConfigurationWireTests, SyncRecordMapperSSLTests.
  • New iOS tests: IOSDriverFactoryRefusalTests, MacOnlyImportRowTests, ConnectionListRowModelTests, ScenePresenterTests (refusal held behind an open connection), ConnectionDetailFormatterTests, ConnectionErrorClassifierTests, IOSConnectionImportServiceTests.preferredSSLModeSurvivesImport, and MacOnlyConnectionFormTests as a guard.
  • TableProCore package (2652 passed) and 33 iOS suites (357 passed), lint, l10n.
  • iPhone 18 Pro simulator, iOS 27: a seeded library with MongoDB and ClickHouse connections, and a .tablepro file opened in the app.
Before After
List, light Before, list, light After, list, light
List, dark Before, list, dark After, list, dark
Tap, light Before, tap, light After, tap, light
Tap, dark Before, tap, dark After, tap, dark
Import, light Before, import, light After, import, light
Import, dark Before, import, dark After, import, dark

Not in this PR

  • MongoDB and ClickHouse drivers for iOS.
  • The import sheet marks Mac-only engines, not Mac socket rows.
  • The Quick Connect widget still lists Mac-only connections. A tap on one reaches the alert.
  • An import that replaces a synced Mac Preferred connection with an explicit Required keeps Preferred in iCloud when the cert paths match. That local copy looks the same as one an older iOS build stored, and reading it the other way would flip every such copy to Required on any iOS edit.
  • A Mac Preferred connection whose local copy an older iOS build stored still goes up as Required on a full re-upload after an iCloud reset. The older build already dropped the mode.

Fixes #3631

@datlechin
datlechin enabled auto-merge (squash) October 20, 2026 02:04
@datlechin
datlechin merged commit 80b34e9 into main Oct 20, 2026
8 checks passed
@datlechin
datlechin deleted the feat/ios-mac-only-connections branch October 20, 2026 03:18
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.

Mark synced connections the iPhone and iPad cannot open

1 participant