Skip to content

fix(cloudsync): synchronize saved quick commands - #238

Open
loooinfo wants to merge 2 commits into
TooonyChen:mainfrom
loooinfo:bugfix/sync-saved-quick-commands
Open

loooinfo wants to merge 2 commits into
TooonyChen:mainfrom
loooinfo:bugfix/sync-saved-quick-commands

Conversation

@loooinfo

@loooinfo loooinfo commented Nov 23, 2026 •

Copy link
Copy Markdown

Summary

Saved quick commands and groups now participate in encrypted cloud sync, including multiline text, Enter options and ordering. Entries merge independently by ID, and additions retain their position next to surviving neighbors. Received commands are persisted before replacing the live store or advancing the merge base; pending local saves and repaired IDs must also persist before upload. Unreadable local command files cannot silently delete remote commands, including after an error banner is dismissed, and edits made while syncing survive.

Payload schema 2 protects the new field from older clients; existing schema 1 files are upgraded on upload, so participating clients need to update together. The existing explicit force-replace operation still replaces the destination.

Closes #235

Testing

go test -race ./internal/app ./internal/cloudsync ./internal/config -run 'Test(Sync|Merge|QuickCommand)' -count=1
go vet ./...
go tool mygo vet
  • Race tests for simulated two-device command sync, ordering, deletion, independent edits, lazy loading, changes during sync and schema 1 migration. Regressions reproduce corrupted/unreadable files, local and received-command save failures, dismissed banners, failure during an in-flight sync, repaired-ID persistence across restart and concurrent middle insertions.
  • Existing sync and merge race regression tests, Go vet, MyGo vet and diff checks.
  • All four feature branches were combined in a scratch worktree; focused race tests pass and production Go sources match the combined custom app. The combined custom app cross-builds for Windows amd64. A manual two-computer sync using a real provider has not been performed here.
  • Complete combined regression: other packages pass. The app package completes with go test -race -timeout 20m ./internal/app in 610 seconds after the default 600-second package limit was reached. Only three failures remain, reproduced on unchanged base 78c2f91: TestBackgroundImage, TestBackgroundReadsOffUIThread and TestCommandBarPage. All added tests pass; no race reports were found.

Prepared with Codex.

Persist pending local edits and repaired IDs before upload. Omit unreadable documents, save received commands before changing the live store, and retain the merge base on a failed save. Keep inserted commands next to surviving neighbors during concurrent changes.

Prepared with Codex.

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.

fix(cloudsync): synchronize saved quick commands

1 participant