@devries-cameron20 / composio-1 / commits / a9555a865
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(docs): stop quickstart intro from rendering nested <p>

The intro text sat on its own lines inside <p className="mb-6">, so MDX wrapped it in a second paragraph and rendered <p><p>…</p></p>. Browsers split that apart, React hydration failed, and the page rebuilt on the client on every visit. Use a <div> wrapper and add a content test that flags a <p> tag alone on a line. Fixes #4703

tarunvashishth committed Sep 30, 2026 at 01:25 UTC a9555a86536a568df7a6162da0c7868c93027813
2 files changed +23 -2
docs/content/docs/quickstart.mdx
+2 -2
@@ -8,9 +8,9 @@ Build an agent that chooses Composio tools at runtime. Type a task, connect an a
8
9 <div className="not-prose my-6 grid grid-cols-1 items-start gap-4 md:grid-cols-2">
10 <div>
11 - <p className="mb-6">
11 + <div className="mb-6">
12 Pick your framework below. A Composio [session](/docs/how-composio-works) gives your agent tool discovery, account connections, and execution across [1000+ apps](/toolkits). It exposes only a small set of meta tools, so app schemas are loaded when the agent needs them.
13 - </p>
13 + </div>
14 <AgentSetupActions />
15 </div>
16 <Callout className="my-0" type="info" title="Running as an unattended coding agent?">
docs/tests/static/content.test.ts
+21
@@ -101,6 +101,27 @@ describe("Content - no empty pages", () => {
101 });
102 });
103
104 +describe("Content - valid HTML nesting", () => {
105 + test("no <p> tag sits alone on a line", async () => {
106 + // MDX parses the lines inside a block-level <p> as a markdown paragraph,
107 + // rendering <p><p>…</p></p>. Browsers split that apart, so React hydration
108 + // fails and the page re-renders on the client. Use a <div> wrapper instead.
109 + const files = [...(await findMdxFiles(DOCS_DIR)), ...(await findMdxFiles(EXAMPLES_DIR))];
110 + const nested: string[] = [];
111 +
112 + for (const file of files) {
113 + const lines = (await readFile(file, "utf-8")).split("\n");
114 + lines.forEach((line, i) => {
115 + if (/^\s*<p(\s[^>]*)?>\s*$/.test(line)) {
116 + nested.push(`${relative(join(DOCS_DIR, ".."), file)}:${i + 1}`);
117 + }
118 + });
119 + }
120 +
121 + expect(nested).toEqual([]);
122 + });
123 +});
124 +
125 describe("Content - provider compatibility", () => {
126 test("Gemini Python docs use the google-genai-compatible provider", async () => {
127 const content = await readFile(GOOGLE_PROVIDER_DOC, "utf-8");