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.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(ultrawiki): let the fullscreen map answer for the topic you picked
Ruben Lütke5784f4d2a4b0
diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.test.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.test.tsxindex de4a5f1cb8..20103cae01 100644--- a/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.test.tsx+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.test.tsx@@ -101,11 +101,28 @@ const PAYLOAD = {reason: "ok",};+/** One entity page, as the detail endpoint answers it. */+const DETAIL = {+ ok: true,+ entity: {+ key: "bora bora",+ label: "Bora Bora",+ mentions: 20,+ first_seen: "2026-06-30T10:00:00Z",+ last_seen: "2026-07-08T10:00:00Z",+ neighbors: [{ key: "tahiti", label: "Tahiti", shared: 7 }],+ },+ moments: [],+ total: 0,+ corpus: { sources: 1, items: 40, distilled: 30 },+};+function installFetch(body: unknown = PAYLOAD) {- const fetchMock = vi.fn(async () => ({+ const fetchMock = vi.fn(async (url: unknown) => ({ok: true,status: 200,- json: async () => body,+ json: async () =>+ String(url).includes("/entities/") ? DETAIL : (body as unknown),}));vi.stubGlobal("fetch", fetchMock);return fetchMock;@@ -235,6 +252,41 @@ it("shows how much of the corpus is on screen", async () => {expect(caption.textContent).toContain("2");});+it("says what you picked while the map covers the detail view", async () => {+ // Fullscreen lies on top of the panel that normally answers a click, so a+ // hit had nothing to show for itself but a hairline ring around the dot —+ // indistinguishable from a click that missed. The map has to answer for+ // itself while it owns the screen.+ installFetch();+ const onSelect = vi.fn();+ const view = renderGraph({ selectedKey: "bora bora", onSelect });++ expect(screen.queryByTestId("explore-graph-selection")).toBeNull();++ fireEvent.click(screen.getByTestId("explore-graph-expand-toggle"));++ const card = await screen.findByTestId("explore-graph-selection");+ expect(card.textContent).toContain("Bora Bora");+ await waitFor(() => expect(card.textContent).toContain("20"));++ // Neighbours are the way through the map, so they have to stay reachable+ // from the fullscreen card too.+ fireEvent.click(await screen.findByTestId("explore-graph-neighbor-tahiti"));+ expect(onSelect).toHaveBeenCalledWith("tahiti");++ view.unmount();+});++it("keeps the fullscreen card out of the way when the panel is visible", async () => {+ installFetch();+ renderGraph({ selectedKey: "bora bora" });++ await waitFor(() => expect(forceGraphProps.length).toBeGreaterThan(0));+ // Not expanded: ExplorePanel's own detail view is on screen, so a second+ // copy of the same facts would just be noise.+ expect(screen.queryByTestId("explore-graph-selection")).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.tsxindex a613757d61..a723b6889d 100644--- a/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.tsx+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/EntityGraph.tsx@@ -25,7 +25,10 @@ import { useT } from "@/i18n";import { cn } from "@/lib/utils";import { sizeChanged } from "@/lib/wikiGraph";import { corpusSpan, nodeRadius, recencyTint } from "@/lib/entityGraph";-import { fetchExploreGraph } from "@/lib/ultrawikiExploreApi";+import {+ fetchExploreEntity,+ fetchExploreGraph,+} from "@/lib/ultrawikiExploreApi";export interface EntityGraphProps {minMentions: number;@@ -131,6 +134,28 @@ export function EntityGraph({const shown = graphData.nodes.length;const total = query.data?.total_entities ?? 0;+ // Fullscreen covers the panel that normally answers a click, so the map has+ // to answer for itself. The label comes from the node already in hand, which+ // is what makes the click feel instant; the counts and neighbours arrive+ // when the request does. Same query key as ExplorePanel's detail view, so+ // the two share one cached answer rather than each fetching their own.+ const selectedNode = useMemo(+ () => graphData.nodes.find((node) => node.id === selectedKey) ?? null,+ [graphData, selectedKey],+ );+ const detailQuery = useQuery({+ queryKey: ["ultrawiki", "explore", "entity", selectedKey],+ queryFn: () => fetchExploreEntity(selectedKey as string),+ enabled: isExpanded && selectedKey !== null,+ staleTime: 30_000,+ });+ const detail =+ detailQuery.data?.entity.key === selectedKey ? detailQuery.data.entity : null;+ // A topic can be selected from the list while the mention floor keeps it off+ // the map, so fall back to what the request brought rather than showing+ // nothing at all.+ const selection = selectedNode ?? detail;+return (<divid="explore-entity-graph"@@ -271,6 +296,60 @@ export function EntityGraph({}}/>)}++ {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"+ >+ <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">+ <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>+ )}+ </div>+ )}</div><p className="border-t border-border px-4 py-1 text-[10px] text-muted-foreground">