Skip to content

Conversation

@madster456
Copy link
Collaborator

@madster456 madster456 commented Dec 10, 2025

Changes

overview Page Redesign

  • Added centered hero section with Stack Auth logo and welcome message
  • Replaced verbose "Why Stack Auth" section with a clean Quick start guide for next.js
  • added Components section with compact card links.
  • Streamlined QuickLinks and Apps sections
  • Added lastModified frontmatter support

Frontmatter schema extension

  • Extended frontmatter schema to support optional lastModified field
  • Enables pages to display when they were last updated

Last Modified Display

  • Added subtle "Last Updated" text at the bottom of pages that have the lastModified frontmatter field

Copy Button for Code Blocks

  • Added copy-to-clipboard button to all codeblocks
  • Button appears on hover, shows checkmark feedback when copied
  • Applies to all code blocks

New Code Examples

  • Added setup/overview examples for the overview page quick start
    • install - npx command
    • use-auth - useUser example

Summary by CodeRabbit

  • New Features

    • Code blocks gain a copy-to-clipboard button.
    • Docs pages now show "Last updated" timestamps when available.
  • Documentation

    • Overview page redesigned into a hero + quick-start, component showcase, and explore sections with clearer links.
    • Setup examples expanded to include an "install" quick-start and an authentication "use" example.

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

@cmux-agent
Copy link

cmux-agent bot commented Dec 10, 2025

Older cmux preview screenshots (latest comment is below)

Preview Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Captured 1 screenshot for commit a781355 (2025-12-10 16:45:29.703 UTC).

Full page screenshot of the docs Overview page showing the welcome section, quick link cards for Setup & Installation, Components, SDK Reference, and REST API Reference. Also shows the Apps section with icon grid (API Keys, Emails, Teams, RBAC, Webhooks), Why Choose Stack Auth section with code examples, and sign-in component preview.

docs-overview-page-full.png


Generated by cmux preview system

@vercel
Copy link

vercel bot commented Dec 10, 2025

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

Project Deployment Review Updated (UTC)
stack-backend Ready Ready Preview, Comment Dec 16, 2025 5:54pm
stack-dashboard Ready Ready Preview, Comment Dec 16, 2025 5:54pm
stack-demo Ready Ready Preview, Comment Dec 16, 2025 5:54pm
stack-docs Ready Ready Preview, Comment Dec 16, 2025 5:54pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 10, 2025

Walkthrough

Adds an "overview" examples section, restructures the docs overview page into a quick-start/components layout, extends frontmatter with an optional lastModified field, renders "Last updated" on doc pages when present, and adds a copy-to-clipboard button to code blocks.

Changes

Cohort / File(s) Change Summary
Code examples
docs/code-examples/setup.ts
Added a new top-level overview key to setupExamples with install and use-auth CodeExample[] groups for Next.js usage.
Overview page content
docs/content/docs/(guides)/overview.mdx
Replaced long-form marketing content with a JSX hero, Quick Start steps (PlatformCodeblock), conditional Components CardGroup, revised QuickLinks and Apps headings, and removed previous onboarding copy.
Frontmatter schema
docs/source.config.ts
Introduced extendedFrontmatterSchema (adds optional lastModified: string) and switched docs/api/dashboard collections to use it.
Docs page rendering
docs/src/app/docs/[[...slug]]/page.tsx
Conditionally render a "Last updated {lastModified}" timestamp when page.data.lastModified exists.
Code block UI
docs/src/components/mdx/base-codeblock.tsx
Added client-side copy-to-clipboard button, copied state, trim logic, and Copy/Check icon toggle with hover visibility and async handler.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to docs/source.config.ts schema changes and propagation to collections.
  • Verify lastModified formatting and fallback behavior in page.tsx.
  • Test clipboard behavior and UI states in base-codeblock.tsx across browsers and when clipboard access is denied.
  • Review conditional rendering and platform-specific blocks in overview.mdx for correctness.

Possibly related PRs

  • #1042 — Updates overview.mdx QuickLinks and related components/exports used by the overview page changes.

Suggested reviewers

  • N2D4

Poem

🐰 I hopped through docs with nimble paws,

Click — the copy button earns applause,
Timestamps hum when pages change,
Quick-start paths now in my range,
A carrot-cheer for docs made bright.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: reworking the overview page documentation and making updates to code block functionality.
Description check ✅ Passed The description comprehensively covers all major changes with organized sections detailing the overview redesign, frontmatter schema extension, last modified display, copy button feature, and new code examples.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/content/overview-rework

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.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 10, 2025

Greptile Overview

Greptile Summary

This PR redesigns the documentation overview page and adds quality-of-life improvements to code blocks.

Key Changes:

  • Redesigned overview page with centered hero section featuring Stack Auth logo and streamlined quick start guide for Next.js
  • Replaced verbose "Why Stack Auth" marketing content with concise Components and Explore sections
  • Added copy-to-clipboard button to all code blocks with hover visibility and checkmark feedback
  • Extended frontmatter schema to support optional lastModified field for tracking page updates
  • Added subtle "Last Updated" display at page bottom when lastModified is present

Technical Notes:

  • All MDX components used (StackAuthIcon, PlatformCodeblock, CardGroup, etc.) are properly registered in mdx-components.tsx
  • Code examples for the overview page follow existing patterns in setup.ts
  • Copy button implementation correctly uses runAsynchronously for async clipboard operations per project conventions
  • lucide-react icons (Check, Copy) are available as a dependency

Confidence Score: 5/5

  • This PR is safe to merge - it contains only documentation and UI improvements with no backend or security-sensitive changes.
  • All changes are isolated to the docs package with no breaking changes. The code follows existing patterns, uses proper imports, and the copy-to-clipboard feature handles errors gracefully. No functional regressions possible.
  • No files require special attention.

Important Files Changed

File Analysis

Filename Score Overview
docs/code-examples/setup.ts 5/5 Added new 'overview' section with 'install' and 'use-auth' code examples for the overview page quick start guide. Clean additions that follow existing patterns.
docs/content/docs/(guides)/overview.mdx 5/5 Redesigned overview page with centered hero, quick start guide, and streamlined sections. Removed verbose "Why Stack Auth" content. All components (StackAuthIcon, PlatformCodeblock, CardGroup, etc.) are properly available.
docs/source.config.ts 5/5 Extended frontmatter schema with optional lastModified field using Zod. Clean implementation that follows fumadocs patterns.
docs/src/app/docs/[[...slug]]/page.tsx 5/5 Added conditional rendering of lastModified date at page bottom when frontmatter includes it. Simple and non-breaking change.
docs/src/components/mdx/base-codeblock.tsx 5/5 Added copy-to-clipboard button with hover visibility and visual feedback. Uses runAsynchronously for async operations, imports from lucide-react which is available in dependencies.

Sequence Diagram

sequenceDiagram
    participant User
    participant OverviewPage as overview.mdx
    participant PlatformCodeblock
    participant BaseCodeblock
    participant Clipboard as navigator.clipboard

    User->>OverviewPage: Visit /docs/overview
    OverviewPage->>PlatformCodeblock: Render with document="setup/overview"
    PlatformCodeblock->>PlatformCodeblock: getExample("setup/overview", "install")
    PlatformCodeblock->>BaseCodeblock: Render code with copy button
    
    User->>BaseCodeblock: Hover over code block
    BaseCodeblock->>BaseCodeblock: Show copy button (opacity-100)
    
    User->>BaseCodeblock: Click copy button
    BaseCodeblock->>Clipboard: writeText(code)
    Clipboard-->>BaseCodeblock: Success
    BaseCodeblock->>BaseCodeblock: Show checkmark, reset after 2s
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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: 0

🧹 Nitpick comments (1)
docs/src/components/mdx/base-codeblock.tsx (1)

4-4: Tighten copy handler error handling and hover behavior; consider using shared icons

  • Since the click is already wrapped in runAsynchronously, you can drop the local try/catch in handleCopy and let the shared helper surface/log errors, keeping behavior consistent with the rest of the app. If you still want custom UX on failure, use runAsynchronously’s onError option rather than swallowing inside handleCopy.
  • The code‑trimming (code.startsWith(' ') ? code.slice(1) : code) is now duplicated between highlighting and copying; consider extracting a small getSanitizedCode(code) helper to keep them in sync.
  • The button’s transition-all with opacity-0 group-hover/code:opacity-100 currently fades in on hover as well as out; per the hover guidelines, you may want to make the appearance snappier and only animate the fade‑out (e.g., keep the hover state immediate and transition opacity/colors on hover exit).
  • You already have Check and Copy icons defined in docs/src/components/icons.tsx; importing from there instead of lucide-react directly would keep icon usage consistent and avoid duplicate definitions.

