super-productivity/docs/wiki
Johannes Millan 222fa4c8aa
feat(sync): show banner when LWW sync discards a user content edit (#8694) (#8702)
* feat(sync): show banner when LWW discards a user content edit

Auto-resolved LWW conflicts were only surfaced as a generic "N local/
remote wins" count snack, so a field-level edit silently dropped by
last-write-wins (e.g. a title edit lost to a concurrent notes edit) was
invisible to the user (#8694).

Split the resolution outcome: routine self-healing (reschedule/repeat/
archive/done churn) keeps the quiet count snack, while a resolution that
discarded a genuine content edit (task title/notes/subtasks/attachments)
shows a dismissible banner naming the affected task(s).

- New pure summarizeLwwResolutions() classifier in @sp/sync-core (inspects
  the losing side's changed fields; UPDATE only, so create/delete/move and
  scheduling churn stay routine).
- Titles are HTML-escaped before the innerHTML banner (they come from
  synced remote data) and never logged.

* fix(sync): correct + simplify LWW content-conflict notice (multi-review)

Address multi-agent review of the previous commit:

- CRITICAL: the classifier's multi-entity branch made the feature a no-op
  in production. Captured ops are always wrapped as
  { actionPayload, entityChanges: [] } and task edits never populate
  entityChanges (only time-tracking does), so a real title/notes edit was
  read as having no changed fields → classified routine → banner never
  fired. Fixed by dropping the branch and relying on extractUpdateChanges
  (which unwraps actionPayload), gated to UPDATE ops. Spec now uses the
  real wrapped payload shape so this can't regress.
- Move the classifier out of the framework-agnostic @sp/sync-core package
  into the app (findLwwContentConflicts); it held app-specific TASK field
  names and was exported but unused. TASK-only, no generics/callback.
- De-duplicate content conflicts per task (one task can yield several
  concurrent conflicts) so the banner never lists a title twice.
- Direction-neutral wording ("Older edits may have been discarded") since
  the discarded side depends on which client won.
- Use the banner's built-in dismiss button instead of a no-op action.
- Consolidate escapeHtml: escapeHtmlAttr now re-exports the shared util.
- Guard against a non-string title before trim().

* fix(sync): drop dead 'attachments' from LWW content fields (review)

Second-review WARNING: attachments are edited via dedicated
[TaskAttachment] actions with payload { taskId, taskAttachment }, never
updateTask({ task: { changes: { attachments } } }), so extractUpdateChanges
never surfaces an 'attachments' key — the entry could never match and
falsely claimed coverage. Removed it (title/notes/subTaskIds are live) and
added a guard test asserting a real attachment-action-shaped op is not
flagged, so it isn't naively re-added.
2026-07-02 12:53:02 +02:00
..
assets docs(wiki): initial revision (v0.1) 2026-01-20 03:04:08 -08:00
0.-Meta-Diataxis.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
0.00-Wiki-Structure-and-Organization.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
0.01-Style-Guide.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
0.02-Wiki-QA-and-Maintenance.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
1.00-Quickstarts.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
1.01-First-Steps.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
1.02-Configure-Data-Synchronization.md fix(sync): support separate Nextcloud login name 2026-05-18 13:43:23 +02:00
2.00-How_To.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.01-Downloads and Install.md docs/wiki content v0.8 (#7068) 2026-04-01 12:40:28 +02:00
2.02-Restore-Data-From-Backup.md docs(backup): document Android automatic restore (#8193) 2026-06-09 11:27:43 +02:00
2.03-Add-Tasks.md feat(help): add create task how-to #8015 (#8079) 2026-06-08 11:40:14 +02:00
2.04-Manage-Subtasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.05-Manage-Scheduled-Tasks.md refactor(tasks): restructure reminder dialog footer into primary + overflow (#8517) 2026-06-22 15:42:44 +02:00
2.06-Manage-Repeating-Tasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.07-Manage-Task-Integrations.md feat(plainspace): Collaborate-on-Plainspace discovery + smoother connect (#8649) 2026-07-01 16:39:34 +02:00
2.08-Choose-Sync-Backend.md docs(sync): document Proton Drive via rclone WebDAV (#8064) 2026-06-19 11:05:30 +02:00
2.09-Configure-Sync-Backend.md fix(sync): surface OneDrive OAuth token errors and document Entra setup (#8580) 2026-06-24 16:18:46 +02:00
2.10-Configure-Obsidian-for-Wiki-Contributions.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.11-Run-the-Development-Server.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.12-Package-the-App.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.13-Run-with-Docker.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.14-Build-for-Android.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.15-Develop-a-Plugin.md fix(plugins): allow iframe-only plugin installs 2026-05-18 13:43:22 +02:00
2.16-Set-Up-Development-Environment.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.17-Add-a-New-Issue-Integration.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.18-Contribute-Translations.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.19-Sync-Proton-Drive-via-rclone.md docs(wiki): add Proton Drive via rclone + WebDAV guide 2026-06-18 15:18:15 +02:00
3.00-Reference.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
3.01-API.md refactor: retire GET /api/sync/snapshot, re-scope GET /api/sync/status as diagnostic (#8496) 2026-06-20 12:02:58 +02:00
3.02-Settings-and-Preferences.md fix(backup): add Android automatic backup restore (#8066) (#8158) 2026-06-08 20:39:02 +02:00
3.03-Keyboard-Shortcuts.md feat(electron): trigger global shortcuts via superproductivity:// URLs (#8645) 2026-06-30 17:22:30 +02:00
3.04-Short-Syntax.md feat(help): add create task how-to #8015 (#8079) 2026-06-08 11:40:14 +02:00
3.05-Web-App-vs-Desktop.md fix(caldav): route WebDAV verbs through native HTTP on Android (#8558) (#8577) 2026-06-24 13:45:39 +02:00
3.06-User-Data.md refactor: remove dead SyncStateCorruptedError, compat exports, and 0 byte sync-providers barrel #8328 (#8396) 2026-06-15 14:16:14 +02:00
3.07-Issue-Integration-Comparison.md feat(plainspace): Collaborate-on-Plainspace discovery + smoother connect (#8649) 2026-07-01 16:39:34 +02:00
3.08-Sync-Integration-Comparison.md docs(sync): document Proton Drive via rclone WebDAV (#8064) 2026-06-19 11:05:30 +02:00
3.09-Theming.md feat(theme): add Plainspace built-in theme 2026-06-15 14:06:21 +02:00
3.97-Obsidian-Linter-Config-MD.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.98-Obsidian-Linter-Config-YAML.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.99-Other.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
4.00-Concepts.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
4.01-The-Today-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.02-Inbox-View.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.03-Planner-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.04-Schedule-View.md fix(schedule): indicate tasks beyond available time 2026-05-11 14:30:55 +02:00
4.05-Board-View.md feat(boards): enhance project selection with multi-select and sidebar… (#8069) 2026-06-09 18:33:09 +02:00
4.06-Project-View.md feat(project): project completion experience (#8036) 2026-06-08 13:43:38 +02:00
4.07-Tag-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.07a-Tags_Eat-the-Frog.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.07b-Tags_Ordinal-Priorities.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.08-Time-Estimates.md docs(wiki): add How Time Is Logged section 2026-02-04 14:45:00 +01:00
4.09-Task-Attributes.md docs(wiki): substantial addition of integrations (issue and sync) 2026-02-04 14:45:00 +01:00
4.10-Task-Notes.md feat(search): include note content in global search and support folde… (#8044) 2026-06-09 19:18:10 +02:00
4.11-Subtasks.md docs(wiki): add Repeating Tasks section and update references across multiple documents 2026-02-04 14:45:00 +01:00
4.12-Scheduled-Tasks.md docs(wiki): added Scheduled Tasks; updated references in multiple sections 2026-02-04 14:45:00 +01:00
4.13-Repeating-Tasks.md chore(task-repeat): revert RRULE Phase 1 from master (#7948) Develop the full RFC-5545 RRULE epic on the long-running feat/rrule-epic branch and merge once complete and testable in final form, rather than landing 13 phases into master one half-state at a time. Work preserved on feat/rrule-epic. Not yet shipped (post-v18.9.1), so no user impact. 2026-06-09 13:56:38 +02:00
4.14-How-Time-Is-Logged.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.15-Timers-and-Focus-Mode.md feat(focus-mode): make preparation opt-in, smooth start transition (#8639) 2026-06-29 19:44:53 +02:00
4.16-Break-Reminders.md docs(wiki): add Reminders and Idle Time 2026-02-04 14:45:00 +01:00
4.17-Idle-Time.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.18-Reflection.md docs(wiki): add Metrics 2026-02-04 14:45:00 +01:00
4.19-Metrics.md [codex] Hide global metric charts outside Today (#8019) 2026-06-05 10:53:57 +02:00
4.20-Task-Archiving.md docs(wiki): add Task Archiving section and update references across multiple documents 2026-02-04 14:45:00 +01:00
4.21-Worklog.md fix(worklog): avoid misleading export start/end times (#8090) 2026-06-08 20:44:47 +02:00
4.22-Quick-History.md feat(history): merge Quick History and Worklog into a unified History view (#8033) 2026-06-05 18:10:56 +02:00
4.23-Managing-Your-Data.md feat(sync): show banner when LWW sync discards a user content edit (#8694) (#8702) 2026-07-02 12:53:02 +02:00
4.24-Integrations.md docs(caldav): clarify bidirectional VTODO sync (#8196) 2026-06-09 11:27:39 +02:00
_Footer.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
_Sidebar.md docs(sync): document Proton Drive via rclone WebDAV (#8064) 2026-06-19 11:05:30 +02:00
Home.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00