Polish topology canvas chrome and toolbar text clipping.

Remove the edge legend and React Flow attribution, and fix layout/align select padding so Chinese labels render fully.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-01 17:52:39 +08:00
parent fce6e2cc9e
commit cb865254e4
2 changed files with 17 additions and 31 deletions

View file

@ -2293,6 +2293,7 @@ export function TopologyPage() {
nodeTypes={nodeTypes}
connectionMode={ConnectionMode.Loose}
defaultEdgeOptions={{ type: "straight" }}
proOptions={{ hideAttribution: true }}
nodesDraggable={toolBehavior.nodesDraggable}
nodesConnectable={toolBehavior.nodesConnectable}
elementsSelectable={toolBehavior.elementsSelectable}
@ -2370,30 +2371,6 @@ export function TopologyPage() {
</ControlButton>
</Controls>
<MiniMap pannable zoomable />
<div className="topo-legend" aria-hidden="true">
{(
[
["manual", t("topology.edgeManual")],
["discovered", t("topology.edgeDiscovered")],
["stale", t("topology.edgeStale")],
] as const
).map(([kind, label]) => {
const d = edgeDefaults[kind];
return (
<span key={kind} className="topo-legend__item">
<span
className="topo-legend__swatch"
style={{
borderTopColor: d.stroke_color,
borderTopWidth: Math.max(1, Math.min(4, d.stroke_width)),
borderTopStyle: d.line_style === "solid" ? "solid" : "dashed",
}}
/>
{label}
</span>
);
})}
</div>
</ReactFlow>
</TopoDisplayContext.Provider>
) : (