diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9ee07940a..63b872543 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,8 @@
### Fixed
+- Keep indexing visible while an existing workspace republishes its index. Overview tables now keep readable columns, Members spans the page, and crowded maps stay compact. Cards have space below the view tabs, and graph nodes are easier to hover and select.
+
- Windows harness shutdown accepts an already-reaped child while retaining errors for a child that has not exited.
- Compounding reports early subprocess rejections instead of crashing with a broken-pipe error.
- `rzm init` preserves custom and edited command files, and previews and reports removal of unmodified generated commands.
diff --git a/DESIGN.md b/DESIGN.md
index 210fb848f..63edf3739 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -419,7 +419,7 @@ The canvas uses neutral grid depth, typed cards, type-palette relation lines, an
### Graphs and Maps
-Every graph surface (the overview maps, the Atlas, and Explorer) follows the same rules. Essential edges and outlines use `--type-8` or `--link`, which clear 3:1 in both appearances. Labels sit on their own layer above nodes and edges with a 4px surface-coloured halo, placed clear of other nodes and labels, and nodes keep 24px inside the plot. Overview maps cap at 280px so the Members table stays in view, give each member type its own hue (matching the Members dots), put edge counts where no other edge crosses, and state the expand hint once. Explorer opens at folder level (folders sized by what they hold and coloured by their most common type; very large folders open into subfolders and small ones fold into one node under their parent). Its root graph follows folder containment from the vault at the centre; cross-folder links appear on hover with counts and never drive layout. Selecting a folder focuses the graph and sidebar without opening a right panel; files keep their detail panel and use the sidebar’s current outline file icons. Explorer drops node radii to 2–3px with the hovered neighbourhood emphasised, shows edge labels only on hover or match, keeps its grouped legend (Notes by type, Code, Folders) and banner outside the canvas, and shows a loading state until the first draw; a drawn graph sets `data-graph-ready="true"` on its container (also when there is nothing to draw), which the screenshot tooling waits on.
+Every graph surface (the overview maps, the Atlas, and Explorer) follows the same rules. Essential edges and outlines use `--type-8` or `--link`, which clear 3:1 in both appearances. Labels sit on their own layer above nodes and edges with a 4px surface-coloured halo, placed clear of other nodes and labels, and nodes keep 24px inside the plot. Overview maps are 260px tall and grow by at most 120px for labels, so the Members table stays in view, give each member type its own hue (matching the Members dots), put edge counts where no other edge crosses, and state the expand hint once. Explorer opens at folder level (folders sized by what they hold and coloured by their most common type; very large folders open into subfolders and small ones fold into one node under their parent). Its root graph follows folder containment from the vault at the centre; cross-folder links appear on hover with counts and never drive layout. Selecting a folder focuses the graph and sidebar without opening a right panel; files keep their detail panel and use the sidebar’s current outline file icons. Explorer drops node radii to 2–3px with the hovered neighbourhood emphasised, shows edge labels only on hover or match, keeps its grouped legend (Notes by type, Code, Folders) and banner outside the canvas, and shows a loading state until the first draw; a drawn graph sets `data-graph-ready="true"` on its container (also when there is nothing to draw), which the screenshot tooling waits on.
### Custom Views
diff --git a/docs/specs/experience/scope-overview.md b/docs/specs/experience/scope-overview.md
index 911810a63..0c6f714d6 100644
--- a/docs/specs/experience/scope-overview.md
+++ b/docs/specs/experience/scope-overview.md
@@ -3,7 +3,7 @@ type: ExperienceSpec
id: SPEC-0117
summary: "One Overview view shows the shape of All notes and of every display group: a type-level link map, a member table, and scope-only blocks. Briefing shows activity at every level, All notes gains one, and every block loads on its own so switching scopes never freezes the workspace."
spec-status: active
-last-updated: 2026-11-04
+last-updated: 2026-11-06
last-verified: 2026-11-04 # Round 7
aliases:
- SPEC-0117
@@ -161,7 +161,7 @@ This spec revises [[group-views-and-view-platform|SPEC-0111]], whose Briefing lo
- MUST remember the map/matrix toggle per scope and the expanded groups at All notes through the kit's view preferences ([[view-preferences|SPEC-0114]]).
- MUST add a kit host action, `openSearch({ folder })`, that opens a project search tab with the existing folder filter, for US4's folder action. The rail's note-list filter stays private to the rail.
- MUST give map nodes keyboard focus in descending record-count order, activation with Enter or Space, and accessible names, and keep the Matrix a complete text alternative.
-- MUST use the kit's theme tokens and stay dense: hairline dividers, Inter numbers with tabular figures, no cards inside cards. Descriptive section help belongs in the heading's title and accessible description; only computed judgements such as "Review suggested" keep an info icon. Briefing and Overview share their centred column with the header and presentation tabs (about 1320px and 1520px respectively). Overview places Members below the compact map (capped at 280px), uses solid relation links and dashed plain links, and legends only the link kinds drawn. Unused declared relations retain their separate dashed hairline treatment. The page MUST fit without horizontal scrolling at 1280px with the rail open, and the member table SHOULD begin above the fold at 1440 by 1000.
+- MUST use the kit's theme tokens and stay dense: hairline dividers, Inter numbers with tabular figures, no cards inside cards. Descriptive section help belongs in the heading's title and accessible description; only computed judgements such as "Review suggested" keep an info icon. Briefing and Overview share their centred column with the header and presentation tabs (about 1320px and 1520px respectively). Overview places Members across the full width below the compact map (260px tall, growing by at most 120px when a crowded map needs room for labels), uses solid relation links and dashed plain links, and legends only the link kinds drawn. Unused declared relations retain their separate dashed hairline treatment. The page MUST fit without horizontal scrolling at 1280px with the rail open, and the member table SHOULD begin above the fold at 1440 by 1000.
- SHOULD reuse the Briefing building blocks, including the existing "Outside the group" list and the views-and-guide block, instead of duplicating them.
- SHOULD keep Overview's modules under about 500 lines each, like the other group views.
diff --git a/web/bundled-views/group/group.css b/web/bundled-views/group/group.css
index 75e31dbd3..c65c36b54 100644
--- a/web/bundled-views/group/group.css
+++ b/web/bundled-views/group/group.css
@@ -1495,12 +1495,6 @@
padding: 0 20px;
}
-/* All notes: Members sit under the map in the main column. */
-.gv-ov--workspace .gv-ov-main .gv-ov-members {
- margin: 4px -20px -16px;
- border-top: 1px solid var(--border);
-}
-
@media (min-width: 960px) {
.gv-ov {
grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
@@ -1512,7 +1506,7 @@
}
}
-/* The map. Its canvas takes the block's width and a 280px height, so labels draw
+/* The map. Its canvas takes the block's width and a 260-380px height, so labels draw
at their real size and the Members table starts above the fold. Edges and node
outlines clear 3:1 against the surface in both themes. */
.gv-map-canvas {
diff --git a/web/bundled-views/group/map-layout.ts b/web/bundled-views/group/map-layout.ts
index 60d247ce3..de9212452 100644
--- a/web/bundled-views/group/map-layout.ts
+++ b/web/bundled-views/group/map-layout.ts
@@ -455,16 +455,25 @@ function layoutAtSize(input: LayoutInput): MapLayout {
};
}
-/** Add room for crowded expansions rather than silently dropping their labels. */
+/**
+ * The most a crowded map grows to fit its labels. Every pass re-spreads the
+ * drawing over the taller box, so more height rarely fits more labels and
+ * instead strands weakly linked members far from the rest.
+ */
+const MAX_GROWTH = 120;
+
+/** Add some room for crowded expansions, keeping the shortest box that labels the most members. */
export function layoutMap(input: LayoutInput): MapLayout {
let result = layoutAtSize(input);
for (
- let attempt = 1;
- result.labels.size < result.positions.size && attempt <= result.positions.size;
- attempt++
+ let extra = 60;
+ result.labels.size < result.positions.size && extra <= MAX_GROWTH;
+ extra += 60
) {
- result = layoutAtSize({ ...input, height: input.height + attempt * 60 });
+ const taller = layoutAtSize({ ...input, height: input.height + extra });
+
+ if (taller.labels.size > result.labels.size) result = taller;
}
return result;
diff --git a/web/bundled-views/group/members.test.ts b/web/bundled-views/group/members.test.ts
index c344a3de3..1c4d8684b 100644
--- a/web/bundled-views/group/members.test.ts
+++ b/web/bundled-views/group/members.test.ts
@@ -497,3 +497,32 @@ it("fits a label wider than the canvas without adding height", () => {
expect(layout.labels.has("wide")).toBe(true);
expect(layout.height).toBe(260);
});
+
+it("keeps a crowded map near its height when its labels cannot all fit", () => {
+ // Shaped like a large vault: a dense, fully linked core and one member with a single link.
+ const core = Array.from({ length: 11 }, (_, index) => ({
+ id: `T${index}`,
+ radius: index ? 6 + index : 30,
+ label: `Member type ${index}\n${(index + 1) * 37} notes`,
+ }));
+
+ const edges = core.flatMap((a, i) =>
+ core.slice(i + 1).map((b, j) => ({
+ a: a.id,
+ b: b.id,
+ links: (i + j) * 13 + 1,
+ label: { key: `${a.id}|${b.id}`, text: String((i + j) * 13 + 1) },
+ })),
+ );
+
+ const input: LayoutInput = {
+ width: 560,
+ height: 260,
+ nodes: [...core, { id: "Leaf", radius: 5, label: "Coaching\n1 note" }],
+ edges: [...edges, { a: "T0", b: "Leaf", links: 1, label: { key: "T0|Leaf", text: "1" } }],
+ outside: [],
+ };
+
+ // Growing to fit every label would make this map over 2,000px tall.
+ expect(layoutMap(input).height).toBeLessThanOrEqual(input.height + 120);
+});
diff --git a/web/bundled-views/group/overview-style.css b/web/bundled-views/group/overview-style.css
index 86bcafbac..f55f14025 100644
--- a/web/bundled-views/group/overview-style.css
+++ b/web/bundled-views/group/overview-style.css
@@ -131,11 +131,15 @@
.gv-ov-side > .rz-section {
margin-top: 0;
}
-.gv-ov-members {
+/* A scroller must also be the containing block of the hidden .sr-only text in
+ its cells, or that text escapes the clip and widens the whole page. */
+.gv-ov-members,
+.gv-mx-wrap {
+ position: relative;
overflow-x: auto;
}
-.gv-ov--group > .gv-ov-members,
+.gv-ov > .gv-ov-members,
.gv-ov-below {
grid-column: 1 / -1;
border-top: 1px solid var(--border);
@@ -206,8 +210,10 @@
.gv-map-legend dd > span {
white-space: nowrap;
}
+/* Automatic layout: the fixed column widths below are minimums, so the name
+ column keeps its content's width instead of collapsing under the others. */
.gv-page .gv-ov-table {
- table-layout: fixed;
+ table-layout: auto;
width: 100%;
}
.gv-ov-table .gv-col-number {
@@ -224,7 +230,7 @@
}
.gv-page .gv-ov-table th,
.gv-page .gv-ov-table td {
- padding: 5px 8px;
+ padding: 5px 6px;
white-space: nowrap;
}
.gv-page .gv-ov-table th:first-child {
@@ -338,12 +344,19 @@
.gv-ov .gv-outside-actions .list-more {
margin: 0;
}
+/* Automatic layout, as in the member table: a long folder name widens its
+ column, and "links to" wraps in what is left. */
.gv-page .gv-ov-folders {
- table-layout: fixed;
+ table-layout: auto;
}
.gv-page .gv-ov-folders th:first-child {
width: 60px;
}
+.gv-ov-folders .gv-ov-folder {
+ max-width: 160px;
+ white-space: normal;
+ overflow-wrap: anywhere;
+}
.gv-page .gv-ov-folders th:nth-child(2) {
width: 58px;
}
diff --git a/web/bundled-views/group/overview.tsx b/web/bundled-views/group/overview.tsx
index d96a0ba96..be4ee435c 100644
--- a/web/bundled-views/group/overview.tsx
+++ b/web/bundled-views/group/overview.tsx
@@ -351,15 +351,10 @@ function OverviewPage({ scope }: { scope: Scope }) {
{!data.missing && (
<>
- {/* Group Members span both columns; All notes keeps its compact main column. */}
+ {/* Members span both columns, so the table has room for every column. */}
- {scope.kind === "workspace" && (
-
-
-
- )}
{scope.kind === "workspace" ? (
@@ -374,15 +369,13 @@ function OverviewPage({ scope }: { scope: Scope }) {
>
)}
+
+
+
{scope.kind === "group" && (
- <>
-
-
-
-
-
-
- >
+
+
+
)}
>
diff --git a/web/src/components/AppShell.test.tsx b/web/src/components/AppShell.test.tsx
index d6788fe96..97a7ac859 100644
--- a/web/src/components/AppShell.test.tsx
+++ b/web/src/components/AppShell.test.tsx
@@ -2,6 +2,7 @@ import { act, fireEvent, screen, waitFor } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { deferredReply, jsonReply, withFakeFetch } from "../test/fakeFetch";
import type { OntologyEditSessionResponse } from "../api/types";
+import { queryKeys } from "../api/queryKeys";
import { renderWithQueryClient as render } from "../test/renderWithQueryClient";
import { AppShell } from "./AppShell";
import type { DesktopCommand } from "./desktopHost";
@@ -201,6 +202,39 @@ describe("AppShell", () => {
expect(http.count("GET", "/api/v1/status")).toBe(1);
});
+ it.each([false, true])(
+ "shows index republication after startup (desktop=%s)",
+ async (desktop) => {
+ window.__RHIZOME_DESKTOP__ = desktop;
+
+ if (desktop) http.json("GET", "/api/tasks", {}, 404).json("GET", "/api/tasks/state", {}, 404);
+
+ statusReplies({ vaultName: "testvault", vaultPath: "/tmp/x", indexState: "ready" });
+ http.json("GET", "/api/v1/ontology/summary", {
+ schemaPresent: false,
+ totalNotes: 12,
+ rebuilding: true,
+ });
+
+ const { queryClient } = render();
+
+ try {
+ const banner = await screen.findByTestId("index-ready-banner");
+ expect(banner).toHaveTextContent("Updating index…");
+ await act(async () => {
+ queryClient.setQueryData(queryKeys.ontology.summary(), {
+ schemaPresent: false,
+ totalNotes: 12,
+ rebuilding: false,
+ });
+ });
+ await waitFor(() => expect(screen.queryByTestId("index-ready-banner")).toBeNull());
+ } finally {
+ delete window.__RHIZOME_DESKTOP__;
+ }
+ },
+ );
+
it("keeps one shared navigation shell while switching workspaces", async () => {
statusReplies({ vaultName: "testvault", vaultPath: "/tmp/x" });
diff --git a/web/src/components/AppShell.tsx b/web/src/components/AppShell.tsx
index 9afb10088..8775eab0a 100644
--- a/web/src/components/AppShell.tsx
+++ b/web/src/components/AppShell.tsx
@@ -295,6 +295,7 @@ export function AppShell() {
});
const status = statusQuery.data ?? null;
+ const summaryQuery = useOntologySummaryQuery(status !== null && !bareNote?.note);
const setStatus = (next: StatusResponse | null) =>
queryClient.setQueryData(queryKeys.status(), next);
@@ -415,7 +416,11 @@ export function AppShell() {
)}
-
+
{notesVisited || route === "notes" ? (
diff --git a/web/src/components/IndexReadyBanner.tsx b/web/src/components/IndexReadyBanner.tsx
index 0f6bf7e6c..d3eaf99f4 100644
--- a/web/src/components/IndexReadyBanner.tsx
+++ b/web/src/components/IndexReadyBanner.tsx
@@ -9,16 +9,19 @@ type IndexReadyBannerProps = {
// omit it and let this component own the fetch.
status?: StatusResponse | null;
onStatusChange?: (status: StatusResponse) => void;
+ rebuilding?: boolean;
};
// IndexReadyBanner renders a non-blocking "Preparing index…" affordance under
// the AppShell nav whenever `/api/v1/status` reports `indexState ===
-// "initializing"`. It hides as soon as status flips to `ready` (or on the
-// existing `index.changed` SSE invalidation event), so the gate transition
-// surfaces in the UI without forcing a manual refresh. Routes render normally
-// beneath the banner; gated endpoints surface their own in-pane loading
-// states until the backend gate opens.
-export function IndexReadyBanner({ status, onStatusChange }: IndexReadyBannerProps = {}) {
+// "initializing"`, or the shared ontology summary reports republication.
+// Startup readiness stays true during later indexing, so it cannot describe
+// whether the current index snapshot is available.
+export function IndexReadyBanner({
+ status,
+ onStatusChange,
+ rebuilding = false,
+}: IndexReadyBannerProps = {}) {
const controlled = status !== undefined;
const [fetchedState, setFetchedState] = useState(null);
const state = controlled ? (status?.indexState ?? null) : fetchedState;
@@ -80,7 +83,7 @@ export function IndexReadyBanner({ status, onStatusChange }: IndexReadyBannerPro
};
}, [controlled, onStatusChange, status]);
- if (state !== "initializing") return null;
+ if (state !== "initializing" && !rebuilding) return null;
return (
- Preparing index…
- First-launch reads will retry automatically.
+
+ {state === "initializing" ? "Preparing index…" : "Updating index…"}
+
+ {state === "initializing" && (
+
+ First-launch reads will retry automatically.
+
+ )}
);
}
diff --git a/web/src/components/sigmaLabels.ts b/web/src/components/sigmaLabels.ts
index 0e99ef80d..ea0d98c0f 100644
--- a/web/src/components/sigmaLabels.ts
+++ b/web/src/components/sigmaLabels.ts
@@ -86,6 +86,8 @@ export function createLabelPainter(
) {
let planned: Map | null = null;
const placed: Box[] = [];
+ /** Each node's drawn label this frame, so the label is a pointer target too. */
+ const drawn = new Map();
const widths = new Map();
const measure = (context: CanvasRenderingContext2D, text: string) => {
@@ -102,6 +104,7 @@ export function createLabelPainter(
const beginFrame = () => {
planned = null;
placed.length = 0;
+ drawn.clear();
};
/** Place every label this frame will draw, largest node first, clear of discs, labels, and edges. */
@@ -409,6 +412,7 @@ export function createLabelPainter(
}
if (!spot) return;
+ drawn.set(data.key, spot.box);
const [left, top, right, bottom] = spot.box;
const { label, canvas } = colors();
const endX = Math.max(left, Math.min(data.x, right));
@@ -490,5 +494,13 @@ export function createLabelPainter(
context.globalAlpha = 1;
};
- return { draw, beginFrame, occupied: () => placed };
+ /** The node whose drawn label covers the viewport point, if any. */
+ const labelAt = (x: number, y: number) => {
+ for (const [id, [left, top, right, bottom]] of drawn)
+ if (x >= left && x <= right && y >= top && y <= bottom) return id;
+
+ return null;
+ };
+
+ return { draw, beginFrame, labelAt, occupied: () => placed };
}
diff --git a/web/src/components/sigmaRenderer.ts b/web/src/components/sigmaRenderer.ts
index 96dd38853..6546b8885 100644
--- a/web/src/components/sigmaRenderer.ts
+++ b/web/src/components/sigmaRenderer.ts
@@ -38,6 +38,9 @@ const NodeImageProgram = createNodeImageProgram(
// back to enterNode/leaveNode events if a future Sigma drops it.
type NodePicker = (position: { x: number; y: number }) => string | null;
+/** How far outside a node's disc, in CSS pixels, the pointer still picks it. */
+const HIT_SLOP = 8;
+
export type ThemeColors = GraphColors & {
label: string;
edgeLabel: string;
@@ -304,7 +307,43 @@ export function mountSigmaRenderer({
const pickCandidate = sigma["getNodeAtPosition"];
- const picker: NodePicker | null = isNodePicker(pickCandidate) ? pickCandidate.bind(sigma) : null;
+ const exactPicker: NodePicker | null = isNodePicker(pickCandidate)
+ ? pickCandidate.bind(sigma)
+ : null;
+
+ // Explorer draws nodes at 2-3px, too small to hover or click by their pixels
+ // alone. A miss falls back to the node whose label is under the pointer, then
+ // to the nearest node within HIT_SLOP of its edge.
+ // ponytail: a linear scan per animation frame; index the points if graphs grow far past NODE_AVOID_ORDER.
+ const picker: NodePicker | null = exactPicker
+ ? (position) => {
+ const exact = exactPicker(position);
+
+ if (exact) return exact;
+ const label = labels.labelAt(position.x, position.y);
+
+ if (label) return label;
+ let nearest: string | null = null;
+ let gap: number = HIT_SLOP;
+
+ sigma.getGraph().forEachNode((id) => {
+ const data = sigma.getNodeDisplayData(id);
+
+ if (!data || data.hidden) return;
+ const point = sigma.framedGraphToViewport(data);
+
+ const distance =
+ Math.hypot(point.x - position.x, point.y - position.y) - sigma.scaleSize(data.size);
+
+ if (distance <= gap) {
+ nearest = id;
+ gap = distance;
+ }
+ });
+
+ return nearest;
+ }
+ : null;
const mouseCaptor = sigma.getMouseCaptor();
const mouseCanvas = sigma.getCanvases().mouse;
@@ -383,7 +422,10 @@ export function mountSigmaRenderer({
};
sigma.on("enterNode", ({ node }) => syncHoverNode(node));
- sigma.on("leaveNode", () => syncHoverNode(null));
+
+ // With a picker, pointer moves clear hover, so Sigma's pixel-exact leaveNode
+ // cannot drop a hover the wider target still holds.
+ if (!picker) sigma.on("leaveNode", () => syncHoverNode(null));
const clearHoverFrame = () => {
if (hoverFrameID === null) return;
@@ -439,15 +481,26 @@ export function mountSigmaRenderer({
camera.on("updated", onCameraUpdated);
- sigma.on("clickNode", ({ node, event }) => {
+ const clickNode = (node: string, original: MouseEvent | TouchEvent) => {
const attrs = sigma.getGraph().getNodeAttributes(node);
- const original = event.original;
const beside =
original instanceof MouseEvent && (original.metaKey || original.ctrlKey) ? true : false;
onNodeClickRef.current(graphNodeFromAttrs(node, attrs), { beside });
- });
+ };
+
+ sigma.on("clickNode", ({ node, event }) => clickNode(node, event.original));
+
+ // A click near a node, or on its label, opens it like a click on the node.
+ const clickNearbyNode = (event: { x: number; y: number; original: MouseEvent | TouchEvent }) => {
+ const node = picker?.({ x: event.x, y: event.y });
+
+ if (node) clickNode(node, event.original);
+ };
+
+ sigma.on("clickStage", ({ event }) => clickNearbyNode(event));
+ sigma.on("clickEdge", ({ event }) => clickNearbyNode(event));
return () => {
camera.off("updated", onCameraUpdated);
diff --git a/web/src/components/useSigmaGraph.lifecycle.test.tsx b/web/src/components/useSigmaGraph.lifecycle.test.tsx
index 0043d7e82..e2461ab2e 100644
--- a/web/src/components/useSigmaGraph.lifecycle.test.tsx
+++ b/web/src/components/useSigmaGraph.lifecycle.test.tsx
@@ -384,6 +384,59 @@ describe("useSigmaGraph renderer lifecycle", () => {
}
});
+ it.each(["clickStage", "clickEdge"] as const)(
+ "opens a nearby node on %s, but ignores farther clicks",
+ (eventName) => {
+ // The pixel pick misses, as it does a few pixels off a 2-3px Explorer node.
+ // Sigma keeps getNodeAtPosition private; element access reaches it, as in the renderer.
+ const exactPick = Sigma.prototype["getNodeAtPosition"];
+ Sigma.prototype["getNodeAtPosition"] = () => null;
+
+ try {
+ const onSpy = vi.spyOn(Sigma.prototype, "on");
+ const callback = vi.fn();
+
+ const view = render(
+ ,
+ );
+
+ const renderer = Array.from(new Set(onSpy.mock.contexts)).filter(isSigma).at(-1);
+
+ if (!renderer) throw new Error("Sigma renderer did not mount");
+ const display = renderer.getNodeDisplayData("one");
+
+ if (!display) throw new Error("node one is not drawn");
+ const center = renderer.framedGraphToViewport(display);
+ const edge = center.x + renderer.scaleSize(display.size);
+
+ const clickAt = (x: number) =>
+ act(() => {
+ renderer.emit(eventName, {
+ edge: "link",
+ event: {
+ x,
+ y: center.y,
+ sigmaDefaultPrevented: false,
+ preventSigmaDefault: () => undefined,
+ original: new MouseEvent("click"),
+ },
+ preventSigmaDefault: () => undefined,
+ });
+ });
+
+ clickAt(edge + 20);
+ expect(callback).not.toHaveBeenCalled();
+ clickAt(edge + 6);
+ expect(callback).toHaveBeenCalledWith(expect.objectContaining({ id: "one" }), {
+ beside: false,
+ });
+ view.unmount();
+ } finally {
+ Sigma.prototype["getNodeAtPosition"] = exactPick;
+ }
+ },
+ );
+
it("keeps a faded node hoverable and clickable, including beside modifier", () => {
const onSpy = vi.spyOn(Sigma.prototype, "on");
const renderers = () => Array.from(new Set(onSpy.mock.contexts)).filter(isSigma);
diff --git a/web/src/configured-view.css b/web/src/configured-view.css
index 3b3ab87b3..7b4a1a586 100644
--- a/web/src/configured-view.css
+++ b/web/src/configured-view.css
@@ -1813,6 +1813,12 @@ tr:focus-within .configured-view__boolean-editor .configured-view__cell-clear {
padding: 0 22px 10px;
}
+/* Ungrouped cards start one card gap below the view tabs' divider, not on it.
+ Grouped cards already start with their section header's own top padding. */
+.configured-view__cards > .configured-view__card-grid {
+ margin-top: var(--sp-3);
+}
+
.configured-view__card-section-header {
margin: 0 0 12px;
border-bottom: 1px solid var(--border);
diff --git a/web/tests/e2e/group-overview.spec.ts b/web/tests/e2e/group-overview.spec.ts
index f475cf85f..bbe124ceb 100644
--- a/web/tests/e2e/group-overview.spec.ts
+++ b/web/tests/e2e/group-overview.spec.ts
@@ -110,7 +110,48 @@ test("All notes opens on its Briefing and offers the Overview", async ({ page })
await chooseView(page, "Overview");
await expect(frame.getByRole("region", { name: "Map" })).toBeVisible();
await expect(frame.getByRole("region", { name: "Untyped notes by folder" })).toBeVisible();
- await expect(frame.getByRole("region", { name: "Members" })).toBeVisible();
+ const members = frame.getByRole("region", { name: "Members" });
+ await expect(members).toBeVisible();
+
+ // In a narrow window every table cell keeps its own content, Members spans
+ // the Overview, and only the Members table scrolls sideways, never the page.
+ await page.setViewportSize({ width: 1000, height: 820 });
+ await expect(members.getByRole("row", { name: /Untyped/ })).toBeVisible();
+ await frame
+ .locator(".gv-ov-folders tbody button")
+ .first()
+ .evaluate((button) => {
+ button.textContent = "averylongunbrokenfoldername".repeat(8);
+ });
+
+ const layout = await members.evaluate((section) => {
+ const doc = section.ownerDocument;
+
+ const spills = [...doc.querySelectorAll(".gv-ov-table td, .gv-ov-folders td")].flatMap(
+ (cell) => {
+ const right = cell.getBoundingClientRect().right;
+
+ return [...cell.querySelectorAll("*")].some(
+ (child) =>
+ child.getBoundingClientRect().width > 0 &&
+ child.getBoundingClientRect().right > right + 1,
+ )
+ ? [cell.closest("tr")?.textContent?.trim() ?? ""]
+ : [];
+ },
+ );
+
+ return {
+ spills,
+ width: section.getBoundingClientRect().width,
+ overview: section.closest(".gv-ov")!.getBoundingClientRect().width,
+ pageOverflow: doc.documentElement.scrollWidth - doc.documentElement.clientWidth,
+ };
+ });
+
+ expect(layout.spills).toEqual([]);
+ expect(layout.width).toBe(layout.overview);
+ expect(layout.pageOverflow).toBe(0);
});
for (const { time, heading } of [
diff --git a/web/tests/e2e/index-ready.spec.ts b/web/tests/e2e/index-ready.spec.ts
new file mode 100644
index 000000000..c59a7957a
--- /dev/null
+++ b/web/tests/e2e/index-ready.spec.ts
@@ -0,0 +1,56 @@
+import { expect, test } from "./fixtures";
+
+declare global {
+ interface Window {
+ indexEventSources: EventSource[];
+ }
+}
+
+for (const desktop of [false, true]) {
+ test(`shows index republication after startup (${desktop ? "desktop" : "browser"})`, async ({
+ page,
+ }) => {
+ await page.addInitScript((enabled) => {
+ window.__RHIZOME_DESKTOP__ = enabled;
+ const NativeEventSource = window.EventSource;
+ window.indexEventSources = [];
+ window.EventSource = class extends NativeEventSource {
+ constructor(url: string | URL, options?: EventSourceInit) {
+ super(url, options);
+
+ if (String(url).includes("/api/v1/events")) window.indexEventSources.push(this);
+ }
+ };
+ }, desktop);
+
+ let rebuilding = true;
+
+ await page.route("**/api/v1/status", async (route) => {
+ const response = await route.fetch();
+
+ await route.fulfill({ json: { ...(await response.json()), indexState: "ready" } });
+ });
+ await page.route("**/api/v1/ontology/summary", async (route) => {
+ const response = await route.fetch();
+
+ await route.fulfill({ json: { ...(await response.json()), rebuilding } });
+ });
+
+ await page.goto("/notes");
+ const banner = page.getByTestId("index-ready-banner");
+
+ await expect(banner).toBeVisible();
+ await expect(banner).toHaveText("Updating index…");
+
+ rebuilding = false;
+ await expect
+ .poll(() => page.evaluate(() => window.indexEventSources.length))
+ .toBeGreaterThan(0);
+ await page.evaluate(() => {
+ for (const source of window.indexEventSources) {
+ source.dispatchEvent(new MessageEvent("index.changed", { data: "{}" }));
+ }
+ });
+ await expect(banner).toBeHidden();
+ });
+}
diff --git a/web/tests/e2e/type-cards.spec.ts b/web/tests/e2e/type-cards.spec.ts
index a4b14d5e6..6dd1138ed 100644
--- a/web/tests/e2e/type-cards.spec.ts
+++ b/web/tests/e2e/type-cards.spec.ts
@@ -1,5 +1,41 @@
import { expect, test } from "./fixtures";
-import { chooseView, expectViewSettled } from "./workspaceView";
+import { chooseView, expectViewSettled, openViewOptions } from "./workspaceView";
+
+test("cards keep their top gap while a background refresh is pending", async ({ page }) => {
+ await page.goto("/notes/tv-work-item");
+ await chooseView(page, "Cards");
+ await expectViewSettled(page);
+ await openViewOptions(page);
+ await page.getByRole("combobox", { name: "Group by" }).selectOption("");
+ await expectViewSettled(page);
+ const grid = page.locator(".configured-view__cards > .configured-view__card-grid");
+ const topGap = () => grid.evaluate((element) => parseFloat(getComputedStyle(element).marginTop));
+
+ expect(await topGap()).toBe(8);
+
+ let release = () => {};
+
+ const pending = new Promise((resolve) => {
+ release = resolve;
+ });
+
+ await page.route("**/api/v1/views/*/execute", async (route) => {
+ await pending;
+ await route.continue();
+ });
+
+ try {
+ await openViewOptions(page);
+ await page.getByRole("button", { name: "Refresh view", exact: true }).click();
+ await expect(page.locator(".configured-view__loading-overlay")).toBeAttached();
+ expect(await topGap()).toBe(8);
+ } finally {
+ release();
+ }
+
+ await expectViewSettled(page);
+ expect(await topGap()).toBe(8);
+});
test("cards place metadata below reserved two-line title areas and align grid row heights", async ({
page,