Repository navigation
The Proposals tab decides the selected proposals in one confirmed batch - #2285
Conversation
A namespace administrator ticks rows of the Proposals tab and rejects or
accepts them in one call. A toolbar above the table counts the list
("the newest 100 of 140 proposals") and holds the selection bar; it
replaces the note under the table.
A row takes a checkbox only where the caller can decide and the row can
be decided with others: a row that shares its key with another proposal
and a sensitive row take none and say why.
Reject opens a plan that lists each key, proposer and preview as the
list shows them, takes one optional reason and sends the listed hashes.
Accept reads each complete text with the review dialog's read, draws
format and bidirectional control characters as code points, marks a
proposal that lands in Conflicts, leaves an unreadable text out by name
and sends each read's hash. Accept is unavailable above 20 selected,
because each text is shown in full.
The dialog stays open on the answer: a status line counts what was
decided and one line per proposal left pending says why, in words for
each code the server answers and in the server's sentence where it
sends no code. Decided rows leave the selection.
Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const loading = accept && proposals.some((p) => !reads[p.memory_id]); | ||
| // What the button counts and the call sends: every row of a rejection, and of an | ||
| // acceptance every text but those that could not be read. | ||
| const sending = proposals.filter((p) => !(accept && reads[p.memory_id]?.error)); |
There was a problem hiding this comment.
Stale reads survive scope change
Medium Severity
The accept plan keeps earlier full-text reads when org or namespace changes. loading stays false because those reads are already stored, so Accept can send the previous texts' hashes under the new scope before the fresh reads finish.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 632c89e. Configure here.
…s a result by the row it names The count that takes the selection bar's place holds no control, so Clear, Escape and unticking Select all left the focus on the page. The panel takes it, as it does when a result that decided every row is closed. A `not_proposed` result names the newest row of the key, which is another row once the proposal is deleted and another identity's fact holds the key. The result says "Already accepted." or "Already rejected." only when `memory_id` is the proposal's own row, and "Not a pending proposal." otherwise. Under a coarse pointer the row checkbox is a 44 px target. Click UI's cell clips what leaves it, so the cell that holds a checkbox is as tall as the target and does not clip. `e2e/list-tables.spec.ts` taps 20 px from the box's centre on each side at 375 px and at 1024 px. Tests: the code-point case writes its format characters as escapes, and the read of the server's code table goes through `repositoryText` in `test/opNames.ts`, which throws when `server/` is present and the module is not. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 44277fb. Configure here.
| .row-check-cell { | ||
| overflow: visible; | ||
| padding-block: calc((var(--spacing-hit) - var(--click-checkbox-size-all)) / 2); | ||
| } |
There was a problem hiding this comment.
Touch target sits under adjacent cells
Medium Severity
The coarse-pointer hit area on a proposal checkbox is a 44px ::after centered on a ~16px control inside a 40px row-check-cell. That box extends into the next cell, which is painted on top and has no z-index on the checkbox. A tap beside the box hits the fact cell instead of toggling the row, and can open the review.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 44277fb. Configure here.
| const lost = !document.activeElement || document.activeElement === document.body; | ||
| if (wasSelecting.current && !selecting && lost) panel.current?.focus(); | ||
| wasSelecting.current = selecting; | ||
| }, [selecting]); |
There was a problem hiding this comment.
Selection clear steals dialog focus
Medium Severity
When a batch decides every selected row, the selection bar unmounts while the result dialog is still open. The new layout effect treats the unmounted dialog button as lost focus (activeElement is body) and focuses the panel behind the modal, before BatchDialog moves focus to Close.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 44277fb. Configure here.
The panel that takes the focus when the selection bar leaves holds the toolbar and the whole table. On a list taller than the window a plain focus() scrolled it into view: the page moved 125 px and the header and the tab list left the window. The focus now passes preventScroll. A Playwright case in list-tables.spec.ts ticks a row of a 40-row list, presses Clear, and expects the panel focused and the scroll position unchanged. It failed with the page scrolled before the change. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>


