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(core): restore legacy sessions in markerless projects by EnglandLobster · Pull Request #54048 · anomalyco/opencode

Conversation

@EnglandLobster

@EnglandLobster EnglandLobster commented Oct 9, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #53450. Related: #51176 and the migration-time repair in #51935.

Type of change

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

What does this PR do?

Opening a non-Git/Hg directory creates a V2 project but skips the resolution event, leaving imported V1 sessions under global and hidden from project-scoped lists.

Publish resolution for markerless directories too. An optional exact flag keeps both the database projector and client adoption limited to that directory; repository resolution retains recursive adoption. Existing affected project rows recover on their next resolution. Adoption resets the relative path to "" and preserves session timestamps and history.

Unlike #51935's migration-time pass over known projects, this handles directory discovery at runtime. It uses the existing durable event/transaction path rather than adding another database repair loop.

How did you verify your code works?

  • New regression fails on unmodified v2: an existing markerless project leaves its legacy session under global.
  • Core session-create, project and session-move suites: 83 passed, including exact-directory isolation, empty-subpath listing, timestamp preservation and idempotent resolution.
  • Schema worktree suite: 6 passed; client solid-data suite: 28 passed.
  • Regenerated clients with bun run generate in packages/client.
  • Root bun run check (lint and typechecks) passed.

Screenshots / recordings

Not a visual change.

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.

All reactions
LovelyLuLu0704 LovelyLuLu0704
fix(core): restore legacy sessions in markerless projects
009b6de
@github-actions github-actions Bot added the needs:issue label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

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

opencode-agent[bot]
opencode-agent Bot reviewed Oct 9, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I reproduced the problem with the CLI from source: in a non-Git directory with an existing project and imported V1 sessions under global, session list is empty on v2. With this change the directory's session is adopted, with path set to "" and its timestamps kept, and a session in a subdirectory stays under global. The new regression test fails on the base and passes here. The nearby core, schema and client suites behave the same as on the base, and typechecks pass. I have no blocking concerns.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Frey-Fu Frey-Fu mentioned this pull request Oct 10, 2026
tui: V1→V2 migration stores stripped absolute dir in session.path, hiding sessions from /sessions #53709
Closed
@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:38
@github-actions github-actions Bot removed the needs:issue label Oct 10, 2026
This was referenced Oct 11, 2026
sessions: V1-migrated sessions are orphaned in the global project and hidden after upgrading to V2 #54640
Closed
session: V1 to V2 migration hides legacy sessions from the default cwd-scoped list #54679
Closed
sessions: V1 legacy session rows unfindable in V2 /sessions because session.path is not normalized to project-root-relative form #54774
Closed
migration: V1 sessions stay in the synthetic 'global' project after upgrading to V2 and vanish from the session list #55081
Closed
migration: V1 "global" project sessions invisible in V2 session list after upgrade #55275
Closed
db migration: v1→v2 leaves pre-upgrade sessions invisible in session list (project_id/path not remapped) #55381
Closed
tui: pre-upgrade sessions hidden from session list (stuck under "global" project) #55596
Closed
session: V1 sessions in non-git directories hidden after V2 migration (project_id stays 'global') #55633
Closed
@627-hub 627-hub mentioned this pull request Oct 16, 2026
V2: V1 session history is never imported into session_v2 — old sessions invisible in OpenCode 2 #41217
Closed
This was referenced Oct 18, 2026
Migrated non-git sessions stay under project_id 'global', so the V2 TUI shows 0 sessions while the desktop app lists them #56760
Closed
sessions: pre-project-row sessions stranded in global project are hidden from session lists #57629
Closed
This was referenced Oct 21, 2026
V1→V2 importer keeps project_id='global' for non-git directories, so migrated sessions never appear in the per-directory session picker #50551
Closed
sessions: V1 sessions from non-git directories hidden from the project session list #53450
Closed
@github-actions

github-actions Bot commented Nov 9, 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 Nov 9, 2026
@github-actions github-actions Bot added the automated-pr-cleanup label Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencode-agent opencode-agent[bot] opencode-agent[bot] left review comments

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.

sessions: V1 sessions from non-git directories hidden from the project session list

Uh oh!

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

1 participant

@EnglandLobster
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.