Skip to content

[Docs] - Full cleanup#1105

Merged
madster456 merged 22 commits intodevfrom
docs/cleanup
Jan 27, 2026
Merged

[Docs] - Full cleanup#1105
madster456 merged 22 commits intodevfrom
docs/cleanup

Conversation

@madster456
Copy link
Collaborator

@madster456 madster456 commented Jan 14, 2026

Summary by CodeRabbit

  • Removed Features

    • Dashboard embed support removed.
    • Many Python template guides and SDK/component docs removed.
  • Documentation

    • Docs reorganized with a simplified layout and consolidated sections.
    • Apple OAuth guide streamlined to use an in-doc secret generator.
  • Refactor

    • Button styling and variant API unified.
    • Embedded routing simplified to support docs-embed and api-embed only.

✏️ Tip: You can customize this high-level summary in your review settings.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 14, 2026

Skipped: This PR changes more files than the configured file change limit: (125 files found, 100 file limit)

@vercel
Copy link

vercel bot commented Jan 14, 2026

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

Project Deployment Review Updated (UTC)
stack-backend Ready Ready Preview, Comment Jan 27, 2026 6:45am
stack-dashboard Ready Ready Preview, Comment Jan 27, 2026 6:45am
stack-demo Ready Ready Preview, Comment Jan 27, 2026 6:45am
stack-docs Ready Ready Preview, Comment Jan 27, 2026 6:45am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

A 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

