fix(ui): remove scope=project from session list requests#572
Open
JDis03 wants to merge 1 commit into
Open
Conversation
OpenCode 1.17.10 has a bug in the /session endpoint: when scope=project is passed, it ignores the directory filter and returns ALL sessions across every project. This made the same session appear in every project tab in CodeNomad — deleting a session from one tab deleted it from all of them. The scope=project parameter was added in upstream PR NeuralNomadsAI#565 (commit e29c3a0) to avoid pagination limits on the default endpoint. With the directory filter ignored, that optimization becomes a correctness bug, so drop scope=project until OpenCode fixes the backend. With directory alone, the endpoint correctly returns only the sessions for the requested folder. Verified via curl on the running process: directory=/test returns 1 session (Hola greeting), directory=/idm returns 1 session (up). Co-Authored-By: Claude <noreply@anthropic.com>
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/28476660488 Artifacts expire in 7 days.
|
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.
Problem
PR #565 (commit e29c3a0) added
scope=projectto session list requests to avoid pagination limits. With OpenCode 1.17.x, the/sessionendpoint ignores thedirectoryfilter whenscope=projectis present and returns all sessions from the global SQLite database instead.This makes the same session appear in every project tab. Deleting a session from one tab deletes it from the shared DB, affecting all of them.
Reproduction
Related: anomalyco/opencode#33113
Fix
Drop
scope: "project"frombuildProjectSessionListOptions(). Thedirectoryparameter alone correctly filters sessions to the requested folder on OpenCode 1.17.x.scope: "project"can be reintroduced once the backend respectsdirectoryalongside it.Validation
directory=/test→ 1 session (correct)directory=/idm→ 1 session (correct)