Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

fix(archive): preserve archived task metadata - #3755

Merged
trunk-io[bot] merged 3 commits into
mainfrom
posthog-code/fix-archived-task-recovery
Jul 23, 2026
Merged

fix(archive): preserve archived task metadata#3755
trunk-io[bot] merged 3 commits into
mainfrom
posthog-code/fix-archived-task-recovery

Conversation

@richardsolomou

@richardsolomou richardsolomou commented Jul 23, 2026

Copy link
Copy Markdown
Member

Problem

Archived tasks can lose their title and repository metadata once they fall out of the normal task list, leaving recent work difficult to find or recover. Large archive lists also render every row and only support broad text filtering.

Changes

I persist each available archive field independently and recover older local and cloud records from retained session logs in the background. Unrecoverable records keep honest fallback titles without hiding known dates or repositories. Archive actions read both full-task and summary caches, while restored tasks fetch their full details only when opened. The archive page virtualizes rows and has a dedicated repository filter alongside title and task ID search.

How did you test this?

  • Ran workspace-server, core, and UI typechecks.
  • Ran 36 workspace-server archive tests, 13 core archive-list tests, and 13 focused UI archive tests.
  • Tested the Electron app with 725 copied production archives, including recovery results, bounded row rendering, scrolling, and repository filtering.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Recover metadata for older archives and keep large archive lists responsive.

Generated-By: PostHog Code
Task-Id: 68800b78-554e-42ce-9077-b5125e27a6aa
@trunk-io

trunk-io Bot commented Jul 23, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit b4f3647.

@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
packages/ui/src/features/archive/useArchiveTask.ts:131-141
**Archive metadata misses summary cache**

When a task is archived from the default sidebar with the full task-list query disabled, this lookup excludes the task-summary cache and sends undefined title, creation date, and repository fields, causing the archive to use fallback metadata and depend on best-effort log recovery.

### Issue 2 of 2
packages/ui/src/features/archive/ArchivedTasksView.tsx:523-525
**Restore action loses task navigation**

When an archived task is available through the explicit-ID summaries but absent from the current user's filtered task list, this lookup uses the pre-restore `listedTasks` value and omits the “View task” action from the successful restore toast.

Reviews (1): Last reviewed commit: "fix(archive): preserve archived task met..." | Re-trigger Greptile

Comment thread packages/ui/src/features/archive/useArchiveTask.ts Outdated
Comment thread packages/ui/src/features/archive/ArchivedTasksView.tsx Outdated
@richardsolomou
richardsolomou requested a review from a team July 23, 2026 12:15
Read archive metadata from summary caches and restore task navigation.

Generated-By: PostHog Code
Task-Id: 68800b78-554e-42ce-9077-b5125e27a6aa
Comment thread packages/core/src/archive/archiveListView.ts
Keep each recovered archive field independent when another is unavailable.

Generated-By: PostHog Code
Task-Id: 68800b78-554e-42ce-9077-b5125e27a6aa
@trunk-io
trunk-io Bot merged commit f057f43 into main Jul 23, 2026
34 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/fix-archived-task-recovery branch July 23, 2026 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants