Skip to content

fix: honor v2 session list filters#30147

Closed
he-yufeng wants to merge 1 commit into
anomalyco:devfrom
he-yufeng:fix/v2-session-list-filters
Closed

fix: honor v2 session list filters#30147
he-yufeng wants to merge 1 commit into
anomalyco:devfrom
he-yufeng:fix/v2-session-list-filters

Conversation

@he-yufeng
Copy link
Copy Markdown

@he-yufeng he-yufeng commented May 31, 2026

Issue for this PR

Fixes #30109

Type of change

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

What does this PR do?

The v2 session list API accepted filters such as roots, start, and path, but the handler did not pass them through to the session service. This wires those filters into the query path and adds an HTTP API regression test for root-only, start-time, and path filtering.

How did you verify your code works?

  • bun --cwd packages\opencode test test\server\httpapi-session.test.ts -t "honors v2 session list filters"
  • bun --cwd packages\opencode test test\server\httpapi-session.test.ts
  • bun --cwd packages\opencode typecheck
  • bun --cwd packages\core typecheck
  • bunx prettier --check packages\core\src\session.ts packages\opencode\src\server\routes\instance\httpapi\handlers\v2\session.ts packages\opencode\test\server\httpapi-session.test.ts
  • bunx oxlint packages\core\src\session.ts packages\opencode\src\server\routes\instance\httpapi\handlers\v2\session.ts packages\opencode\test\server\httpapi-session.test.ts (warnings only, no errors)
  • git diff --check

Screenshots / recordings

N/A; this is an API behavior fix.

Checklist

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

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label May 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

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
Contributor

github-actions Bot commented Jun 1, 2026

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jun 1, 2026
@github-actions github-actions Bot closed this Jun 1, 2026
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.

Session list "Load More" pagination broken when filtering by directory

1 participant