mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-29 02:30:03 +00:00
* fix(sync): ignore startup example tasks during import
* fix(sync): defer startup example tasks until initial sync completes
Switch ExampleTasksService to afterInitialSyncDoneStrict$ so example tasks
are not created before the first remote import lands. On a fresh synced
client the imported tasks are then already in the store and the length===0
guard skips creation entirely — closing the same conflict for file-based
providers (Dropbox/WebDAV), which the op-log marker gate does not cover.
The isExampleTask marker + gate exclusion stay as a safety net for the
narrow case where example tasks are created on a still-empty server and an
import arrives before they are uploaded.
Also dedupe the two markRejected call sites into _discardExampleTaskOps and
document the local-only read (a remote isExampleTask flag can never bypass
the conflict dialog) and the intentional mixed-case behavior.
* test(sync): cover mixed-pending and empty-discard import gate cases
Add a SyncImportConflictGateService test for the mixed case (real pending
work + startup example tasks): the conflict dialog is still shown, but the
example-task id is reported in discardablePendingOpIds and intentionally
left for the caller to keep on USE_LOCAL — locking the documented invariant.
Also assert markRejected is not called on the config-only silent-accept path,
pinning the empty-array guard in _discardExampleTaskOps.
* test(sync): integration coverage for example-task import gate
Run the real OperationLogStoreService + SyncImportConflictGateService against
IndexedDB (no mocks) to cover the seam the unit specs stub:
- example-task creates persisted with their real multi-entity payload are
recognized as non-meaningful and reported as discardable
- after markRejected they are actually excluded from getUnsynced() (never
uploaded), while a pending config op is preserved
- real user work alongside example tasks still triggers the dialog
- a remote-sourced example-task op is never discardable (gate reads local
pending only)
Verified load-bearing: removing the gate exclusion turns the first case red.
* fix(sync): mark onboarding done when example tasks are skipped
EXAMPLE_TASKS_CREATED was only written after creating example tasks, so a
synced client that skipped creation because real tasks already existed never
set the flag — and could recreate onboarding tasks on a later startup when
the task list happened to be empty.
Set the flag whenever tasks already exist at the initial-sync gate, so
onboarding runs at most once per client.
* docs(sync): note known limits of the example-task import gate
Document two accepted, narrow residuals of syncing onboarding example tasks:
- upload→piggyback path: example ops accepted in the same upload round are
already synced and not in the discard list; state stays correct because the
SYNC_IMPORT filter drops them as CONCURRENT on receivers.
- file-based snapshot path: hasMeaningfulStoreData() counts example tasks (no
in-state marker), so a fresh Dropbox/WebDAV client that made example tasks
while sync was disabled can still see the conflict dialog.
* test(sync): cover fresh-client example-task import gate (e2e)
Add a SuperSync e2e proving a fresh client with first-run example tasks accepts
an incoming SYNC_IMPORT without a conflict dialog, plus a backward-compatible
{ allowExampleTasks } opt-in to createSimulatedClient (the harness otherwise
pre-sets SUP_EXAMPLE_TASKS_CREATED).
Uses waitForInitialSync:false + a race between the conflict dialog and sync
completion so the test actually fails when the dialog appears (pre-fix), and
asserts all four onboarding titles are absent. Guards the op-log isExampleTask
marker/gate path (not the afterInitialSyncDoneStrict$ timing, which a fresh
e2e client cannot exercise since sync is disabled at boot).
* docs(sync): link example-task import-gate limitations to #7985
|
||
|---|---|---|
| .. | ||
| ENCRYPTION-E2E-STATUS.md | ||
| import-sync.spec.ts | ||
| supersync-account-deletion.spec.ts | ||
| supersync-account-reset.spec.ts | ||
| supersync-advanced-edge-cases.spec.ts | ||
| supersync-advanced.spec.ts | ||
| supersync-archive-conflict.spec.ts | ||
| supersync-archive-data-sync.spec.ts | ||
| supersync-archive-subtasks.spec.ts | ||
| supersync-backup-import-id-mismatch.spec.ts | ||
| supersync-backup-recovery.spec.ts | ||
| supersync-cascade-delete.spec.ts | ||
| supersync-compaction.spec.ts | ||
| supersync-concurrent-delete-reorder.spec.ts | ||
| supersync-concurrent-import.spec.ts | ||
| supersync-constraint-error-recovery.spec.ts | ||
| supersync-cross-entity.spec.ts | ||
| supersync-daily-summary.spec.ts | ||
| supersync-day-change-overdue-6992.spec.ts | ||
| supersync-divergence-bug-6571.spec.ts | ||
| supersync-edge-cases.spec.ts | ||
| supersync-encryption-conflict.spec.ts | ||
| supersync-encryption-password-change.spec.ts | ||
| supersync-encryption-password-preservation.spec.ts | ||
| supersync-encryption.spec.ts | ||
| supersync-error-handling.spec.ts | ||
| supersync-error-scenarios.spec.ts | ||
| supersync-example-task-fresh-client.spec.ts | ||
| supersync-global-config-edge-cases.spec.ts | ||
| supersync-import-clean-server-state.spec.ts | ||
| supersync-import-clean-slate.spec.ts | ||
| supersync-import-conflict-dialog.spec.ts | ||
| supersync-import-encryption-change.spec.ts | ||
| supersync-import-encryption-preserve.spec.ts | ||
| supersync-import-other-client-ops.spec.ts | ||
| supersync-import-same-client-ops.spec.ts | ||
| supersync-keep-local-archive-preservation.spec.ts | ||
| supersync-lastseq-preservation.spec.ts | ||
| supersync-late-join.spec.ts | ||
| supersync-legacy-migration-sync.spec.ts | ||
| supersync-lww-conflict.spec.ts | ||
| supersync-lww-singleton.spec.ts | ||
| supersync-max-retry-rejection.spec.ts | ||
| supersync-models.spec.ts | ||
| supersync-multi-tab.spec.ts | ||
| supersync-network-failure.spec.ts | ||
| supersync-no-op-sync.spec.ts | ||
| supersync-planner.spec.ts | ||
| supersync-provider-switch-to-supersync.spec.ts | ||
| supersync-provider-switch.spec.ts | ||
| supersync-realtime-push.spec.ts | ||
| supersync-reenable-and-account-switch.spec.ts | ||
| supersync-repeat-task-advanced.spec.ts | ||
| supersync-repeat-task.spec.ts | ||
| supersync-server-backup-revert.spec.ts | ||
| supersync-server-migration-abort.spec.ts | ||
| supersync-server-migration.spec.ts | ||
| supersync-simple-counter.spec.ts | ||
| supersync-snapshot-vector-clock.spec.ts | ||
| supersync-stress.spec.ts | ||
| supersync-superseded-clock-regression.spec.ts | ||
| supersync-task-ordering.spec.ts | ||
| supersync-time-tracking-advanced.spec.ts | ||
| supersync-token-expiry.spec.ts | ||
| supersync-vector-clock-max-size.spec.ts | ||
| supersync-vector-clock-pruning.spec.ts | ||
| supersync-worklog.spec.ts | ||
| supersync-wrong-password-error.spec.ts | ||
| supersync.spec.ts | ||
| webdav-encryption-conflict-use-local.spec.ts | ||
| webdav-encryption-disable.spec.ts | ||
| webdav-first-sync-conflict.spec.ts | ||
| webdav-legacy-migration-sync.spec.ts | ||
| webdav-provider-switch.spec.ts | ||
| webdav-single-client-rapid-sync.spec.ts | ||
| webdav-sync-advanced.spec.ts | ||
| webdav-sync-archive.spec.ts | ||
| webdav-sync-delete-cascade.spec.ts | ||
| webdav-sync-error-handling.spec.ts | ||
| webdav-sync-expansion.spec.ts | ||
| webdav-sync-full.spec.ts | ||
| webdav-sync-tags.spec.ts | ||
| webdav-sync-task-order.spec.ts | ||
| webdav-sync-today-tag.spec.ts | ||