Skip to content

fix(web): tolerate unnamed workspace directory rows - #6349

Merged
lefarcen merged 2 commits into
feat/workspace-teamfrom
fix/workspace-name-directory-compat-20260803
Aug 3, 2026
Merged

fix(web): tolerate unnamed workspace directory rows#6349
lefarcen merged 2 commits into
feat/workspace-teamfrom
fix/workspace-name-directory-compat-20260803

Conversation

@lefarcen

@lefarcen lefarcen commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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, causing trim() 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

  • UI — new page / dialog / panel / menu item / setting / empty state in apps/web or apps/desktop (including Electron menu bar)
  • Keyboard shortcut — new or changed
  • CLI / env var — new od subcommand or flag, new tools-dev / tools-pack flag, or new OD_* env var
  • API / contract — new /api/* endpoint, new SSE event, or changed shape in packages/contracts
  • Extension point — new entry under skills/, design-systems/, design-templates/, or craft/, or change to the skills protocol
  • i18n keys — added new translation keys (see TRANSLATIONS.md for the locale workflow)
  • New top-level dependency — adding any new entry to the root package.json (dependencies or devDependencies); workspace-package package.json files are out of scope. Include a paragraph on what we get vs. what bytes we ship (see CONTRIBUTING.md → Code style)
  • Default behavior change — changes what existing users experience without opting in (default model, default setting, file/SQLite schema, auto-network on startup, auto-install)
  • None — internal refactor, docs, tests, or translation update only

Screenshots

Not applicable. This is a runtime compatibility fix with no visual surface change.

Bug fix verification

  • Red spec: apps/web/tests/useWorkspaceContext.cache.test.tsxkeeps a verified context when a legacy directory row omits workspaceName.
  • The spec failed on the target base origin/feat/workspace-team@4a4dfadd: the valid context became null after the missing name threw.
  • The spec passes on this branch. The previously failing feature-branch regression set also passes without weakening exact argument assertions.

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 typecheck
  • pnpm --filter @open-design/web build
  • pnpm guard
  • pnpm typecheck
  • git diff --check

@lefarcen
lefarcen requested a review from nettee August 3, 2026 01:10
@lefarcen lefarcen added size/S PR changes 20-100 lines risk/medium Medium risk: regular code changes type/bugfix Bug fix labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Visual regression review

Head: 387035b · Base: 4a4dfad

Baseline unavailable; PR screenshots are new visual cases and need baseline review.

0 changed · 0 unchanged · 47 new without baseline · 0 failed

New cases without baselines

PR PR PR
visual-avatar-local-agent-list
pr
visual-avatar-local-agent-list-panel
pr
visual-avatar-menu
pr
visual-avatar-menu-panel
pr
visual-avatar-open-design-model-picker
pr
visual-critical-settings
pr
visual-critical-workspace
pr
visual-critical-workspace-preview
pr
visual-design-system-detail
pr
visual-design-systems
pr
visual-home
pr
visual-home-catalog
pr
visual-home-context-picker
pr
visual-home-context-picker-popover
pr
visual-home-plugin-filter
pr
visual-home-plugin-use-staged
pr
visual-home-plugin-use-with-query
pr
visual-home-staged-attachment
pr
visual-integrations-use-everywhere
pr
visual-new-project-modal
pr

27 additional new case(s) omitted from this comment.

Visual diff is advisory only and does not block merging.

@lefarcen
lefarcen merged commit caabd00 into feat/workspace-team Aug 3, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/medium Medium risk: regular code changes size/S PR changes 20-100 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant