fix(web): tolerate unnamed workspace directory rows - #6349
Merged
lefarcen merged 2 commits intoAug 3, 2026
Conversation
…rkspace-name-directory-compat-20260803
Contributor
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.















Why
The workspace context backfill added on the feature branch assumed every runtime directory row already included
workspaceName. Older or incomplete directory payloads can omit that display-only field, causingtrim()to throw after the explicit Workspace/member selection had already been verified. The hook then reported the workspace service as unavailable, discarded the Team catalog cache path, and regressed project collaboration and creation flows.This patch preserves the verified explicit Workspace identity while treating a missing legacy display name as non-fatal. It does not infer authority, permissions, or identity from any ambient/active Workspace state.
What users will see
Users with an older or partially populated Workspace directory can continue opening and creating Team projects without the workspace context unexpectedly becoming unavailable. When the directory includes a name, the existing exact-row name backfill remains unchanged.
Surface area
apps/weborapps/desktop(including Electron menu bar)odsubcommand or flag, newtools-dev/tools-packflag, or newOD_*env var/api/*endpoint, new SSE event, or changed shape inpackages/contractsskills/,design-systems/,design-templates/, orcraft/, or change to the skills protocolTRANSLATIONS.mdfor the locale workflow)package.json(dependenciesordevDependencies); workspace-packagepackage.jsonfiles are out of scope. Include a paragraph on what we get vs. what bytes we ship (seeCONTRIBUTING.md→ Code style)Screenshots
Not applicable. This is a runtime compatibility fix with no visual surface change.
Bug fix verification
apps/web/tests/useWorkspaceContext.cache.test.tsx—keeps a verified context when a legacy directory row omits workspaceName.origin/feat/workspace-team@4a4dfadd: the valid context becamenullafter the missing name threw.Validation
pnpm --filter @open-design/web exec vitest run -c vitest.config.ts --maxWorkers=2 tests/useWorkspaceContext.cache.test.tsx tests/use-project-collab.context-seed.test.tsx tests/useWorkspaceContext.sign-in-refresh.test.tsx tests/components/App.project-create-race.test.tsx(63 passed)pnpm --filter @open-design/web test(578 files; 5,983 passed; 11 skipped)pnpm --filter @open-design/web typecheckpnpm --filter @open-design/web buildpnpm guardpnpm typecheckgit diff --check