Rework Graph page: node cards, key, toolbar bar and details card
CI / integration (push) Successful in 12s
CI / check (push) Successful in 15s

- Custom graph nodes with identity kind tags and per-column colours; wider
  text, styled edge labels, "full access" for everything grants.
- Filters, refresh and the key share one bar above the canvas.
- Details card restructured into sections with capability chips, a collapsible
  policy HCL and a red Revoke button; shared CapabilityChips component.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mattandClaude Sonnet 5.5 committed 2026-10-20 12:16:02 +01:00
1 parent 68e564eb6c
commit d67a9c9b62
7 files changed
+441 -110

No files matched your search

+234 -27
View File
@@ -23,6 +23,11 @@
--warn: light-dark(#8a5a00, #f2c14e);
--warn-soft: light-dark(#fff4d6, #3a2d0c);
/* Graph node kinds. */
--node-identity: light-dark(#2a6fdb, #6ea8ff);
--node-policy: light-dark(#7a4bc2, #b794f4);
--node-path: light-dark(#0b7a6e, #3cc2af);
--font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
--mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
@@ -263,13 +268,15 @@ button[type='submit']:hover:not(:disabled) {
/* Destructive actions. */
button[aria-label^='Delete'],
button[aria-label^='Revoke'],
button[aria-label^='Remove'] {
button[aria-label^='Remove'],
button.danger {
color: var(--danger);
}
button[aria-label^='Delete']:hover:not(:disabled),
button[aria-label^='Revoke']:hover:not(:disabled),
button[aria-label^='Remove']:hover:not(:disabled) {
button[aria-label^='Remove']:hover:not(:disabled),
button.danger:hover:not(:disabled) {
background: var(--danger-soft);
border-color: var(--danger);
}
@@ -613,40 +620,92 @@ td:last-child button + button {
/* ---------- Graph ---------- */
/* One bar above the canvas: filters and refresh on top, the key underneath. */
.graph-bar {
display: grid;
gap: var(--s3);
margin-bottom: var(--s3);
padding: var(--s3) var(--s4);
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
}
.graph-toolbar {
display: flex;
flex-wrap: wrap;
gap: var(--s4);
gap: var(--s3) var(--s4);
align-items: flex-end;
margin-bottom: var(--s3);
}
.graph-toolbar label:not(.check) {
display: grid;
gap: var(--s1);
color: var(--ink-soft);
font-size: var(--text-sm);
font-weight: 500;
}
.graph-toolbar input:not([type='checkbox']) {
width: 15rem;
}
.graph-toolbar .check {
min-height: 2.25rem;
}
.graph-toolbar button {
margin-left: auto;
min-height: 2.25rem;
}
.graph-legend {
display: flex;
gap: var(--s5);
margin-bottom: var(--s2);
flex-wrap: wrap;
align-items: center;
gap: var(--s2) var(--s5);
margin: 0;
padding: var(--s3) 0 0;
border-top: 1px solid var(--line);
list-style: none;
color: var(--ink-faint);
font-size: var(--text-sm);
}
.graph-legend .grow {
margin-left: auto;
}
.swatch {
display: inline-block;
width: 0.6rem;
height: 0.6rem;
margin-right: var(--s1);
border-radius: 2px;
background: var(--node-colour);
}
.swatch-identity {
--node-colour: var(--node-identity);
}
.swatch-policy {
--node-colour: var(--node-policy);
}
.swatch-path {
--node-colour: var(--node-path);
}
.graph-layout {
display: grid;
grid-template-columns: 1fr 22rem;
grid-template-columns: minmax(0, 1fr) 22rem;
gap: var(--s4);
}
.graph-canvas {
height: 70vh;
height: calc(100vh - 21rem);
min-height: 28rem;
background: var(--surface-sunken);
border: 1px solid var(--line);
border-radius: var(--radius);
@@ -654,40 +713,188 @@ td:last-child button + button {
}
.graph-details {
max-height: calc(100vh - 21rem);
overflow: auto;
max-height: 70vh;
padding: var(--s4) var(--s5);
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
}
.gnode {
width: 300px;
font-size: 12px;
border-width: 2px;
.detail-head {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: var(--s2);
margin-bottom: var(--s2);
}
.gnode-identity {
border-color: #2d7ff9;
.detail-head h2,
.graph-details h2 {
margin: 0;
font-size: var(--text-lg);
overflow-wrap: anywhere;
}
.gnode-policy {
border-color: #8e44ad;
}
.gnode-managed {
border-style: solid;
.graph-details h3 {
margin: var(--s5) 0 var(--s2);
color: var(--ink-soft);
font-size: var(--text-sm);
font-weight: 600;
}
.gnode-missing {
border-style: dashed;
opacity: 0.7;
.graph-details p {
margin: 0 0 var(--s2);
}
.graph-details code {
overflow-wrap: anywhere;
}
.detail-empty {
padding: var(--s6) var(--s3);
color: var(--ink-faint);
text-align: center;
}
.edge-to {
color: var(--ink-soft);
}
/* Label/value rows: one entry per line, hairline between. */
.rows,
.people {
margin: 0;
padding: 0;
list-style: none;
}
.rows > li {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--s1) var(--s3);
padding: var(--s2) 0;
border-bottom: 1px solid var(--line);
}
.rows > li:last-child {
border-bottom: 0;
}
.rows > li.stacked {
display: block;
}
.row-main {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--s1) var(--s3);
}
.people {
margin-top: var(--s1);
padding-left: var(--s3);
}
.people li {
padding: 1px 0;
}
.graph-details details {
margin-top: var(--s5);
}
.graph-details summary {
color: var(--accent);
cursor: pointer;
}
.graph-details pre {
margin: var(--s2) 0 0;
}
.note-warn {
padding: var(--s2) var(--s3);
background: var(--warn-soft);
border-radius: var(--radius);
color: var(--warn);
font-size: var(--text-sm);
}
/* Nodes. The wrapper carries state classes; the card is what you see. */
.gnode {
--node-colour: var(--ink-faint);
width: 260px;
}
.gnode-identity {
--node-colour: var(--node-identity);
}
.gnode-policy {
--node-colour: var(--node-policy);
}
.gnode-path {
border-color: #27ae60;
--node-colour: var(--node-path);
}
.gnode-selected {
box-shadow: 0 0 0 3px var(--warn);
.gnode-card {
display: flex;
align-items: baseline;
gap: var(--s2);
padding: var(--s2) var(--s3);
background: var(--surface);
color: var(--ink);
border: 1px solid var(--line-strong);
border-left: 4px solid var(--node-colour);
border-radius: var(--radius);
font-size: 14px;
line-height: 1.3;
}
.gnode-path .gnode-label {
font-family: var(--mono);
font-size: 13px;
}
.gnode-label {
overflow-wrap: anywhere;
}
.gnode-kind {
flex: none;
padding: 0 var(--s2);
background: var(--surface-sunken);
border-radius: 999px;
color: var(--ink-soft);
font-size: 11px;
}
.gnode-managed .gnode-label {
font-weight: 650;
}
.gnode-missing .gnode-card {
border-style: dashed;
border-left-style: solid;
opacity: 0.75;
}
.gnode-selected .gnode-card {
box-shadow: 0 0 0 2px var(--accent);
}
/* Handles anchor the edges but aren't interactive. */
.gnode-card .react-flow__handle {
width: 1px;
height: 1px;
min-width: 0;
min-height: 0;
opacity: 0;
border: 0;
}
@media (max-width: 48rem) {