refactor(events): change connectionUpdated payload from Void to UUID? for per-connection filtering#1159
Merged
Conversation
… for per-connection filtering
This was referenced May 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AppEvents.connectionUpdatedpayload changes fromPassthroughSubject<Void, Never>toPassthroughSubject<UUID?, Never>. The payload is the affected connection's id, ornilfor bulk updates where the sender doesn't track individual ids.Senders updated (9 sites):
ConnectionFormCoordinator.deleteCurrent,ConnectionFormCoordinator.save(insert + update branches), sample-DB launcher (open + reset), per-connection iCloud-sync toggle inWelcomeContextMenus-> passconnection.id.SyncCoordinator.applyRemoteChanges,ConnectionExportService.importConnections, multi-select iCloud-sync toggle inWelcomeContextMenus-> passnil.Subscribers:
WelcomeViewModelis the only current subscriber and it discards the payload ({ _ in self?.loadConnections() }); the welcome list shows every connection so a payload-agnostic refresh is correct. The new payload type is binary-source-compatible with that closure shape.Why this matters
Audit finding X2. The audit recommends matching the same shape as
ConnectionStatusChangeandDatabaseDidConnect, which already carry the affectedconnectionIdso per-connection subscribers can filter. Today there are no per-connection subscribers, but the same anti-pattern that PR #1139 had to fix (mainCoordinatorTeardownthat lacked a payload) and PR #1148 had to fix (databaseDidConnectsubscribers that ignored the payload) starts here: every event the welcome list has to consume is also visible to any future per-coordinator subscriber, and without a payload that subscriber would have to refresh on every unrelated edit.Test plan
nilevent.