Skip to content

fix(desktop): route organization members to their organization and settings - #9717

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/desktop-org-entry-routing
Nov 5, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
fix/desktop-org-entry-routing

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • GET /api/workspaces now returns forwardOrganizationId when a viewer has no workspace, can't create one, and belongs to an organization whose surface can serve them. /workspace forwards them there instead of showing "No workspace access yet", and ?redirect=settings lands on the organization's general settings. Ships with the web release, so installed desktop apps and their saved /workspace route 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 /home instead of /workspace
  • Desktop "Settings…" now opens /o/<id>/settings/general from 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-names
  • check:audits and 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-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 5, 2026 9:02pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Routes organization members without workspace access to their organization instead of the blocked workspace picker.

  • Viewers without a workspace can land in an enabled organization.
  • Desktop Settings opens the settings for the last visited surface.
  • Desktop sign-in lands on the shared app entry.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["/workspace"] --> B{"Has an accessible workspace?"}
  B -->|Yes| C["Open workspace destination"]
  B -->|No| D{"Can create a workspace?"}
  D -->|Yes| E["Create default workspace"]
  D -->|No| F{"Member organization rollout enabled?"}
  F -->|No or lookup fails| G["Show blocked picker"]
  F -->|Yes| H{"Settings requested?"}
  H -->|Yes| I["Open organization settings"]
  H -->|No| J["Open organization Home"]
Loading

Reviews (3) · Last reviewed commit: "fix(desktop): pass route context in the ..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 9 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 11 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 11 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit a40804c into staging Nov 5, 2026
86 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/desktop-org-entry-routing branch November 5, 2026 21:07

This branch was previously deployed

1 inactive deployment
Preview — ce98e04c Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant