Repository navigation
Description
TaskActionItem has two ways to ask "is this task retired?", and they disagree. Roughly 32 call sites read the raw deleted field while ~20 read the isRetired projection, so a task retired only through canonical lifecycle status reads as live in the former.
The type documents why the projection exists (desktop/macos/Desktop/Sources/TaskActionItem.swift:82-87):
/// Server list/detail responses project soft retirement through canonical
/// lifecycle status and may omit the legacy `deleted` field. Keep that
/// projection here so every local cache and surface applies the same rule.
var isRetired: Bool {
deleted == true || taskStatus == "cancelled" || taskStatus == "superseded"
}So a server row with status: "cancelled" and no deleted field is retired — but task.deleted != true evaluates to "live" for it. Verified examples that read the raw field on objects that have not been through the local cache (where the column is written from isRetired, masking the difference):
desktop/macos/Desktop/Sources/MainWindow/ChatFirst/ChatFirstShell.swift:569— a fresh detail fetch:A cancelled/superseded task is returned here as though live.if let task = try? await APIClient.shared.getActionItem(id: id), task.deleted != true { return task }
desktop/macos/Desktop/Sources/Stores/TasksStore.swift:2761,:2766—remoteTask.deleted != true,hydratedTask.deleted != trueon freshly fetched rows.desktop/macos/Desktop/Sources/MainWindow/Pages/TasksPage.swift:200-201,:2546-2549,:5525— filter predicates andisDeleted.- Live-lane filters over
tasksStore.tasks:MainWindow/DesktopTopBar.swift:58,MainWindow/ChatFirst/ChatFirstTasksPage.swift:153,:413,:417,:547,MainWindow/ChatFirst/ChatFirstShell.swift:544,:566,:573,:604,:610,MainWindow/Pages/DashboardPage.swift:1006.
Why it is mostly invisible today: every writer that persists a task derives the stored column from the projection, not the raw field — Rewind/Core/ActionItemModels.swift:323 (deleted: item.isRetired), :376, :750, and Rewind/Core/ActionItemStorage.swift:744. So once a row round-trips through SQLite both readings agree. The divergence is only observable on objects read straight from an API response, which is exactly what the sites above do.
This is the same failure class as #11460 — retirement re-derived by each reader instead of stated once by an authority — but on paths the deleted lane never touches, so that PR neither causes nor fixes it. Filing separately rather than widening a verified bug fix.
Note when scoping: deleted is also a field on unrelated types (Conversation, the conversation-embedded ActionItem, memory/goal records), so the raw-read count above needs per-site type checking rather than a blind sweep.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn review
Activity
fix(desktop): stop dashboard navigation from opening a retired task (#…
aryanorastar commentedon Aug 25, 2026
Fixed in #12187.
Root cause:
TaskActionItem.isRetiredcorrectly treatsstatus: cancelledandstatus: supersededas retired, but several desktop readers bypassed it and checked only the optional legacydeletedflag. When the backend returned a status-only retirement (deletedomitted), those readers could still count, render, focus, filter, or mutate the task as live.The PR makes the legacy wire marker private while preserving the exact
deletedJSON key, then migrates everyTaskActionItemlifecycle read to the canonicalisRetiredpredicate across:Proof:
TaskActionItemRetirementAuthorityTestsbuildscancelledandsupersededtasks withdeleted: niland proves they are retired, land in the correct Removed filter, and cannot enter the active dated surface."deleted": true(never the new private Swift property name), then decodes back as retired.omi-11518-retirement, bundle idcom.omi.omi-11518-retirement) was built, signed, installed, launched, and confirmed through its automation bridge. Authenticated task CRUD could not be exercised on this machine because no desktop auth seed exists and the synthetic local stack requires unavailable Docker/Typesense; the PR does not claim that missing UI run.Full-suite disclosure: 5,766 tests ran with one skip and two failures in unrelated global-owner tests. One passed immediately in isolation; the other reproduces independently in isolation with the owner resolving to
anonymous. Neither test touches a changed file. All task-retirement coverage is green.