From e151fd5ccca0a07ecd08ab1862b136f4800a0c49 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Fri, 20 Mar 2026 01:16:42 +0000 Subject: [PATCH] Flatten investigation context rows --- .../internal/subsystems/unified-resources.md | 8 +- .../Infrastructure/ResourceDetailDrawer.tsx | 208 +++++++++--------- .../ResourceDetailDrawer.history.test.tsx | 5 + 3 files changed, 111 insertions(+), 110 deletions(-) diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md index f31319fd4..0a9a118bc 100644 --- a/docs/release-control/v6/internal/subsystems/unified-resources.md +++ b/docs/release-control/v6/internal/subsystems/unified-resources.md @@ -249,8 +249,12 @@ inside a collapsed `Investigation context` disclosure, so runtime status and identity stay primary while secondary AI and policy signals remain available without competing with the first-screen monitoring story. Inside that disclosure, the AI intelligence summary now reads as compact -label/value rows instead of metric tiles, so the opened investigation surface -stays scan-first before the change summary and correlation reveal appear. +label/value rows instead of metric tiles or nested cards, so the opened +investigation surface stays scan-first before the change summary and +correlation reveal appear. +Inside that disclosure, the governance summary also stays label-first with +compact rows and badges instead of a second card stack, so policy detail reads +as supporting context rather than another dashboard. Inside that disclosure, learned dependency and correlation detail now sits behind its own reveal instead of rendering at full depth immediately, so the opened investigation surface stays label-first and leaves relationship pattern diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx index 6d97abd7e..59fc29ea7 100644 --- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx +++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx @@ -1827,131 +1827,123 @@ const DrawerContent: Component = (props) => { showLabel="Show context" hideLabel="Hide context" class="mt-3 rounded border border-border bg-surface p-3" - contentClass="mt-3 grid gap-3 md:grid-cols-2" + contentClass="mt-3 space-y-3" dataTestId="resource-investigation-context" > {(intel) => ( -
-
- AI Intelligence +
+
+ AI Intelligence
-
-
- Health - - {intel().health.grade} · {Math.round(intel().health.score)}/100 - -
-
- Trend - - {intel().health.trend} - -
-
- Notes - {intel().note_count} -
+
+ Health + + {intel().health.grade} · {Math.round(intel().health.score)}/100 +
-
- - -
-
-
-
- Correlation context -
+
+ Trend + + {intel().health.trend} + +
+
+ Notes + {intel().note_count} +
+ + +
+
+
+
+ Correlation context
-
- - -
- -
-
+
- -
+ + +
+ +
+
+
+
)} -
-
- Data Governance +
+
+ Data Governance
-
- -
-
Sensitivity
-
- {getResourceSensitivityLabel(props.resource.policy?.sensitivity)} -
+ +
+ Sensitivity + + {getResourceSensitivityLabel(props.resource.policy?.sensitivity)} + +
+
+ Routing + + {getResourceRoutingScopeLabel(props.resource.policy?.routing.scope)} + +
+
+ 0 || governanceSummary()}> +
+ Redactions + + {policyRedactions().length} + +
+
+ 0}> +
+ Redaction labels +
+ + {(label) => ( + + {label} + + )} +
-
-
Routing
-
- {getResourceRoutingScopeLabel(props.resource.policy?.routing.scope)} -
+
+ + +
+ AI-Safe Summary +
+ {governanceSummary()}
- - 0 || governanceSummary()}> -
-
Redactions
-
- {policyRedactions().length} -
-
-
-
-
- 0}> -
- Redaction labels -
- - {(label) => ( - - {label} - - )} - -
-
-
- -
- AI-Safe Summary -
- {governanceSummary()} -
-
-
-
+
+
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx index 22d5933e2..8e9db9f4e 100644 --- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx +++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx @@ -245,6 +245,11 @@ describe('ResourceDetailDrawer change history section', () => { fireEvent.click(screen.getByRole('button', { name: 'Show context' })); await screen.findByText('AI Intelligence'); + expect( + screen + .getByTestId('resource-investigation-context') + .querySelectorAll('.rounded.border.border-border.bg-surface.p-3').length, + ).toBe(0); expect(screen.getByText('Health')).toBeInTheDocument(); expect(screen.getByText('A · 92/100')).toBeInTheDocument(); expect(screen.getByText('Trend')).toBeInTheDocument();