fix(settings): redirect unavailable tabs to general - #6710
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview
Adds Vitest coverage for subscription, workspace, and org redirect paths plus the unchanged 404 cases. Reviewed by Cursor Bugbot for commit 8010d92. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR redirects recognized but unavailable workspace settings sections to General while preserving 404 behavior for invalid sections and inaccessible workspaces.
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The fallback target bypasses availability gates and renders normally, while invalid sections and inaccessible workspaces continue to return 404 as intended.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/settings/[section]/page.tsx | Redirects recognized unavailable sections to General while retaining route validation and workspace-access checks. |
| apps/sim/app/workspace/[workspaceId]/settings/[section]/page.test.tsx | Covers subscription, workspace, organization, unknown-section, and inaccessible-workspace behavior. |
Reviews (1): Last reviewed commit: "fix(settings): redirect unavailable tabs..." | Re-trigger Greptile
Summary
Problem: Switching workspaces preserves the current settings URL, but the destination workspace may not expose that section.
Solution: Recognized but unavailable sections now redirect to the destination workspace's General settings page, while invalid routes and inaccessible workspaces still return 404.
Implementation level
WorkspaceSettingsSectionPagealready owns destination-specific availability and authorization, so the fallback belongs there instead of duplicating those rules in the workspace switcher.page.tsx- applies the fallback at the settings-route boundarypage.test.tsx- covers subscription, workspace, organization, invalid-section, and inaccessible-workspace behaviorType of Change
Testing
Checklist