docs: inline embeddable widgets as in-repo Mintlify snippets#31
Conversation
Replace iframes to sei-widgets.vercel.app with self-contained /snippets/*.jsx components and wire them into the relevant pages: - add-sei-button -> learn/dev-chains - network-tabs -> index, evm/networks - version-table -> evm/installing-seid-cli, node/index - random-peers -> node/index, node/troubleshooting - ecosystem-contracts -> evm/ecosystem-contracts Also adds snippets/rpc-selector.jsx (generated, not yet wired anywhere). All widget data endpoints are CORS-open, so the live-data snippets (version-table, rpc-selector) fetch directly from the docs origin. Brand colors use the existing --sei-* CSS variables with dark-mode detection, since the widgets' custom Tailwind theme colors don't exist in Mintlify. Each snippet was verified hydrating via `mint dev` + a headless render. The changelog, ecosystem app grid, and faucet remain iframes (faucet depends on npm packages that can't bundle in a snippet). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR SummaryMedium Risk Overview The new snippets mirror the old widget behavior in-page: network tabs with copy/hash deep; live mainnet/testnet binary versions via RPC
Reviewed by Cursor Bugbot for commit 6bba2d0. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
- changelog.jsx -> evm/changelog (live sei-chain CHANGELOG fetch + static fallback)
- ecosystem-app-grid.jsx -> learn/{indexers,oracles,rpc-providers,wallets}
(takes a `category` prop; fetches the CORS-open ecosystem API client-side)
- rpc-selector.jsx -> evm/index "RPC Endpoints" section, where it lived before
commit 9e2c32d removed it. The interactive selector sits above the static
endpoint table, which is kept inside an <Accordion> so endpoints remain
readable without executing JavaScript (the reason it was originally swapped).
Completes the iframe -> snippet migration; only the faucet stays an iframe.
All pages verified hydrating via `mint dev` + headless render.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the old RpcSelector component and clean up EVM page markup; replace the RPC accordion with inline tabs. Normalize changelog version headers to dedupe fetched vs. static entries and show a small "Checking for the latest releases…" spinner while loading. Improve ecosystem-contracts scrolling by using desktop/mobile element IDs and selecting the visible node before centering. Harden version-table RPC parsing to accept both Sei and standard Tendermint response shapes, avoid caching undefined values, and show cached versions immediately while only re-fetching when stale. Also add upstream typo snapshots to _typos.toml used by changelog snippets.
Add robust error and UX handling across snippets and introduce CSS fixes. - snippets/ecosystem-app-grid.jsx: add hasError state, surface a friendly error message on fetch failure, and add a marker class (`sei-eco-grid`) to preserve original logo layout. - snippets/random-peers.jsx: seed peers synchronously from the inlined pool to avoid loading/hydration flashes, randomize on mount, and show a clear message when no peers are configured for a network. - snippets/version-table.jsx: handle missing version in abci_info responses, keep cached values when fetches fail, and show "Unavailable" when no cache exists to avoid perpetual "Fetching..." state. - style.css: flatten Mintlify code-block wrapper visuals (remove double rounding/borders), ensure transparent inner pre/shiki backgrounds, and reset figure/img margins/radii inside `.sei-eco-grid` so logos fill their tiles. These changes prevent misleading empty states during outages, avoid SSR/hydration mismatches, and restore expected visual rendering for code blocks and ecosystem logos.
- Rename AppCardV2 to AppCard now that the V1 card no longer exists - Map sei-ibc-go PRs to the correct repo and key changelog entries by version - Sync the active network tab to the URL hash Co-authored-by: Cursor <cursoragent@cursor.com>
Refactor changelog rendering to robustly handle links and labels: introduce renderLink and labelForUrl helpers, honor explicit [label](url) markdown, heuristically link bare GitHub URLs, compare ranges, and PR numbers (including inline component detection). Replace brittle regex-based cleaning with segmented parsing and keep link styling/hover behavior consistent. Also avoid mutating intermediate strings when extracting bullet points. In ecosystem app grid, add an ArrowRightIcon and use it for site-relative (internal) integration links while keeping the ExternalLinkIcon for off-site links.
Use the actual component name in changelog TextWithLinks (comp.name) instead of hardcoding "sei-chain". In EcosystemAppGrid, create AppCard once via a lazy useState initializer so its component identity remains stable across parent re-renders (prevents remounts, preserves hover state and image tiles). Pass isDark into the card so theme changes still propagate. Added explanatory comment about mintlify snippet constraints.
Ecosystem contracts: defer scrolling to matching contract rows by introducing pendingScrollId state and a useEffect that runs after the section is opened (ensures the target is no longer inside a hidden display:none container). Clear pendingScrollId immediately in the effect to avoid accidental re-triggers. Replace the desktop <table> with a div-based grid (rowGridStyle) to avoid clipping caused by Mintlify's MDX <table> wrapper and this card's overflow-hidden layout; add role attributes for accessibility and break-all on code elements to prevent overflow. Network tabs: read window.location.hash during initial render (SSR-safe) so deep links show the correct tab on first paint, and call the hash handler once on mount to resync if the hash changed between initial render and mount.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6bba2d0. Configure here.

What
Replaces the
<iframe src="https://sei-widgets.vercel.app/...">embeds with self-contained in-repo Mintlify snippets under/snippets/*.jsx, wired into the relevant pages. This is the full migration — 8 of the 9 widgets.add-sei-button.jsxnetwork-tabs.jsxversion-table.jsxrandom-peers.jsxecosystem-contracts.jsxchangelog.jsxecosystem-app-grid.jsxcategoryprop)rpc-selector.jsxNotes
access-control-allow-origin: *, so the live-data snippets (version-table, rpc-selector, changelog, ecosystem grid) fetch directly from the docs origin — verified incl. POST preflight.bg-sei-maroon-100, …) don't exist in Mintlify, so brand colors are inlinevar(--sei-*)styles (tokens already instyle.css) with a dark-modeMutationObserver.mint dev+ a headless render (no JS/hydration errors). The ecosystem grids load real cards from the Sanity API; the changelog loads live from GitHub.evm/indexwhere it lived before commit9e2c32dremoved it. That commit had swapped it for a static endpoint table "so endpoints are readable without executing JavaScript." To preserve that, the interactive selector now sits above the static table, which is kept inside an<Accordion>(still in the DOM for crawlers/LLMs). Drop the table if you'd rather have only the widget.Companion PR
Widget source removal: sei-protocol/sei-docs-widgets#2. Merge that one only after this PR is deployed, or the still-live production iframes would 404.
🤖 Generated with Claude Code