feat: web explorer web three way nav#1706
Open
megha-narayanan wants to merge 5 commits into
Open
Conversation
… tree, source, and template Double-click a construct or violation occurrence to view its source file (left pane) and synthesized template block (right pane) side-by-side. Navigation highlights the target lines with a fading color overlay and scrolls both panes to top. A file picker in each pane header allows opening arbitrary project files. - Add resolveAllResourceRanges to cloud-assembly-api (single-parse batch) - Add GET /api/template endpoint returning content + per-resource line ranges, property ranges, and source locations - Add CodeViewer component with line numbers, highlight, and scroll - Wire double-click on ConstructTree and ViolationsPanel to navigate - Cache assembly reads with 2s TTL to avoid redundant disk I/O - Remove FilePane (replaced by navigation-driven CodeViewer)
…nostics, and app path - Add PrismJS-based syntax highlighting for TypeScript, JSON, and YAML in the code viewer (~12KB bundle cost) - Add squiggly underlines for policy violations in the source pane, colored by severity (error/warning/info) - Create TemplateViewer component that displays templates as YAML by default with a JSON/YAML toggle - Add collapsible resource sections in the template view with Collapse All / Expand All controls - Show the CDK app directory path in the page header via GET /api/info - Add js-yaml and prismjs as devDependencies
…e double-click - Add source→template navigation: double-click a line in the source pane to jump to the resource it produces in the template pane - Fix template highlight coordinates: TemplateViewer now resolves highlights from logicalId using its own display-format resources (JSON or YAML), eliminating the JSON-line-in-YAML-view mismatch - Replace js-yaml + regex-based YAML remapping with the `yaml` package's AST parser (parseDocument + LineCounter) for robust resource range resolution - Remove per-property line ranges from the API (block-level highlight only) - Add source-nav.ts: builds a per-file anchor index from the construct tree for efficient source-line-to-construct lookups
…view The gutter fold markers were computed but never wired into CodeViewer, so collapsing never worked. Removes the collapse state, Collapse/Expand All buttons, collapseContent, and the line-adjustment helpers; the YAML/JSON toggle stays.
Adds Java, C#, and Go grammars alongside TypeScript, JavaScript, Python, JSON, and YAML, and extracts a shared Language type. detectLanguage maps each source extension.
03968c6 to
a27c8e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A full cdk explore UI over the synthesized assembly. Builds on #1624.
Features
Design decisions
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license