Skip to content

Add partner integration guide and mermaid diagrams#45730

Merged
matlin merged 8 commits into
masterfrom
matlin/partner-guide-w-mermaid
May 13, 2026
Merged

Add partner integration guide and mermaid diagrams#45730
matlin merged 8 commits into
masterfrom
matlin/partner-guide-w-mermaid

Conversation

@matlin
Copy link
Copy Markdown
Contributor

@matlin matlin commented May 8, 2026

  • Draft
  • Update
  • feat: add beautiful-mermaid and integration flow diagrams
  • Make mermaid theme match site

Summary by CodeRabbit

  • New Features

    • Added Mermaid diagram rendering in docs with themed SVG output.
  • Documentation

    • Added "Supabase Partner Integration Guide" covering simple and signed-redirect flows, JWT verification, sequence diagrams, and key guidance.
    • Updated site navigation to include the new partner integration guide.
  • Chores

    • Added Mermaid rendering dependency.

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment, Open in v0 May 13, 2026 0:53am
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored May 13, 2026 0:53am
design-system Skipped Skipped May 13, 2026 0:53am
studio-self-hosted Skipped Skipped May 13, 2026 0:53am
studio-staging Skipped Skipped May 13, 2026 0:53am
ui-library Skipped Skipped May 13, 2026 0:53am
zone-www-dot-com Skipped Skipped May 13, 2026 0:53am

Request Review

@supabase
Copy link
Copy Markdown

supabase Bot commented May 8, 2026

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 0de9d30f-deb2-4c38-9dab-318af9c278fd

📥 Commits

Reviewing files that changed from the base of the PR and between baf32d1 and ce45b6c.

📒 Files selected for processing (2)
  • apps/docs/components/Mermaid.tsx
  • apps/docs/content/guides/integrations/partner-integration-guide.mdx
✅ Files skipped from review due to trivial changes (1)
  • apps/docs/content/guides/integrations/partner-integration-guide.mdx

📝 Walkthrough

Walkthrough

Adds a Mermaid renderer component and dependency, wires it into MDX for inline diagrams, introduces a partner integration guide with simple and signed-JWT redirect flows, and updates the docs navigation to link the new guide.

Changes

Mermaid Diagram Support & Partner Integration Guide

Layer / File(s) Summary
Dependencies
apps/docs/package.json
Adds beautiful-mermaid (^1.1.3) for SVG rendering.
Mermaid React component
apps/docs/components/Mermaid.tsx
New Mermaid component accepts a chart string, renders themed SVG via renderMermaidSVG, and injects the SVG into a styled, horizontally scrollable container via dangerouslySetInnerHTML. No error-handling path is present in the changed ranges.
MDX component integration
apps/docs/features/docs/MdxBase.shared.tsx
Imports and registers Mermaid in the MDX components object for inline diagram rendering.
Partner integration guide
apps/docs/content/guides/integrations/partner-integration-guide.mdx
New guide documenting simple redirect and signed JWT redirect approaches, endpoint request/response shapes, JWT validation rules (ES256, kid, iss, aud, iat/exp), key handling, and sequence diagrams.
Navigation menu
apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
Adds "Supabase partner integration guide" link under Build Your Own / integrations.

Sequence Diagram

sequenceDiagram
  participant Browser
  participant MDX as MDX renderer
  participant Mermaid as Mermaid component
  participant Renderer as beautiful-mermaid
  participant DOM

  Browser->>MDX: render MDX with `Mermaid` node
  MDX->>Mermaid: pass `chart` prop
  Mermaid->>Renderer: renderMermaidSVG(chart, theme)
  Renderer-->>Mermaid: SVG markup
  Mermaid->>DOM: injectSVG(innerHTML)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • gregnr

Poem

🐰✨ I stitched a Mermaid into docs today,
Charts sprout like sea-foam where text used to lay,
Redirects and tokens hop in tidy rhyme,
Keys and JWTs keep perfect time,
Hooray — docs and diagrams hop in time!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description does not follow the required template structure; it lacks proper sections like 'What kind of change', 'Current behavior', and 'New behavior'. Restructure the description to match the template: add 'CONTRIBUTING.md' acknowledgment, specify change type, explain current/new behavior, and provide context.
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.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: adding a partner integration guide and Mermaid diagrams for visualization.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch matlin/partner-guide-w-mermaid

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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
Copy Markdown
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.

