Skip to content

feat(session): support ancestor directory filtering for sdk lists#22373

Closed
OverHash wants to merge 4 commits intoanomalyco:devfrom
OverHash:feat/ancestor-directory-filtering
Closed

feat(session): support ancestor directory filtering for sdk lists#22373
OverHash wants to merge 4 commits intoanomalyco:devfrom
OverHash:feat/ancestor-directory-filtering

Conversation

@OverHash
Copy link
Copy Markdown

@OverHash OverHash commented Apr 14, 2026

Sorry contributors, I meant to make a PR into my own local fork. This wasn't supposed to be created to upstream repo!

Keep x-opencode-directory as a header for GET /session unless callers explicitly set a directory query so worktree and subdirectory users still see project sessions. Add regression coverage for both v1 and v2 SDK clients and keep the test harness aligned with Server.Default().app.
* Move early-continue logic for `/session` API requests inside a dedicated
  branch
* Adds new explicit comment to document why we are early-continuing
* Rewrite `session` -> `isSessionRequest` and `has` ->
  `hasExplicitSearchParameter` for clarity
Rewrite directory headers into query params for v1 and v2 session list requests and treat directory filters as ancestor-aware matches. Add integration coverage that verifies ancestor directories see descendant sessions while sibling worktrees remain isolated.
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Apr 14, 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.

@OverHash
Copy link
Copy Markdown
Author

Closing this PR to reopen against my fork.

@OverHash OverHash closed this Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

Based on my search, I found a potentially related PR:

Related PR:

The search results also show other session-related PRs (#13960, #14489) that touch on scoping session lists to directories, but #20361 is the most directly related to the filtering behavior being implemented in PR #22373.

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

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant