Skip to content

refactor: phase 5 tail — migrate 12 domain notifications to AppEvents#1119

Merged
datlechin merged 4 commits intomainfrom
refactor/phase5-tail
May 8, 2026
Merged

refactor: phase 5 tail — migrate 12 domain notifications to AppEvents#1119
datlechin merged 4 commits intomainfrom
refactor/phase5-tail

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

Phase 5 tail. 12 remaining domain notifications migrated to typed AppEvents publishers. Punch list now empty for domain events. Tier 3 command-style notifications stay on NotificationCenter until the command-bus pass.

Migrated

Connection events:

  • databaseDidConnect → DatabaseDidConnect{connectionId} (typed)
  • connectionUpdated → Void (no observer reads payload)
  • mainWindowWillClose → Void
  • MainContentCoordinator.teardownNotification → mainCoordinatorTeardown (typed)

Data update events:

  • queryHistoryDidUpdate, sqlFavoritesDidUpdate, linkedFoldersDidUpdate, linkedSQLFoldersDidUpdate (Void)

Misc:

  • licenseStatusDidChange, syncChangeTracked, mcpAuditLogChanged (Void)
  • pluginsRejected → [RejectedPlugin] (typed payload)

Commits

  1. 07d6da2 - migrate connection events
  2. d3bbafb - migrate data update events
  3. 05c80cd - migrate misc app events

Notes

  • SyncChangeTracker: dropped the unused NotificationCenter init parameter (test injection point with no callers).
  • AppNotifications.swift kept (still holds Tier 3 command names: exportConnections, importConnections, focusConnectionFormWindowRequested, openSampleDatabaseRequested, resetSampleDatabaseRequested, exportQueryResults, saveAsFavoriteRequested, showFeedbackWindow, refreshData, deleteSelectedRows, etc.).
  • TableProApp.swift mainWindowWillClose declaration removed; refreshData and other Tier 3 commands remain.

Test plan

  • Build clean (verified)
  • swiftlint clean on all 27 touched files (verified, 0 violations)
  • Connect/disconnect a database, confirm sidebar status updates
  • Save query, confirm history panel reloads
  • Star a query, confirm favorites sidebar reloads
  • Edit a connection, confirm welcome list refreshes
  • License activation, confirm UI reflects new state
  • Reject an outdated plugin, confirm alert shows with rejected list
  • Edit linked folder, confirm linked sidebar refreshes

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05c80cdaaa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -10,39 +10,23 @@
import Foundation

extension Notification.Name {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update remaining query history notification consumers

This migration removes the Notification.Name.queryHistoryDidUpdate declaration, but the test target still observes .queryHistoryDidUpdate in TableProTests/Core/Storage/QueryHistoryManagerTests.swift when verifying delete/clear notifications. As a result, compiling or running the test target will fail until those tests are migrated to AppEvents.shared.queryHistoryDidUpdate or a compatibility notification is kept.

Useful? React with 👍 / 👎.

@datlechin datlechin merged commit 1747daf into main May 8, 2026
2 checks passed
@datlechin datlechin deleted the refactor/phase5-tail branch May 8, 2026 10:54
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