Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

fix(explorer): label the graph view control "Focus" (#1552)

Wei Tao9d93a8084068
diff --git a/explorer/src/workspaces/GraphWorkspace/GraphInspectorPanel.tsx b/explorer/src/workspaces/GraphWorkspace/GraphInspectorPanel.tsx
index 2d12407b..0a8113a2 100644
--- a/explorer/src/workspaces/GraphWorkspace/GraphInspectorPanel.tsx
+++ b/explorer/src/workspaces/GraphWorkspace/GraphInspectorPanel.tsx
@@ -346,7 +346,7 @@ export function GraphInspectorPanel({
<div style={{ color: GRAPH_THEME.ui.text.strong, fontWeight: 600, marginBottom: 6 }}>Selected item is not directly inspectable in the current graph.</div>
<div style={{ color: GRAPH_THEME.ui.text.body, fontSize: 13, lineHeight: 1.6 }}>
{canActivateFocused
- ? "Activate Focused mode to resolve this grouped selection to its canonical node."
+ ? "Use Focus to resolve this grouped selection to its canonical node."
: (focusedUnavailableReason ?? "Focused mode is unavailable for the current selection.")}
</div>
</div>
diff --git a/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx b/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx
index 872d961c..b8a0517a 100644
--- a/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx
+++ b/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx
@@ -2791,7 +2791,7 @@ export function GraphWorkspace({ externalFocusNodeId, externalFocusToken, onDirt
},
{
id: "view-focused",
- label: "Focused",
+ label: "Focus",
title: canActivateFocusedMode
? "Inspect the selected node in a focused local graph"
: (focusedSelectionResolution.reason ?? "Focused mode is unavailable for the current selection"),
diff --git a/explorer/tests/graphColorLegend.e2e.ts b/explorer/tests/graphColorLegend.e2e.ts
index db57631a..cc0c1f49 100644
--- a/explorer/tests/graphColorLegend.e2e.ts
+++ b/explorer/tests/graphColorLegend.e2e.ts
@@ -101,7 +101,9 @@ test("visible legend follows loaded data, reloads, focused views, and distance m
await heatmap.click();
await legend.waitFor();
await assertLegendMatchesGraph(page);
- await page.getByRole("button", { name: "Focused", exact: true }).click();
+ const focusButton = page.getByRole("button", { name: "Focus", exact: true });
+ assert.equal(await focusButton.isDisabled(), false, "Focus is enabled once a node is selected");
+ await focusButton.click();
await legend.getByText("Document", { exact: true }).waitFor({ state: "hidden" });
await assertLegendMatchesGraph(page, ["alice", "acme", "research"]);
assert.equal(await legend.getByText("Researcher", { exact: true }).count(), 1);