Also applies to: 52-62, 164-180

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8827c0c and d14ce7e.

📒 Files selected for processing (5)
  • docs/code-examples/setup.ts (1 hunks)
  • docs/content/docs/(guides)/overview.mdx (2 hunks)
  • docs/source.config.ts (1 hunks)
  • docs/src/app/docs/[[...slug]]/page.tsx (1 hunks)
  • docs/src/components/mdx/base-codeblock.tsx (3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Always add new E2E tests when changing the API or SDK interface
For blocking alerts and errors, never use toast; use alerts instead as they are less easily missed by the user
NEVER try-catch-all, NEVER void a promise, and NEVER .catch(console.error); use loading indicators and async callbacks instead, or use runAsynchronously/runAsynchronouslyWithAlert for error handling
Use ES6 maps instead of records wherever you can

Files:

  • docs/code-examples/setup.ts
  • docs/source.config.ts
  • docs/src/app/docs/[[...slug]]/page.tsx
  • docs/src/components/mdx/base-codeblock.tsx
**/*.{ts,tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,css}: Keep hover/click transitions snappy and fast; avoid fade-in delays on hover. Apply transitions after action completion instead, like smooth fade-out when hover ends
Use hover-exit transitions instead of hover-enter transitions; for example, use 'transition-colors hover:transition-none' instead of fade-in on hover

Files:

  • docs/code-examples/setup.ts
  • docs/source.config.ts
  • docs/src/app/docs/[[...slug]]/page.tsx
  • docs/src/components/mdx/base-codeblock.tsx
{.env*,**/*.{ts,tsx,js}}

📄 CodeRabbit inference engine (AGENTS.md)

Prefix environment variables with STACK_ (or NEXT_PUBLIC_STACK_ if public) so changes are picked up by Turborepo and improves readability

Files:

  • docs/code-examples/setup.ts
  • docs/source.config.ts
  • docs/src/app/docs/[[...slug]]/page.tsx
  • docs/src/components/mdx/base-codeblock.tsx
🧠 Learnings (1)
📚 Learning: 2025-12-04T18:03:49.961Z
Learnt from: CR
Repo: stack-auth/stack-auth PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T18:03:49.961Z
Learning: Applies to packages/stack-shared/src/config/schema.ts : Whenever making backwards-incompatible changes to the config schema, update the migration functions in packages/stack-shared/src/config/schema.ts

Applied to files:

  • docs/source.config.ts
🧬 Code graph analysis (1)
docs/src/components/mdx/base-codeblock.tsx (2)
packages/stack-shared/src/utils/promises.tsx (1)
  • runAsynchronously (343-366)
docs/src/components/icons.tsx (2)
  • Check (163-165)
  • Copy (185-205)
⏰ 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). (11)
  • GitHub Check: lint_and_build (latest)
  • GitHub Check: all-good
  • GitHub Check: Vercel Agent Review
  • GitHub Check: check_prisma_migrations (22.x)
  • GitHub Check: docker
  • GitHub Check: restart-dev-and-test
  • GitHub Check: build (22.x)
  • GitHub Check: build (22.x)
  • GitHub Check: setup-tests
  • GitHub Check: restart-dev-and-test-with-custom-base-port
  • GitHub Check: build (22.x)
🔇 Additional comments (4)
docs/source.config.ts (1)

7-12: Extended frontmatter schema wiring looks correct and backwards‑compatible

Using an optional lastModified string on top of the existing frontmatterSchema cleanly adds the metadata without breaking existing docs, and scoping it only to the main docs collection is appropriate. No further changes needed here.

Also applies to: 18-18

docs/src/app/docs/[[...slug]]/page.tsx (1)

70-75: Last‑updated display is safely integrated

The conditional render on page.data.lastModified is straightforward, non‑disruptive to existing pages, and the styling matches a subtle metadata footer. Looks good as is.

docs/code-examples/setup.ts (1)

4-24: Overview quick‑start examples are consistent with existing setupExamples structure

