Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(ultrawiki): rebuild Explore around the map instead of above it

Ruben Lütke576420a75e8d
diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.test.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.test.tsx
index 20103cae01..6fa808eeab 100644
--- a/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.test.tsx
@@ -287,6 +287,58 @@ it("keeps the fullscreen card out of the way when the panel is visible", async (
expect(screen.queryByTestId("explore-graph-selection")).toBeNull();
});
+it("sizes the canvas from its own box, not from the window", async () => {
+ // No width prop and the renderer falls back to window.innerWidth: a canvas
+ // wider than the column it lives in, drawing the network off-centre. The
+ // ResizeObserver callback is a frame away at best — and a tab the OS treats
+ // as occluded delivers no frames at all, so the fallback could stand for as
+ // long as the window stayed hidden. The first measurement is synchronous.
+ installFetch();
+ const width = 640;
+ const height = 480;
+ vi.spyOn(HTMLElement.prototype, "getBoundingClientRect").mockReturnValue({
+ width,
+ height,
+ top: 0,
+ left: 0,
+ right: width,
+ bottom: height,
+ x: 0,
+ y: 0,
+ toJSON: () => ({}),
+ });
+
+ renderGraph();
+
+ await waitFor(() => expect(forceGraphProps.length).toBeGreaterThan(0));
+ const props = forceGraphProps.at(-1) as Record<string, unknown>;
+ expect(props.width).toBe(width);
+ expect(props.height).toBe(height);
+});
+
+it("gives the map the whole box and floats its chrome on top", async () => {
+ // The map used to be a 224 px letterbox: a title bar, a hint line and a
+ // control row each took a slice of the little height it had, and a force
+ // layout with no area is a smear. Every piece of chrome is now positioned
+ // OVER the canvas, so none of it can shrink the map again.
+ installFetch();
+ renderGraph();
+
+ const stage = screen.getByTestId("explore-entity-graph");
+ expect(stage.className).toContain("h-full");
+ // The canvas paints at a fixed pixel width; out of flow it can set no
+ // floor for the column it lives in.
+ expect(screen.getByTestId("explore-graph-canvas").className).toContain(
+ "absolute",
+ );
+ expect(stage.className).toContain("overflow-hidden");
+ expect(stage.className).toContain("min-w-0");
+
+ for (const id of ["explore-graph-floor", "explore-graph-shown"]) {
+ expect(screen.getByTestId(id).closest(".absolute")).not.toBeNull();
+ }
+});
+
it("expands across the app and restores with Escape", async () => {
installFetch();
renderGraph();
diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.tsx
index a723b6889d..6ecc9db714 100644
--- a/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.tsx
+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.tsx
@@ -1,17 +1,29 @@
/**
- * The map of which topics appear together.
+ * The map of which topics appear together — the centre of Explore, not a
+ * banner above it.
*
* A node is a topic, an edge means "these two came up in the same moment",
* and the edge is thicker the more often that happened. Node size is mention
* count, node brightness is recency — both computed in lib/entityGraph.ts so
* the list and the map speak the same visual language.
*
- * The mention floor is the whole reason this is readable. On a real corpus
- * 977 topics collapse to 313 at two mentions and 77 at five; drawing every
- * one-off at once is a hairball, not a map. The slider makes the trade
- * explicit and reversible instead of hiding data silently.
+ * Two things make it readable, and both are structural rather than cosmetic:
+ *
+ * 1. AREA. A force layout spreads its nodes in two dimensions; squeezed into
+ * a 224 px letterbox it collapses into a smear no zoom can undo. The
+ * component now fills whatever box the panel gives it and every chrome
+ * element floats ON the map instead of stealing height from it.
+ * 2. The mention FLOOR. On a real corpus 977 topics collapse to 313 at two
+ * mentions and 77 at five; drawing every one-off at once is a hairball,
+ * not a map. The slider makes the trade explicit and reversible instead of
+ * hiding data silently.
+ *
+ * The canvas is absolutely positioned inside its container on purpose: the
+ * renderer paints at a FIXED pixel width, and a fixed-width child inside a
+ * flex row sets that row's floor — which is how the whole section grew a
+ * horizontal scrollbar it could never shrink back out of.
*/
-import { useEffect, useMemo, useRef, useState } from "react";
+import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
import { useQuery } from "@tanstack/react-query";
import { Maximize2, Minimize2 } from "lucide-react";
import ForceGraph2D from "react-force-graph-2d";
@@ -66,6 +78,12 @@ const FLOORS = [1, 2, 3, 5, 8] as const;
*/
const POINTER_PAD = 2;
+/** The recency ramp, sampled for the legend so it cannot drift from the map. */
+const LEGEND_SPAN = { start: 0, end: 100 };
+const LEGEND_STOPS = [0, 25, 50, 75, 100].map((position) =>
+ recencyTint(new Date(position).toISOString(), LEGEND_SPAN),
+);
+
export function EntityGraph({
minMentions,
onMinMentionsChange,
@@ -87,16 +105,28 @@ export function EntityGraph({
staleTime: 30_000,
});
- useEffect(() => {
+ useLayoutEffect(() => {
const element = containerRef.current;
if (!element) return;
- const observer = new ResizeObserver((entries) => {
- const box = entries[0]?.contentRect;
- if (!box) return;
- const next = { w: Math.round(box.width), h: Math.round(box.height) };
+ const apply = (w: number, h: number) => {
+ const next = { w: Math.round(w), h: Math.round(h) };
// Sub-pixel churn would restart the force simulation and make the
// network flail; the shared threshold helper absorbs it.
setSize((prev) => (sizeChanged(prev, next) ? next : prev));
+ };
+ // Measure BEFORE the observer's first callback. Without a width the
+ // renderer falls back to `window.innerWidth` — a canvas wider than the
+ // column it sits in, drawing the network off-centre and, until this
+ // column got a `min-w-0`, dragging a horizontal scrollbar across the
+ // whole app. The observer callback is one frame away at best, and a tab
+ // the OS considers occluded produces no frames at all, so that fallback
+ // could stand indefinitely. The box is already laid out here.
+ const box = element.getBoundingClientRect();
+ apply(box.width, box.height);
+ const observer = new ResizeObserver((entries) => {
+ const measured = entries[0]?.contentRect;
+ if (!measured) return;
+ apply(measured.width, measured.height);
});
observer.observe(element);
return () => observer.disconnect();
@@ -161,72 +191,16 @@ export function EntityGraph({
id="explore-entity-graph"
data-testid="explore-entity-graph"
data-expanded={isExpanded ? "true" : "false"}
+ ref={containerRef}
className={cn(
- "flex h-full flex-col bg-background",
+ "uw-stage relative h-full min-h-0 w-full min-w-0 overflow-hidden",
isExpanded && "fixed inset-0 z-[100]",
)}
>
- <div className="flex items-center justify-between gap-3 border-b border-border px-4 py-1.5">
- <p className="text-[11px] uppercase tracking-wide text-muted-foreground">
- {t("ultrawiki.explore.graph_title")}
- </p>
- <div className="flex items-center gap-2">
- <span
- data-testid="explore-graph-shown"
- className="text-[11px] tabular-nums text-muted-foreground"
- >
- {t("ultrawiki.explore.graph_shown")
- .replace("{0}", String(shown))
- .replace("{1}", String(total))}
- </span>
- <input
- type="range"
- data-testid="explore-graph-floor"
- min={0}
- max={FLOORS.length - 1}
- step={1}
- value={Math.max(FLOORS.indexOf(minMentions as (typeof FLOORS)[number]), 0)}
- onChange={(event) =>
- onMinMentionsChange(FLOORS[Number(event.target.value)] ?? 1)
- }
- aria-label={t("ultrawiki.explore.min_mentions").replace(
- "{0}",
- String(minMentions),
- )}
- title={t("ultrawiki.explore.min_mentions").replace(
- "{0}",
- String(minMentions),
- )}
- className="h-1 w-24 cursor-pointer appearance-none rounded-full bg-muted accent-primary"
- />
- <button
- type="button"
- data-testid="explore-graph-expand-toggle"
- onClick={() => setIsExpanded((expanded) => !expanded)}
- aria-controls="explore-entity-graph"
- aria-expanded={isExpanded}
- aria-label={t(
- isExpanded
- ? "wiki_graph.restore_view_title"
- : "wiki_graph.expand_view_title",
- )}
- title={t(
- isExpanded
- ? "wiki_graph.restore_view_title"
- : "wiki_graph.expand_view_title",
- )}
- className="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border bg-background/70 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60"
- >
- {isExpanded ? (
- <Minimize2 className="h-3.5 w-3.5" aria-hidden />
- ) : (
- <Maximize2 className="h-3.5 w-3.5" aria-hidden />
- )}
- </button>
- </div>
- </div>
+ {/* Behind the canvas, carrying no data — see .uw-stage in index.css. */}
+ <div className="uw-stage-glow pointer-events-none absolute inset-0" aria-hidden />
- <div ref={containerRef} className="relative min-h-0 flex-1">
+ <div className="absolute inset-0" data-testid="explore-graph-canvas">
{shown === 0 ? (
<p
data-testid="explore-graph-empty"
@@ -245,7 +219,7 @@ export function EntityGraph({
nodeRelSize={1}
nodeVal={(node: NodeObject<RenderNode>) => node.radius}
nodeLabel={(node: NodeObject<RenderNode>) => node.label}
- linkColor={() => "rgba(125, 184, 255, 0.16)"}
+ linkColor={() => "rgba(255, 214, 10, 0.11)"}
linkWidth={(link) =>
Math.min(0.4 + (link.weight ?? 1) * 0.15, 2.4)
}
@@ -277,9 +251,23 @@ export function EntityGraph({
ctx.fillStyle = node.colour;
ctx.fill();
if (selected) {
+ // Two rings: a white core edge that reads against a yellow
+ // dot, and a wide soft halo that finds the selection again
+ // once the map is zoomed out and the dot is three pixels.
ctx.lineWidth = 1.5 / scale;
ctx.strokeStyle = "#ffffff";
ctx.stroke();
+ ctx.beginPath();
+ ctx.arc(
+ node.x,
+ node.y,
+ node.radius + 4 + 2 / scale,
+ 0,
+ 2 * Math.PI,
+ );
+ ctx.lineWidth = 1 / scale;
+ ctx.strokeStyle = "rgba(255, 214, 10, 0.55)";
+ ctx.stroke();
}
// Labels only once the user has zoomed in, and only for the
// nodes that carry weight — a wall of overlapping text is how
@@ -290,71 +278,178 @@ export function EntityGraph({
ctx.textBaseline = "top";
ctx.fillStyle = selected
? "rgba(255,255,255,0.95)"
- : "rgba(255,255,255,0.55)";
+ : "rgba(255,255,255,0.62)";
ctx.fillText(node.label, node.x, node.y + node.radius + 1.5);
}
}}
/>
)}
+ </div>
+
+ {/* Edges of a force layout carry no meaning, so they get darkened to
+ push the eye to the middle. Above the canvas, below the controls. */}
+ <div
+ className="uw-stage-vignette pointer-events-none absolute inset-0"
+ aria-hidden
+ />
- {isExpanded && selection && (
- <div
- data-testid="explore-graph-selection"
- className="absolute bottom-3 left-3 max-w-xs rounded-lg border border-border bg-background/90 px-3 py-2 shadow-lg backdrop-blur-sm"
+ {/* --- Floating chrome. None of it takes height from the map. --- */}
+
+ <div className="pointer-events-none absolute inset-x-0 top-0 flex items-start justify-between gap-3 p-3">
+ <div className="uw-stage-pill pointer-events-auto rounded-lg px-3 py-1.5">
+ <p className="text-[10px] uppercase tracking-[0.14em] text-muted-foreground">
+ {t("ultrawiki.explore.graph_title")}
+ </p>
+ <p
+ data-testid="explore-graph-shown"
+ className="text-[11px] tabular-nums text-foreground"
>
- <p className="text-sm text-foreground">{selection.label}</p>
- <p className="mt-0.5 text-[11px] tabular-nums text-muted-foreground">
- {t("ultrawiki.explore.mentions_long").replace(
- "{0}",
- String(selection.mentions),
- )}
- {detail?.first_seen && (
- <>
- {" · "}
- {t("ultrawiki.explore.period")
- .replace("{0}", detail.first_seen.slice(0, 10))
- .replace("{1}", detail.last_seen.slice(0, 10))}
- </>
- )}
- </p>
+ {t("ultrawiki.explore.graph_shown")
+ .replace("{0}", String(shown))
+ .replace("{1}", String(total))}
+ </p>
+ </div>
- {detail && (
- <div className="mt-2">
- <p className="text-[10px] uppercase tracking-wide text-muted-foreground">
- {t("ultrawiki.explore.neighbors")}
- </p>
- {detail.neighbors.length === 0 ? (
- <p className="mt-1 text-[11px] text-muted-foreground">
- {t("ultrawiki.explore.no_neighbors")}
- </p>
- ) : (
- <div className="mt-1 flex flex-wrap gap-1">
- {detail.neighbors.slice(0, 8).map((neighbor) => (
- <button
- key={neighbor.key}
- type="button"
- data-testid={`explore-graph-neighbor-${neighbor.key}`}
- onClick={() => onSelect(neighbor.key)}
- title={t("ultrawiki.explore.shared").replace(
- "{0}",
- String(neighbor.shared),
- )}
- className="rounded-full border border-border px-2 py-0.5 text-[11px] text-muted-foreground hover:border-primary/50 hover:text-foreground"
- >
- {neighbor.label}
- </button>
- ))}
- </div>
- )}
- </div>
- )}
+ <button
+ type="button"
+ data-testid="explore-graph-expand-toggle"
+ onClick={() => setIsExpanded((expanded) => !expanded)}
+ aria-controls="explore-entity-graph"
+ aria-expanded={isExpanded}
+ aria-label={t(
+ isExpanded
+ ? "wiki_graph.restore_view_title"
+ : "wiki_graph.expand_view_title",
+ )}
+ title={t(
+ isExpanded
+ ? "wiki_graph.restore_view_title"
+ : "wiki_graph.expand_view_title",
+ )}
+ className="uw-stage-pill pointer-events-auto inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60"
+ >
+ {isExpanded ? (
+ <Minimize2 className="h-3.5 w-3.5" aria-hidden />
+ ) : (
+ <Maximize2 className="h-3.5 w-3.5" aria-hidden />
+ )}
+ </button>
+ </div>
+
+ <div className="pointer-events-none absolute inset-x-0 bottom-0 flex flex-wrap items-end justify-between gap-2 p-3">
+ {/* The legend earns its place: without it the two encodings on screen
+ (size, warmth) are decoration the reader has to guess at. */}
+ <div className="uw-stage-pill pointer-events-auto rounded-lg px-3 py-2">
+ <div className="flex items-center gap-2">
+ <span className="flex items-center gap-1.5" aria-hidden>
+ <span className="block h-1.5 w-1.5 rounded-full bg-muted-foreground" />
+ <span className="block h-2.5 w-2.5 rounded-full bg-muted-foreground" />
+ <span className="block h-3.5 w-3.5 rounded-full bg-muted-foreground" />
+ </span>
+ <span className="text-[10px] text-muted-foreground">
+ {t("ultrawiki.explore.legend_size")}
+ </span>
</div>
- )}
+ <div className="mt-1.5 flex items-center gap-2">
+ <span
+ className="block h-1.5 w-14 rounded-full"
+ style={{
+ backgroundImage: `linear-gradient(90deg, ${LEGEND_STOPS.join(", ")})`,
+ }}
+ aria-hidden
+ />
+ <span className="text-[10px] text-muted-foreground">
+ {t("ultrawiki.explore.legend_recency")}
+ </span>
+ </div>
+ </div>
+
+ <div
+ className="uw-stage-pill pointer-events-auto flex items-center gap-2.5 rounded-lg px-3 py-2"
+ title={t("ultrawiki.explore.graph_hint")}
+ >
+ <span className="text-[10px] text-muted-foreground">
+ {t("ultrawiki.explore.graph_hint_short")}
+ </span>
+ <input
+ type="range"
+ data-testid="explore-graph-floor"
+ min={0}
+ max={FLOORS.length - 1}
+ step={1}
+ value={Math.max(FLOORS.indexOf(minMentions as (typeof FLOORS)[number]), 0)}
+ onChange={(event) =>
+ onMinMentionsChange(FLOORS[Number(event.target.value)] ?? 1)
+ }
+ aria-label={t("ultrawiki.explore.min_mentions").replace(
+ "{0}",
+ String(minMentions),
+ )}
+ title={t("ultrawiki.explore.min_mentions").replace(
+ "{0}",
+ String(minMentions),
+ )}
+ className="h-1 w-28 cursor-pointer appearance-none rounded-full bg-muted accent-primary"
+ />
+ <span className="w-8 text-right text-[10px] tabular-nums text-foreground">
+ {t("ultrawiki.explore.mentions").replace("{0}", String(minMentions))}
+ </span>
+ </div>
</div>
- <p className="border-t border-border px-4 py-1 text-[10px] text-muted-foreground">
- {t("ultrawiki.explore.graph_hint")}
- </p>
+ {isExpanded && selection && (
+ <div
+ data-testid="explore-graph-selection"
+ className="uw-stage-pill absolute bottom-24 left-3 max-w-xs rounded-xl px-3.5 py-3 shadow-2xl"
+ >
+ <p className="text-sm text-foreground">{selection.label}</p>
+ <p className="mt-0.5 text-[11px] tabular-nums text-muted-foreground">
+ {t("ultrawiki.explore.mentions_long").replace(
+ "{0}",
+ String(selection.mentions),
+ )}
+ {detail?.first_seen && (
+ <>
+ {" · "}
+ {t("ultrawiki.explore.period")
+ .replace("{0}", detail.first_seen.slice(0, 10))
+ .replace("{1}", detail.last_seen.slice(0, 10))}
+ </>
+ )}
+ </p>
+
+ {detail && (
+ <div className="mt-2.5">
+ <p className="text-[10px] uppercase tracking-[0.14em] text-muted-foreground">
+ {t("ultrawiki.explore.neighbors")}
+ </p>
+ {detail.neighbors.length === 0 ? (
+ <p className="mt-1 text-[11px] text-muted-foreground">
+ {t("ultrawiki.explore.no_neighbors")}
+ </p>
+ ) : (
+ <div className="mt-1.5 flex flex-wrap gap-1">
+ {detail.neighbors.slice(0, 8).map((neighbor) => (
+ <button
+ key={neighbor.key}
+ type="button"
+ data-testid={`explore-graph-neighbor-${neighbor.key}`}
+ onClick={() => onSelect(neighbor.key)}
+ title={t("ultrawiki.explore.shared").replace(
+ "{0}",
+ String(neighbor.shared),
+ )}
+ className="rounded-full border border-border px-2 py-0.5 text-[11px] text-muted-foreground transition-colors hover:border-primary/50 hover:text-foreground"
+ >
+ {neighbor.label}
+ </button>
+ ))}
+ </div>
+ )}
+ </div>
+ )}
+ </div>
+ )}
</div>
);
}
diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/ExplorePanel.test.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/ExplorePanel.test.tsx
index c3c1ecc6f8..f13b623c67 100644
--- a/jarvis/ui/web/frontend/src/components/ultrawiki/ExplorePanel.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/ExplorePanel.test.tsx
@@ -16,6 +16,7 @@ import {
render,
screen,
waitFor,
+ within,
} from "@testing-library/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
@@ -235,6 +236,68 @@ describe("topic detail", () => {
const link = await screen.findByTestId("explore-moment-link-1");
expect(link.getAttribute("href")).toBe("app://a");
});
+
+ it("returns to all moments from a topic", async () => {
+ installRoutes({
+ "/api/ultrawiki/explore/entities/tahiti": {
+ ok: true,
+ entity: ENTITIES[1],
+ moments: MOMENTS,
+ total: 1,
+ corpus: FULL_CORPUS,
+ },
+ });
+ renderPanel();
+
+ fireEvent.click(await screen.findByTestId("explore-entity-tahiti"));
+ await screen.findByTestId("explore-detail");
+
+ fireEvent.click(screen.getByTestId("explore-reader-back"));
+
+ await waitFor(() => {
+ expect(screen.queryByTestId("explore-detail")).toBeNull();
+ });
+ expect(screen.getByTestId("explore-moment-1")).toBeTruthy();
+ });
+});
+
+describe("reading a moment", () => {
+ it("holds the answer back until the reader asks for it", async () => {
+ // A moment carries a summary AND the resolution the distillation arrived
+ // at. Printing both for two hundred moments is the wall of text this view
+ // was rebuilt to stop being; the resolution was simply never rendered at
+ // all, which is the other extreme. Closed = headline plus a few lines,
+ // open = the whole thing.
+ installRoutes();
+ renderPanel();
+
+ const card = await screen.findByTestId("explore-moment-1");
+ expect(card.getAttribute("data-open")).toBe("false");
+ expect(card.textContent).not.toContain("Fly via Tahiti.");
+
+ fireEvent.click(within(card).getByRole("button"));
+
+ expect(card.getAttribute("data-open")).toBe("true");
+ expect(card.textContent).toContain("Fly via Tahiti.");
+ });
+});
+
+describe("the three columns", () => {
+ it("cannot be widened past the window by anything inside them", async () => {
+ // The map paints a canvas at a fixed pixel width. A flex child that
+ // cannot shrink below its content turns that into the section's floor —
+ // which is how Explore grew a horizontal scrollbar that clipped the right
+ // edge off every moment and could never shrink back out of it.
+ installRoutes();
+ renderPanel();
+ await screen.findByTestId("explore-entity-berlin");
+
+ const columns = screen.getByTestId("explore-columns");
+ expect(columns.className).toContain("min-w-0");
+ for (const column of Array.from(columns.children)) {
+ expect(column.className).toContain("min-w-0");
+ }
+ });
});
describe("the four honest empty states", () => {
diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/ExplorePanel.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/ExplorePanel.tsx
index 88156f1fb4..0a37c8a3fa 100644
--- a/jarvis/ui/web/frontend/src/components/ultrawiki/ExplorePanel.tsx
+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/ExplorePanel.tsx
@@ -5,10 +5,24 @@
* what is importing, what is configured. This is the one view that answers
* the question the user actually has — "what does it know about my life?"
*
+ * Layout: three columns, and the split is the whole design.
+ *
+ * ┌───────────┬──────────────────────────┬───────────────┐
+ * │ topics │ THE MAP │ reader │
+ * │ (17 rem) │ (all the rest) │ (27 rem) │
+ * └───────────┴──────────────────────────┴───────────────┘
+ *
+ * It replaced a stack — a 224 px map wedged above a full-width list — which
+ * failed at both ends: a force layout squeezed into a letterbox is a smear,
+ * and a paragraph set 1 500 px wide is a wall no one reads a second line of.
+ * Splitting them fixes both with the same move. The map gets area, the prose
+ * gets a column about 65 characters across, which is the width text has been
+ * set at for four hundred years.
+ *
* Visual encoding (lib/entityGraph.ts, never inline):
* - how OFTEN a topic comes up → its count and its node size in the graph
* - WHEN it lived in your history → the time bar under each topic and the
- * brightness of its node
+ * warmth of its node, ash → signal yellow
* Both are derived from the data. There is no decorative colour in here.
*
* The time bar is the signature of this view: at a glance you see that
@@ -17,7 +31,7 @@
*/
import { useMemo, useState } from "react";
import { useQuery } from "@tanstack/react-query";
-import { ArrowLeft, ExternalLink, Search } from "lucide-react";
+import { ArrowLeft, ChevronDown, ExternalLink, Search } from "lucide-react";
import { cn } from "@/lib/utils";
import { useT } from "@/i18n";
@@ -130,6 +144,7 @@ export function ExplorePanel({
distilled: 0,
};
const action = EMPTY_ACTION[reason];
+ const detail = detailQuery.data?.entity.key === selected ? detailQuery.data : null;
return (
// h-full, not flex-1: the tab body this renders into is itself a
@@ -137,7 +152,10 @@ export function ExplorePanel({
// ceiling — the panel grew to 46 000 px on a real corpus, pushing the
// vault strip somewhere no one would ever scroll to. Taking the parent's
// height instead is what makes the inner lists scroll on their own.
- <div className="flex h-full min-h-0 flex-col" data-testid="explore-panel">
+ <div
+ className="flex h-full min-h-0 min-w-0 flex-col"
+ data-testid="explore-panel"
+ >
{reason !== "ok" && (
<div
data-testid="explore-empty"
@@ -160,11 +178,18 @@ export function ExplorePanel({
</div>
)}
- <div className="flex min-h-0 flex-1 flex-col lg:flex-row">
- <aside className="flex min-h-0 shrink-0 flex-col border-b border-border lg:w-72 lg:border-b-0 lg:border-r">
- <div className="relative border-b border-border px-3 py-2">
+ {/* min-w-0 on every column of this row, without exception: the map
+ paints a canvas at a fixed pixel width, and one flex child that
+ cannot shrink below its content is all it takes to give the whole
+ section a horizontal scrollbar it can never shrink back out of. */}
+ <div
+ data-testid="explore-columns"
+ className="flex min-h-0 min-w-0 flex-1 flex-col xl:flex-row"
+ >
+ <aside className="flex min-h-0 min-w-0 shrink-0 flex-col border-b border-border xl:w-[17rem] xl:border-b-0 xl:border-r">
+ <div className="relative shrink-0 px-3 pb-2 pt-3">
<Search
- className="pointer-events-none absolute left-5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"
+ className="pointer-events-none absolute left-6 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"
aria-hidden
/>
<input
@@ -173,22 +198,22 @@ export function ExplorePanel({
onChange={(event) => setSearch(event.target.value)}
placeholder={t("ultrawiki.explore.search_placeholder")}
aria-label={t("ultrawiki.explore.search_placeholder")}
- className="w-full rounded-md border border-border bg-background py-1.5 pl-7 pr-2 text-xs outline-none placeholder:text-muted-foreground focus-visible:ring-1 focus-visible:ring-primary"
+ className="h-8 w-full rounded-lg border border-border bg-background/60 pl-8 pr-2.5 text-xs outline-none transition-colors placeholder:text-muted-foreground hover:border-border focus-visible:border-primary/50 focus-visible:ring-1 focus-visible:ring-primary/40"
/>
</div>
- <p className="px-4 py-1.5 text-[11px] uppercase tracking-wide text-muted-foreground">
+ <p className="shrink-0 px-4 pb-1.5 pt-1 text-[10px] uppercase tracking-[0.14em] text-muted-foreground">
{t("ultrawiki.explore.entities_count").replace(
"{0}",
String(filtered.length),
)}
</p>
- <div className="min-h-0 flex-1 overflow-y-auto pb-2 max-lg:max-h-64">
+ <div className="scrollbar-jarvis min-h-0 flex-1 overflow-y-auto px-1.5 pb-2 max-xl:max-h-56">
{filtered.length === 0 && search.trim() !== "" && (
<p
data-testid="explore-no-search-hits"
- className="px-4 py-3 text-xs text-muted-foreground"
+ className="px-2.5 py-3 text-xs text-muted-foreground"
>
{t("ultrawiki.explore.no_search_hits").replace("{0}", search.trim())}
</p>
@@ -205,33 +230,73 @@ export function ExplorePanel({
</div>
</aside>
- <div className="flex min-h-0 flex-1 flex-col">
- <div className="h-56 shrink-0 border-b border-border sm:h-64">
- <EntityGraph
- minMentions={minMentions}
- onMinMentionsChange={setMinMentions}
- selectedKey={selected}
- onSelect={setSelected}
- />
- </div>
+ {/* The map. No fixed height anywhere on this branch — it takes the
+ column, which on a desktop window is most of the screen. */}
+ <div className="min-h-[20rem] min-w-0 shrink-0 border-b border-border xl:min-h-0 xl:flex-1 xl:shrink xl:border-b-0">
+ <EntityGraph
+ minMentions={minMentions}
+ onMinMentionsChange={setMinMentions}
+ selectedKey={selected}
+ onSelect={setSelected}
+ />
+ </div>
+
+ <section className="flex min-h-0 min-w-0 flex-1 flex-col bg-card/20 xl:w-[27rem] xl:flex-none xl:border-l xl:border-border">
+ <header className="flex shrink-0 items-start gap-2 border-b border-border px-4 py-2.5">
+ {selected && (
+ <button
+ type="button"
+ data-testid="explore-reader-back"
+ onClick={() => setSelected(null)}
+ aria-label={t("ultrawiki.explore.back")}
+ title={t("ultrawiki.explore.back")}
+ className="mt-0.5 inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-primary"
+ >
+ <ArrowLeft className="h-3.5 w-3.5" aria-hidden />
+ </button>
+ )}
+ <div className="min-w-0 flex-1">
+ <p className="truncate text-[10px] uppercase tracking-[0.14em] text-muted-foreground">
+ {selected && detail
+ ? t("ultrawiki.explore.moments_of").replace(
+ "{0}",
+ detail.entity.label,
+ )
+ : t("ultrawiki.explore.moments_title")}
+ </p>
+ <p className="text-[11px] tabular-nums text-muted-foreground">
+ {t("ultrawiki.explore.moments_count").replace(
+ "{0}",
+ String(
+ selected && detail
+ ? detail.moments.length
+ : (momentsQuery.data?.total ?? 0),
+ ),
+ )}
+ {!selected && (
+ <>
+ {" · "}
+ <span className="normal-case">
+ {t("ultrawiki.explore.reader_hint")}
+ </span>
+ </>
+ )}
+ </p>
+ </div>
+ </header>
- <div className="min-h-0 flex-1 overflow-y-auto">
- {selected && detailQuery.data ? (
+ <div className="scrollbar-jarvis min-h-0 flex-1 overflow-y-auto">
+ {selected && detail ? (
<EntityDetail
- entity={detailQuery.data.entity}
- moments={detailQuery.data.moments}
- onBack={() => setSelected(null)}
+ entity={detail.entity}
+ moments={detail.moments}
onSelect={setSelected}
/>
) : (
- <MomentList
- title={t("ultrawiki.explore.moments_title")}
- moments={momentsQuery.data?.moments ?? []}
- count={momentsQuery.data?.total ?? 0}
- />
+ <MomentList moments={momentsQuery.data?.moments ?? []} />
)}
</div>
- </div>
+ </section>
</div>
<VaultBar />
@@ -264,20 +329,29 @@ function EntityRow({
data-entity-key={entity.key}
data-active={active ? "true" : "false"}
className={cn(
- "group block w-full px-4 py-1.5 text-left transition-colors",
- active ? "bg-primary/10" : "hover:bg-muted/50",
+ "group block w-full rounded-lg px-2.5 py-1.5 text-left transition-colors",
+ active
+ ? "bg-primary/10 ring-1 ring-inset ring-primary/25"
+ : "hover:bg-muted/60",
)}
>
<span className="flex items-baseline justify-between gap-2">
- <span className="truncate text-xs text-foreground">{entity.label}</span>
+ <span
+ className={cn(
+ "truncate text-xs",
+ active ? "text-primary" : "text-foreground",
+ )}
+ >
+ {entity.label}
+ </span>
<span className="shrink-0 text-[11px] tabular-nums text-muted-foreground">
{entity.mentions}
</span>
</span>
{/* The signature of this view: where in your history this topic lived.
- Width is its lifetime, position is when, brightness is how recent. */}
+ Width is its lifetime, position is when, warmth is how recent. */}
<span
- className="mt-1 block h-[3px] w-full rounded-full bg-muted"
+ className="mt-1 block h-[3px] w-full rounded-full bg-white/[0.06]"
aria-hidden
>
<span
@@ -299,44 +373,33 @@ function EntityRow({
function EntityDetail({
entity,
moments,
- onBack,
onSelect,
}: {
entity: UltraWikiEntity;
moments: UltraWikiMoment[];
- onBack: () => void;
onSelect: (key: string) => void;
}): JSX.Element {
const t = useT();
return (
- <div className="p-4" data-testid="explore-detail">
- <button
- type="button"
- onClick={onBack}
- className="mb-3 flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground"
- >
- <ArrowLeft className="h-3 w-3" aria-hidden />
- {t("ultrawiki.explore.back")}
- </button>
-
- <h3 className="text-sm text-foreground">{entity.label}</h3>
- <p className="mt-0.5 text-[11px] tabular-nums text-muted-foreground">
- {t("ultrawiki.explore.mentions_long").replace(
- "{0}",
- String(entity.mentions),
- )}
- {entity.first_seen && (
- <>
- {" · "}
- {t("ultrawiki.explore.period")
- .replace("{0}", entity.first_seen.slice(0, 10))
- .replace("{1}", entity.last_seen.slice(0, 10))}
- </>
- )}
- </p>
+ <div data-testid="explore-detail">
+ <div className="border-b border-border px-4 py-3.5">
+ <h3 className="text-sm text-foreground">{entity.label}</h3>
+ <p className="mt-0.5 text-[11px] tabular-nums text-muted-foreground">
+ {t("ultrawiki.explore.mentions_long").replace(
+ "{0}",
+ String(entity.mentions),
+ )}
+ {entity.first_seen && (
+ <>
+ {" · "}
+ {t("ultrawiki.explore.period")
+ .replace("{0}", entity.first_seen.slice(0, 10))
+ .replace("{1}", entity.last_seen.slice(0, 10))}
+ </>
+ )}
+ </p>
- <div className="mt-3">
- <p className="text-[11px] uppercase tracking-wide text-muted-foreground">
+ <p className="mt-3 text-[10px] uppercase tracking-[0.14em] text-muted-foreground">
{t("ultrawiki.explore.neighbors")}
</p>
{entity.neighbors.length === 0 ? (
@@ -355,7 +418,7 @@ function EntityDetail({
"{0}",
String(neighbor.shared),
)}
- className="rounded-full border border-border px-2 py-0.5 text-[11px] text-muted-foreground hover:border-primary/50 hover:text-foreground"
+ className="rounded-full border border-border px-2 py-0.5 text-[11px] text-muted-foreground transition-colors hover:border-primary/50 hover:text-foreground"
>
{neighbor.label}
<span className="ml-1 tabular-nums opacity-60">
@@ -367,68 +430,99 @@ function EntityDetail({
)}
</div>
- <MomentList
- title={t("ultrawiki.explore.moments_of").replace("{0}", entity.label)}
- moments={moments}
- count={moments.length}
- className="mt-4"
- />
+ <MomentList moments={moments} />
</div>
);
}
-function MomentList({
- title,
- moments,
- count,
- className,
-}: {
- title: string;
- moments: UltraWikiMoment[];
- count: number;
- className?: string;
-}): JSX.Element {
+function MomentList({ moments }: { moments: UltraWikiMoment[] }): JSX.Element {
+ return (
+ <ol className="space-y-2 p-3">
+ {moments.map((moment) => (
+ <MomentCard key={moment.document_id} moment={moment} />
+ ))}
+ </ol>
+ );
+}
+
+/**
+ * One distilled moment, as something you can actually read.
+ *
+ * Closed it is a headline and three lines — enough to scan a couple of
+ * hundred of them. Open it is the whole summary plus the answer the
+ * distillation arrived at, which until now was fetched, stored, and never
+ * shown to anyone.
+ */
+function MomentCard({ moment }: { moment: UltraWikiMoment }): JSX.Element {
const t = useT();
+ const [open, setOpen] = useState(false);
+ const expandable = Boolean(moment.summary || moment.resolution);
+
return (
- <div className={cn("px-4 py-3", className)}>
- <p className="flex items-baseline gap-2 text-[11px] uppercase tracking-wide text-muted-foreground">
- {title}
- <span className="tabular-nums normal-case opacity-70">
- {t("ultrawiki.explore.moments_count").replace("{0}", String(count))}
+ <li
+ data-testid={`explore-moment-${moment.document_id}`}
+ data-open={open ? "true" : "false"}
+ className="rounded-xl border border-border/70 bg-card/40 px-3.5 py-3 transition-colors hover:border-primary/25 hover:bg-card/70"
+ >
+ <button
+ type="button"
+ disabled={!expandable}
+ onClick={() => setOpen((value) => !value)}
+ aria-expanded={expandable ? open : undefined}
+ aria-label={
+ expandable
+ ? t(open ? "ultrawiki.explore.read_less" : "ultrawiki.explore.read_more")
+ : undefined
+ }
+ className="flex w-full items-start gap-2 text-left disabled:cursor-default"
+ >
+ <span className="min-w-0 flex-1 text-[13px] font-medium leading-relaxed text-foreground">
+ {moment.title}
</span>
- </p>
- <ol className="mt-2 space-y-2.5">
- {moments.map((moment) => (
- <li
- key={moment.document_id}
- data-testid={`explore-moment-${moment.document_id}`}
- className="border-l-2 border-border pl-3"
- >
- <p className="text-xs leading-snug text-foreground">{moment.title}</p>
- {moment.summary && (
- <p className="mt-0.5 line-clamp-2 text-[11px] leading-snug text-muted-foreground">
- {moment.summary}
- </p>
+ {expandable && (
+ <ChevronDown
+ className={cn(
+ "mt-1 h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",
+ open && "rotate-180",
)}
- <p className="mt-1 flex items-center gap-1.5 text-[10px] tabular-nums text-muted-foreground">
- <span>{moment.timestamp_utc.slice(0, 10)}</span>
- <span aria-hidden>·</span>
- <span className="truncate">{moment.source_label}</span>
- {moment.permalink && (
- <a
- href={moment.permalink}
- data-testid={`explore-moment-link-${moment.document_id}`}
- className="inline-flex items-center gap-0.5 hover:text-foreground"
- >
- <ExternalLink className="h-2.5 w-2.5" aria-hidden />
- {t("ultrawiki.explore.open_source")}
- </a>
- )}
- </p>
- </li>
- ))}
- </ol>
- </div>
+ aria-hidden
+ />
+ )}
+ </button>
+
+ {moment.summary && (
+ <p
+ className={cn(
+ "mt-1.5 text-xs leading-relaxed text-muted-foreground",
+ !open && "line-clamp-3",
+ )}
+ >
+ {moment.summary}
+ </p>
+ )}
+
+ {open && moment.resolution && (
+ <p className="mt-2.5 border-l-2 border-primary/40 pl-2.5 text-xs leading-relaxed text-foreground/90">
+ {moment.resolution}
+ </p>
+ )}
+
+ <p className="mt-2.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-[10px] tabular-nums text-muted-foreground">
+ <span>{moment.timestamp_utc.slice(0, 10)}</span>
+ <span aria-hidden>·</span>
+ <span className="truncate">{moment.source_label}</span>
+ {moment.permalink && (
+ <a
+ href={moment.permalink}
+ data-testid={`explore-moment-link-${moment.document_id}`}
+ className="inline-flex items-center gap-0.5 transition-colors hover:text-primary"
+ >
+ <ExternalLink className="h-2.5 w-2.5" aria-hidden />
+ {t("ultrawiki.explore.open_source")}
+ </a>
+ )}
+ </p>
+ </li>
);
}
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 8f453307a2..23dff13aa4 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -2717,131 +2717,22 @@
"result_error": "Discord nicht erreichbar, bitte später erneut versuchen."
},
"ultrawiki": {
- "explore": {
- "vault": {
- "title": "Obsidian-Vault",
- "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",
- "export": "Exportieren",
- "exporting": "Wird geschrieben …",
- "exported": "{0} Notizen geschrieben, {1} unverändert.",
- "notes": "{0} Notizen",
- "never": "Noch nie exportiert",
- "last": "Zuletzt am {0}",
- "register": "Bei Obsidian anmelden",
- "registering": "Wird angemeldet …",
- "registered": "In Obsidian eingetragen",
- "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",
- "error": "Hat nicht geklappt: {0}"
- },
- "vault": {
- "title": "Obsidian-Vault",
- "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",
- "export": "Exportieren",
- "exporting": "Wird geschrieben …",
- "exported": "{0} Notizen geschrieben, {1} unverändert.",
- "notes": "{0} Notizen",
- "never": "Noch nie exportiert",
- "last": "Zuletzt am {0}",
- "register": "Bei Obsidian anmelden",
- "registering": "Wird angemeldet …",
- "registered": "In Obsidian eingetragen",
- "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",
- "error": "Hat nicht geklappt: {0}"
- },
- "tab": "Entdecken",
- "loading": "Wissensbestand wird gelesen …",
- "error": "Der Wissensbestand konnte nicht gelesen werden.",
- "entities_title": "Begriffe",
- "entities_count": "{0} Begriffe",
- "moments_title": "Momente",
- "moments_count": "{0} Momente",
- "graph_title": "Verbindungen",
- "search_placeholder": "Begriff suchen …",
- "no_search_hits": "Kein Begriff passt zu „{0}“.",
- "mentions": "{0}×",
- "mentions_long": "{0} Erwähnungen",
- "period": "{0} bis {1}",
- "neighbors": "Taucht auf mit",
- "no_neighbors": "Kommt bisher immer allein vor.",
- "shared": "{0} gemeinsame Momente",
- "back": "Zurück zur Übersicht",
- "open_source": "Beleg öffnen",
- "source_prefix": "aus",
- "min_mentions": "Ab {0} Erwähnungen",
- "graph_shown": "{0} von {1} Begriffen",
- "graph_hint": "Weniger häufige Begriffe sind ausgeblendet — Regler nach links für alle.",
- "graph_empty": "Kein Begriff wird oft genug erwähnt. Stell den Regler auf 1.",
- "moments_of": "Momente mit {0}",
- "empty": {
- "no_sources": "Es ist noch keine Quelle verbunden. Verbinde zuerst eine Quelle, dann kann Jarvis etwas wissen.",
- "nothing_imported": "Eine Quelle ist verbunden, aber es wurde noch nichts geholt. Starte den Import bei den Quellen.",
- "nothing_distilled": "Es liegen Einträge da, aber noch keiner wurde ausgewertet. Dafür braucht es ein eingerichtetes Sprachmodell in den Einstellungen.",
- "no_entities": "Die Einträge wurden ausgewertet, aber es kamen keine Namen oder Orte darin vor. Die Momente unten kannst du trotzdem durchblättern."
- }
- },
- "explore": {
- "vault": {
- "title": "Obsidian-Vault",
- "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",
- "export": "Exportieren",
- "exporting": "Wird geschrieben …",
- "exported": "{0} Notizen geschrieben, {1} unverändert.",
- "notes": "{0} Notizen",
- "never": "Noch nie exportiert",
- "last": "Zuletzt am {0}",
- "register": "Bei Obsidian anmelden",
- "registering": "Wird angemeldet …",
- "registered": "In Obsidian eingetragen",
- "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",
- "error": "Hat nicht geklappt: {0}"
- },
- "tab": "Entdecken",
- "loading": "Wissensbestand wird gelesen …",
- "error": "Der Wissensbestand konnte nicht gelesen werden.",
- "entities_title": "Begriffe",
- "entities_count": "{0} Begriffe",
- "moments_title": "Momente",
- "moments_count": "{0} Momente",
- "graph_title": "Verbindungen",
- "search_placeholder": "Begriff suchen …",
- "no_search_hits": "Kein Begriff passt zu „{0}“.",
- "mentions": "{0}×",
- "mentions_long": "{0} Erwähnungen",
- "period": "{0} bis {1}",
- "neighbors": "Taucht auf mit",
- "no_neighbors": "Kommt bisher immer allein vor.",
- "shared": "{0} gemeinsame Momente",
- "back": "Zurück zur Übersicht",
- "open_source": "Beleg öffnen",
- "source_prefix": "aus",
- "min_mentions": "Ab {0} Erwähnungen",
- "graph_shown": "{0} von {1} Begriffen",
- "graph_hint": "Weniger häufige Begriffe sind ausgeblendet — Regler nach links für alle.",
- "graph_empty": "Kein Begriff wird oft genug erwähnt. Stell den Regler auf 1.",
- "moments_of": "Momente mit {0}",
- "empty": {
- "no_sources": "Es ist noch keine Quelle verbunden. Verbinde zuerst eine Quelle, dann kann Jarvis etwas wissen.",
- "nothing_imported": "Eine Quelle ist verbunden, aber es wurde noch nichts geholt. Starte den Import bei den Quellen.",
- "nothing_distilled": "Es liegen Einträge da, aber noch keiner wurde ausgewertet. Dafür braucht es ein eingerichtetes Sprachmodell in den Einstellungen.",
- "no_entities": "Die Einträge wurden ausgewertet, aber es kamen keine Namen oder Orte darin vor. Die Momente unten kannst du trotzdem durchblättern."
- }
- },
"explore": {
- "vault": {
- "title": "Obsidian-Vault",
- "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",
- "export": "Exportieren",
- "exporting": "Wird geschrieben …",
- "exported": "{0} Notizen geschrieben, {1} unverändert.",
- "notes": "{0} Notizen",
- "never": "Noch nie exportiert",
- "last": "Zuletzt am {0}",
- "register": "Bei Obsidian anmelden",
- "registering": "Wird angemeldet …",
- "registered": "In Obsidian eingetragen",
- "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",
- "error": "Hat nicht geklappt: {0}"
- },
+ "vault": {
+ "title": "Obsidian-Vault",
+ "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",
+ "export": "Exportieren",
+ "exporting": "Wird geschrieben …",
+ "exported": "{0} Notizen geschrieben, {1} unverändert.",
+ "notes": "{0} Notizen",
+ "never": "Noch nie exportiert",
+ "last": "Zuletzt am {0}",
+ "register": "Bei Obsidian anmelden",
+ "registering": "Wird angemeldet …",
+ "registered": "In Obsidian eingetragen",
+ "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",
+ "error": "Hat nicht geklappt: {0}"
+ },
"tab": "Entdecken",
"loading": "Wissensbestand wird gelesen …",
"error": "Der Wissensbestand konnte nicht gelesen werden.",
@@ -2864,7 +2755,13 @@
"min_mentions": "Ab {0} Erwähnungen",
"graph_shown": "{0} von {1} Begriffen",
"graph_hint": "Weniger häufige Begriffe sind ausgeblendet — Regler nach links für alle.",
+ "graph_hint_short": "Zeigen ab",
"graph_empty": "Kein Begriff wird oft genug erwähnt. Stell den Regler auf 1.",
+ "legend_size": "Größer = häufiger erwähnt",
+ "legend_recency": "Länger her → gerade eben",
+ "reader_hint": "Begriff wählen, um nur dessen Momente zu lesen",
+ "read_more": "Ganzen Moment lesen",
+ "read_less": "Moment zuklappen",
"moments_of": "Momente mit {0}",
"empty": {
"no_sources": "Es ist noch keine Quelle verbunden. Verbinde zuerst eine Quelle, dann kann Jarvis etwas wissen.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index ea53c390bd..c7d3070835 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -2718,116 +2718,22 @@
"result_error": "Couldn't reach Discord, please try again later."
},
"ultrawiki": {
- "explore": {
- "vault": {
- "title": "Obsidian vault",
- "hint": "The same knowledge as Markdown files on disk.",
- "export": "Export",
- "exporting": "Writing …",
- "exported": "{0} notes written, {1} unchanged.",
- "notes": "{0} notes",
- "never": "Never exported",
- "last": "Last run {0}",
- "register": "Add to Obsidian",
- "registering": "Adding …",
- "registered": "Added to Obsidian",
- "not_installed": "Obsidian is not installed on this machine. The files are written anyway — any Markdown app can open them.",
- "error": "That did not work: {0}"
- },
- "tab": "Explore",
- "loading": "Reading the knowledge base …",
- "error": "The knowledge base could not be read.",
- "entities_title": "Topics",
- "entities_count": "{0} topics",
- "moments_title": "Moments",
- "moments_count": "{0} moments",
- "graph_title": "Connections",
- "search_placeholder": "Search a topic …",
- "no_search_hits": "No topic matches “{0}”.",
- "mentions": "{0}×",
- "mentions_long": "{0} mentions",
- "period": "{0} to {1}",
- "neighbors": "Appears with",
- "no_neighbors": "Has only ever appeared on its own.",
- "shared": "{0} shared moments",
- "back": "Back to the overview",
- "open_source": "Open the evidence",
- "source_prefix": "from",
- "min_mentions": "From {0} mentions",
- "graph_shown": "{0} of {1} topics",
- "graph_hint": "Rarer topics are hidden — move the slider left to show all.",
- "graph_empty": "No topic is mentioned often enough. Set the slider to 1.",
- "moments_of": "Moments involving {0}",
- "empty": {
- "no_sources": "No source is connected yet. Connect one first, then Jarvis has something to know.",
- "nothing_imported": "A source is connected but nothing has been fetched yet. Start the import under Sources.",
- "nothing_distilled": "Entries are stored but none has been analysed yet. That needs a language model configured in the settings.",
- "no_entities": "The entries were analysed but named no people or places. You can still browse the moments below."
- }
- },
- "explore": {
- "vault": {
- "title": "Obsidian vault",
- "hint": "The same knowledge as Markdown files on disk.",
- "export": "Export",
- "exporting": "Writing …",
- "exported": "{0} notes written, {1} unchanged.",
- "notes": "{0} notes",
- "never": "Never exported",
- "last": "Last run {0}",
- "register": "Add to Obsidian",
- "registering": "Adding …",
- "registered": "Added to Obsidian",
- "not_installed": "Obsidian is not installed on this machine. The files are written anyway — any Markdown app can open them.",
- "error": "That did not work: {0}"
- },
- "tab": "Explore",
- "loading": "Reading the knowledge base …",
- "error": "The knowledge base could not be read.",
- "entities_title": "Topics",
- "entities_count": "{0} topics",
- "moments_title": "Moments",
- "moments_count": "{0} moments",
- "graph_title": "Connections",
- "search_placeholder": "Search a topic …",
- "no_search_hits": "No topic matches “{0}”.",
- "mentions": "{0}×",
- "mentions_long": "{0} mentions",
- "period": "{0} to {1}",
- "neighbors": "Appears with",
- "no_neighbors": "Has only ever appeared on its own.",
- "shared": "{0} shared moments",
- "back": "Back to the overview",
- "open_source": "Open the evidence",
- "source_prefix": "from",
- "min_mentions": "From {0} mentions",
- "graph_shown": "{0} of {1} topics",
- "graph_hint": "Rarer topics are hidden — move the slider left to show all.",
- "graph_empty": "No topic is mentioned often enough. Set the slider to 1.",
- "moments_of": "Moments involving {0}",
- "empty": {
- "no_sources": "No source is connected yet. Connect one first, then Jarvis has something to know.",
- "nothing_imported": "A source is connected but nothing has been fetched yet. Start the import under Sources.",
- "nothing_distilled": "Entries are stored but none has been analysed yet. That needs a language model configured in the settings.",
- "no_entities": "The entries were analysed but named no people or places. You can still browse the moments below."
- }
- },
"explore": {
- "vault": {
- "title": "Obsidian vault",
- "hint": "The same knowledge as Markdown files on disk.",
- "export": "Export",
- "exporting": "Writing …",
- "exported": "{0} notes written, {1} unchanged.",
- "notes": "{0} notes",
- "never": "Never exported",
- "last": "Last run {0}",
- "register": "Add to Obsidian",
- "registering": "Adding …",
- "registered": "Added to Obsidian",
- "not_installed": "Obsidian is not installed on this machine. The files are written anyway — any Markdown app can open them.",
- "error": "That did not work: {0}"
- },
+ "vault": {
+ "title": "Obsidian vault",
+ "hint": "The same knowledge as Markdown files on disk.",
+ "export": "Export",
+ "exporting": "Writing …",
+ "exported": "{0} notes written, {1} unchanged.",
+ "notes": "{0} notes",
+ "never": "Never exported",
+ "last": "Last run {0}",
+ "register": "Add to Obsidian",
+ "registering": "Adding …",
+ "registered": "Added to Obsidian",
+ "not_installed": "Obsidian is not installed on this machine. The files are written anyway — any Markdown app can open them.",
+ "error": "That did not work: {0}"
+ },
"tab": "Explore",
"loading": "Reading the knowledge base …",
"error": "The knowledge base could not be read.",
@@ -2850,7 +2756,13 @@
"min_mentions": "From {0} mentions",
"graph_shown": "{0} of {1} topics",
"graph_hint": "Rarer topics are hidden — move the slider left to show all.",
+ "graph_hint_short": "Show from",
"graph_empty": "No topic is mentioned often enough. Set the slider to 1.",
+ "legend_size": "Bigger = mentioned more often",
+ "legend_recency": "Longer ago → just now",
+ "reader_hint": "Pick a topic to read only its moments",
+ "read_more": "Read the whole moment",
+ "read_less": "Collapse this moment",
"moments_of": "Moments involving {0}",
"empty": {
"no_sources": "No source is connected yet. Connect one first, then Jarvis has something to know.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 4626505d85..720039baa9 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -2717,116 +2717,22 @@
"result_error": "No se pudo llegar a Discord, inténtalo de nuevo más tarde."
},
"ultrawiki": {
- "explore": {
- "vault": {
- "title": "Bóveda de Obsidian",
- "hint": "El mismo conocimiento como archivos Markdown en el disco.",
- "export": "Exportar",
- "exporting": "Escribiendo …",
- "exported": "{0} notas escritas, {1} sin cambios.",
- "notes": "{0} notas",
- "never": "Nunca exportado",
- "last": "Última vez {0}",
- "register": "Añadir a Obsidian",
- "registering": "Añadiendo …",
- "registered": "Añadido a Obsidian",
- "not_installed": "Obsidian no está instalado en este equipo. Los archivos se escriben igualmente: cualquier app de Markdown puede abrirlos.",
- "error": "No funcionó: {0}"
- },
- "tab": "Explorar",
- "loading": "Leyendo la base de conocimiento …",
- "error": "No se pudo leer la base de conocimiento.",
- "entities_title": "Temas",
- "entities_count": "{0} temas",
- "moments_title": "Momentos",
- "moments_count": "{0} momentos",
- "graph_title": "Conexiones",
- "search_placeholder": "Buscar un tema …",
- "no_search_hits": "Ningún tema coincide con «{0}».",
- "mentions": "{0}×",
- "mentions_long": "{0} menciones",
- "period": "{0} a {1}",
- "neighbors": "Aparece junto a",
- "no_neighbors": "Hasta ahora siempre aparece solo.",
- "shared": "{0} momentos compartidos",
- "back": "Volver al resumen",
- "open_source": "Abrir la evidencia",
- "source_prefix": "de",
- "min_mentions": "Desde {0} menciones",
- "graph_shown": "{0} de {1} temas",
- "graph_hint": "Los temas menos frecuentes están ocultos: mueve el control a la izquierda para verlos todos.",
- "graph_empty": "Ningún tema se menciona lo suficiente. Pon el control en 1.",
- "moments_of": "Momentos con {0}",
- "empty": {
- "no_sources": "Todavía no hay ninguna fuente conectada. Conecta una primero y Jarvis tendrá algo que saber.",
- "nothing_imported": "Hay una fuente conectada pero aún no se ha traído nada. Inicia la importación en Fuentes.",
- "nothing_distilled": "Hay entradas guardadas pero ninguna se ha analizado todavía. Para eso hace falta un modelo de lenguaje configurado en los ajustes.",
- "no_entities": "Las entradas se analizaron pero no mencionaron personas ni lugares. Aun así puedes hojear los momentos de abajo."
- }
- },
- "explore": {
- "vault": {
- "title": "Bóveda de Obsidian",
- "hint": "El mismo conocimiento como archivos Markdown en el disco.",
- "export": "Exportar",
- "exporting": "Escribiendo …",
- "exported": "{0} notas escritas, {1} sin cambios.",
- "notes": "{0} notas",
- "never": "Nunca exportado",
- "last": "Última vez {0}",
- "register": "Añadir a Obsidian",
- "registering": "Añadiendo …",
- "registered": "Añadido a Obsidian",
- "not_installed": "Obsidian no está instalado en este equipo. Los archivos se escriben igualmente: cualquier app de Markdown puede abrirlos.",
- "error": "No funcionó: {0}"
- },
- "tab": "Explorar",
- "loading": "Leyendo la base de conocimiento …",
- "error": "No se pudo leer la base de conocimiento.",
- "entities_title": "Temas",
- "entities_count": "{0} temas",
- "moments_title": "Momentos",
- "moments_count": "{0} momentos",
- "graph_title": "Conexiones",
- "search_placeholder": "Buscar un tema …",
- "no_search_hits": "Ningún tema coincide con «{0}».",
- "mentions": "{0}×",
- "mentions_long": "{0} menciones",
- "period": "{0} a {1}",
- "neighbors": "Aparece junto a",
- "no_neighbors": "Hasta ahora siempre aparece solo.",
- "shared": "{0} momentos compartidos",
- "back": "Volver al resumen",
- "open_source": "Abrir la evidencia",
- "source_prefix": "de",
- "min_mentions": "Desde {0} menciones",
- "graph_shown": "{0} de {1} temas",
- "graph_hint": "Los temas menos frecuentes están ocultos: mueve el control a la izquierda para verlos todos.",
- "graph_empty": "Ningún tema se menciona lo suficiente. Pon el control en 1.",
- "moments_of": "Momentos con {0}",
- "empty": {
- "no_sources": "Todavía no hay ninguna fuente conectada. Conecta una primero y Jarvis tendrá algo que saber.",
- "nothing_imported": "Hay una fuente conectada pero aún no se ha traído nada. Inicia la importación en Fuentes.",
- "nothing_distilled": "Hay entradas guardadas pero ninguna se ha analizado todavía. Para eso hace falta un modelo de lenguaje configurado en los ajustes.",
- "no_entities": "Las entradas se analizaron pero no mencionaron personas ni lugares. Aun así puedes hojear los momentos de abajo."
- }
- },
"explore": {
- "vault": {
- "title": "Bóveda de Obsidian",
- "hint": "El mismo conocimiento como archivos Markdown en el disco.",
- "export": "Exportar",
- "exporting": "Escribiendo …",
- "exported": "{0} notas escritas, {1} sin cambios.",
- "notes": "{0} notas",
- "never": "Nunca exportado",
- "last": "Última vez {0}",
- "register": "Añadir a Obsidian",
- "registering": "Añadiendo …",
- "registered": "Añadido a Obsidian",
- "not_installed": "Obsidian no está instalado en este equipo. Los archivos se escriben igualmente: cualquier app de Markdown puede abrirlos.",
- "error": "No funcionó: {0}"
- },
+ "vault": {
+ "title": "Bóveda de Obsidian",
+ "hint": "El mismo conocimiento como archivos Markdown en el disco.",
+ "export": "Exportar",
+ "exporting": "Escribiendo …",
+ "exported": "{0} notas escritas, {1} sin cambios.",
+ "notes": "{0} notas",
+ "never": "Nunca exportado",
+ "last": "Última vez {0}",
+ "register": "Añadir a Obsidian",
+ "registering": "Añadiendo …",
+ "registered": "Añadido a Obsidian",
+ "not_installed": "Obsidian no está instalado en este equipo. Los archivos se escriben igualmente: cualquier app de Markdown puede abrirlos.",
+ "error": "No funcionó: {0}"
+ },
"tab": "Explorar",
"loading": "Leyendo la base de conocimiento …",
"error": "No se pudo leer la base de conocimiento.",
@@ -2849,7 +2755,13 @@
"min_mentions": "Desde {0} menciones",
"graph_shown": "{0} de {1} temas",
"graph_hint": "Los temas menos frecuentes están ocultos: mueve el control a la izquierda para verlos todos.",
+ "graph_hint_short": "Mostrar desde",
"graph_empty": "Ningún tema se menciona lo suficiente. Pon el control en 1.",
+ "legend_size": "Más grande = mencionado más veces",
+ "legend_recency": "Hace tiempo → ahora mismo",
+ "reader_hint": "Elige un tema para leer solo sus momentos",
+ "read_more": "Leer el momento completo",
+ "read_less": "Plegar este momento",
"moments_of": "Momentos con {0}",
"empty": {
"no_sources": "Todavía no hay ninguna fuente conectada. Conecta una primero y Jarvis tendrá algo que saber.",
diff --git a/jarvis/ui/web/frontend/src/index.css b/jarvis/ui/web/frontend/src/index.css
index 74f2fa4c4f..c7fed5d020 100644
--- a/jarvis/ui/web/frontend/src/index.css
+++ b/jarvis/ui/web/frontend/src/index.css
@@ -4,6 +4,44 @@
@tailwind components;
@tailwind utilities;
+/* App-wide scrollbars — PLAIN (non-@layer) CSS on purpose, same reason as the
+ xterm rules below: a `@layer` rule keyed on an element rather than a class
+ is not guaranteed to survive Tailwind's purge.
+ The native WebView2 bar is a light-grey 17 px column with arrow buttons —
+ it reads as somebody else's chrome bolted onto a matte-black app, and it
+ was the single loudest non-theme surface left on screen. This makes every
+ scroll container in the app agree: a thin dark thumb floating on the
+ content, no track, no buttons. Individual surfaces still opt out
+ (.agentic-terminal-host below, PaneScrollbar) — a class beats `*`. */
+* {
+ scrollbar-width: thin;
+ scrollbar-color: hsl(var(--border)) transparent;
+}
+::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+}
+::-webkit-scrollbar-track {
+ background: transparent;
+}
+::-webkit-scrollbar-thumb {
+ /* The transparent border + content-box clip is what makes the thumb read as
+ a floating pill rather than a filled gutter. */
+ background-color: hsl(var(--border));
+ background-clip: content-box;
+ border: 3px solid transparent;
+ border-radius: 999px;
+}
+::-webkit-scrollbar-thumb:hover {
+ background-color: hsl(var(--muted-foreground));
+}
+::-webkit-scrollbar-corner {
+ background: transparent;
+}
+::-webkit-scrollbar-button {
+ display: none;
+}
+
/* xterm.js viewport scrollbar — PLAIN (non-@layer) CSS on purpose. Tailwind
tree-shakes `@layer utilities` by class usage, and `.xterm-viewport` is
created by xterm.js at runtime (it never appears in the source), so a rule
@@ -283,20 +321,21 @@
color: transparent;
}
- /* Custom scrollbar — matching the theme */
+ /* Quieter than the app-wide default at the top of this file — for dense
+ lists where even the default pill is one line of noise too many. The
+ app-wide rules already cover track, buttons and corner. */
.scrollbar-jarvis::-webkit-scrollbar {
- width: 6px;
- height: 6px;
- }
- .scrollbar-jarvis::-webkit-scrollbar-track {
- background: transparent;
+ width: 8px;
+ height: 8px;
}
.scrollbar-jarvis::-webkit-scrollbar-thumb {
- background: hsl(var(--border));
- border-radius: 3px;
+ background-color: hsl(var(--border));
+ background-clip: content-box;
+ border: 2px solid transparent;
+ border-radius: 999px;
}
.scrollbar-jarvis::-webkit-scrollbar-thumb:hover {
- background: hsl(var(--muted-foreground));
+ background-color: hsl(var(--muted-foreground));
}
/* ===========================================================
@@ -710,6 +749,52 @@
animation: uw-hatch-drift 1.1s linear infinite;
}
+ /*
+ * The Explore stage — the surface the topic map is drawn on.
+ *
+ * The map used to be a 224 px letterbox above a wall of text, which is the
+ * one arrangement that makes a network unreadable: a force layout needs
+ * area, not width. It now owns the middle of the screen, and these three
+ * layers are what stop that area from reading as an empty black rectangle.
+ * All of it is behind the canvas and none of it carries data — the grid
+ * gives the depth a floating cloud of dots has nothing to sit on, the glow
+ * marks the centre of gravity, the vignette pulls the eye off the edges.
+ */
+ .uw-stage {
+ background-color: hsl(var(--background));
+ background-image:
+ linear-gradient(rgba(255, 214, 10, 0.028) 1px, transparent 1px),
+ linear-gradient(90deg, rgba(255, 214, 10, 0.028) 1px, transparent 1px);
+ background-size: 48px 48px;
+ }
+
+ .uw-stage-glow {
+ background: radial-gradient(
+ circle at 50% 46%,
+ rgba(255, 214, 10, 0.13) 0%,
+ rgba(255, 214, 10, 0.04) 34%,
+ transparent 66%
+ );
+ filter: blur(46px);
+ }
+
+ .uw-stage-vignette {
+ background: radial-gradient(
+ ellipse at 50% 50%,
+ transparent 42%,
+ rgba(0, 0, 0, 0.5) 100%
+ );
+ }
+
+ /* The floating control pills over the stage (floor slider, legend, counts).
+ Glass rather than a solid card: the map has to stay visible underneath,
+ or the controls become a second letterbox. */
+ .uw-stage-pill {
+ background: rgba(10, 10, 10, 0.66);
+ border: 1px solid hsl(var(--border));
+ backdrop-filter: blur(10px);
+ }
+
@keyframes uw-hatch-drift {
from {
background-position: 0 0;
diff --git a/jarvis/ui/web/frontend/src/lib/entityGraph.ts b/jarvis/ui/web/frontend/src/lib/entityGraph.ts
index f808f8d85b..a6b8f30472 100644
--- a/jarvis/ui/web/frontend/src/lib/entityGraph.ts
+++ b/jarvis/ui/web/frontend/src/lib/entityGraph.ts
@@ -37,12 +37,14 @@ const MIN_RADIUS = 3;
const RADIUS_RANGE = 9;
/**
- * Oldest → newest tint. The dim end is deliberately a desaturated blue-grey
- * rather than a second hue: two hues would read as two CATEGORIES, and
- * recency is one continuous axis.
+ * Oldest → newest tint: ash that warms into the signal yellow the whole app
+ * is built on. ONE hue travelling from desaturated to saturated, deliberately
+ * — two hues would read as two CATEGORIES, and recency is one continuous
+ * axis. The dim end stays light enough to hold ~3.5:1 against the matte-black
+ * background, so an old topic is quiet, never invisible.
*/
-const TINT_OLD = { r: 0x4c, g: 0x5a, b: 0x72 };
-const TINT_NEW = { r: 0x7d, g: 0xb8, b: 0xff };
+const TINT_OLD = { r: 0x6b, g: 0x66, b: 0x54 };
+const TINT_NEW = { r: 0xff, g: 0xd6, b: 0x0a };
function parse(timestamp: string): number | null {
const value = Date.parse(timestamp);
diff --git a/jarvis/ui/web/frontend/src/views/ultrawiki/UltraWikiPanel.tsx b/jarvis/ui/web/frontend/src/views/ultrawiki/UltraWikiPanel.tsx
index 8da96c03e9..b77de74e8b 100644
--- a/jarvis/ui/web/frontend/src/views/ultrawiki/UltraWikiPanel.tsx
+++ b/jarvis/ui/web/frontend/src/views/ultrawiki/UltraWikiPanel.tsx
@@ -142,7 +142,7 @@ export function UltraWikiPanel(): JSX.Element {
/>
)}
- <div className="flex items-stretch border-b border-border bg-card/40">
+ <div className="scrollbar-jarvis flex items-stretch overflow-x-auto border-b border-border bg-card/40">
<UltraTabButton
active={tab === "overview"}
onClick={() => setTab("overview")}
@@ -187,7 +187,18 @@ export function UltraWikiPanel(): JSX.Element {
/>
</div>
- <div className="min-h-0 flex-1 overflow-y-auto">
+ {/* Explore is the one tab that manages its own scrolling: it is a
+ three-column workspace whose map fills the height it is given, and
+ an outer scroll container would let that height grow without limit
+ instead of pinning it to the window. */}
+ <div
+ className={cn(
+ "min-h-0 flex-1",
+ tab === "explore"
+ ? "overflow-hidden"
+ : "scrollbar-jarvis overflow-y-auto",
+ )}
+ >
{tab === "overview" && (
<OverviewTab
status={status}
@@ -245,7 +256,7 @@ function UltraTabButton({
type="button"
onClick={onClick}
className={cn(
- "flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs transition-colors",
+ "flex shrink-0 items-center gap-1.5 whitespace-nowrap border-b-2 px-4 py-2.5 text-xs transition-colors",
active
? "border-primary text-foreground"
: "border-transparent text-muted-foreground hover:text-foreground",