Skip to content

test: add archive/unarchive functionality tests#1

Open
Shaik121 wants to merge 15 commits intodevfrom
feat/unarchive
Open

test: add archive/unarchive functionality tests#1
Shaik121 wants to merge 15 commits intodevfrom
feat/unarchive

Conversation

@Shaik121
Copy link
Copy Markdown
Owner

@Shaik121 Shaik121 commented Apr 1, 2026

Issue for this PR

Closes anomalyco#6680
Closes anomalyco#12393

Type of change

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

What does this PR do?

This PR adds unit tests for the archive/unarchive functionality that will be added in PR anomalyco#15250. The tests verify:

  • Session.setArchived correctly archives a session
  • Session.setArchived with time=null correctly unarchives a session
  • Session.listGlobal with archived=true returns only archived sessions
  • Session.listGlobal with archived=false returns only active sessions
  • Proper filtering between archived and non-archived sessions

How did you verify your code works?

All tests pass:

  • Session archive/unarchive tests: 2 pass, 0 fail
  • All session-related tests: 15 pass, 0 fail
  • Full test suite: 1629 pass

Backend verification completed - the archive/unarchive functionality works correctly.

Screenshots / recordings

N/A - This is a backend test-only PR

Checklist

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@Shaik121
Copy link
Copy Markdown
Owner Author

Shaik121 commented Apr 1, 2026

Hi maintainers!

I noticed there's also a closed PR anomalyco#16001 (feat(app): unarchive sessions) that addresses the same issue. This PR (#1) adds complementary tests for the archive/unarchive functionality.

Could you let me know:

  1. Is this test PR valuable/acceptable?
  2. Should I close this and rely solely on PR feat(app): view archived sessions & unarchive anomalyco/opencode#15250?
  3. Or is there a different approach you'd prefer?

Thanks!

@Shaik121
Copy link
Copy Markdown
Owner Author

Shaik121 commented Apr 1, 2026

pinging @adamdotdevin - could you review this PR? The tests pass and it complements PR anomalyco#15250 which adds the archive/unarchive UI feature. Would be great to get this merged to help prevent future regressions!

The tests verify:

  • Session.setArchived archives a session correctly
  • Session.setArchived with time=null unarchives correctly
  • Session.listGlobal filtering works for both archived=true and archived=false

All 1629 tests pass including the new archive tests.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to unarchive in opencode-desktop [FEATURE]: view archived sessions on desktop

2 participants