fix: fix code blocks#44
Conversation
Greptile SummaryThis PR fixes several code block rendering issues across the docs — preventing duplicate snippets before React hydration, correcting CLI commands that were incorrectly placed as code block titles, fixing the
Confidence Score: 5/5Safe to merge — all changes are targeted display fixes with no logic regressions. The hydration guard in CodeGroup.tsx correctly sequences the DOM mutations (pre.hidden) before the React re-render that removes the CSS hiding, so there is no intermediate flash of multiple code blocks. All MDX edits are mechanical content corrections — moving commands out of title attributes, normalising [expandable] directive syntax, and fixing the mermaid fence — with no structural or logic changes. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant Astro as Astro SSR
participant CSS as global.css
participant React as CodeGroup (React)
Astro->>Browser: Render HTML with all pre.astro-code visible
Note over Browser,CSS: data-ready attr absent — CSS hides non-first pre elements
CSS->>Browser: display:none on :not(:first-of-type) pre
React->>Browser: Hydrate — useEffect runs
React->>Browser: "pre.hidden = true for non-active tabs (sync DOM mutation)"
React->>Browser: setTabs(...) triggers re-render
React->>Browser: "Re-render sets data-ready=true"
Note over Browser,CSS: CSS selector no longer matches — hidden attr manages visibility
Reviews (1): Last reviewed commit: "fix: normalize code block metadata" | Re-trigger Greptile |
/docs/adk/quickstartfor example/docs/integrations/sdk/cli-reference#chatfor example/docs/integrations/sdk/integration/concepts#provide-multiple-schemasfor example (or where empty with a title,/docs/integrations/sdk/installation)/docs/adk/conversations/setup#channel-matchingfor example/docs/webchat/integrations/wix#copy-the-script-urlfor example