feat(session): support ancestor directory filtering for sdk lists#22373
Closed
OverHash wants to merge 4 commits intoanomalyco:devfrom
Closed
feat(session): support ancestor directory filtering for sdk lists#22373OverHash wants to merge 4 commits intoanomalyco:devfrom
OverHash wants to merge 4 commits intoanomalyco:devfrom
Conversation
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.
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
Author
|
Closing this PR to reopen against my fork. |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sorry contributors, I meant to make a PR into my own local fork. This wasn't supposed to be created to upstream repo!