Cohort / File(s) Summary
Docs README & site config
docs/README.md, docs/next.config.mjs, docs/package.json
README rewritten; CORS/embed route patterns changed to /docs-embed/:path* and /api-embed/:path*; setup-openapi script and @xyflow/react removed.
Source / collection config
docs/lib/source.ts, docs/source.config.ts
Dashboard source and dashboard collection removed (dashboardSource and dashboard defineDocs deleted).
Home routes & layouts
docs/src/app/(home)/layout.tsx, docs/src/app/(home)/page.tsx
Home layout and fallback page component deleted; rely on redirects for routing.
Dashboard embed pages/layouts
docs/src/app/dashboard-embed/[[...slug]]/page.tsx, docs/src/app/dashboard-embed/layout.tsx
Entire dashboard-embed page and layout removed (MDX lookup + redirect + rendering logic deleted).
Embedded link handling
docs/src/components/embedded-link-interceptor.tsx, docs/src/components/mdx/embedded-link.tsx
Removed dashboard-embed/dashboard absolute/relative handling; only docs-embed and api-embed remain.
Button imports & components
docs/src/components/api/button.tsx, docs/src/components/api/*.(tsx), docs/src/components/mdx/button.tsx, docs/src/components/ui/button.tsx
Legacy API Button file removed; import paths updated to ../mdx/button; MDX button gains variant/color resolution types and exported ButtonProps; UI buttonVariants updated with new defaults and sizes.
MDX components removed
docs/src/components/mdx/api-sequence-diagram.tsx, docs/src/components/mdx/platform-config.ts, docs/src/components/stack-auth/sign-in.tsx
ApiSequenceDiagram, platform-config helpers, and SignInExtraInfo removed.
Homepage & layout components removed
docs/src/components/homepage/homepage-footer.tsx, docs/src/components/homepage/iconHover.tsx, docs/src/components/layout/search-toggle.tsx, docs/src/components/layouts/home-layout.tsx
Footer, 3D icon selector, search toggle(s), and full home layout deleted.
MDX registry update
docs/src/mdx-components.tsx
Removed mappings for ApiSequenceDiagram, DocsSelector, SignInExtraInfo.
Templates — SDK & types
docs/templates/sdk/**/*, docs/templates/sdk/types/*.mdx
Comprehensive SDK reference and types docs removed (stack-app, user, team, api-key, item, customer, email, etc.).
Templates — Concepts & Auth Providers
docs/templates/concepts/**/*, docs/templates/concepts/auth-providers/*, docs/templates/concepts/auth-providers/meta.json
Wide removal of conceptual guides (OAuth, JWT, webhooks, permissions, teams, onboarding) and all provider integration guides + provider index meta.
Templates — Customization & Getting Started
docs/templates/customization/*, docs/templates/getting-started/*
Custom pages, styling, dark mode, i18n, page examples, setup, production guides removed.
Templates — Components & snippets
docs/templates/components/*, docs/templates/snippets/*, docs/templates/meta.json
Component reference pages and many snippet templates removed; metadata manifests deleted.
Python templates
docs/templates-python/*
Python-specific templates and meta.json deleted; select Python guide files removed.
Content update: Apple provider doc
docs/content/docs/(guides)/concepts/auth-providers/apple.mdx
Rewrote Apple guide to use an AppleSecretGenerator component, renamed fields (Account ID → Team ID, Choose File → Private Key File) and replaced manual secret generation steps.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • N2D4

Poem

🐰 I nibbled through docs at dawn,

Templates fell on the lawn,
Embeds now point where they should be,
A tidy hop, a clearer tree. 🥕

🚥 Pre-merge checks | ❌ 3
❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is empty except for a CONTRIBUTING.md reference comment, lacking any substantive explanation of changes, rationale, or scope. Add a comprehensive description explaining what was removed (unused templates, components, scripts), why this cleanup is valuable, and any migration notes for users or maintainers.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title '[Docs] - Full cleanup' is vague and generic, using non-descriptive terms that don't convey meaningful information about the changeset. Use a more specific title that describes the primary change, e.g., 'Remove unused documentation templates and unused components' or 'Consolidate docs, remove unused templates and home layout'.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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: primary and default are nearly identical.

Both primary and default use 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: Use performance.now() for elapsed time measurement.

Per coding guidelines, Date.now() should not be used for measuring elapsed time. The startTime variable and subsequent duration calculations should use performance.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 use performance.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.mdx would not resolve correctly. If deep relative linking is needed, consider using a loop or the normalizePath approach from embedded-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 catch block silently swallows all errors. While returning false is 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

📥 Commits

Reviewing files that changed from the base of the PR and between d6dc85b and db3cd88.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (125)
  • docs/README.md
  • docs/content/docs/(guides)/concepts/auth-providers/apple.mdx
  • docs/lib/source.ts
  • docs/next.config.mjs
  • docs/package.json
  • docs/source.config.ts
  • docs/src/app/(home)/layout.tsx
  • docs/src/app/(home)/page.tsx
  • docs/src/app/dashboard-embed/[[...slug]]/page.tsx
  • docs/src/app/dashboard-embed/layout.tsx
  • docs/src/components/api/auth-panel.tsx
  • docs/src/components/api/button.tsx
  • docs/src/components/api/enhanced-api-page.tsx
  • docs/src/components/api/webhooks-api-page.tsx
  • docs/src/components/embedded-link-interceptor.tsx
  • docs/src/components/homepage/homepage-footer.tsx
  • docs/src/components/homepage/iconHover.tsx
  • docs/src/components/layout/search-toggle.tsx
  • docs/src/components/layouts/home-layout.tsx
  • docs/src/components/mdx/api-sequence-diagram.tsx
  • docs/src/components/mdx/button.tsx
  • docs/src/components/mdx/embedded-link.tsx
  • docs/src/components/mdx/platform-config.ts
  • docs/src/components/stack-auth/sign-in.tsx
  • docs/src/components/ui/button.tsx
  • docs/src/mdx-components.tsx
  • docs/templates-python/concepts/backend-integration.mdx
  • docs/templates-python/concepts/teams-management.mdx
  • docs/templates-python/concepts/user-authentication.mdx
  • docs/templates-python/getting-started/setup.mdx
  • docs/templates-python/meta.json
  • docs/templates/components/account-settings.mdx
  • docs/templates/components/credential-sign-in.mdx
  • docs/templates/components/credential-sign-up.mdx
  • docs/templates/components/forgot-password.mdx
  • docs/templates/components/index.mdx
  • docs/templates/components/magic-link-sign-in.mdx
  • docs/templates/components/meta.json
  • docs/templates/components/oauth-button-group.mdx
  • docs/templates/components/oauth-button.mdx
  • docs/templates/components/password-reset.mdx
  • docs/templates/components/selected-team-switcher.mdx
  • docs/templates/components/sign-in.mdx
  • docs/templates/components/sign-up.mdx
  • docs/templates/components/stack-handler.mdx
  • docs/templates/components/stack-provider.mdx
  • docs/templates/components/stack-theme.mdx
  • docs/templates/components/user-button.mdx
  • docs/templates/concepts/api-keys.mdx
  • docs/templates/concepts/auth-providers/apple.mdx
  • docs/templates/concepts/auth-providers/bitbucket.mdx
  • docs/templates/concepts/auth-providers/discord.mdx
  • docs/templates/concepts/auth-providers/facebook.mdx
  • docs/templates/concepts/auth-providers/github.mdx
  • docs/templates/concepts/auth-providers/gitlab.mdx
  • docs/templates/concepts/auth-providers/google.mdx
  • docs/templates/concepts/auth-providers/index.mdx
  • docs/templates/concepts/auth-providers/linkedin.mdx
  • docs/templates/concepts/auth-providers/meta.json
  • docs/templates/concepts/auth-providers/microsoft.mdx
  • docs/templates/concepts/auth-providers/passkey.mdx
  • docs/templates/concepts/auth-providers/spotify.mdx
  • docs/templates/concepts/auth-providers/twitch.mdx
  • docs/templates/concepts/auth-providers/two-factor-auth.mdx
  • docs/templates/concepts/auth-providers/x-twitter.mdx
  • docs/templates/concepts/backend-integration.mdx
  • docs/templates/concepts/custom-user-data.mdx
  • docs/templates/concepts/emails.mdx
  • docs/templates/concepts/jwt.mdx
  • docs/templates/concepts/oauth.mdx
  • docs/templates/concepts/orgs-and-teams.mdx
  • docs/templates/concepts/permissions.mdx
  • docs/templates/concepts/stack-app.mdx
  • docs/templates/concepts/team-selection.mdx
  • docs/templates/concepts/user-onboarding.mdx
  • docs/templates/concepts/webhooks.mdx
  • docs/templates/customization/custom-pages.mdx
  • docs/templates/customization/custom-styles.mdx
  • docs/templates/customization/dark-mode.mdx
  • docs/templates/customization/internationalization.mdx
  • docs/templates/customization/page-examples/forgot-password.mdx
  • docs/templates/customization/page-examples/index.mdx
  • docs/templates/customization/page-examples/meta.json
  • docs/templates/customization/page-examples/password-reset.mdx
  • docs/templates/customization/page-examples/sign-in.mdx
  • docs/templates/customization/page-examples/sign-up.mdx
  • docs/templates/faq.mdx
  • docs/templates/getting-started/components.mdx
  • docs/templates/getting-started/production.mdx
  • docs/templates/getting-started/setup.mdx
  • docs/templates/getting-started/users.mdx
  • docs/templates/meta.json
  • docs/templates/others/cli-authentication.mdx
  • docs/templates/others/convex.mdx
  • docs/templates/others/mcp-setup.mdx
  • docs/templates/others/self-host.mdx
  • docs/templates/others/supabase.mdx
  • docs/templates/overview.mdx
  • docs/templates/rest-api/overview.mdx
  • docs/templates/sdk/hooks/use-stack-app.mdx
  • docs/templates/sdk/hooks/use-user.mdx
  • docs/templates/sdk/index.mdx
  • docs/templates/sdk/meta.json
  • docs/templates/sdk/objects/stack-app.mdx
  • docs/templates/sdk/overview-new.mdx
  • docs/templates/sdk/types/api-key.mdx
  • docs/templates/sdk/types/connected-account.mdx
  • docs/templates/sdk/types/contact-channel.mdx
  • docs/templates/sdk/types/customer.mdx
  • docs/templates/sdk/types/email.mdx
  • docs/templates/sdk/types/item.mdx
  • docs/templates/sdk/types/project.mdx
  • docs/templates/sdk/types/team-permission.mdx
  • docs/templates/sdk/types/team-profile.mdx
  • docs/templates/sdk/types/team-user.mdx
  • docs/templates/sdk/types/team.mdx
  • docs/templates/sdk/types/user.mdx
  • docs/templates/snippets/always-tab-codeblock.mdx
  • docs/templates/snippets/big-divider.mdx
  • docs/templates/snippets/divider.mdx
  • docs/templates/snippets/get-user-or-parameter.mdx
  • docs/templates/snippets/make-full-page.mdx
  • docs/templates/snippets/stack-app-constructor-options-after-ssk.mdx
  • docs/templates/snippets/stack-app-constructor-options-before-ssk.mdx
  • docs/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 use toast, 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. Use runAsynchronously or runAsynchronouslyWithAlert instead 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 use Date.now() for measuring elapsed (real) time; instead use performance.now()
Use ES6 maps instead of records wherever possible

Files:

  • docs/src/components/api/auth-panel.tsx
  • docs/src/components/api/webhooks-api-page.tsx
  • docs/src/components/mdx/embedded-link.tsx
  • docs/lib/source.ts
  • docs/src/components/embedded-link-interceptor.tsx
  • docs/src/components/mdx/button.tsx
  • docs/src/components/api/enhanced-api-page.tsx
  • docs/src/mdx-components.tsx
  • docs/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., use usePathname instead of await params)
Code defensively using ?? throwErr(...) instead of non-null assertions, with good error messages explicitly stating violated assumptions
Try to avoid the any type. When using any, 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.tsx
  • docs/src/components/api/webhooks-api-page.tsx
  • docs/src/components/mdx/embedded-link.tsx
  • docs/lib/source.ts
  • docs/src/components/embedded-link-interceptor.tsx
  • docs/src/components/mdx/button.tsx
  • docs/src/components/api/enhanced-api-page.tsx
  • docs/src/mdx-components.tsx
  • docs/src/components/ui/button.tsx
{.env*,**/*.{ts,tsx,js,jsx}}

