Repository navigation
The dashboard lists, creates, opens and deletes collections - #126
Merged
Merged
Conversation
An Access page in the admin drawer reads collection.list, creates a collection under a parent or at the top level, shows a collection's grants and newest documents, opens its members dialog, and deletes it through collection.delete after a confirm. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… and the last page The Members dialog takes the collection's role from collection.list, so an admin through a parent or a group can add and revoke. A delete hands focus to the search once the list reads again; the last Load more hands it to the first row it added. The details dialog opens on itself, puts Close before Delete, and says when the grants shown are capped; a search that matches nothing names the pages it covered. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…n no row shows useLastPageFocus replaces the copies in Collections and the Library, and sends focus to the search when the last page adds no row the search shows. The collection details read grants with the page's own limit, say when the list may be capped, name every ancestor in the inheritance hint, and remount per collection instead of stamping their reads. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…us hook has its own spec The details ask grants.list for its largest page and caption it only when the stored rows read (each row plus its folded spellings) reach the limit. useLastPageFocus gets a spec for each target and for leaving focus alone, and the design guide names it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…d the focus guard The count is people and the limit counts stored grants, so a cut list says "the newest; more not shown". Specs check the 500 limit sent, the caption at the limit, grantsCut's arithmetic, and that a page left keeps focus where it was. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… shows no caption Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
This was referenced Oct 21, 2026
5 of 9 tasks
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 has a Collections page (admin drawer, Access) that lists the collections your grants reach, creates one, shows its grants and newest documents, opens its members, and deletes it with what it holds after a confirm.
Why
Collections and their grants exist on the server (
collection.*,grants.*), but the dashboard had no way to see or manage them: an admin needed the SDK or raw HTTP to create a collection, check who can read it, or delete it.Scope and risk
frontend/src/views/admin/Collections.tsxat/admin/collections, filed as the first entry of the drawer's Access group, so every namespace admin sees it; Users still shows only to org and platform admins. The page is org-scoped.collection.list(500 a page, "Load more" on a cursor) and filters by name in the browser. A row opens a dialog that readsnamespace.get(description, created),grants.list(the collection's own grants; the parent's are named in a hint, since they reach it too) andknowledge.list(the newest 25 documents, projected to the three fields shown).flows/CreateCollectionDialog.tsx) checks thecol-prefix, the reservedcol-me-prefix and the namespace name rule before sending, and offers as parents only the non-personal collections the caller writes; the server still decides.flows/MembersDialog.tsx(grants.create/revoke/approve).collection.deleteonly after a danger confirm that says what goes: documents, originals and memories erased from disk, grants stop applying, children become top-level, the name is not reused. It is offered only to an admin of a non-personal collection: absent from the row menu otherwise, andaria-disabledwith its reason in the details dialog. A delete whose erasure came backfailedsays it is being retried and names the erasure id.lib/useLastPageFocus, used by Collections and the Library; the Library also gains the fallback to its search when the last page shows no row. Activity keeps its own handoff: it keys on a row's position among the filtered events (audit rows carry no unique name to key on), and moving it is a separate change.grants.list's largest page (500) and say "the newest; more not shown" only when the stored rows read, each row plus its folded spellings (also), reach that limit. A folded row whose subject differs from the kept row's only in case adds nothing toalso, so a list cut at exactly the limit with such a pair reads as one stored grant short, and as whole; a server-side page flag would close that, and is left to the open grants.list paging change rather than added here.server/operations/reach_manifest.pyis regenerated because the dashboard now calls the threecollection.*ops.Compatibility, rollout and rollback
Tests
npm --prefix frontend run build(tsc and Vite): passes.npm --prefix frontend run budget: OK.make format-check,make lint(Biome with its accessibility rules, codegen checks, the reach census),make typecheck: pass.frontend/src/views/admin/Collections.test.tsx(vitest): loading, list, count, empty, filtered, error with Retry, Load more, details (members, documents, "the newest 25", grants cut at 500 stored rows and no caption below it, focus on the dialog itself), Delete unavailable to a viewer, delete only after the confirm, create and a refused create, and axe over the list and the details dialog.Sidebar.nav.test.tsfollows the Access group./admin/collectionsjoinsROUTES(the axe, focus-ring and layout sweeps) and the route budget, with acollection.listfixture;a11y.spec.tsruns axe with the details dialog and the New collection dialog open.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 hand: the op inputs and outputs against
server/identity/api/models_collections.py, the role gates inops_collections.pyandops_grants.py, and the design guide's rules for the primitives used.I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.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