You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a task is deleted from the Archived tasks view, it reappears in the sidebar task list. The task should remain hidden after deletion.
Steps to reproduce
Create or select an existing task in the sidebar.
Right-click the task → Archive.
Open the Archived tasks view (Home → Archived → “View all”, or /code/archived).
Delete the archived task (Delete button or context menu → Delete).
Observe the sidebar task list.
Expected behavior
The deleted task does not appear in the sidebar.
The task does not appear in other task lists that respect workspace/archive state.
Actual behavior
After deleting from Archived tasks, the task reappears in the sidebar.
It may disappear later after an unrelated refresh (navigation, restart, or another action that refetches workspaces).
Screen recording
Screen.Recording.2026-07-04.at.12.19.40.PM.mov
Environment
App: PostHog Code (desktop)
Mode: local
OS: macOS
Suspected cause
Deleting an archived task removes local state on the server (archives row + workspaces row), but the UI refresh after delete only invalidates archive and tasks caches — not the workspaces cache.
Sidebar visibility requires both:
Task is not archived (archivedTaskIds)
Task has a workspace (workspaces)
After delete:
Cache
After refetch
Result
archivedTaskIds
No longer archived
✅ Updated
workspaces
Still has workspace
❌ Stale
Because !archived && hasWorkspace evaluates to true, the task shows in the sidebar again.
Restore (unarchive) already invalidated the workspaces cache; delete did not.
Proposed fix
After a successful archived-task delete, also invalidate WORKSPACE_QUERY_KEY, matching the restore path.
Deleted archived task reappears in sidebar
Summary
When a task is deleted from the Archived tasks view, it reappears in the sidebar task list. The task should remain hidden after deletion.
Steps to reproduce
/code/archived).Expected behavior
Actual behavior
Screen recording
Screen.Recording.2026-07-04.at.12.19.40.PM.mov
Environment
Suspected cause
Deleting an archived task removes local state on the server (
archivesrow +workspacesrow), but the UI refresh after delete only invalidates archive and tasks caches — not the workspaces cache.Sidebar visibility requires both:
archivedTaskIds)workspaces)After delete:
archivedTaskIdsworkspacesBecause
!archived && hasWorkspaceevaluates to true, the task shows in the sidebar again.Restore (unarchive) already invalidated the workspaces cache; delete did not.
Proposed fix
After a successful archived-task delete, also invalidate
WORKSPACE_QUERY_KEY, matching the restore path.