Conversation
9 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1073 +/- ##
=======================================
Coverage 82.56% 82.56%
=======================================
Files 31 31
Lines 2770 2770
Branches 518 518
=======================================
Hits 2287 2287
Misses 346 346
Partials 137 137 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tony
added a commit
that referenced
this pull request
Jul 2, 2026
why: Verify the sphinx-gp-mermaid renderer on the live site — the production path runs behind Cloudflare (Rocket Loader), which local builds cannot reproduce. what: - Add mermaid to the docs workflow's push trigger - Force PUBLISH on the mermaid ref so a workflow-only push deploys Revert this commit before merging #1073.
tony
added a commit
that referenced
this pull request
Jul 2, 2026
why: Verify the sphinx-gp-mermaid renderer on the live site — the production path runs behind Cloudflare (Rocket Loader), which local builds cannot reproduce. what: - Add mermaid to the docs workflow's push trigger - Force PUBLISH on the mermaid ref so a workflow-only push deploys Revert this commit before merging #1073.
tony
added a commit
that referenced
this pull request
Jul 4, 2026
why: Verify the sphinx-gp-mermaid renderer on the live site — the production path runs behind Cloudflare (Rocket Loader), which local builds cannot reproduce. what: - Add mermaid to the docs workflow's push trigger - Force PUBLISH on the mermaid ref so a workflow-only push deploys Revert this commit before merging #1073.
tony
added a commit
to git-pull/gp-sphinx
that referenced
this pull request
Jul 4, 2026
Adds `sphinx-gp-mermaid`, a workspace package that renders MyST `mermaid` fences to inline SVG at build time via mermaid-cli. Diagrams paint with the page — no client-side runtime, no async pop-in, no layout shift — and follow the site's light/dark theme with no JavaScript. Extracted from tmuxp's production `docs/_ext/mermaid_inline.py`; tmuxp adopts the package in the companion PR. - **Dual-theme, zero-JS**: each diagram renders to a light and a dark SVG matched to the gp-furo palette, inlined and toggled by CSS on the page theme. Mermaid bakes id-scoped `!important` colors into its output, so a single render cannot follow the toggle. - **Content-addressed cache**: rendered SVGs are cached under `<confdir>/_mermaid_cache`, keyed on render version, theme, config, and source; the cache survives clean builds and writes atomically so parallel writers never read a torn SVG. - **Graceful degradation**: a missing or failing renderer warns once per builder and falls back to the diagram source, keeping `:name:` anchors intact; non-HTML builders emit an alt-text stand-in instead of crashing. - **Conf-level fence routing**: `merge_sphinx_config()` routes plain ```mermaid fences to the directive when the extension is active; explicit overrides still win. - **Opt-in**: not in `DEFAULT_EXTENSIONS` — rendering needs a Node toolchain (mermaid-cli + headless Chrome), so consumers who don't use diagrams pay nothing. - **Documentation**: ships the package's full Diátaxis tree (how-to, reference, dependents) and a live example gallery showing diverse diagram types as the extension's real dual-theme output. See also: tmux-python/tmuxp#1073
tony
added a commit
that referenced
this pull request
Jul 4, 2026
why: Verify the sphinx-gp-mermaid renderer on the live site — the production path runs behind Cloudflare (Rocket Loader), which local builds cannot reproduce. what: - Add mermaid to the docs workflow's push trigger - Force PUBLISH on the mermaid ref so a workflow-only push deploys Revert this commit before merging #1073.
tony
added a commit
that referenced
this pull request
Jul 4, 2026
why: Verify the sphinx-gp-mermaid renderer on the live site — the production path runs behind Cloudflare (Rocket Loader), which local builds cannot reproduce. what: - Add mermaid to the docs workflow's push trigger - Force PUBLISH on the mermaid ref so a workflow-only push deploys Revert this commit before merging #1073.
Member
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
why: The vendored mermaid renderer moved into the sphinx-gp-mermaid workspace package; the docs build needs it available before the local copy can be dropped. what: - Add sphinx-gp-mermaid==0.0.1a32 to the dev and docs groups - Bump the gp-sphinx family of packages to 0.0.1a32 - Regenerate uv.lock
why: The vendored docs/_ext/mermaid_inline.py moved into the sphinx-gp-mermaid workspace package; load the package instead so the local copy can be dropped. what: - extra_extensions: mermaid_inline -> sphinx_gp_mermaid - Keep the explicit myst_fence_as_directive: the pinned gp-sphinx release predates the auto-routing that ships with the package; drop it on the next gp-sphinx bump - Existing _mermaid_cache entries stay valid (identical cache-key inputs), so adoption re-renders nothing
why: The renderer now ships as sphinx-gp-mermaid and the docs build already loads the package, so the docs/_ext copy, its stylesheet, and its test suite are dead weight. what: - Delete docs/_ext/mermaid_inline.py, docs/_static/css/gp-diagram.css, and tests/test_docs_mermaid.py (the suite moved to the gp-sphinx workspace with the code) - Retarget the AGENTS.md diagrams convention, .gitignore comment, and docs.yml toolchain comment at the package; the pnpm/puppeteer provisioning itself is unchanged
why: Record for 1.74.0 that the docs mermaid renderer moved from a vendored extension to the reusable upstream sphinx-gp-mermaid package, with rendered output unchanged. what: - Add a Development entry under the unreleased 1.74.0 section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/_ext/mermaid_inline.pywithsphinx-gp-mermaid, the gp-sphinx workspace package it was extracted into — the same build-time dual light/dark inline-SVG pipeline introduced in Docs: build-time mermaid + tmux-layout diagram rendering #1071, now maintained upstream.sphinx-gp-mermaid==0.0.1a32from PyPI alongside the other gp-sphinx-family packages.docs/_mermaid_cacheSVG remains a cache hit; adoption never launches Chrome.Changes
pyproject.toml/uv.lock: the dependency and its exclude-newer-cooldown exemption alongside the other gp-sphinx-family packages.docs/conf.py:extra_extensionsloadssphinx_gp_mermaid. The explicitmyst_fence_as_directive=["mermaid"]stays for now — the pinned gp-sphinx release predates the upstream auto-routing — and drops on the next gp-sphinx bump.docs/AGENTS.md,.gitignore,.github/workflows/docs.yml: authoring guidance and comments retargeted at the package. The pnpm/puppeteer provisioning is unchanged: mermaid-cli remains a docs devDependency here, since the Python package resolvesmmdcbut does not vendor it.Rendered markup now uses the package's workspace-namespaced CSS classes (
gp-sphinx-diagram*in place ofgp-diagram*), shipped by the package itself; visual output is unchanged.Dependency status
sphinx-gp-mermaid==0.0.1a32is a normal PyPI pin (the gp-sphinx release shipped — companion PR below), so the lockfile is reproducible and this PR is mergeable as-is.Verification
Zero references to the vendored renderer or its CSS namespace remain:
Test plan
uv run ruff check .,uv run ruff format .,uv run mypy .— cleanuv run py.test --reruns 0— suite green (the vendored mermaid tests moved upstream with the code)just build-docs— every diagram page renders through the package;_mermaid_cacheentries hit with no mmdc invocations (mtimes unchanged)gp-sphinx-diagram__variant--theme-{light,dark}figures and link the packaged stylesheetCompanion PR
sphinx-gp-mermaidpackage