You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node-click highlighting (the feature that syncs the graph to the editor) is broken when using the YAML format. While clicking a node correctly scrolls and highlights the code in JSON mode, it fails in YAML mode, providing no visual feedback to the user.
Steps to Reproduce
Open the application (it defaults to JSON mode).
Click a node in the graph (e.g., "properties") and verify the editor scrolls and highlights the line.
Switch the editor format to YAML using the format toggle.
Click the same node (or any other node) in the graph visualization.
Observe that the editor does not scroll, move the cursor, or apply any highlighting.
Demo Video
Screen.Recording.2026-03-09.at.11.30.13.PM.mov
Expected Behavior
Clicking a node in the graph should resolve the correct line and column in the YAML source and apply the monaco-highlight-line decoration, just as it does for JSON.
Environment
OS: macOS
Browser: Chrome
Version: v0.5.11-beta
Additional Context
The root cause is located in src/components/MonacoEditor.tsx at line 170. The application uses jsonc-parser to generate an AST from the editor text. Because jsonc-parser only supports JSON, it returns undefined when the content is YAML. This triggers an early return on line 171, effectively disabling the feature for YAML users.
Proposed Solution
I propose refactoring the useEffect in MonacoEditor.tsx to be format-aware by branching on the existing schemaFormat context value: using jsonc-parser's parseTree/findNodeAtLocation for JSON, and a YAML-compatible AST parser (such as the yaml library's parseDocument, which provides source offsets) for YAML content. This will allow correct resolution of JSON Pointer paths to editor line numbers regardless of format.
Good First Issue
I believe this issue is a good first issue for new contributors.
Bug Details
Description
Node-click highlighting (the feature that syncs the graph to the editor) is broken when using the YAML format. While clicking a node correctly scrolls and highlights the code in JSON mode, it fails in YAML mode, providing no visual feedback to the user.
Steps to Reproduce
properties") and verify the editor scrolls and highlights the line.Demo Video
Screen.Recording.2026-03-09.at.11.30.13.PM.mov
Expected Behavior
Clicking a node in the graph should resolve the correct line and column in the YAML source and apply the monaco-highlight-line decoration, just as it does for JSON.
Environment
Additional Context
The root cause is located in
src/components/MonacoEditor.tsxat line 170. The application usesjsonc-parserto generate an AST from the editor text. Becausejsonc-parseronly supports JSON, it returns undefined when the content is YAML. This triggers an early return on line 171, effectively disabling the feature for YAML users.Proposed Solution
I propose refactoring the
useEffectinMonacoEditor.tsxto be format-aware by branching on the existingschemaFormatcontext value: using jsonc-parser'sparseTree/findNodeAtLocationfor JSON, and a YAML-compatible AST parser (such as the yaml library'sparseDocument, which provides source offsets) for YAML content. This will allow correct resolution of JSON Pointer paths to editor line numbers regardless of format.Good First Issue
Contribution