Skip to content

fix(session): respect directory filter with workspaces#30804

Open
rexdotsh wants to merge 1 commit into
anomalyco:devfrom
rexdotsh:fix/session-directory-experimental-workspaces
Open

fix(session): respect directory filter with workspaces#30804
rexdotsh wants to merge 1 commit into
anomalyco:devfrom
rexdotsh:fix/session-directory-experimental-workspaces

Conversation

@rexdotsh
Copy link
Copy Markdown
Contributor

@rexdotsh rexdotsh commented Jun 4, 2026

Issue for this PR

Closes #30801

Type of change

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

What does this PR do?

Fixes directory-scoped session lists when experimental workspaces are enabled.

Before this change, Session.list({ directory }) ignored directory in that mode unless callers also passed a path. The web sidebar could then receive project-wide results, filter them client-side by exact directory, and render only New session + Load more even though sessions existed.

This makes directory apply whenever scope: "project" was not explicitly requested, and adds regression coverage for two sibling directories in the same git project.

How did you verify your code works?

  • cd packages/opencode && bun test test/server/session-list.test.ts
  • cd packages/opencode && bun typecheck
  • Built a patched release-channel binary and verified the web UI now shows the existing sessions for the affected worktree.

Screenshots / recordings

Before

chrome_t6ztZ0DWtg.mp4

After

Fixed session sidebar showing existing sessions

Checklist

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

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.

Web UI session list shows only New session + Load more for a directory with existing sessions

1 participant