diff --git a/robot-docs/web.md b/robot-docs/web.md index 8c71092e0..3e83fc059 100644 --- a/robot-docs/web.md +++ b/robot-docs/web.md @@ -102,7 +102,7 @@ A press on a call opens a drawer under its lane: what it did (each edit opens th **Agents** (`AgentsButton.svelte`, `agents.ts`, `nodes/AgentsNode.svelte`, `views/AgentsView.svelte`): once a session has agents below it, its window shows a branching-icon button beside the jobs one (in canvas windows only; the phone has none). Its count is the agents working, and its menu lists them (closed ones too, indented by how far below the window's own session they are) under an "open tree" row. The menu and the tree order siblings alike (`agentRank`, held by `ranksOf` while the menu is open or a tree card is hovered), by the rule the TUI shares: [the order of agents](agents.md#the-order-of-agents). A family is read whole from its root with `GET /sessions?family_id=` (`listFamily`), once for every window of it, however many show it (`watchFamily` shares the read and the newest answer). It is polled, since the events socket follows only roots, and `familyDelay` sets the pace: every 2 s while an agent works, 3 s while the root has a turn, 6 s at rest with agents and 30 s with none, at once when the root's turn starts or ends (`pokeFamily`) or the tab comes back, and never while the tab is hidden. A read that changes nothing tells no one, and a first read that fails says so. An agent picked opens as an ordinary chat window beside the one it came from, tied to it by a tether (`Board.openSession(id, parent)`). "open tree" opens the agents window for the family's root (`layoutTree`): active branches grow to the right of the root while closed folds and finished branches balance to its left when active work is also present; large leaf sibling sets (> 5) stagger across sub-columns with a half-row vertical offset so links glide between rows, and two or more closed leaf agents under a parent fold into a `▸ N closed agents` deck node that unfolds its compact closed pills in place on click without shrinking the fitted zoom (`fitBox` and `shapeOf` ignore unfolded closed pills, and clicking a fold pins it under the pointer while contour tucking keeps sibling branches from overlapping). Active cards show their name, short model or live face (on roots and leads), and latest tool/activity snippet; closed pills use an opaque dimmed surface, and links sit at 22% opacity at rest and light the hovered card's ancestor chain in `--accent` (90%) while stepping down monotonically across descendant hops (`hoverLineage`: 62%, 42%, 30%, vs 14% for unrelated branches). A click opens an agent, and a "hide inactive" button (shown once any agent is not working) leaves out the agents that are not working, idle and closed alike, unless one is working below them (`withoutInactive`), the window shrinking to what is left; the choice is kept in this browser. The tree pans and zooms itself: a left-button drag on its ground cancels native text selection, and only the tree is non-selectable, so panning cannot extend a selection into neighbouring conversation blocks while their text and the tree's buttons retain their usual interactions. It starts fitted and centred with room around it (48 px, enlarged up to 135% when the window is bigger than it needs) and follows the window while it is resized, until the person drags the ground, scrolls, pinches or uses its + and − buttons, after which it stays where they put it until the fit button follows the window again; an "auto-fit" button (on by default, kept in this browser) also fits it whenever the tree's shape changes (`shapeOf`: an agent added, removed or hidden, not one only doing something else), and the window itself is sized to the tree either way until it is resized. The window is sized to hold the tree at 115% and its room (`AgentsNode`, at most 1500 by 960), and again when agents come or go, growing only into free room (`growInto`: it stops 32 px short of a window beside or below it, so it never covers the chats opened from it), until the person resizes it. The size it was last fitted to is kept on the window (`data.fit`, saved with the board), and it is fitted again only while it still has that size (`refit`), so a size the person set holds through a reload. The session list holds only roots (`scope=roots`), so a window of an agent keeps its record in `sessions.agents` (`adopt` when it opens, refreshed by each family read, and `ensure` reads it back for a window the board restores, counting only a 404 as gone). -The **artifact** (`nodes/ArtifactNode.svelte`, `views/ArtifactView.svelte`, `artifacts.svelte.ts`; robot-docs/artifacts.md) is a page the agent made, live in a sandboxed `