fix(desktop): route organization members to their organization and settings
Merged
WA
4d ago+265+265+012345678901234567890123456789-13-13-01234567890123456789
Summary
GET /api/workspacesnow returnsforwardOrganizationIdwhen a viewer has no workspace, can't create one, and belongs to an organization whose surface can serve them./workspaceforwards them there instead of showing "No workspace access yet", and?redirect=settingslands on the organization's general settings. Ships with the web release, so installed desktop apps and their saved/workspaceroute recover without an update- Forwarding only happens when the organization's rollout is on, the same condition that stops the organization surface sending viewers back to
/workspace, so the two can't loop - The decision lives in the branch that already computes the blocked state, so it can't disagree with the card. A failed lookup leaves the existing card in place rather than failing the list
- Desktop browser sign-in now lands on
/homeinstead of/workspace - Desktop "Settingsā¦" now opens
/o/<id>/settings/generalfrom the organization view. Without a workspace or organization in the last route it uses/workspace?redirect=settings. It used to fall back to/home, which has no settings, so the menu item appeared to do nothing
Not changed: Desktop, Browser, and Terminal settings are still workspace-bound, so members without a workspace can't reach them.
Type of Change
- Bug fix
Testing
- New failure-mode tests in
workspaces/route.test.ts,workspace/page.test.tsx,resolve-app-entry.test.ts,app-routes.test.ts,handoff.test.ts. Reverted each guard (client forward, card suppression, settings destination, route field, lookup failure, rollout, org route, fallback, handoff landing) and watched its test go red bun run type-check, biome on changed files,check:tool-registry-boundary,check:api-validation:strict,check:api-contract-routes,check:test-patterns,check:source-conventions,check:client-boundary,check:boundaries,check:application-graph,check:comment-hygiene,check:utils,check:file-namescheck:auditsand the full test suite left to CI- Not exercised in a packaged desktop app against a real organization account
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing (new tests pass the
test-auditauthoring gate) - No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)