Skip to content

fix(app): keep nested directory for local sessions - #51805

Closed
Dante-dan wants to merge 4 commits into
anomalyco:devfrom
Dante-dan:nested-session-directory
Closed

Dante-dan wants to merge 4 commits into
anomalyco:devfrom
Dante-dan:nested-session-directory

Conversation

@Dante-dan

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #51191

Type of change

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

What does this PR do?

The Web app resolved a new Local session to the Git project's canonical root, even when the selected directory was a subfolder. Keep the selected directory for Local sessions so its .opencode/skills can be discovered. Creating a new worktree still uses the project root.

How did you verify your code works?

  • bun test --conditions=solid --preload ./happydom.ts ./src/new-session (9 passed)
  • bun typecheck from packages/app (passed)
  • Root lint passed. Full root check stopped in an unrelated Astro package because its telemetry tried to write to ~/Library/Preferences/astro, which this environment denies.
  • The production session-entry benchmark was attempted before the change; its app build exceeded the configured 120-second web-server startup limit, so no timing comparison was available.

Screenshots / recordings

No visual UI change.

Checklist

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

@github-actions

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.

@github-actions

Copy link
Copy Markdown
Contributor

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

@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:21
@Franklittleboy

Copy link
Copy Markdown

Thanks for working on this fix. GitHub now shows merge conflicts with the v2 branch. Could you update the branch and resolve them? I see many people(includes myself) are still affected by this issue in the Web UI.

@Dante-dan

Copy link
Copy Markdown
Contributor Author

@Franklittleboy Resolved the conflicts in this PR, which targets dev (the promoted v2 development branch). I also opened #55578 for the v2 branch. Both preserve the selected subdirectory for Local sessions. The 19 new-session tests and all 36 package typechecks passed on each version.

@Franklittleboy

Copy link
Copy Markdown

@Franklittleboy Resolved the conflicts in this PR, which targets dev (the promoted v2 development branch). I also opened #55578 for the v2 branch. Both preserve the selected subdirectory for Local sessions. The 19 new-session tests and all 36 package typechecks passed on each version.

Thanks so much!!!

@github-actions

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web: session in nested project folder opens at git repo root, nested .opencode/skills not discovered

2 participants