📄 CodeRabbit inference engine (AGENTS.md)

All environment variables should be prefixed with STACK_ (or NEXT_PUBLIC_STACK_ if public) to ensure Turborepo picks up changes and improve readability

Files:

  • docs/src/components/api/auth-panel.tsx
  • docs/src/components/api/webhooks-api-page.tsx
  • docs/src/components/mdx/embedded-link.tsx
  • docs/lib/source.ts
  • docs/src/components/embedded-link-interceptor.tsx
  • docs/src/components/mdx/button.tsx
  • docs/src/components/api/enhanced-api-page.tsx
  • docs/src/mdx-components.tsx
  • docs/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.tsx
  • docs/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, and SignInExtraInfo have 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 lg size and explicit defaultVariants improves 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 HTML color attribute while allowing the custom color prop. The discriminated union pattern for ButtonAsButton | ButtonAsLink is 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 toggleAuth remains 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-embed from 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, and lib/platform-config.ts are 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.

Comment on lines +34 to +36
>(({ className, color, variant, size = 'sm', icon, href, children, ...props }, ref) => {
// Support both `variant` and `color` props (variant takes precedence)
const resolvedColor = variant ?? color ?? 'secondary';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
>(({ 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.

Copy link
Contributor

@N2D4 N2D4 left a comment

Choose a reason for hiding this comment

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

🙌

@madster456 madster456 merged commit 9e2cd4d into dev Jan 27, 2026
13 of 27 checks passed
@madster456 madster456 deleted the docs/cleanup branch January 27, 2026 06:38
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.

2 participants