mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
fix(ui): resolve explorer redesign merge blockers
This commit is contained in:
@@ -102,11 +102,14 @@ export function DecisionWorkspace() {
|
||||
fetch("/api/decisions", { signal: ctrl.signal })
|
||||
.then((r) => r.ok ? r.json() : Promise.reject(r.status))
|
||||
.then((data) => {
|
||||
if (ctrl.signal.aborted) return;
|
||||
setDecisions(data);
|
||||
if (data.length > 0) void loadChain(data[0]);
|
||||
})
|
||||
.catch((e) => { if (e?.name !== "AbortError") console.error(e); })
|
||||
.finally(() => setListLoading(false));
|
||||
.finally(() => {
|
||||
if (!ctrl.signal.aborted) setListLoading(false);
|
||||
});
|
||||
return () => ctrl.abort();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
@@ -286,7 +286,7 @@ export function AlignmentsTab() {
|
||||
</div>
|
||||
</div>
|
||||
<button style={primaryButtonStyle} disabled={busy} onClick={handleSave}>
|
||||
{busy ? <Loader2 size={14} className="spin" /> : <GitMerge size={14} />}
|
||||
{busy ? <Loader2 size={14} className="ws-spin" /> : <GitMerge size={14} />}
|
||||
Save alignment
|
||||
</button>
|
||||
</section>
|
||||
|
||||
@@ -82,7 +82,7 @@ export function HealthTab({ onFixInEditor }: HealthTabProps) {
|
||||
{error ? <div style={errorStyle}>{error}</div> : null}
|
||||
|
||||
{loading ? (
|
||||
<div style={loadingStyle}><Loader2 size={18} className="spin" /> Computing health dashboard...</div>
|
||||
<div style={loadingStyle}><Loader2 size={18} className="ws-spin" /> Computing health dashboard...</div>
|
||||
) : health ? (
|
||||
<>
|
||||
<section style={{ ...scoreGridStyle, gridTemplateColumns: `220px repeat(${health.dimensions.length}, minmax(180px, 1fr))` }}>
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
BookOpen,
|
||||
CheckCircle2,
|
||||
ExternalLink,
|
||||
GitMerge,
|
||||
Layers,
|
||||
Loader2,
|
||||
Plus,
|
||||
|
||||
@@ -254,7 +254,7 @@ export function ShaclStudio({ onJumpToNode }: ShaclStudioProps) {
|
||||
<div style={{ display: "flex", gap: 8 }}>
|
||||
<button style={secondaryButtonStyle} disabled={loading} onClick={handleGenerate}><Wand2 size={14} /> Generate strict</button>
|
||||
<button style={primaryButtonStyle} disabled={loading || !shacl.trim()} onClick={handleValidate}>
|
||||
{loading ? <Loader2 size={14} className="spin" /> : <Play size={14} />}
|
||||
{loading ? <Loader2 size={14} className="ws-spin" /> : <Play size={14} />}
|
||||
Validate
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -160,7 +160,7 @@ test("summarizeDistanceBuckets reports local rings and outside count", () => {
|
||||
anchor: 1,
|
||||
oneHop: 1,
|
||||
twoHop: 1,
|
||||
threeHop: 1,
|
||||
threeHopPlus: 1,
|
||||
outside: 2,
|
||||
});
|
||||
});
|
||||
@@ -193,11 +193,11 @@ test("buildHeatmapRenderSnapshot caps and deterministically samples large rings"
|
||||
assert.equal(firstSnapshot.ringCounts.anchor, 1);
|
||||
assert.equal(firstSnapshot.ringCounts.oneHop, 130);
|
||||
assert.equal(firstSnapshot.ringCounts.twoHop, 700);
|
||||
assert.equal(firstSnapshot.ringCounts.threeHop, 950);
|
||||
assert.equal(firstSnapshot.ringCounts.threeHopPlus, 950);
|
||||
assert.equal(firstSnapshot.renderedRingCounts.anchor, 1);
|
||||
assert.equal(firstSnapshot.renderedRingCounts.oneHop, 120);
|
||||
assert.equal(firstSnapshot.renderedRingCounts.twoHop, 650);
|
||||
assert.equal(firstSnapshot.renderedRingCounts.threeHop, 900);
|
||||
assert.equal(firstSnapshot.renderedRingCounts.threeHopPlus, 900);
|
||||
assert.equal(firstSnapshot.saturationMode, "sampled");
|
||||
assert.deepEqual(firstSnapshot.visibleNodeIds, secondSnapshot.visibleNodeIds);
|
||||
assert.ok(firstSnapshot.visibleNodeIds.includes("anchor"));
|
||||
@@ -233,7 +233,7 @@ test("resolveDistanceNodeStyle applies readable heatmap rings only when ready",
|
||||
anchor: 1,
|
||||
oneHop: 1,
|
||||
twoHop: 1,
|
||||
threeHop: 1,
|
||||
threeHopPlus: 1,
|
||||
outside: 1,
|
||||
},
|
||||
});
|
||||
@@ -268,7 +268,7 @@ test("resolveDistanceNodeStyle compresses saturated heatmap far rings", () => {
|
||||
anchor: 1,
|
||||
oneHop: 32,
|
||||
twoHop: 3350,
|
||||
threeHop: 7412,
|
||||
threeHopPlus: 7412,
|
||||
outside: 3280,
|
||||
},
|
||||
});
|
||||
@@ -295,14 +295,14 @@ test("resolveDistanceNodeStyle mutes unsampled heatmap nodes instead of coloring
|
||||
anchor: 1,
|
||||
oneHop: 0,
|
||||
twoHop: 2,
|
||||
threeHop: 0,
|
||||
threeHopPlus: 0,
|
||||
outside: 0,
|
||||
},
|
||||
heatmapRenderedRingCounts: {
|
||||
anchor: 1,
|
||||
oneHop: 0,
|
||||
twoHop: 1,
|
||||
threeHop: 0,
|
||||
threeHopPlus: 0,
|
||||
outside: 0,
|
||||
},
|
||||
heatmapSaturationMode: "sampled",
|
||||
|
||||
Reference in New Issue
Block a user