Skip to content

docs: fix MDX/Mermaid build errors in v2 docs#951

Merged
scarmuega merged 1 commit into
mainfrom
docs/fix-v2-mdx-build
Jun 15, 2026
Merged

docs: fix MDX/Mermaid build errors in v2 docs#951
scarmuega merged 1 commit into
mainfrom
docs/fix-v2-mdx-build

Conversation

@scarmuega

@scarmuega scarmuega commented Jun 15, 2026

Copy link
Copy Markdown
Member

Problem

The Starlight docs build (txpipe/docs) fails compiling the v2 docset merged in #950:

[@mdx-js/rollup] Expected the closing tag `</TabItem>` either after the end of `listItem` …
file: …/oura-v2/docs/v2/advanced/stateful_cursor.mdx

Cause & fix

  • advanced/stateful_cursor.mdx — a </TabItem> indented two spaces sat directly after a Markdown list. A - list's content-indent is two spaces, so the closing tag was absorbed as a loose list-item paragraph and MDX never saw it. Moving all Tabs/TabItem tags to column 0 with blank lines around the content puts them outside the list. (The other Tabs pages — binary_release, kubernetes — only have fenced code blocks before their closing tags, which parse fine, so they're untouched.)
  • how_it_works.mdx — hardened the new Mermaid block to canonical syntax (spaced -. label .-> dotted links, non-reserved node id) so rehype-mermaid's img-svg renderer accepts it.

Verification

Ran a full local astro build of txpipe/docs against this content (deps + Chromium installed for the Mermaid render):

  • 195 pages built, build Complete — no MDX errors.
  • The diagram rasterizes to an data:image/svg+xml,…aria-roledescription='flowchart' SVG (browser render succeeded).
  • All three new pages (how_it_works, quickstart, troubleshooting) render.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Enhanced formatting and spacing in stateful cursor configuration documentation and system flowchart diagrams for improved clarity and readability.

The Starlight docs build (txpipe/docs) failed compiling the v2 docset merged
in #950:

- advanced/stateful_cursor.mdx: a `</TabItem>` indented two spaces directly
  after a Markdown list was absorbed as a loose list-item paragraph, so MDX
  never saw the closing tag ("Expected the closing tag </TabItem>"). Moving the
  Tabs/TabItem JSX tags to column 0 with blank lines around the content puts
  the tags outside the list.
- how_it_works.mdx: harden the Mermaid block to canonical syntax (spaced
  dotted-link labels, non-reserved node id) so rehype-mermaid's img-svg
  renderer accepts it.

Verified with a full local `astro build` of txpipe/docs against this content:
195 pages built, the diagram rasterizes to SVG, all three new pages render.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@scarmuega scarmuega requested a review from paulobressan as a code owner June 15, 2026 14:07
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8e80f17d-ed6d-4fd3-b26f-7cbd3a3a66a2

📥 Commits

Reviewing files that changed from the base of the PR and between d7b231a and 69dcb2c.

📒 Files selected for processing (2)
  • docs/v2/advanced/stateful_cursor.mdx
  • docs/v2/how_it_works.mdx

📝 Walkthrough

Walkthrough

Two documentation files receive whitespace-only edits. stateful_cursor.mdx gains blank lines around the Memory and Redis TabItem blocks. how_it_works.mdx adjusts spacing and punctuation in the Mermaid flowchart's cursor edge labels. No content, configuration values, or diagram structure changes.

Changes

Documentation Formatting

Layer / File(s) Summary
Whitespace and diagram formatting cleanup
docs/v2/advanced/stateful_cursor.mdx, docs/v2/how_it_works.mdx
Blank lines inserted around Memory and Redis TabItem blocks; Mermaid flowchart edge label spacing/punctuation adjusted on cursor-related connections.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A blank line here, a space tucked there,
The tabs breathe easy, diagrams fair.
No logic changed, no values swapped,
Just tidy prose, all neatly mapped.
The warren's docs look crisp and bright! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: fixing MDX/Mermaid build errors in v2 documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/fix-v2-mdx-build

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.

@scarmuega scarmuega merged commit 201eaa3 into main Jun 15, 2026
5 checks passed
@scarmuega scarmuega deleted the docs/fix-v2-mdx-build branch June 15, 2026 15:31
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.

1 participant