GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(session): scope default lists by directory by samiralibabic · Pull Request #38532 · anomalyco/opencode

Conversation

@samiralibabic

@samiralibabic samiralibabic commented Jul 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #38529
Replaces the implementation scope from #28972 and #18890.

Related to #31210. This is the current-dev implementation for #38529; unlike #31210, it intentionally makes exact-directory filtering the default in both Git and non-Git contexts while retaining project scope when directory filtering is disabled.

Type of change

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

What does this PR do?

Non-git directories share the global project, so project-only session queries can mix unrelated directories.

The CLI now sends its exact instance directory when listing sessions. The TUI uses the same exact-directory filter by default and keeps project scope when directory filtering is disabled. Explicit recursive path behavior is unchanged, and directory queries retain the legacy path IS NULL fallback. Resume-time cwd handling is intentionally out of scope.

How did you verify your code works?

  • Focused CLI, TUI, and server session-list tests
  • bun typecheck in packages/opencode and packages/tui
  • pre-push bun turbo typecheck
  • Prettier and git diff --check

Screenshots / recordings

N/A. Query behavior only.

Checklist

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

samiralibabic reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@samiralibabic
fix(session): scope default lists by directory
fa89273
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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

Based on my search, I found related PRs that address similar session scoping and directory filtering concerns:

  1. PR fix(tui): scope non-git sessions by directory, not hierarchical path #31210 - fix(tui): scope non-git sessions by directory, not hierarchical path

    • Directly related: already implements directory-based scoping for non-git sessions in the TUI
  2. PR fix(opencode): scope --continue to the current worktree directory #33521 - fix(opencode): scope --continue to the current worktree directory

    • Related: handles directory scoping for the continue command
  3. PR fix(acp): list known sessions across projects on empty cwd #33789 - fix(acp): list known sessions across projects on empty cwd

    • Related: addresses session listing behavior with directory context
  4. PR fix(sdk): avoid implicit directory filtering on /session list #20361 - fix(sdk): avoid implicit directory filtering on /session list

    • Related: directly addresses implicit directory filtering on session list endpoints
  5. PR fix(opencode): resolve directory when list sessions #22835 - fix(opencode): resolve directory when list sessions

    • Related: handles directory resolution during session listing

These PRs tackle similar problems around session scoping and directory-based filtering. PR #38532 appears to be consolidating these fixes into a comprehensive solution (as indicated by "Replaces the implementation scope from #28972 and #18890" in the description).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@samiralibabic samiralibabic mentioned this pull request Jul 27, 2026
fix(tui): scope non-git sessions by directory, not hierarchical path #31210
Closed
3 of 6 tasks
This was referenced Aug 10, 2026
[BUG] Windows: session.path for non-git projects is drive-dependent, hiding sessions from /sessions based on launch drive #41567
Closed
fix(session): anchor non-git session paths to the directory drive #41568
Closed
@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

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:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Aug 23, 2026
@github-actions github-actions Bot added the automated-pr-cleanup label Aug 23, 2026
@samiralibabic

samiralibabic commented Aug 31, 2026

Copy link
Copy Markdown
Author

This remains reproducible on current dev (9f69463f1d). I rebased the one-commit fix and force-pushed the refreshed head as 9061d6c382.

Verification on the rebased branch:

  • OpenCode session-list tests: 12 passed
  • TUI session-list tests: 7 passed
  • packages/opencode and packages/tui typechecks passed
  • workspace typecheck: 30 packages passed
  • changed-file Prettier and git diff --check passed

The PR was closed by automated inactivity cleanup rather than a technical rejection. Please reopen it for review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

automated-pr-cleanup

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

session list and TUI mix sessions from unrelated non-git directories

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@samiralibabic
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.