fix(workspace): reuse persisted root after workspace creation#1273
Open
benjaminshafii wants to merge 1 commit intodevfrom
Open
fix(workspace): reuse persisted root after workspace creation#1273benjaminshafii wants to merge 1 commit intodevfrom
benjaminshafii wants to merge 1 commit intodevfrom
Conversation
Windows folder pickers can return a raw path string that differs from the canonical workspace path persisted by Tauri/OpenWork (for example C:/... vs C:\...). The new-workspace flow kept using the raw picker path for host activation and starter-session loading, so exact directory filters missed the newly materialized sessions. Use the persisted local workspace path after creation/import before starting the host, waiting for starter sessions, or opening an empty session, and add focused regression coverage for that path pivot.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Why
On Windows, the folder picker can return a path string that does not exactly match the canonical local workspace path persisted by Tauri/OpenWork (for example
C:/...vsC:\..., or raw picker output vs normalized persisted root).The new-workspace flow kept using the raw picker path after creation for:
Session filtering uses exact directory equality in OpenCode, so those follow-up steps could miss the sessions that were just materialized under the persisted workspace root. That explains the symptoms where a newly created workspace showed no prepopulated starter sessions and then behaved as if session creation was broken.
What changed
resolveCreatedLocalWorkspacePath()inapps/app/src/app/lib/workspace-path.tsapps/app/src/app/context/workspace.tsto pivot from the raw picker path to the persisted workspace path after create/import before continuing the workflowapps/app/scripts/workspace-path.tsandpnpm test:workspace-pathVerification
Ran from
apps/app:pnpm typecheckpnpm test:workspace-pathpnpm test:session-scopeNotes
I did not run the full Docker + Chrome MCP flow for this PR because the reported bug is Windows-specific and this environment is macOS, so I could not reproduce the real OS boundary here. The focused regression test covers the mismatched-path case directly.