Skip to content

feat(modules): make Compare & Sync a module that stays on for existing installs - #4404

Open
datlechin wants to merge 2 commits into
mainfrom
feat/compare-sync-module
Open

datlechin wants to merge 2 commits into
mainfrom
feat/compare-sync-module

Conversation

@datlechin

@datlechin datlechin commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Compare & Sync is a module (id compareSync) in Settings > Extensions. Default: on for a Mac that ran an earlier build, off on a new install.
  • Install-age default, for every module that was core before: AppModule.wasCore plus a per-Mac default written once, first thing in applicationWillFinishLaunching, before the menu bar is built. The marker is com.TablePro.settings.didMigrateStartupToReopenLast, which every launch since 0.51.0 writes with no user action (Compare & Sync shipped in 0.68.0), or the onboarding flag. The answer is stored in com.TablePro.modules.<id>.default, so a later launch never changes it.
  • Reset All Settings returns each module to this Mac's recorded default instead of a fixed value.
  • Storage: two new device-local Bool keys, never synced. The previous stable reads neither and keeps its own keys as they were.
  • Off: no Database > Compare submenu (the 8 commands and its separator), no "Compare & Sync With…" in the Welcome connection menu, no launch registration of its window (the WindowOpener presenter is gone; the launcher presents the window itself), and nothing in the quit-time running-work check, since its run registry is empty. It has no shortcuts or Keyboard rows, and no URL, AppleScript or MCP entry exists for it.
  • Off-state sink: CompareSyncLauncher.open opens nothing and does not read the license while the module is off. Turning the module off runs CompareSyncRunRegistry.endAll(), which cancels every run and closes every Compare & Sync window, its sheets first, without the close prompt. A cancelled run whose statement is still writing stays in the quit check until it ends, as after closing the window.
  • On without a license: the existing license prompt, unchanged.
  • Docs: docs(features): Compare & Sync is a module docs#262 (draft, merges after this one).

Test plan

  • New CompareSyncModuleResidueTests: off leaves no menu item, Welcome item, key equivalent or Keyboard row, and the host's launcher opens no window; on adds the submenu last with its 8 commands and the Welcome item after Duplicate; switching edits the installed bar; on without a license still asks for one; turning off through the Extensions path cancels a running comparison and closes every window; a cancelled run stays in the quit check until it ends.
  • New AppModuleDefaultTests: new install off and stays off; a Mac with the launch marker or the onboarding flag keeps it on; recorded once; recording leaves the on/off keys an older build reads unset; Reset All Settings returns each Mac to its own default.
  • Changed on purpose: AppModuleSettingsTests (modulesStartOff, resetRestoresDefaults, keysAreNamespaced) and LiveMessagesModuleResidueTests.offByDefault read the recorded default; WelcomeMenuSpecTests gains the module flag; the three WindowOpenerTests compare presenter cases are removed with the presenter.

Part of #4273 (AR-09)

This branch has not been deployed

No deployments
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