Part of: #1144
Part of: #1763
Related: #2064
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):
On the dashboard's Proposals tab a namespace administrator ticks rows and rejects or accepts them in one confirmed batch. The plan shows every text before anything is sent, and the result names each proposal left pending and why.
Why
memory.proposal_decidedecides many keys in one call and answers one result per key, and the dashboard decided one proposal per dialog. A reviewer with forty proposals to reject opened forty dialogs. The tab now sends one call for the rows the reviewer ticked, after a plan that shows what the call is bound to, and it says for each key the call left pending why it was left.Scope and risk
Dashboard only:
frontend/src/views/admin/Proposals.tsxand its test,frontend/src/api/review.ts, one rule infrontend/src/styles.css, two cases infrontend/e2e/list-tables.spec.ts, the test helperfrontend/src/test/opNames.tsand two documentation pages. No server file changes.What changes on the tab:
ListToolbar, no search) counts the list: "the newest 100 of 140 proposals" when the list is cut, "37 proposals" when it holds every one. It replaces the note under the table. While rows are selected the toolbar is the shared selection bar, with its own words ("3 selected", "Select all 40 on this page").highrow ("Sensitive proposals are decided one at a time."). Both are decided from their own review, as before.U+202E. A proposal with a non-emptyconflict_withis marked "Lands in Conflicts when accepted". A text that could not be read is left out, named in the list with the read's reason, and counted out of the button. The button is disabled until every read has answered, and the call sends the hash of each read.role="status"line says "Rejected 37 of 40", a list holds one line per proposal left pending, and the only button is Close. Decided rows leave the selection at once and the list is read again; the rows left pending stay selected. Closing returns the focus to the toolbar action that opened the plan, or to the panel when nothing is selected any more.code:not_found,not_proposed,hash_required,changed,ambiguous,not_independent,proposer_unknownandvalue_refused. Anot_proposedresult names the newest row of the key inmemory_id. When that is the proposal's own row, someone decided it first, and the line says "Already accepted." or "Already rejected." by itsstatus. When it is another row (the proposal was deleted and another identity's fact holds the key), the line says "Not a pending proposal.". A result with nocode, from a server a release behind, and a code the dashboard does not know show the server'sreasonsentence.Design choices:
readProposal, that the single review and the accept plan both call, so the two cannot differ in what they treat as a gone or unreadable proposal.key), so a plan never starts with the reads, the reason or the result of the one before. The dialog keeps the plan it was mounted with, so its content stays drawn while it closes.styles.css), extended to the table cell that holds a checkbox. Click UI's cell clips what leaves it, and under 769 px its card clips the cell, so under a coarse pointer that cell is 44 px tall and does not clip. A phone's card is 12 px taller for it; a fine pointer sees no change.Left out: a shared key in a batch, and an order for the list.
Risk:
changedand stays pending.Proposals.tsx. Whichever merges second resolves a small conflict inreadProposal.Compatibility, rollout and rollback
memory.proposal_decidewith severalmemory_keys, oneapproved_sha256entry per key and onereason, all of which the op already takes (up to 500 keys; the tab lists 100). It now readsresults[].decided,status,reason,codeandmemory_idof that op andconflict_withofmemory.proposals, which the server already answers.frontend/src/api/review.tsgains theProposalDecisiontype and theconflict_withfield for them.codenormemory_id, and the result then shows itsreasonsentence. A server that sends noconflict_withgets no Conflicts mark.Tests
New cases in
frontend/src/views/admin/Proposals.test.tsx, undera batch of proposals. Each fails when the behaviour it names does not hold:offers no selection to a role that cannot decide.gives an administrator a checkbox per row that is never a tab stop: also that Space on the current row toggles it.a shared-key row and a sensitive row take no checkbox, and each says why.the reject plan lists each preview, starts on Cancel and sends the listed hashes: also the reason, and that no full text is read.the accept plan reads each text whole and sends each read's hash: the reads answer hashes that differ from the listed ones.holds the acceptance until every text is read.draws format and bidirectional control characters as code points: the source writes each character as an escape.Accept is unavailable above 20 selected, and Reject takes them all.a service administrator selects and rejects, with Accept unavailable.marks a contradicted proposal in the accept plan.leaves an unreadable text out of the acceptance, names it and counts it out.the result lists each undecided row with its words, and decided rows leave the selection: also the status line and the focus after Close.a decided row leaves the selection before the list is read again.closing a result that decided every row puts the focus on the panel.... empties the selection and puts the focus on the panel, three cases: Enter on Clear, Escape from Reject…, and Space on the ticked "Select all". Each failed with the focus on the page before the panel took it.says a proposal was decided only when the result names its own row: anot_proposedresult that names another row, or none, reads "Not a pending proposal."; it failed with "Already accepted." before the check onmemory_id.shows the reason sentence of a server a release behind, and of a code it does not know.words every code the server can answer: reads the code set fromserver/memory/domain/proposal_triage.py, so a code added there with no words here fails. The read goes throughrepositoryTextinfrontend/src/test/opNames.ts, which the generated op table's read also uses: it throws whenserver/is present and the module is not, and answers the test's own list only in a checkout withoutserver/.a batch that gets no answer keeps the plan open for another try.Cancel sends nothing and keeps the selection: also that the next plan starts empty.a row decided from its own review leaves the selection.the open plan has no accessibility violation: axe on the plan and on the result.Changed cases: the test of a cut list now reads the count from the toolbar and checks that the old note is gone, a new case covers a list that holds every proposal, and the cell helpers skip the added checkbox column.
New cases in
frontend/e2e/list-tables.spec.ts:a proposal's checkbox is a 44 px target, with a touch pointer at 375 px (Click UI's cards) and at 1024 px (the table). It taps 20 px from the centre of the 16 px box on each of its four sides and expects each tap to tick or untick the row and none to open the review. Both widths failed before the style rule.clearing a proposal selection leaves the page where it was scrolled: on a list of 40 proposals, taller than the window, it ticks a row, presses Clear, and expects the panel focused and the scroll position unchanged. It failed with the page scrolled 125 px before the focus passedpreventScroll.npx vitest runonProposals.test.tsxand the 13 test files that import the changed modules or readstyles.css(api/review.test.ts,ReviewQueue.test.tsx,copy.rules.test.ts,emptyStates.rules.test.ts,canCall.test.ts,RunReliance.test.tsx,ListToolbar.test.tsx,Toast.layer.test.tsx,ThreadReplayDialog.test.tsx,Modal.test.tsx,ui.test.tsx,Unavailable.test.tsx,preview.test.tsx)Proposals.test.tsx: 61 passed. With thepreventScrollargument, the last change, the two files that reach it ran again (Proposals.test.tsx,ReviewQueue.test.tsx): 160 passednpx playwright test e2e/list-tables.spec.tsnpm --prefix frontend run build,npm --prefix frontend run budgettsc -bwith no errors);bundle-budget: OKbiome formaton the six changed dashboard files andbiome lint frontend/src(the pinned Biome)ruff check server extractor sdk/python tests scripts .claude,ruff format --check .make typecheckmypy --strict sdk/python/loom: no issues in 75 filespytest -n 2ontests/unit/test_package_contracts.py,test_op_transport_contract.py,test_tunable_constants.py,test_store_names_refused.py,test_degraded_unnoted.py,test_public_copy.py,test_doc_links.py,test_agent_instructions.pyandtests/analyzertests/unit/test_degraded_unnoted.py::test_every_broad_handler_notes_its_fallback_or_says_why_it_need_notfails onserver/knowledge/app/sources_queue.py. This change touches no Python file, and the branch point fails the same way:mainhas since fixed it, in a commit this branch does not hold. It is reported here and not fixed.Not run locally:
e2e/list-tables.spec.ts. That spec ran in headless Chromium with the system libraries it misses on this machine unpacked into a private folder and named inLD_LIBRARY_PATH; nothing was installed.make lintandmake formatas whole targets: this machine has norustfmtand noshfmt. Ruff and Biome ran on their own, as the table says, no shell file changed, and the two documentation pages are unchanged since Prettier checked them.The branch merges with
mainwithout a conflict (git merge-tree --write-tree origin/main HEAD), so it holds no merge ofmain.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. Checked by running: each new test against the change, the type check, the build and the bundle budget, the format and lint checks on the changed files, the touch target in a browser at two widths, the scroll position after Clear in a browser, and the diff read once against the dashboard design rules.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make test-unitand applicable integration results are reported by CI; a full local run is not required before pushing.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump), the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py) and the standalone skill bundles (python3 scripts/codegen/standalone_skills.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.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