Wave 7 close-out: the graphTools surface, wrapped cluster labels, the orphan sweep
Part 1 — the surface:
- Settings ▸ Agent ▸ Tools gains the prober GRAPH-TOOLS row as its FIRST
row (owner ruling: in the Tools section, not the tool-toggles list —
its subject is the map, its mechanism is agent capability). Writes
agent.graphTools {enabled} (absent = on, the toggle discipline) via
the section PUT; composeGraphTools pure seam. Its own key in the agent
contract — never in the tools map.
- The row carries the search-row hint discipline: "Connects prior
sessions' knowledge into new ones — the prober reads the knowledge
map" (owner wording). The honest interplay composes both: when
graph.enabled is off the row dims + disables with a "Graph is
disabled" hint (the effective gate itself is server-side, per-turn
fresh). AgentSection reads the graph section (record.graph, passed by
the dialog) — read-only.
- Cluster labels wrap: wave 7 made labels session names and FILE PATHS,
which the old single-line fillText could not bound. wrapRegionLabel
(pure, exported): word-wrap first, char-split long paths (the
node-label discipline), capped at 3 lines, overflow folded into an
ellipsized last line (owner: wrap, cap 2–3, ellipsize). Pre-wrapped
once per geometry build at the SCREEN-fixed size (viewer-relative
labels — the wrap never goes stale mid-camera-move), drawn centered
line-by-line at the centroid. Deleted-session clusters keep their
hull-only honest silence (label null → no lines).
- The orphan sweep: StatsBar's leftSlot prop is dead (its one consumer,
the knowledge-context slider, died in c690181) — removed, and pre-chat
views now render NOTHING on the left (owner ruling this round: a
"— · —" summary over an empty popover is pure noise) — the dictation
middle just widens. Stale knowledge-context comments swept in
chat.tsx (adoption-window + activity-nudge docs), activity-dock.tsx
(useActivity ground rules), dictation.tsx (×2 adaptive-meter docs),
home.tsx (pre-chat dock comment).
Part 2 — Teacher's c690181 review: clean. Imports, KIND_ICON/KIND_LABEL
entries, render branches and event seams all excised whole; the probe-
handoff branch re-indented intact and merge-adopted; tests updated in
lockstep (merge-adopted, record-adapter, render-new-session retired).
Platform's 4b60e0f roster-string fixes (labeler dropped from both
SLOT_META blocks) reviewed — consistent across agent-section +
setup-dialog.
Gates: tsc clean, 854/854 (8 new: wrapRegionLabel cases, graphTools
SSR rows ×3; stats-bar + ladder fixtures updated to the new rulings),
lint 0, build ok. Live on :3001: graphTools row first-in-group with
hint, off→{enabled:false}→on round-trip, graph-off dimming + hint +
disabled toggle, pre-chat rows summary-free, chat view keeps its
summary, long-title cluster label wrapped without console errors
(visual read unavailable this session — pure wrap is unit-pinned).
This commit is contained in:
@@ -49,6 +49,7 @@ import type React from "react";
|
||||
import {
|
||||
MODEL_SLOTS,
|
||||
type AgentSettings,
|
||||
type GraphSettings,
|
||||
type ModelCatalogEntry,
|
||||
type ModelSlotName,
|
||||
type ModelsSettings,
|
||||
@@ -99,6 +100,14 @@ export function composeTool(agent: AgentSettings | undefined, id: string, on: bo
|
||||
return { ...agent, tools: { ...agent?.tools, [id]: on } };
|
||||
}
|
||||
|
||||
/** Compose the prober graph-tools toggle (wave 7): its own key in the
|
||||
* agent section — never in the tool-toggles map (owner ruling). Absent =
|
||||
* ON (the toggle discipline); the write is explicit either way, so an
|
||||
* explicit-off record stays visible as stored. Pure — exported for tests. */
|
||||
export function composeGraphTools(agent: AgentSettings | undefined, on: boolean): AgentSettings {
|
||||
return { ...agent, graphTools: { enabled: on } };
|
||||
}
|
||||
|
||||
/** The research tool runs on the search port — the teacher registry DROPS
|
||||
* it when no engine is live (chat-handler's searchAvailable, the same
|
||||
* /api/search signal the section fetches). Pure — exported for tests.
|
||||
@@ -218,12 +227,17 @@ function MenuTrigger({
|
||||
export function AgentSection({
|
||||
agent,
|
||||
models,
|
||||
graph,
|
||||
onSectionChange,
|
||||
onModelsChange,
|
||||
}: {
|
||||
agent: AgentSettings | undefined;
|
||||
/** The `models` section (slot pins — engine-level, PUT /api/settings/models). */
|
||||
models: ModelsSettings | undefined;
|
||||
/** The `graph` section — READ ONLY here: the graphTools row composes its
|
||||
* master switch (graph.enabled off dims + disables the row; the
|
||||
* effective gate is server-side, per-turn fresh). */
|
||||
graph: GraphSettings | undefined;
|
||||
/** Writes the composed WHOLE agent section (replace-PUT discipline). */
|
||||
onSectionChange: (next: AgentSettings) => void;
|
||||
/** Writes the composed models section (slots — replace-PUT discipline). */
|
||||
@@ -571,6 +585,31 @@ export function AgentSection({
|
||||
</SettingsGroup>
|
||||
|
||||
<SettingsGroup label="Tools" testid="group-tools">
|
||||
{/* The prober's graph tools (wave 7, owner ruling 2026-09-23):
|
||||
FIRST row of the group — its subject is the map, its
|
||||
mechanism is agent capability, so it lives in Tools but
|
||||
NOT in the tool-toggles list. Its own agent-section key
|
||||
(agent.graphTools), the search-row hint discipline: a
|
||||
smaller line under it explaining what it is — this
|
||||
connects prior sessions' knowledge into new ones. */}
|
||||
{(() => {
|
||||
const graphOn = graph?.enabled ?? true;
|
||||
return (
|
||||
<SettingsRow
|
||||
label="Graph tools"
|
||||
hint={graphOn ? "Connects prior sessions' knowledge into new ones — the prober reads the knowledge map" : "Graph is disabled"}
|
||||
testid="graph-tools-row"
|
||||
dimmed={!graphOn}
|
||||
>
|
||||
<Toggle
|
||||
checked={agent?.graphTools?.enabled ?? true}
|
||||
disabled={!graphOn}
|
||||
label="graph tools"
|
||||
onChange={(on) => onSectionChange(composeGraphTools(agent, on))}
|
||||
/>
|
||||
</SettingsRow>
|
||||
);
|
||||
})()}
|
||||
{TOGGLE_TOOLS.map((id) => {
|
||||
// Research needs a live search engine; the row + toggle gray
|
||||
// on the same signal the registry drops the tool on (see
|
||||
|
||||
Reference in New Issue
Block a user