Skip to content

updateTaskNode() surfaces zero user-visible notification on a non-OCC write failure #2092

Closed

Description

@mstomar125

Found during

Adversarial review of #2091 (OCC error-shape stripping causing a duplicate notification in updateNode()), while checking whether updateTaskNode() has the same duplicate-notification bug. It doesn't — but for a different, arguably worse reason.

The gap

updateTaskNode()'s outer `handle.promise.catch((err) => { ... })` (packages/desktop-app/src/lib/services/shared-node-store.svelte.ts) only checks `err instanceof OperationCancelledError` and returns early for that case. Unlike updateNode()'s and deleteNode()'s outer catches, it has no fallback `conflictNotifications.add({conflictType: 'write-failure', ...})` for the general case. So:

Why this matters

`updateTaskNode()` is called fire-and-forget (`void`-returning) from every UI call site (e.g. `task-schema-form.svelte`'s status/priority/due-date/assignee controls) — there is no other mechanism by which a caller would learn the write failed. A user changing a task's status, priority, or due date during a network blip or daemon hiccup sees the local optimistic value revert (via the unconditional rollback) with no toast, no error, nothing — the UI just silently snaps back with no explanation, which reads as a bug/glitch rather than a reported failure.

Comparison

Suggested fix

Add the same fallback to `updateTaskNode()`'s outer `handle.promise.catch()` that `updateNode()`/`deleteNode()`/`setNode()` already have: after the `OperationCancelledError` check, surface a generic `write-failure` notification for every other rejection (guarding against duplicating the OCC path's own specific notification the same way #2091 does — a captured boolean flag, not a re-derived `isVersionConflict(err)` check, since the re-thrown error has the same shape-stripping issue #2080/#2091 fixed for the sibling methods).

Scope note

Discovered during #2091's review, explicitly flagged as out of scope for that PR (which is about deduplicating a notification, not adding a missing one). Filing separately.

Activity

  1. added
    bug
    on Aug 14, 2026
  2. mstomar125 commented on Aug 14, 2026

    @mstomar125
    ContributorAuthor

    Fixed in #2098.

    updateTaskNode()'s outer catch only handled OperationCancelledError and returned early — it had no fallback `write-failure` notification for a genuine non-OCC failure at all (unlike `updateNode()`/`deleteNode()`/`setNode()`, which all have one). Added the same captured-boolean-gated fallback those three already have (`occConflictAlreadyNotified`, mirroring #2091's fix for `updateNode()`'s duplicate-notification bug), so a non-OCC `updateTaskNode()` write failure now surfaces exactly one `write-failure` notification instead of zero.

    Extended `occ-notification-dedup.test.ts` with an `updateTaskNode()` describe block; the non-OCC test is verified to fail against the pre-fix code (0 notifications) and pass with the fix (1 notification, type `write-failure`).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions