Repository navigation
fix: don't boot a full instance for session list - #37477
armancharan wants to merge 6 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
| projectID?: ProjectV2.ID | ||
| scope?: "project" | ||
| path?: string | ||
| workspaceID?: WorkspaceV2.ID |
There was a problem hiding this comment.
subject to feedback from code owners, i think this ordering variant — where the ID-related properties are colocated — would be better
| projectID?: ProjectV2.ID | |
| scope?: "project" | |
| path?: string | |
| workspaceID?: WorkspaceV2.ID | |
| scope?: "project" | |
| path?: string | |
| projectID?: ProjectV2.ID | |
| workspaceID?: WorkspaceV2.ID |
|
This PR looks like it fixes a correctness bug I hit too, not just the hang — wanted to add reproduction evidence in case it's useful for review/priority. Setup: Symptom: Database ground truth ( -- project table -- session table, correctly linked But the API response for Downstream impact: breaks the bundled web UI's per-project session list — a project with real history shows "Nothing here yet" because the client-side match against the real project ID never finds anything (everything's Given this PR's test explicitly covers "filters by projectID when projectID is provided — excludes ... other projects," it looks like this change fixes exactly this. Happy to test against the branch if that'd help move it along — this one's been blocking remote/mobile access to existing sessions for me. |
|
This might also help with a downstream issue I opened in Entire: entireio/cli#1992. The idea there is to use opencode --pure session list --format jsonrewrites Since this PR avoids Would it make sense to add a regression test checking that |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #37435
#37435
Type of change
What does this PR do?
session listwas loading a full instance just to query the db, which can take a long time. Skip that, resolve the project from cwd, and list by project id.How did you verify your code works?
bun test test/cli/session-list-bootstrap.test.ts test/server/session-list.test.tssession list does not run InstanceBootstrap plugins— plugins stay unloaded forsession list(still run foragent list)filters by projectID when projectID is provided— lists only this project's root sessions; excludes children and other projectsAcceptance
session listsession list does not run InstanceBootstrap pluginsprojectIDfilters by projectID when projectID is providedScreenshots / recordings
n/a
Checklist