Three separate root causes addressed:
1. markTaskDone/markSubtaskDone race with 200ms animation delay:
toggleDoneWithAnimation uses window.setTimeout(200ms) before
dispatching isDone:true. Tests proceeded before the state settled,
causing subsequent assertions to fail. Fix: wait for isDone CSS class
after clicking done-toggle. Also use .first() on the task locator to
avoid Playwright strict-mode violations during CDK drag animation,
where the same task briefly exists as two DOM elements.
2. Premature waitForURL resolution in supersync.spec.ts test 5.1:
waitForURL(/tag\/TODAY/) matched the current /tag/TODAY/daily-summary
URL immediately. Fix: add negative lookahead (?!\/daily-summary).
3. LWW worklog title nondeterminism in archive-conflict test:
After archive-wins conflict resolution and multiple sync rounds, the
archived task title on both clients depends on sync timing — it may be
the original name or the renamed name. Fix: accept either title using
hasTaskInWorklog OR, rather than asserting a specific title.