Repository navigation
The Assistant page opens on the namespace's overview, and a user or agent is picked from it, not typed - #306
Merged
Merged
Conversation
…gent is picked from it, not typed The overview (namespace.inventory) is read on load. Each user and agent in it is a button that inspects it, and the id field suggests them while taking any other id or a session id. Inspect documents, Open the graph (with or without an entity) and Draft improvements are one action each; a draft card says how to apply it in plain words instead of showing a disabled Apply button. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…on, labelled counts and picks Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ng, the whole id in a tip Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ead, tips only for cut names Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…icks, Agent name field Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…at the badges' width, focus on the Memories heading Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… through Unavailable A pick's accessible name is set on the button, since its flex label drops the space between the name and the count; the cut name's tip goes through Unavailable's `tip`, so the button keeps one tree whether blocked or not. Tests pin Unavailable keeping focus as its reason clears and BusyButton forwarding its ref. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…nt in the singular An uncounted plane or an incomplete population shows the server's reason as a sentence, which already says what was not counted. A pick with one row reads "1 memory", and a blocked, cut pick's description ends with its id as a sentence. The subject mapping moves to its own module; the e2e behaviour checks for a pick leave the layout setup for a test of their own, and Unavailable's tip has a unit test. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… that say why The drafts block is a section labelled by its Review changes heading, like the overview's. The pick's flushSync comment says the Memories heading mounts once the read is busy; the fallback reasons drop their period to match the server's; imports sit in name order; the BusyButton test clicks the button its mock is for. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… its tip only The subject's toggle label, field label and empty reasons are one record in assistant/subjects.ts, beside the population each is listed under. A blocked, cut pick is described by its reason alone; Unavailable shows its tip under the reason. Tests pin Refresh keeping the overview marked busy and a second pick moving the focus, and share one token helper. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ble's tip computed once shownName in assistant/subjects.ts labels both the datalist options and the picks; Unavailable builds its tooltip content before the JSX; the gate comment keeps only why; a test name says what it checks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… a change of subject An id picked in one namespace, or typed as a user id, is not sent as another namespace's id or as a session id. Agents are described by what the server counts (the agent memories were written under, apart from their authors); the tooltip test checks the reason and the tip apart. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…, names by domain The subject toggle clears the id only when the subject changes; a namespace switch clears the graph's start entity too. The subject copy is SUBJECT_COPY (the inspection heading reads its label) and the population mapping INSPECTED_AS; `pick` is required, and the gate comment says why the inventory's answer counts as well as the token's claims. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…hint only with picks The inspection heading shows an agent by the dashboard's name for it, as the pick and the suggestion do. "Who appears here" asks for a pick only when the overview lists someone; the toggle's early return says why it is there. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…t says what it keys on A session is never suggested, so its copy has no `pick`. The form's namespace key is named for what it is and says why a new token keeps the typed id; the top-N test is built as the server answers (20 of 340). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
feat/assistant-ux
branch
from
November 7, 2026 11:00
ef5df69 to
1946e47
Compare
This was referenced Nov 7, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The dashboard's Assistant page opens on what the namespace holds and who appears in it; each user and agent there is a button that shows what it remembers, so no id has to be typed. Documents, the graph and drafting improvements are one action each.
Why
The page opened on a Scope form with User selected, an empty User id box and a disabled Inspect saying "Enter an id to inspect", so it read as a page that needs an id before it can do anything, although the overview, the documents read and every starter need none. The ids it asked for were ones it already had: the inventory lists the users and agents found on rows, but as plain badges to copy and retype. Nothing showed until a starter was clicked, Documents sat as a fourth choice in the User/Agent/Session toggle although it takes no id and reads something else, and the graph needed an entity typed into a free-text box with no suggestions. The visible copy named ops and release details.
The page now reads top to bottom as a first-time viewer uses it:
namespace.inventory, a VIEWER read gated as before): live counts and the newest write per plane (the dashboard'sStattiles), then users, agents, authors and members. Users and agents are buttons; a click fills the form, inspects, and moves the focus to the answer. Authors and members are listed only, since no inspection is filed under an actor or a grant. Refresh reads it again.datalist, the native combobox, so any other id or a session id can still be typed). A disabled button says what to do next ("Pick a user above or type an id."). Inspect documents is its own button.Design notes:
Reading the inventory on load stays inside the op's budget: it is the namespace's counts and three top-20 group-bys over the table's key prefix, read each time the page opens (a visit, or Back from the graph), when the namespace or token scope changes, and on Refresh. Measured on a local ClickHouse with one namespace of 207,360 live memory rows (5,184 users, 30 agents), five calls: 9 queries per call, 836,497 rows read, 71.5 MiB peak memory per query, the slowest query 30–84 ms, and 38–120 ms end to end, against the op's p99 budget of 800 ms (
OP_BUDGETS_P99_MS). The reads scale with the namespace's live rows (eachFINALscan reads them once), so it was measured again at ten times the size: 2,073,601 live rows (51,841 users, 31 agents, merged), five calls, 9 queries and 8,294,405 rows read per call, 72 MiB peak memory per query, the slowest query 59–89 ms, and 78–100 ms end to end. (One of the five calls also ran the server's usage-hint checks, which any call can trigger and which share the request's tag: 15 more queries, the slowest 210 ms.) The page is meant for any namespace that size or smaller; one far larger pays the op's own cost, as it did on a click before.Click UI's AutoComplete selects a value from its list and does not keep free text, so the suggest list is the Click UI TextField with a native
datalist.The scope and permission gates are unchanged: an unknown role, a token pinned to one user, and a token whose scope needs an id this page does not send each disable the reads they disabled before. The pinned-token reason now names what it blocks ("inspecting memories and drafting").
While the role is still being read (
namespace.list_mineon a direct visit), the overview shows a loader and each read's button says the role is still loading, not "Your role on this namespace is not known.":lib/namespaceRole.tsgainsuseNamespaceRoleRead, which returns the role and whether that read is still running;useNamespaceRolereturns its role as before.Tasks a first-time viewer does, measured with Playwright against a local server with four users, three agents, seven sessions and two documents:
Scope and risk
Frontend only:
frontend/src/views/Assistant.tsx,views/assistant/Inventory.tsx,ReviewChanges.tsxand the newsubjects.ts(what the page calls each subject, and which population is inspected as which),views/assistant/Inspection.tsx(the subject label fromsubjects.ts, an agent shown by the dashboard's name for it), a comment inlib/graphLink.ts,lib/namespaceRole.ts(the new loading flag; the rows a list_mine read answered are now kept only for the org they were read for), four shared primitives (ui/Unavailablekeeps its child mounted when its reason comes or goes, so a focused button keeps its focus, and takes atip, shown alone without a reason and under the reason with one, while the description stays the reason;ui/BusyButtonforwards its ref and keeps anaria-disabledgiven to it;ui/SectionHeadingtakesfocusableso a script can focus a heading;ui/Stat's hint takes a node), their tests, the Assistant e2e spec, the e2e fixture (which now answersnamespace.inventory, as the page reads it on every load), the page's line indocs/features/dashboard.mdanddocs/features/knowledge.md, and the datalist field indocs/development/dashboard-design.md. No server change. The inspection and document panels show the server's own text, unchanged.Compatibility, rollout and rollback
namespace.inventoryis now called on load instead of on a click.Tests
npm --prefix frontend run test: 218 files, 1932 tests pass (one Library tag test fails now and then under heavy load, and passes alone and on a re-run, before and after this change). The primitives' tests pinUnavailablekeeping a focused child focused as its reason clears, andBusyButtonforwarding its ref and anaria-disabledgiven to it. The Assistant tests cover the overview on load and its gates, the overview read once the role resolves (a loader meanwhile), the id hint when the overview lists nobody, a section or population the server could not count shown with its own reason, a pick with one memory named in the singular, a second pick while the first is still read moving the focus to the answer, the id field cleared on a namespace switch and a change of subject, Refresh keeping the overview on screen marked busy, a failed draft read showing no Review changes, picking a user and an agent (each moves the focus to the answer; the buttons are named "ada 12 memories"), the suggestions per subject, authors not offered, the top-N note, the pinned-token cases, Refresh, a namespace switch reading the new namespace's overview, the graph with and without an entity, and the "How to apply" line for each kind of draft; axe runs on the overview and on the drafts.npm --prefix frontend run buildandrun budget: pass.E2E_PORT=<port> npm --prefix frontend run e2e: the Assistant spec draws every panel at 1400 and 375 px with no horizontal scroll, no clipped element and no axe violation, draws blocked picks with a 200-character id at 375 px (described by the reason, the whole id in the tip), checks a pick's accessible name ("ada 3 memories"), the cut id's tip and the focus on the Memories heading after a pick, and that Back from the graph lands on Open the graph. The Assistant, a11y and focus-ring specs pass; in the route-budget spec/assistantpasses (three runs of three), and the paint-time failures on other pages track the machine's load (load average 485 at the time).Unavailablenow keeps its child inside a closed tooltip on every page, so the route-budget and perf-budget specs ran formainand this head side by side, on the same machine at the same time:mainfailed four CPU-timed checks (an LCP, and interactions of 312, 448 and 1280 ms), this head three (an LCP, and interactions of 224 and 352 ms). EveryUnavailablechild is a Click UIButtonorBusyButton, and no style keys on the tooltip trigger'sdata-state.main's frontend under the same load fails seven of the same spec./assistant's route budget, axe and focus-ring runs pass.make format lint: pass.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. I checked the page in a browser against a local server, and read every changed line.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format,make lintandmake typecheckpass;make test-unitruns on the rebased head before the merge; no server behaviour changed, so no integration run.main; no merged migration is edited. (None.)npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code