refactor(fe): trim >30-line comment blocks (second pass, #2077)
This commit is contained in:
parent
ccc69bbc7b
commit
95b866a53d
5 changed files with 55 additions and 118 deletions
|
|
@ -14,21 +14,12 @@
|
|||
// it reads — to union live containers with agents already named in the
|
||||
// assignments map.
|
||||
//
|
||||
// Editing model (the save-all issue): the operator toggles any number of
|
||||
// checkboxes across BOTH matrices, then clicks the single "save all (N)"
|
||||
// button. We diff each checkbox against the baseline captured at render
|
||||
// time (stored on `data-baseline`) and POST only the perm-types that
|
||||
// actually changed per agent to `POST /api/permissions`:
|
||||
//
|
||||
// { changes: [ { agent, tool_groups?, capabilities? } ] }
|
||||
//
|
||||
// Omitted field = leave that perm-type untouched (no commit, no diff);
|
||||
// an included array fully replaces that perm-type for that agent. The
|
||||
// backend coalesces caps+groups for one agent into ONE combined queue
|
||||
// entry → one rebuild per agent (no more double-rebuilds). The batch is
|
||||
// atomic: validated whole, applied whole, or rejected whole with
|
||||
// `{error}` — so the saved→rebuilding transition only fires on a clean
|
||||
// 200.
|
||||
// Editing model: checkboxes are diffed against a `data-baseline` captured at
|
||||
// render time; only changed perm-types per agent are POSTed to
|
||||
// `POST /api/permissions` as `{ changes: [{agent, tool_groups?, capabilities?}] }`.
|
||||
// Omitted field = leave untouched; included array = full replace. The backend
|
||||
// coalesces caps+groups per agent into ONE queue entry (one rebuild, no
|
||||
// double-rebuild). Batch is atomic — saved→rebuilding only fires on a clean 200.
|
||||
|
||||
import { $, el } from './common.js';
|
||||
import { containersState } from './state.js';
|
||||
|
|
|
|||
Loading…
Reference in a new issue