Skip to content

feat(connections): name the Local Network permission when it blocks a connection - #3699

Merged
datlechin merged 4 commits into
mainfrom
feat/3668-local-network-permission-error
Oct 20, 2026
Merged

datlechin merged 4 commits into
mainfrom
feat/3668-local-network-permission-error

Conversation

@datlechin

@datlechin datlechin commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • A connect that fails with no named cause now probes each host this Mac dials (the database host or host list, the first SSH hop, the SOCKS proxy) with a UDP NWConnection. When macOS 15 Local Network privacy refuses every one, the pane reads Local Network Access Required, names the host, and offers Open System Settings beside Try Again.
  • The driver's text moves to Copy Details (ConnectionFailureInfo.details); the pane headline comes from ConnectionFailureInfo.title.
  • Test Connection, the Welcome window and launch intents get the same error and button through ConnectionFailureClassifier.recoveryAction.
  • Not probed: errors raised before any socket opens (ConnectionPreflightReporting on SOCKS, SSH and tunnel errors), errors a sign-in provider claims, and a host list with one reachable server.
  • UnavailableStateView caps only its text at 420 points. The button row shared that cap and truncated its titles ("Manage Connec…" with three buttons, "Open Syst…" with four).
  • SSH first-hop errors keep strerror: an immediate connect failure dropped it, and the poll path read errno after close().
  • macOS 27 ignores the Privacy_LocalNetwork anchor and opens Privacy & Security (measured against Privacy_AllFiles, which lands on Full Disk Access), so the recovery text names the last step.

Test plan

  • LocalNetworkAccessProbeTests: verdicts from injected path and state results (refused path, satisfied path reporting .notAvailable, mDNS PolicyDenied, NoSuchRecord, ready, ended); a real loopback probe is granted.
  • LocalNetworkAccessDiagnosisTests: hops per transport, SSH alias and jump host resolution, loopback never named, mixed host list, preflight and sign-in errors.
  • LocalNetworkConnectFailureTests: ensureConnected through the fake SQL Server driver records .connectFailed(info, .openLocalNetworkSettings) on a refusal, keeps the driver error when granted, keeps SOCKSProxyError.invalidConfiguration, and records nothing when cancelled mid-probe.
  • ConnectionFailureClassifierTests, ConnectionRecoveryPresentationTests, UnavailableStateViewLayoutTests (a 560-point action row keeps its width; the old cap held it to 420).
  • A real refusal was not produced: denying the permission here would change TCC for the installed TablePro. The refusal path rests on TN3179 and the iOS probe from iOS: LocalNetworkPermission classifies by address range and infers permission state #2040.

Screenshots

The pane rendered from ConnectionUnavailableView with a database host refused. Before is the text main shows for the same failure; on main its buttons were also truncated.

Light Dark
Before Before, light Before, dark
After After, light After, dark

Docs: TableProApp/docs#62

Fixes #3668

@datlechin
datlechin enabled auto-merge (squash) October 20, 2026 15:21
@datlechin
datlechin disabled auto-merge October 20, 2026 15:52
@datlechin
datlechin merged commit 8f634d9 into main Oct 20, 2026
9 of 10 checks passed
@datlechin
datlechin deleted the feat/3668-local-network-permission-error branch October 20, 2026 15:52
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.

Name the Local Network permission when it blocks a connection

1 participant