[CHAIN] fix(ui): simplify attack paths graph interactions#11020
Merged
Alan-TheGentleman merged 13 commits intoPROWLER-1273/react-flow-migrationfrom May 8, 2026
Merged
Conversation
12 tasks
pfe-nazaries
reviewed
May 8, 2026
| .spyOn(harness.user, "click") | ||
| .mockRejectedValue(pointerError); | ||
| const domClickSpy = vi.spyOn(node, "click"); | ||
|
|
Contributor
There was a problem hiding this comment.
I think is overkill to test the test util / harness / page object model
pfe-nazaries
reviewed
May 8, 2026
| ? graphState.expandedResources.has(nodeAction.node.id) | ||
| : false; | ||
| try { | ||
| await finding.navigateToFinding(findingId); |
Contributor
There was a problem hiding this comment.
Optional: add catch block to log the error if you find value on it
pfe-nazaries
approved these changes
May 8, 2026
pfe-nazaries
approved these changes
May 8, 2026
d8bd77c to
544b9e4
Compare
f0c5621 to
a0826db
Compare
544b9e4 to
a505e10
Compare
Base automatically changed from
PROWLER-1273/attack-path-layout-highlights
to
PROWLER-1273/react-flow-migration
May 8, 2026 12:57
- Drop the repeated page heading from the query builder view - Add a regression test for the review feedback - Remove an unused icon import blocking UI lint checks
The Attack Path graph now re-fits its viewport when the user enters
the filtered view (click on a finding) or returns to the full graph
("Back to Full View"), so the focused subgraph and the restored
full graph are always centered instead of leaving the viewport
pointing at the previous coordinates. Resource expansion no longer
re-fits — the initial fit already includes hidden findings, so newly
revealed nodes sit inside the framing the user already has.
The minimap viewport indicator (mask cut-out) is darkened and given
a thicker border to stand out against the dark theme, where it was
previously hard to see.
…ings Recover the expand-time auto-fit lost while smoothing the filter fix. Hidden findings are not measured by React Flow on initial render, so `fitViewOptions.includeHiddenNodes` cannot extend the initial viewport to cover them — clicking a resource that has its findings laid out beyond the framed area would leave the user with empty space and no way to discover the newly revealed nodes. The expand-fit only fires for resources that just transitioned from collapsed to expanded, and only when at least one of the connected findings sits entirely past the current viewport (full bounding box beyond the edge). Partially clipped edge nodes are left alone so the framing the user already has is preserved when nothing has actually moved off-screen. Auto-fits now use asymmetric padding (extra room on the right and bottom) to keep the minimap clear after a fit. Without it, fitted nodes could land underneath the bottom-right minimap and become unclickable. The expand-without-re-fit test was a lock-in for the previous behaviour and is replaced with one asserting the new behaviour: expanding resources whose findings sit off-screen re-fits the viewport.
The Attack Path graph now re-fits its viewport when the user enters
the filtered view (click on a finding) or returns to the full graph
("Back to Full View"), so the focused subgraph and the restored
full graph are always centered instead of leaving the viewport
pointing at the previous coordinates. Resource expansion no longer
re-fits — the initial fit already includes hidden findings, so newly
revealed nodes sit inside the framing the user already has.
The minimap viewport indicator (mask cut-out) is darkened and given
a thicker border to stand out against the dark theme, where it was
previously hard to see.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ings Recover the expand-time auto-fit lost while smoothing the filter fix. Hidden findings are not measured by React Flow on initial render, so `fitViewOptions.includeHiddenNodes` cannot extend the initial viewport to cover them — clicking a resource that has its findings laid out beyond the framed area would leave the user with empty space and no way to discover the newly revealed nodes. The expand-fit only fires for resources that just transitioned from collapsed to expanded, and only when at least one of the connected findings sits entirely past the current viewport (full bounding box beyond the edge). Partially clipped edge nodes are left alone so the framing the user already has is preserved when nothing has actually moved off-screen. Auto-fits now use asymmetric padding (extra room on the right and bottom) to keep the minimap clear after a fit. Without it, fitted nodes could land underneath the bottom-right minimap and become unclickable. The expand-without-re-fit test was a lock-in for the previous behaviour and is replaced with one asserting the new behaviour: expanding resources whose findings sit off-screen re-fits the viewport. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Restore supported graph scroll zoom behavior - Add node action selector for ambiguous resource clicks - Open finding and node details in existing drawers - Cover resource actions with browser tests
- Reuse shared measured-fit scheduling for graph viewport updates - Consolidate node action dialog state - Tighten browser harness dialog detection
- preserve graph edges and hidden-finding visibility rules - align workflow scripts and graph legend behavior - strengthen browser and unit regressions for graph flows
- remove graph node action and details flows - toggle findings directly from resource clicks - keep finding details as the only graph detail view
a0826db to
983237d
Compare
ddee0ef
into
PROWLER-1273/react-flow-migration
3 checks passed
Alan-TheGentleman
added a commit
that referenced
this pull request
May 8, 2026
Co-authored-by: Pablo F.G <pablo.fernandez@prowler.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
🔗 Part of Chained PRs
PROWLER-1273/react-flow-migrationChain Overview
Context
Final interaction-hardening slice for the Attack Paths React Flow migration chain tracked by #10686. This PR builds on #11017 and focuses on dynamic finding layout, graph correctness regressions, and a simplified click model.
Description
Changes:
Steps to review
Commit hooks also passed TypeScript, ESLint, unit tests, and UI build for the latest commits.
Checklist
Community Checklist
UI
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.