♻️ Duplicate comments (1)
apps/docs/content/guides/integrations/partner-integration-guide.mdx (1)

205-205: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix docs_lint blocker: keypair spelling at Line 205

docs_lint / supa-mdx-lint fails on this exact token (Rule003Spelling), so CI remains red until this is corrected.

Suggested patch
-| `kid` | Yes      | The key ID identifying the keypair. Use this to pick the correct public key when verifying the signature. |
+| `kid` | Yes      | The key ID identifying the key pair. Use this to pick the correct public key when verifying the signature. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/guides/integrations/partner-integration-guide.mdx` at line
205, The docs lint failure is caused by the token "keypair" in the table cell
for `kid`; update the wording to the correct spelling "key pair" (e.g., change
"The key ID identifying the keypair..." to "The key ID identifying the key
pair...") so the `kid` row no longer triggers Rule003Spelling; ensure only that
token is changed and no other table formatting is altered.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@apps/docs/content/guides/integrations/partner-integration-guide.mdx`:
- Line 205: The docs lint failure is caused by the token "keypair" in the table
cell for `kid`; update the wording to the correct spelling "key pair" (e.g.,
change "The key ID identifying the keypair..." to "The key ID identifying the
key pair...") so the `kid` row no longer triggers Rule003Spelling; ensure only
that token is changed and no other table formatting is altered.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 577fd6bf-9133-4a84-b3bc-7d552c81b005

📥 Commits

Reviewing files that changed from the base of the PR and between 4dffe42 and cefa046.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • apps/docs/components/Mermaid.tsx
  • apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
  • apps/docs/content/guides/integrations/partner-integration-guide.mdx
  • apps/docs/features/docs/MdxBase.shared.tsx
  • apps/docs/package.json

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🎭 Playwright Test Results

passed  206 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  212 tests across 23 suites
duration  8 minutes, 14 seconds
commit  ce45b6c

Flaky tests

Features › table-editor.spec.ts › table editor › should show rls accordingly

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

Comment thread apps/docs/content/guides/integrations/partner-integration-guide.mdx Outdated
Comment thread apps/docs/content/guides/integrations/partner-integration-guide.mdx
Comment thread apps/docs/components/Mermaid.tsx Outdated
@matlin matlin merged commit 71e94a1 into master May 13, 2026
33 checks passed
@matlin matlin deleted the matlin/partner-guide-w-mermaid branch May 13, 2026 13:47
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Braintrust eval report

Assistant (master-1778680168)

Score Average Improvements Regressions
Completeness 93.3% (-1pp) 3 🟢 4 🔴
Conciseness 43.3% (-3pp) 4 🟢 8 🔴
Correctness 76.4% (+8pp) 4 🟢 1 🔴
Docs Faithfulness 67.1% (+5pp) 4 🟢 2 🔴
Goal Completion 75.3% (-1pp) 4 🟢 5 🔴
Knowledge Usage 100% (+0pp) - -
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+7.000000000000001pp) 1 🟢 -
Tool Usage 75% (+1pp) - -
URL Validity 100% (+0pp) - -
Safety 95.2% (+8pp) 2 🟢 1 🔴
Time_to_first_token 0.02tok (-0.15tok) 15 🟢 9 🔴
Llm_calls 11.31 (+0.19) 10 🟢 9 🔴
Tool_calls 2.87 (-0.16) 6 🟢 12 🔴
Errors 0.07 (+0.07) - 2 🔴
Llm_errors 0.03 (+0.03) - 1 🔴
Tool_errors 0 (+0) - -
Prompt_tokens 21705.69tok (-1.89tok) 13 🟢 9 🔴
Prompt_cached_tokens 6000.64tok (-1515.52tok) 2 🟢 16 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 516.56tok (-82.43tok) 15 🟢 10 🔴
Completion_reasoning_tokens 88.43tok (-6.84tok) 13 🟢 9 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 22222.25tok (-84.32tok) 16 🟢 9 🔴
Estimated_cost 0$ (+0$) 10 🟢 12 🔴
Duration 20.16s (-0.48s) 12 🟢 13 🔴
Llm_duration 11.86s (-0.62s) 17 🟢 8 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants