Skip to content

fix(app): ignore stale project roots when navigating - #30685

Closed
ulises-jeremias wants to merge 3 commits into
anomalyco:devfrom
ulises-jeremias:fix/app-workspace-path-cache-refresh
Closed

fix(app): ignore stale project roots when navigating#30685
ulises-jeremias wants to merge 3 commits into
anomalyco:devfrom
ulises-jeremias:fix/app-workspace-path-cache-refresh

Conversation

@ulises-jeremias

@ulises-jeremias ulises-jeremias commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #30462

Type of change

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

What does this PR do?

Fixes stale workspace/project path restoration after moving a project directory (for example OneDrive path to a local path).

projectRoot(directory) could resolve to an outdated meta.worktree from persisted project metadata, even when that root is no longer one of the currently open project roots. This caused navigation/session restoration to drift back to an old path.

This PR tightens project-root resolution:

  • metadata-derived root is used only if it is still present among current open project roots
  • stale metadata roots are ignored
  • fallback remains the active directory

How did you verify your code works?

  • bun typecheck (from packages/app)
  • bun test src/pages/session/new-session-layout.test.ts (from packages/app)

Screenshots / recordings

Not included.

Checklist

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

@github-actions

github-actions Bot commented Jun 4, 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.

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@ulises-jeremias
ulises-jeremias force-pushed the fix/app-workspace-path-cache-refresh branch from c02ff1b to 3fb0478 Compare June 23, 2026 00:25
* upstream/dev: (212 commits)
  chore: update nix node_modules hashes
  feat(oauth): unify OAuth callback browser pages (anomalyco#34025)
  chore: generate
  refactor(app): replace tab drag handling with dndkit (anomalyco#33880)
  refactor(app): use dropdown for project selector (anomalyco#33984)
  chore: update nix node_modules hashes
  fix(app): bump ghostty-web to prevent terminal resize hangs (anomalyco#34020)
  chore: generate
  feat(sdk): expose active sessions (anomalyco#33991)
  fix(sdk): wake embedded session execution (anomalyco#33992)
  refactor(opencode): stop legacy v2 event emission (anomalyco#33993)
  fix(ui): normalize tooltip trigger layout (anomalyco#33979)
  fix(app): suspend hidden terminal renderer (anomalyco#33990)
  fix(app): enable auto-accept in session settings (anomalyco#33974)
  tweak: hide MCP access token prefix (anomalyco#33711)
  fix(core): refine small model defaults (anomalyco#33926)
  feat(core): split MCP timeout configuration (anomalyco#33977)
  fix(app): simplify question prompt (anomalyco#33968)
  feat(llm): pass strict through tool definitions for Codex parity (anomalyco#33392)
  chore: generate
  ...
@ulises-jeremias

Copy link
Copy Markdown
Contributor Author

@adamdotdevin @Hona @Brendonovich

Rebased onto latest dev (merge commit pushed). CI should re-run shortly — would appreciate a review when you have a moment. Thanks!

@github-actions

github-actions Bot commented Jul 4, 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.

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.

Bug: Editor fails to update workspace path cache after moving project folder out of OneDrive

1 participant