Skip to content

feat(app): view archived sessions & unarchive#15250

Open
alexyaroshuk wants to merge 14 commits intoanomalyco:devfrom
alexyaroshuk:feat/unarchive
Open

feat(app): view archived sessions & unarchive#15250
alexyaroshuk wants to merge 14 commits intoanomalyco:devfrom
alexyaroshuk:feat/unarchive

Conversation

@alexyaroshuk
Copy link
Copy Markdown
Contributor

@alexyaroshuk alexyaroshuk commented Feb 26, 2026

Issue for this PR

Closes #6680, #12393

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a new "Archived Sessions" section in Settings that allows users to:

  • View all archived sessions across projects (or filtered to current project)
  • Restore (unarchive) any archived session back to the sidebar

How did you verify your code works?

  1. bun test
  2. manual test:
  • able to view archived sessions for current project
  • able to view archived sessions for all projects
  • when a session is unarchived, the archived session list is rebuilt, and the session list in the sidebar-items is rebuilt as well (we now see this session as if it was not archived)
  • when a session is archived, the archived session list is rebuilt

Screenshots / recordings

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Comparison to #6769

This pr solves the same underlying issue as 6769, but differently:
Compared to PR #6769, I've placed the archived sessions feature in Settings/ Data(new tab) instead of the sidebar dropdown, added a multi-project filter (All/Current project), and used a simpler list view without the built-in search. The backend changes are in routes/session.ts instead of server.ts.

Files changed

Files Changes
packages/app/src/components/settings-archive.tsx New component to view/restore archived sessions
packages/app/src/components/dialog-settings.tsx Added Archived Sessions tab in Data section
packages/opencode/src/server/routes/session.ts Added archived filter param, nullable archived for unarchive
packages/opencode/src/session/index.ts Added archived filter in list query, setArchived accepts null
packages/app/src/i18n/*.ts Added related keys

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate PRs Found

  1. PR Feat/view archived sessions #6769: Feat/view archived sessions

  2. PR feat: add session archive/unarchive support to TUI #13961: feat: add session archive/unarchive support to TUI

  3. PR feat(app): temporarily disable archive session button and command #12020: feat(app): temporarily disable archive session button and command

@alexyaroshuk
Copy link
Copy Markdown
Contributor Author

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate PRs Found

  1. PR Feat/view archived sessions #6769: Feat/view archived sessions

  2. PR feat: add session archive/unarchive support to TUI #13961: feat: add session archive/unarchive support to TUI

  3. PR feat(app): temporarily disable archive session button and command #12020: feat(app): temporarily disable archive session button and command

  1. addressed above, slightly different implementation - not a duplicate
  2. tui change, not quite related to desktop
  3. 12020 is a bandaid change, unrelated

@alexyaroshuk alexyaroshuk marked this pull request as ready for review February 26, 2026 16:44
@alexyaroshuk
Copy link
Copy Markdown
Contributor Author

@adamdotdevin Could this get a review? Anything I should change?

@Shaik121
Copy link
Copy Markdown

I just experienced this exact issue - I archived a session by mistake and couldn't find any way to unarchive it in the UI. The session data was still in the SQLite database, but there was no way to restore it through the interface.

This PR would have saved my session! Really glad to see this fix coming. The implementation looks clean - having the archived sessions in Settings > Data makes perfect sense.

Tested the branch locally and the unarchive functionality works as expected. This solves issues #6680 and #12393 perfectly.

🚀 Please prioritize this merge!

@Shaik121
Copy link
Copy Markdown

Shaik121 commented Apr 1, 2026

Update: I've also created a complementary PR with tests for the archive/unarchive functionality:

✅ PR #1 (from my fork): Shaik121#1

The tests verify:

  • Session.setArchived works correctly for both archive and unarchive
  • Session.listGlobal with archived filter returns correct sessions

All tests pass (2 pass, 0 fail).

Could the maintainers please review and merge PR #15250? This feature is critical for users who accidentally archive sessions - there's currently no way to unarchive them in the UI. The tests confirm the backend functionality works as expected.

cc @adamdotdevin

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: view archived sessions on desktop

4 participants