Skip to content

Commit 9f80110

Browse files
pliablepixelsclaude
andcommitted
docs(developer-guide): fix mermaid syntax error in Flow 19 diagram
Mermaid parses ";" as a statement separator, so the semicolon in the last message label of Flow 19's sequence diagram truncated the statement and the diagram rendered as "Syntax error in text" on readthedocs. Replaced with a comma, and the docs gate now rejects semicolons inside mermaid blocks; it failed on the offending line before the fix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 159b951 commit 9f80110

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

app/src/tests/agents-contracts.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,27 @@ describe('developer docs cite symbols, not line numbers', () => {
184184
}
185185
expect(offenders, `line-number citations found:\n${offenders.join('\n')}`).toEqual([]);
186186
});
187+
188+
it('no mermaid block contains a semicolon', () => {
189+
// Mermaid parses ";" as a statement separator, so a semicolon inside a
190+
// message label truncates the statement and the whole diagram renders as
191+
// "Syntax error in text" on readthedocs.
192+
const offenders: string[] = [];
193+
const guideDir = path.join(repoRoot, 'docs/developer-guide');
194+
for (const file of fs.readdirSync(guideDir).filter((f) => f.endsWith('.rst'))) {
195+
const lines = fs.readFileSync(path.join(guideDir, file), 'utf8').split('\n');
196+
let inMermaid = false;
197+
lines.forEach((line, i) => {
198+
if (/^\s*\.\. mermaid::/.test(line)) {
199+
inMermaid = true;
200+
return;
201+
}
202+
if (inMermaid && line.trim() && !/^\s/.test(line)) inMermaid = false;
203+
if (inMermaid && line.includes(';')) offenders.push(`${file}:${i + 1} ${line.trim()}`);
204+
});
205+
}
206+
expect(offenders, `semicolons inside mermaid blocks:\n${offenders.join('\n')}`).toEqual([]);
207+
});
187208
});
188209

189210
describe('developer docs reference valid rule IDs', () => {

docs/developer-guide/call-flows.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,7 @@ tool and ``ToolDefinition`` cannot express one), never a runtime decision.
20962096
ZM-->>Tool: rows
20972097
Agent->>Agent: grounding and live-data checks
20982098
Agent-->>Panel: this turn's messages
2099-
Panel->>Panel: render; append context boundary if nearly full
2099+
Panel->>Panel: render, append context boundary if nearly full
21002100

21012101
#. **The `?` key opens the assistant window.** ``components/KeyboardShortcuts.tsx``'s
21022102
``onKeyDown`` treats ``?`` as dual-purpose: when the assistant is enabled

0 commit comments

Comments
 (0)