Conversation
|
Skipped: This PR changes more files than the configured file change limit: ( |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughA large-scale docs refactor: dashboard embedding and related sources/layouts/components removed; docs routing/CORS updated to use docs-embed/api-embed; many MDX template pages and MDX components deleted; Button component consolidated and MDX button updated; Apple auth doc switched to an AppleSecretGenerator workflow. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
docs/content/docs/(guides)/concepts/auth-providers/apple.mdx (2)
46-46: Terminology inconsistency: "Account ID" should be "Team ID".Line 52 refers to this as "Team ID" but this line still uses "Account ID". Update for consistency.
- 9. Find your **Account ID** at the very top-right of the Apple Developer Portal page. + 9. Find your **Team ID** at the very top-right of the Apple Developer Portal page.
66-66: Incorrect product reference: "Supabase" should be "Stack Auth".This appears to be a copy-paste error. The documentation is for Stack Auth, not Supabase.
- 3. Set the **Client ID** (your Service ID identifier), **Client Secret** (the generated secret from Supabase), and **Team ID** (your Apple Developer Team ID). + 3. Set the **Client ID** (your Service ID identifier), **Client Secret** (the generated secret from the tool above), and **Team ID** (your Apple Developer Team ID).
🤖 Fix all issues with AI agents
In `@docs/src/components/mdx/button.tsx`:
- Around line 34-36: The Button component currently sets resolvedColor = variant
?? color ?? 'secondary', which conflicts with ui/button.tsx's buttonVariants
defaultVariants.color: 'primary'; change the fallback from 'secondary' to
'primary' so resolvedColor = variant ?? color ?? 'primary' to align defaults
with buttonVariants (or, if the intent is to keep a different default, update
documentation to state why the component-level default differs). Ensure you
modify the resolution logic where resolvedColor is defined and verify
buttonVariants.defaultVariants.color remains consistent with that value.
🧹 Nitpick comments (4)
docs/src/components/ui/button.tsx (1)
8-11: Duplicate color variants:primaryanddefaultare nearly identical.Both
primaryanddefaultuse the same background and foreground colors, differing only in hover opacity (80% vs 90%). Consider whether both are necessary or if one could be an alias for the other to reduce maintenance burden.docs/src/components/api/enhanced-api-page.tsx (1)
203-204: Useperformance.now()for elapsed time measurement.Per coding guidelines,
Date.now()should not be used for measuring elapsed time. ThestartTimevariable and subsequent duration calculations should useperformance.now()instead.Suggested fix
const executeRequest = useCallback(async (operation: OpenAPIOperation, path: string, method: string) => { - const startTime = Date.now(); + const startTime = performance.now(); setRequestState(prev => ({ ...prev, response: { ...prev.response, loading: true, error: undefined, timestamp: startTime } }));And for the duration calculations:
- const endTime = Date.now(); + const endTime = performance.now();- duration: Date.now() - startTime, + duration: performance.now() - startTime,Based on coding guidelines: "Don't use
Date.now()for measuring elapsed (real) time; instead useperformance.now()"docs/src/components/mdx/embedded-link.tsx (1)
63-66: Consider: Limited support for multi-level relative paths.The current logic only handles a single
../prefix. Paths like../../foo.mdxwould not resolve correctly. If deep relative linking is needed, consider using a loop or thenormalizePathapproach fromembedded-link-interceptor.tsx.♻️ Optional enhancement for multi-level parent resolution
- if (pathPart.startsWith('./')) { - resolvedPath = `${currentDir}/${pathPart.substring(2)}`; - } else if (pathPart.startsWith('../')) { - // Go up one directory - const parentDir = currentDir.substring(0, currentDir.lastIndexOf('/')); - resolvedPath = `${parentDir}/${pathPart.substring(3)}`; - } else { - // Same directory - resolvedPath = `${currentDir}/${pathPart}`; - } + // Resolve relative path by normalizing segments + const combinedPath = `${currentDir}/${pathPart}`; + const segments = combinedPath.split('/').filter(Boolean); + const normalized: string[] = []; + for (const seg of segments) { + if (seg === '.') continue; + if (seg === '..') { + normalized.pop(); + continue; + } + normalized.push(seg); + } + resolvedPath = '/' + normalized.join('/');docs/src/components/embedded-link-interceptor.tsx (1)
88-95: Consider logging fetch failures for debugging.The empty
catchblock silently swallows all errors. While returningfalseis appropriate for this check, logging the error at debug level could help diagnose network issues vs actual 404s.♻️ Optional: Add debug logging
const checkUrlExists = useCallback(async (url: string): Promise<boolean> => { try { const response = await fetch(url, { method: 'HEAD' }); return response.ok; - } catch { + } catch (error) { + console.debug(`Failed to check URL existence for ${url}:`, error); return false; } }, []);
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (125)
docs/README.mddocs/content/docs/(guides)/concepts/auth-providers/apple.mdxdocs/lib/source.tsdocs/next.config.mjsdocs/package.jsondocs/source.config.tsdocs/src/app/(home)/layout.tsxdocs/src/app/(home)/page.tsxdocs/src/app/dashboard-embed/[[...slug]]/page.tsxdocs/src/app/dashboard-embed/layout.tsxdocs/src/components/api/auth-panel.tsxdocs/src/components/api/button.tsxdocs/src/components/api/enhanced-api-page.tsxdocs/src/components/api/webhooks-api-page.tsxdocs/src/components/embedded-link-interceptor.tsxdocs/src/components/homepage/homepage-footer.tsxdocs/src/components/homepage/iconHover.tsxdocs/src/components/layout/search-toggle.tsxdocs/src/components/layouts/home-layout.tsxdocs/src/components/mdx/api-sequence-diagram.tsxdocs/src/components/mdx/button.tsxdocs/src/components/mdx/embedded-link.tsxdocs/src/components/mdx/platform-config.tsdocs/src/components/stack-auth/sign-in.tsxdocs/src/components/ui/button.tsxdocs/src/mdx-components.tsxdocs/templates-python/concepts/backend-integration.mdxdocs/templates-python/concepts/teams-management.mdxdocs/templates-python/concepts/user-authentication.mdxdocs/templates-python/getting-started/setup.mdxdocs/templates-python/meta.jsondocs/templates/components/account-settings.mdxdocs/templates/components/credential-sign-in.mdxdocs/templates/components/credential-sign-up.mdxdocs/templates/components/forgot-password.mdxdocs/templates/components/index.mdxdocs/templates/components/magic-link-sign-in.mdxdocs/templates/components/meta.jsondocs/templates/components/oauth-button-group.mdxdocs/templates/components/oauth-button.mdxdocs/templates/components/password-reset.mdxdocs/templates/components/selected-team-switcher.mdxdocs/templates/components/sign-in.mdxdocs/templates/components/sign-up.mdxdocs/templates/components/stack-handler.mdxdocs/templates/components/stack-provider.mdxdocs/templates/components/stack-theme.mdxdocs/templates/components/user-button.mdxdocs/templates/concepts/api-keys.mdxdocs/templates/concepts/auth-providers/apple.mdxdocs/templates/concepts/auth-providers/bitbucket.mdxdocs/templates/concepts/auth-providers/discord.mdxdocs/templates/concepts/auth-providers/facebook.mdxdocs/templates/concepts/auth-providers/github.mdxdocs/templates/concepts/auth-providers/gitlab.mdxdocs/templates/concepts/auth-providers/google.mdxdocs/templates/concepts/auth-providers/index.mdxdocs/templates/concepts/auth-providers/linkedin.mdxdocs/templates/concepts/auth-providers/meta.jsondocs/templates/concepts/auth-providers/microsoft.mdxdocs/templates/concepts/auth-providers/passkey.mdxdocs/templates/concepts/auth-providers/spotify.mdxdocs/templates/concepts/auth-providers/twitch.mdxdocs/templates/concepts/auth-providers/two-factor-auth.mdxdocs/templates/concepts/auth-providers/x-twitter.mdxdocs/templates/concepts/backend-integration.mdxdocs/templates/concepts/custom-user-data.mdxdocs/templates/concepts/emails.mdxdocs/templates/concepts/jwt.mdxdocs/templates/concepts/oauth.mdxdocs/templates/concepts/orgs-and-teams.mdxdocs/templates/concepts/permissions.mdxdocs/templates/concepts/stack-app.mdxdocs/templates/concepts/team-selection.mdxdocs/templates/concepts/user-onboarding.mdxdocs/templates/concepts/webhooks.mdxdocs/templates/customization/custom-pages.mdxdocs/templates/customization/custom-styles.mdxdocs/templates/customization/dark-mode.mdxdocs/templates/customization/internationalization.mdxdocs/templates/customization/page-examples/forgot-password.mdxdocs/templates/customization/page-examples/index.mdxdocs/templates/customization/page-examples/meta.jsondocs/templates/customization/page-examples/password-reset.mdxdocs/templates/customization/page-examples/sign-in.mdxdocs/templates/customization/page-examples/sign-up.mdxdocs/templates/faq.mdxdocs/templates/getting-started/components.mdxdocs/templates/getting-started/production.mdxdocs/templates/getting-started/setup.mdxdocs/templates/getting-started/users.mdxdocs/templates/meta.jsondocs/templates/others/cli-authentication.mdxdocs/templates/others/convex.mdxdocs/templates/others/mcp-setup.mdxdocs/templates/others/self-host.mdxdocs/templates/others/supabase.mdxdocs/templates/overview.mdxdocs/templates/rest-api/overview.mdxdocs/templates/sdk/hooks/use-stack-app.mdxdocs/templates/sdk/hooks/use-user.mdxdocs/templates/sdk/index.mdxdocs/templates/sdk/meta.jsondocs/templates/sdk/objects/stack-app.mdxdocs/templates/sdk/overview-new.mdxdocs/templates/sdk/types/api-key.mdxdocs/templates/sdk/types/connected-account.mdxdocs/templates/sdk/types/contact-channel.mdxdocs/templates/sdk/types/customer.mdxdocs/templates/sdk/types/email.mdxdocs/templates/sdk/types/item.mdxdocs/templates/sdk/types/project.mdxdocs/templates/sdk/types/team-permission.mdxdocs/templates/sdk/types/team-profile.mdxdocs/templates/sdk/types/team-user.mdxdocs/templates/sdk/types/team.mdxdocs/templates/sdk/types/user.mdxdocs/templates/snippets/always-tab-codeblock.mdxdocs/templates/snippets/big-divider.mdxdocs/templates/snippets/divider.mdxdocs/templates/snippets/get-user-or-parameter.mdxdocs/templates/snippets/make-full-page.mdxdocs/templates/snippets/stack-app-constructor-options-after-ssk.mdxdocs/templates/snippets/stack-app-constructor-options-before-ssk.mdxdocs/templates/snippets/use-on-server-callout.mdx
💤 Files with no reviewable changes (113)
- docs/templates/components/stack-handler.mdx
- docs/package.json
- docs/templates/components/forgot-password.mdx
- docs/src/app/dashboard-embed/layout.tsx
- docs/templates/concepts/auth-providers/bitbucket.mdx
- docs/templates/snippets/stack-app-constructor-options-before-ssk.mdx
- docs/templates/sdk/hooks/use-user.mdx
- docs/templates/components/stack-provider.mdx
- docs/templates/customization/dark-mode.mdx
- docs/templates/concepts/team-selection.mdx
- docs/templates/getting-started/components.mdx
- docs/templates/components/credential-sign-in.mdx
- docs/templates/concepts/backend-integration.mdx
- docs/templates/customization/page-examples/index.mdx
- docs/templates/sdk/overview-new.mdx
- docs/templates-python/concepts/teams-management.mdx
- docs/templates/sdk/types/item.mdx
- docs/templates/components/meta.json
- docs/templates/components/magic-link-sign-in.mdx
- docs/templates/sdk/types/user.mdx
- docs/templates/concepts/auth-providers/apple.mdx
- docs/templates/customization/internationalization.mdx
- docs/templates-python/concepts/user-authentication.mdx
- docs/src/app/dashboard-embed/[[...slug]]/page.tsx
- docs/templates/concepts/webhooks.mdx
- docs/templates/snippets/make-full-page.mdx
- docs/templates/snippets/get-user-or-parameter.mdx
- docs/templates/concepts/stack-app.mdx
- docs/src/components/stack-auth/sign-in.tsx
- docs/src/components/api/button.tsx
- docs/templates/components/sign-in.mdx
- docs/templates/concepts/auth-providers/microsoft.mdx
- docs/src/app/(home)/layout.tsx
- docs/templates/sdk/types/project.mdx
- docs/templates/others/convex.mdx
- docs/source.config.ts
- docs/templates/snippets/use-on-server-callout.mdx
- docs/src/components/homepage/homepage-footer.tsx
- docs/templates/concepts/auth-providers/index.mdx
- docs/templates/concepts/auth-providers/discord.mdx
- docs/templates-python/concepts/backend-integration.mdx
- docs/templates/sdk/objects/stack-app.mdx
- docs/templates/getting-started/setup.mdx
- docs/templates/overview.mdx
- docs/templates/components/index.mdx
- docs/templates/concepts/permissions.mdx
- docs/templates/customization/page-examples/sign-in.mdx
- docs/templates/concepts/auth-providers/github.mdx
- docs/templates/concepts/auth-providers/linkedin.mdx
- docs/templates/others/supabase.mdx
- docs/templates/customization/page-examples/meta.json
- docs/templates/sdk/types/team.mdx
- docs/templates/customization/page-examples/sign-up.mdx
- docs/templates/rest-api/overview.mdx
- docs/templates/customization/page-examples/password-reset.mdx
- docs/templates/customization/page-examples/forgot-password.mdx
- docs/src/app/(home)/page.tsx
- docs/templates/customization/custom-styles.mdx
- docs/src/components/layouts/home-layout.tsx
- docs/templates/components/password-reset.mdx
- docs/templates/concepts/auth-providers/twitch.mdx
- docs/templates/components/user-button.mdx
- docs/templates/snippets/always-tab-codeblock.mdx
- docs/templates/meta.json
- docs/templates/components/oauth-button-group.mdx
- docs/templates/concepts/auth-providers/facebook.mdx
- docs/templates/faq.mdx
- docs/templates/sdk/types/api-key.mdx
- docs/templates/components/oauth-button.mdx
- docs/templates/concepts/auth-providers/spotify.mdx
- docs/src/components/mdx/api-sequence-diagram.tsx
- docs/templates/concepts/jwt.mdx
- docs/templates/sdk/index.mdx
- docs/templates/concepts/auth-providers/passkey.mdx
- docs/templates/getting-started/production.mdx
- docs/templates-python/meta.json
- docs/templates/concepts/user-onboarding.mdx
- docs/templates/components/stack-theme.mdx
- docs/templates/others/mcp-setup.mdx
- docs/templates-python/getting-started/setup.mdx
- docs/templates/concepts/auth-providers/google.mdx
- docs/templates/sdk/types/team-user.mdx
- docs/templates/concepts/orgs-and-teams.mdx
- docs/templates/concepts/auth-providers/two-factor-auth.mdx
- docs/templates/snippets/stack-app-constructor-options-after-ssk.mdx
- docs/templates/sdk/types/contact-channel.mdx
- docs/templates/sdk/types/connected-account.mdx
- docs/templates/sdk/hooks/use-stack-app.mdx
- docs/templates/concepts/auth-providers/meta.json
- docs/templates/concepts/auth-providers/x-twitter.mdx
- docs/templates/concepts/auth-providers/gitlab.mdx
- docs/templates/concepts/custom-user-data.mdx
- docs/templates/sdk/types/team-permission.mdx
- docs/templates/customization/custom-pages.mdx
- docs/templates/getting-started/users.mdx
- docs/templates/others/self-host.mdx
- docs/templates/concepts/oauth.mdx
- docs/templates/components/sign-up.mdx
- docs/templates/sdk/types/email.mdx
- docs/templates/others/cli-authentication.mdx
- docs/templates/sdk/types/customer.mdx
- docs/templates/snippets/divider.mdx
- docs/templates/components/account-settings.mdx
- docs/templates/concepts/api-keys.mdx
- docs/templates/concepts/emails.mdx
- docs/src/components/mdx/platform-config.ts
- docs/src/components/layout/search-toggle.tsx
- docs/templates/sdk/meta.json
- docs/templates/components/selected-team-switcher.mdx
- docs/templates/snippets/big-divider.mdx
- docs/templates/sdk/types/team-profile.mdx
- docs/templates/components/credential-sign-up.mdx
- docs/src/components/homepage/iconHover.tsx
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx}: For blocking alerts and errors, never usetoast, as they are easily missed by the user. Instead, use alerts
Keep hover/click transitions snappy and fast without pre-transition delays (e.g., no fade-in when hovering a button). Apply transitions after the action, like smooth fade-out when hover ends
NEVER try-catch-all, NEVER void a promise, and NEVER .catch(console.error). Use loading indicators for async operations. UserunAsynchronouslyorrunAsynchronouslyWithAlertinstead of general try-catch error handling
When creating hover transitions, avoid hover-enter transitions and use only hover-exit transitions (e.g.,transition-colors hover:transition-none)
Don't useDate.now()for measuring elapsed (real) time; instead useperformance.now()
Use ES6 maps instead of records wherever possible
Files:
docs/src/components/api/auth-panel.tsxdocs/src/components/api/webhooks-api-page.tsxdocs/src/components/mdx/embedded-link.tsxdocs/lib/source.tsdocs/src/components/embedded-link-interceptor.tsxdocs/src/components/mdx/button.tsxdocs/src/components/api/enhanced-api-page.tsxdocs/src/mdx-components.tsxdocs/src/components/ui/button.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: NEVER use Next.js dynamic functions if you can avoid them. Prefer using client components to keep pages static (e.g., useusePathnameinstead ofawait params)
Code defensively using?? throwErr(...)instead of non-null assertions, with good error messages explicitly stating violated assumptions
Try to avoid theanytype. When usingany, leave a comment explaining why and how the type system fails or how errors would still be caught
Files:
docs/src/components/api/auth-panel.tsxdocs/src/components/api/webhooks-api-page.tsxdocs/src/components/mdx/embedded-link.tsxdocs/lib/source.tsdocs/src/components/embedded-link-interceptor.tsxdocs/src/components/mdx/button.tsxdocs/src/components/api/enhanced-api-page.tsxdocs/src/mdx-components.tsxdocs/src/components/ui/button.tsx
{.env*,**/*.{ts,tsx,js,jsx}}
📄 CodeRabbit inference engine (AGENTS.md)
All environment variables should be prefixed with
STACK_(orNEXT_PUBLIC_STACK_if public) to ensure Turborepo picks up changes and improve readability
Files:
docs/src/components/api/auth-panel.tsxdocs/src/components/api/webhooks-api-page.tsxdocs/src/components/mdx/embedded-link.tsxdocs/lib/source.tsdocs/src/components/embedded-link-interceptor.tsxdocs/src/components/mdx/button.tsxdocs/src/components/api/enhanced-api-page.tsxdocs/src/mdx-components.tsxdocs/src/components/ui/button.tsx
🧠 Learnings (3)
📚 Learning: 2026-01-11T06:44:57.542Z
Learnt from: N2D4
Repo: stack-auth/stack-auth PR: 1069
File: packages/template/src/components-page/onboarding.tsx:59-61
Timestamp: 2026-01-11T06:44:57.542Z
Learning: In the stack-auth codebase, Button components from stackframe/stack-ui (including those used via MessageCard props like primaryAction and secondaryAction) can accept async functions directly and automatically handle loading states with indicators. No need to wrap these with runAsynchronouslyWithAlert.
Applied to files:
docs/src/components/api/auth-panel.tsxdocs/src/components/api/webhooks-api-page.tsx
📚 Learning: 2025-10-11T04:13:19.308Z
Learnt from: N2D4
Repo: stack-auth/stack-auth PR: 943
File: examples/convex/app/action/page.tsx:23-28
Timestamp: 2025-10-11T04:13:19.308Z
Learning: In the stack-auth codebase, use `runAsynchronouslyWithAlert` from `stackframe/stack-shared/dist/utils/promises` for async button click handlers and form submissions instead of manual try/catch blocks. This utility automatically handles errors and shows alerts to users.
Applied to files:
docs/src/components/api/auth-panel.tsx
📚 Learning: 2026-01-13T18:14:29.974Z
Learnt from: CR
Repo: stack-auth/stack-auth PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-13T18:14:29.974Z
Learning: When making changes in the dashboard, provide deep links to the modified dashboard page, using localhost with appropriate port prefixes or a.localhost/b.localhost/c.localhost based on $NEXT_PUBLIC_STACK_PORT_PREFIX values
Applied to files:
docs/src/components/mdx/embedded-link.tsx
🧬 Code graph analysis (1)
docs/src/mdx-components.tsx (1)
apps/dashboard/src/components/code-block.tsx (1)
CodeBlock(33-90)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
- GitHub Check: docker
- GitHub Check: all-good
- GitHub Check: Vercel Agent Review
- GitHub Check: setup-tests-with-custom-base-port
- GitHub Check: E2E Tests (Node 22.x, Freestyle mock)
- GitHub Check: E2E Tests (Node 22.x, Freestyle prod)
- GitHub Check: restart-dev-and-test
- GitHub Check: setup-tests
- GitHub Check: lint_and_build (latest)
- GitHub Check: build (22.x)
- GitHub Check: restart-dev-and-test-with-custom-base-port
- GitHub Check: build (22.x)
- GitHub Check: check_prisma_migrations (22.x)
🔇 Additional comments (13)
docs/src/mdx-components.tsx (1)
32-45: LGTM! Clean removal of unused MDX component registrations.The imports and component registrations for
ApiSequenceDiagram,DocsSelector, andSignInExtraInfohave been properly removed in alignment with the deletion of their corresponding source files. The remaining component registry is well-organized and maintains good structure.docs/src/components/ui/button.tsx (1)
17-28: LGTM!The size variants and defaultVariants configuration are well-structured. The addition of
lgsize and explicitdefaultVariantsimproves the component's API.docs/src/components/mdx/button.tsx (2)
19-27: LGTM on type definitions.Using
Omit<..., 'color'>correctly avoids conflicts with the HTMLcolorattribute while allowing the customcolorprop. The discriminated union pattern forButtonAsButton | ButtonAsLinkis clean.
54-76: LGTM!The conditional rendering for anchor vs button is correct, with proper ref forwarding and attribute spreading.
docs/src/components/api/enhanced-api-page.tsx (1)
9-9: LGTM!Import path updated correctly to use the consolidated MDX Button component.
docs/src/components/api/webhooks-api-page.tsx (1)
6-6: LGTM!Import path updated correctly to use the consolidated MDX Button component.
docs/src/components/api/auth-panel.tsx (1)
9-9: LGTM!Import path updated correctly to use the consolidated MDX Button component. The Button usage at line 501 with
toggleAuthremains compatible with the new component.docs/content/docs/(guides)/concepts/auth-providers/apple.mdx (1)
51-59: Component is properly registered and content is well-structured.The
<AppleSecretGenerator />component is correctly defined, imported, and exported in the MDX configuration. The documentation content provides clear bullet points for required inputs and appropriate instructions for handling the generated secret.docs/next.config.mjs (1)
16-17: LGTM! CORS configuration properly updated for new embed routes.The route pattern changes from
/dashboard/:path*and/dashboard-embed/:path*to/docs-embed/:path*and/api-embed/:path*align with the broader removal of dashboard embedding. The comments accurately describe the purpose of each rule.Also applies to: 34-35
docs/src/components/mdx/embedded-link.tsx (1)
26-27: LGTM! Dashboard embedding support correctly removed.The conditional checks are properly updated to only handle
/docs-embed/and/api-embed/paths, consistent with the broader removal of dashboard embedding across the codebase.Also applies to: 44-44
docs/src/components/embedded-link-interceptor.tsx (1)
25-30: LGTM! Embedded URL detection updated consistently.The removal of
/dashboard-embedfrom the embedded URL check aligns with the removal of dashboard embedding support across the codebase.docs/lib/source.ts (1)
1-1: LGTM! Dashboard source correctly removed.The import statement and exports are properly updated to remove the dashboard source, consistent with the broader removal of dashboard embedding support.
docs/README.md (1)
1-90: README comprehensively documents the documentation project structure.All referenced files exist and are correctly documented:
lib/source.ts,source.config.ts,app/layout.config.tsx, andlib/platform-config.tsare in place. The routes and component structure align with the file system. The documentation is clear and well-organized.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| >(({ className, color, variant, size = 'sm', icon, href, children, ...props }, ref) => { | ||
| // Support both `variant` and `color` props (variant takes precedence) | ||
| const resolvedColor = variant ?? color ?? 'secondary'; |
There was a problem hiding this comment.
Default color inconsistency: 'secondary' here vs 'primary' in buttonVariants.
The fallback variant ?? color ?? 'secondary' means a Button with no color/variant props defaults to 'secondary'. However, buttonVariants in ui/button.tsx sets defaultVariants.color: 'primary'. This inconsistency could cause confusion since the MDX Button's default appearance differs from what buttonVariants would produce on its own.
Consider aligning the fallback to 'primary' for consistency, or document the intentional difference.
Suggested fix if alignment is desired
- const resolvedColor = variant ?? color ?? 'secondary';
+ const resolvedColor = variant ?? color ?? 'primary';📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| >(({ className, color, variant, size = 'sm', icon, href, children, ...props }, ref) => { | |
| // Support both `variant` and `color` props (variant takes precedence) | |
| const resolvedColor = variant ?? color ?? 'secondary'; | |
| >(({ className, color, variant, size = 'sm', icon, href, children, ...props }, ref) => { | |
| // Support both `variant` and `color` props (variant takes precedence) | |
| const resolvedColor = variant ?? color ?? 'primary'; |
🤖 Prompt for AI Agents
In `@docs/src/components/mdx/button.tsx` around lines 34 - 36, The Button
component currently sets resolvedColor = variant ?? color ?? 'secondary', which
conflicts with ui/button.tsx's buttonVariants defaultVariants.color: 'primary';
change the fallback from 'secondary' to 'primary' so resolvedColor = variant ??
color ?? 'primary' to align defaults with buttonVariants (or, if the intent is
to keep a different default, update documentation to state why the
component-level default differs). Ensure you modify the resolution logic where
resolvedColor is defined and verify buttonVariants.defaultVariants.color remains
consistent with that value.
Summary by CodeRabbit
Removed Features
Documentation
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.