Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/screenshots/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/pull-requests.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/loadpath/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap" rel="stylesheet" />
<script type="module" crossorigin src="./assets/index-5LvtBaA5.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-YwQandBA.css">
<script type="module" crossorigin src="./assets/index-gOpwxVBZ.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DA_Qg5fM.css">
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/test_ui_screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ def test_ui_review_graph_prs_settings(live_app, tmp_path: Path):
page.get_by_test_id("tab-graph").click()
page.get_by_test_id("graph-full").wait_for()
page.locator(".react-flow__node").first.wait_for(timeout=15_000)
page.locator(".react-flow__minimap-node").first.wait_for(timeout=10_000)
assert page.locator(".react-flow__minimap-node").count() > 3
page.wait_for_timeout(600)
page.screenshot(path=str(dest / "graph.png"), full_page=False)

Expand Down
20 changes: 19 additions & 1 deletion ui/src/ImpactGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function LoadNode({ data, selected }: { data: { name: string; type: string }; se
}

const nodeTypes = { load: LoadNode };
const NODE_WIDTH = 180;
const NODE_HEIGHT = 56;

export function ImpactGraph({ nodes, edges }: { nodes: GraphNode[]; edges: GraphEdge[] }) {
const [selectedId, setSelectedId] = useState<string | null>(null);
Expand All @@ -43,6 +45,10 @@ export function ImpactGraph({ nodes, edges }: { nodes: GraphNode[]; edges: Graph
position: pos.get(n.id) ?? { x: 0, y: 0 },
data: { name: n.name, type: n.type, file: n.file_path },
selected: selectedId === n.id,
// MiniMap reads width/height off the user node, not the measured DOM box.
width: NODE_WIDTH,
height: NODE_HEIGHT,
style: { width: NODE_WIDTH, height: NODE_HEIGHT },
}));
const rfEdges: Edge[] = edges
.filter((e) => byId.has(e.src) && byId.has(e.dst))
Expand Down Expand Up @@ -84,7 +90,19 @@ export function ImpactGraph({ nodes, edges }: { nodes: GraphNode[]; edges: Graph
data-testid="impact-graph"
>
<Background />
<MiniMap pannable zoomable />
<MiniMap
pannable
zoomable
ariaLabel="Impact graph overview"
nodeColor="var(--muted)"
nodeStrokeColor="transparent"
nodeStrokeWidth={0}
maskColor="rgba(0, 0, 0, 0.45)"
maskStrokeColor="var(--accent)"
maskStrokeWidth={1.4}
bgColor="var(--graph-bg)"
style={{ width: 184, height: 128 }}
/>
<Controls />
</ReactFlow>
</ReactFlowProvider>
Expand Down
24 changes: 22 additions & 2 deletions ui/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,24 @@ kbd {
linear-gradient(90deg, var(--graph-grid) 1px, transparent 1px);
background-size: 24px 24px;
}
.react-flow__minimap { background: var(--surface) !important; }
.react-flow__minimap {
background: var(--graph-bg) !important;
border: 1px solid var(--line) !important;
border-radius: var(--radius);
overflow: hidden;
box-shadow: 0 8px 24px var(--shadow);
}
.react-flow__minimap-node {
fill: var(--muted);
stroke: none;
}
.react-flow__minimap-node.selected {
fill: var(--accent);
}
.react-flow__minimap-mask {
fill: rgba(0, 0, 0, 0.45) !important;
stroke: var(--accent) !important;
}
.react-flow__controls { box-shadow: none !important; }
.react-flow__controls-button {
background: var(--surface) !important;
Expand Down Expand Up @@ -881,8 +898,11 @@ h2 { font-size: 13px; margin: 0; font-weight: 600; }
border-radius: var(--radius);
border: 1px solid var(--node-line);
background: var(--node-bg);
min-width: 168px;
width: 180px;
height: 56px;
box-sizing: border-box;
box-shadow: 0 0 0 1px var(--shadow);
overflow: hidden;
}
.lp-node .t { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.lp-node .n { font-size: 13px; font-weight: 600; }
Expand Down
Loading