feat: construct tree and violations#1653
Open
megha-narayanan wants to merge 6 commits into
Open
Conversation
On top of the cloudscape frontend scaffold (aws#1606): - GET /api/tree + /api/policy-validation (toWebNode, normalizeViolations); assemblyDir plumbing; no-store on the unversioned bundle - collapseDefaultChildren folds the synthetic Resource/Default leaf into its parent (display only; violations join on the full tree) - ConstructTree: collapsible, spill-proof rows, friendly type labels, double-click rename with localStorage + revert - ViolationsPanel: severity-sorted, colored [SEVERITY] prefix, scrollable - App: uniform Cloudscape Containers, horizontally resizable construct tree
Backend owns the core-node to displayed-node transform: default-child collapse and per-node highest-severity join. The Cloudscape frontend renders without re-deriving it, and severity rules are shared between server and SPA. Read-only; three-way navigation and frontend tests are deferred to follow-ups.
severityRank, severityHexColor, normalize and severityStyle only ever receive a resolved label: displaySeverity always returns a string and the tree guards before calling. The string | undefined params and the ?? fallback were dead, so narrow to string.
…xplorer-web-tree-violations-v2
…nsError The cdk-lsp merge into the base folds a failed validation-report load into AssemblyData.warnings and removes the violationsError field. Drop the web reportError plumbing (route body, ViolationsResponse type, ViolationsPanel banner, and its route test) to match the new contract.
…xplorer-web-tree-violations-v2
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.
Adds two read-only views to the
cdk exploreweb UI.GET /api/tree): the synthesized construct hierarchy. Eachnode is flagged with the highest severity of any policy violation on it, so
problem areas are visible at a glance.
GET /api/policy-validation): violations groupedby rule, sorted by severity, labeled with the originating plugin.
The server reads the cloud assembly in
cdk.outand returns a wire-stable,app-relative view. The backend owns the full transform from core construct node
to displayed node, including default-child collapse and the per-node
highest-severity join, so the frontend renders without re-deriving any of it.
Out of scope
wire model already carries
templateFileandsourceLocation, but nonavigation UI yet.
frontend (from my monitor, so text looks small):

Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license