feat: redirect sub domain for orgs to verified custom domain when present#27934
feat: redirect sub domain for orgs to verified custom domain when present#27934Amit91848 wants to merge 1 commit intofeat/custom-org-domains-rebasedfrom
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
1 issue found across 9 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="apps/web/lib/team/[slug]/getServerSideProps.tsx">
<violation number="1" location="apps/web/lib/team/[slug]/getServerSideProps.tsx:157">
P2: `team.customDomain?.slug` is always undefined because getTeamWithMembers doesn’t select the team’s customDomain. This prevents org pages from redirecting to their verified custom domain. Select the org’s verified customDomain in getTeamWithMembers (or use a verified-domain helper) before relying on it here.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| const isEmbed = context.resolvedUrl?.includes("/embed"); | ||
| if (!isEmbed && isValidOrgDomain && !customDomain) { | ||
| const orgCustomDomainSlug = team.isOrganization |
There was a problem hiding this comment.
P2: team.customDomain?.slug is always undefined because getTeamWithMembers doesn’t select the team’s customDomain. This prevents org pages from redirecting to their verified custom domain. Select the org’s verified customDomain in getTeamWithMembers (or use a verified-domain helper) before relying on it here.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/lib/team/[slug]/getServerSideProps.tsx, line 157:
<comment>`team.customDomain?.slug` is always undefined because getTeamWithMembers doesn’t select the team’s customDomain. This prevents org pages from redirecting to their verified custom domain. Select the org’s verified customDomain in getTeamWithMembers (or use a verified-domain helper) before relying on it here.</comment>
<file context>
@@ -151,6 +152,22 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
+ const isEmbed = context.resolvedUrl?.includes("/embed");
+ if (!isEmbed && isValidOrgDomain && !customDomain) {
+ const orgCustomDomainSlug = team.isOrganization
+ ? team.customDomain?.slug
+ : team.parent?.customDomain?.slug;
</file context>
Devin AI is addressing Cubic AI's review feedbackA Devin session has been created to address the issues identified by Cubic AI. |
|
Reviewed the Cubic AI feedback on this PR. The only issue raised (violation #1 regarding |

What does this PR do?
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist
Summary by cubic
Redirect org subdomains to their verified custom domains on public booking pages, preserving path and query. Applies across user, team, forms, and instant meeting routes and skips embeds.
Written for commit 8731078. Summary will update on new commits.