The new overview.install and overview.use-auth entries fit the existing setupExamples shape and align with the PlatformCodeblock usage (document="setup/overview" and matching example keys). This should wire the Quick Start section cleanly into the existing code‑example system.

docs/content/docs/(guides)/overview.mdx (1)

3-3: Overview page rework and lastModified metadata are coherent with the new quick‑start flow

The updated frontmatter lastModified field, hero, Quick Start (wired to setup/overview examples), Components, Explore, and Apps sections form a clear, concise entry point into the docs. The new links and PlatformCodeblock usage line up with the code‑examples configuration, and the content structure stays compatible with the new last‑updated footer rendering.

Also applies to: 6-39, 57-57, 70-70, 80-80

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: 0

🧹 Nitpick comments (1)
docs/source.config.ts (1)

9-12: Consider adding date format validation.

The lastModified field accepts any string. For consistency across documentation pages, consider validating the date format:

 const extendedFrontmatterSchema = frontmatterSchema.extend({
-  lastModified: z.string().optional(),
+  lastModified: z.string().datetime().optional(), // ISO 8601 format
 });

Alternatively, if you prefer a simpler date format like YYYY-MM-DD:

lastModified: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),

This ensures consistent date formats and catches typos in frontmatter early during build.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d14ce7e and dd01286.

📒 Files selected for processing (1)
  • docs/source.config.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Always add new E2E tests when changing the API or SDK interface
For blocking alerts and errors, never use toast; use alerts instead as they are less easily missed by the user
NEVER try-catch-all, NEVER void a promise, and NEVER .catch(console.error); use loading indicators and async callbacks instead, or use runAsynchronously/runAsynchronouslyWithAlert for error handling
Use ES6 maps instead of records wherever you can

Files:

  • docs/source.config.ts
**/*.{ts,tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,css}: Keep hover/click transitions snappy and fast; avoid fade-in delays on hover. Apply transitions after action completion instead, like smooth fade-out when hover ends
Use hover-exit transitions instead of hover-enter transitions; for example, use 'transition-colors hover:transition-none' instead of fade-in on hover

Files:

  • docs/source.config.ts
{.env*,**/*.{ts,tsx,js}}

📄 CodeRabbit inference engine (AGENTS.md)

Prefix environment variables with STACK_ (or NEXT_PUBLIC_STACK_ if public) so changes are picked up by Turborepo and improves readability

Files:

  • docs/source.config.ts
🧠 Learnings (1)
📚 Learning: 2025-12-04T18:03:49.961Z
Learnt from: CR
Repo: stack-auth/stack-auth PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T18:03:49.961Z
Learning: Applies to packages/stack-shared/src/config/schema.ts : Whenever making backwards-incompatible changes to the config schema, update the migration functions in packages/stack-shared/src/config/schema.ts

Applied to files:

  • docs/source.config.ts
⏰ 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). (11)
  • GitHub Check: setup-tests
  • GitHub Check: restart-dev-and-test
  • GitHub Check: restart-dev-and-test-with-custom-base-port
  • GitHub Check: lint_and_build (latest)
  • GitHub Check: all-good
  • GitHub Check: Vercel Agent Review
  • GitHub Check: build (22.x)
  • GitHub Check: check_prisma_migrations (22.x)
  • GitHub Check: docker
  • GitHub Check: build (22.x)
  • GitHub Check: build (22.x)
🔇 Additional comments (1)
docs/source.config.ts (1)

16-45: LGTM!

The extended schema is consistently applied across all three documentation collections (docs, api, dashboard), ensuring uniform frontmatter support for the lastModified field throughout the docs site.

@cmux-agent
Copy link

cmux-agent bot commented Dec 10, 2025

Preview Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Captured 2 screenshots for commit 0af8975 (2025-12-10 18:39:02.579 UTC).

Overview docs page showing the Welcome header with Stack Auth icon, Quick Start section with PlatformCodeblock components displaying installation and usage code examples with syntax highlighting and platform selector

overview-page-default.png

Full Overview docs page showing all UI components: Welcome header, Quick Start code blocks, Components CardGroup with React component links, Explore QuickLinks cards, Apps AppGrid with feature icons, and Last Updated date footer

overview-page-full.png


Generated by cmux preview system

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.

3 participants