Repository navigation
Conversation
listByProject() was returning all sessions including archived ones, while listGlobal() already filtered them. Added isNull(time_archived) filter to match listGlobal behavior. Closes anomalyco#27030
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one highly relevant PR that addresses a very similar issue: Potential Duplicate:
This PR (#27034) may be addressing the same bug or a follow-up fix specific to the per-project listing. You may want to check if PR #24907 already covers this functionality or if this is a separate oversight in the per-project listing that was missed in the previous fix. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #27030
Type of change
What does this PR do?
The per-project session listing (
Session.list()/GET /session) returns all sessions including archived ones, while the global listing (Session.listGlobal()/GET /experimental/session) already filters out archived sessions viaisNull(time_archived).This causes archived sessions from automated workflows (cron tasks, CI runs) to pollute the session history displayed to users.
Fix: Added
isNull(SessionTable.time_archived)filter condition tolistByProject()function to matchlistGlobal()behavior. Also addedarchived?: booleanoption toListInputtype so callers can optionally include archived sessions.How did you verify your code works?
bun typecheckinpackages/opencode- no new type errorsScreenshots / recordings
N/A (backend change, no UI impact)
Checklist