-
Notifications
You must be signed in to change notification settings - Fork 0
fix(flowchart/validate): robust bracket scan for parens-in-unquoted (nested + quoted-safe) #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nested + quoted-safe)\n\n- Track label range per [ ... ] segment to dedupe diagnostics\n- Scan with nested-bracket depth; skip brackets inside quotes and escapes\n- Keep skipping typed shapes ([/…/], [\…\]) and ( … )-wrapped labels\n- Prevent duplicate FL-LABEL-PARENS-UNQUOTED when parser already mapped same segment\n\nThis tightens parity with Mermaid by flagging method-like labels such as A[doWork()] only when truly unquoted, even in lines with multiple labels or quotes.\n (cherry picked from commit 43ffc1a)
🔍 Code Analysis Results[...] 🐛 Debug InformationProvider: google Debug Details
🔗 Download Link: visor-debug-95 Powered by Visor from Probelabs Last updated: 2025-11-03T08:44:06.388Z | Triggered by: synchronize | Commit: 2c4a530 💡 TIP: You can chat with Visor using |
🔍 Code Analysis ResultsSecurity Issues (1)
Architecture Issues (1)
✅ Performance Check PassedNo performance issues found – changes LGTM. Quality Issues (1)
🐛 Debug InformationProvider: google Debug Details
🔗 Download Link: visor-debug-95 Powered by Visor from Probelabs Last updated: 2025-11-03T08:44:09.213Z | Triggered by: synchronize | Commit: 2c4a530 💡 TIP: You can chat with Visor using |
…timeout + retry; add compat gap for interactions-linkstyle-multi\n\n- Flowchart VALID/INVALID pages updated\n- PREVIEW_MERMAID_CLI_TIMEOUT_MS env support + one retry to reduce flakes\n- Mark interactions-linkstyle-multi.mmd as compat (mermaid-cli intermittently reports INVALID)
…s compat gap for member-without-name\n\n- Refresh INVALID_DIAGRAMS for class and sequence\n- Mark class member-without-name.mmd as compat since mermaid-cli rejects unnamed members
…ncode via autofix\n\n- Remove heuristic skip for parallelogram/trapezoid labels in validator sweep\n- Stop early-continue in semantics so RoundOpen/RoundClose under [/…/] still map to FL-LABEL-PARENS-UNQUOTED\n- Ensures cases like API1[/Streams API\n(/streams-api)/] are fixed by encoding parens (quotes unsupported in typed labels)\n- Keeps skipping pure ( … )-wrapped labels to avoid flagging shape parens themselves
…s\n\n- diamond-indexof-brackets.mmd → shows decision label with parens and bracket chars; expect FL-LABEL-PARENS-UNQUOTED x2\n- typed-parallelogram-parens.mmd → [/…/] label with parens; expect FL-LABEL-PARENS-UNQUOTED; autofix encodes ( )\n- subgraph-unquoted-title.mmd → unquoted subgraph title with spaces; expect FL-SUBGRAPH-UNQUOTED-TITLE
…ing required for special characters\n\n- Parser: accept Identifier + additional words (Identifier/Text/Number) as subgraph title\n- Diagnostics: only emit FL-SUBGRAPH-UNQUOTED-TITLE when hazards like [](){}:/\ or quotes appear\n\ntests(flowchart): add fixtures for new validations\n- diamond-indexof-brackets.mmd (parens in unquoted decision with bracket chars)\n- typed-parallelogram-parens.mmd (parens inside [/…/] label → encode via autofix)\n- remove subgraph-unquoted-title (now valid); update expected-errors\n\nchore(previews): regenerate flowchart INVALID_DIAGRAMS.md
…anges\n\n- Update flowchart rendered SVGs for subgraph examples\n- Fix sequence valid fixture (blocks-alt-opt-loop.mmd) and regenerate VALID_DIAGRAMS.md
…CI all-fix validation
…-fixtures/sequence/invalid-compat.json with autonumber-malformed.mmd\n- generator: support invalid-compat.json to skip failing --fix=all validations for listed files
…nerate ALL invalid previews\n\n- scripts/generate-previews.js: reduce CLI errors to a single stable line (Parse error… or Syntax error in text), strip stacks\n- handle invalid-compat in main to avoid scope errors\n- regenerate class/flowchart/pie/sequence INVALID_DIAGRAMS.md with canonical messages
…tofix\n\n- Extend robust label sweep to detect '@' hazard (skip typed [/…/] where quotes unsupported)\n- Dedupe with existing range logic; collect both PARENS/AT codes\n\ntests(flowchart): add 'label-with-at-slash.mmd' invalid fixture + expected error\n- Demonstrates '@' + '/' in label; expect FL-LABEL-AT-IN-UNQUOTED\n
…el case; canonical error lines
…e' and unknown-type); regenerate flowchart invalid page; ensure '@' row shows ✅ safe
…nical errors to match CI env
This PR refines the flowchart validator’s heuristic that flags parentheses inside unquoted square‑bracket node labels (
FL-LABEL-PARENS-UNQUOTED).Why
[...]labels are ambiguous for Mermaid; we surface them explicitly for better DX and autofix.[...]segments or quotes were present on a line.What changed
].( … )‑wrapped content inside[].Effect
A[initialize()]only when the label is truly unquoted, even in lines with multiple labels and quotes.Review aids
npm run build && npm run compare:renderers:flowchart.tmp-compare-all/flowchart/<case>/diff.jsonand summaries.Supersedes
main.