~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

consent: permission sets shown as the reference's page shows them

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:consent/permission-sets

The consent page now shows a permission set as the reference's page does: every include: scope gets a row of its own, headed by the set's title or else its NSID, with a closed Details that lists what the set grants: its calls and where they go, and its collections with the actions asked.

Claude Opus 5.5 · high

What changes

Spec. In spec/OAUTH-PAGES.md, "Consent", row 5 now covers every include: token, beside transition:generic too, titled or not. The heading is the set's title, or else its NSID. The sentence is the detail, or else the NSID when the set has a title. Both are shown whole: the 60/140 cut and From <authority> are gone. Each set's row has a Details disclosure, closed at first. It holds the reference's sentence, a Call/Towards table (audiences as the reference names them: Any service, Bluesky App services, Bluesky Chat services, A service controlled by <host>, or else the DID in <code>), and a Data/Create/Update/Delete table. An untitled set's grant is no longer folded into "Your data in …" and "Other services". "Seeing it all" leaves out views with a title over 60 or a detail over 140 code points.

Harness. consentRows and checkConsent in harness/checks/pages.mjs hold each row, and each set's Details cell for cell, with its rowspan. A new set, com.example.test.authBare, has no title, no detail and mixed-case NSIDs. A new client asks for sets towards api.bsky.app, api.bsky.chat and a did:plc audience. The pages run now deals its clients as a shuffled deck, each before any again. look.mjs hosts the harness's sets for include: scopes, and --details opens every disclosure.

Pages. web/src/lib/scopes.ts builds the new set rows. A new Grant.svelte molecule draws the disclosure and its tables. The Icon atom gains Lucide's check, with an accessible name when it is given a label.

Why

The reference's consent screen (oauth-provider-ui's scope-description.tsx, the same on main and on the spaces alpha) shows each include: as its own card: its title or NSID, its detail or NSID, and a dialog of its calls and data. Ours named only titled sets, under a line of our own, and folded untitled ones into other rows.

How it was checked

  • The check bites. The pages run (--pages --seed 1) against the old pages fails at step 1, "the consent list differs". A narrower plant, set rows hidden beside transition:generic, first passed: seed 1 never drew that client. Hence the deck; with it, the same plant fails at step 2.
  • It passes with the fix. Seed 1 passes (33 consent views), and so does seed 2 (37). One earlier seed-2 run timed out finding the consent view after a sign-in, at a load average of 21; it passed when run again.
  • Pages build. npm run check and npm run build pass, and layers.mjs and contrast.mjs pass.
  • Looked at. Drawn with just look consent on desktop light and phone dark, open and closed, and critiqued by a fresh agent. The one finding about this change was letter-by-letter wrapping of the action headers; it is fixed.

Shortcomings

  • We sort by code point. The reference uses localeCompare, which depends on the browser's locale and differs only for mixed-case NSIDs.
  • The reference's space permissions inside a set (spaces alpha) are not shown: this server keeps no space permission in a set's grant.
  • The reference shows the grant in a dialog behind a "?" button. Ours is a <details> named Details, styled as Technical details is.

Review

Start with spec/OAUTH-PAGES.md, "Consent", row 5 and "What it grants". Then read consentRows/grantDetails in the harness.

consent-phone-dark-open.png

consent-desktop-light-closed.png

Approved

This pull gives every include: on the consent page a row of its own, also beside transition:generic. The heading is the set's title or else its NSID. The sentence is the detail, or else the NSID when the set has a title. A closed Details holds the Call/Towards and Data/Create/Update/Delete tables. Untitled sets are no longer folded into rows 7 and 9.

What I checked:

  • Spec, harness and pages agree. spec/OAUTH-PAGES.md row 5 and "What it grants" match the harness's consentRows/grantDetails and web/src/lib/scopes.ts + Grant.svelte. They hold the same audience wording and rowspan, put the same things in <code> (methods, collections and audiences said in no words), sort the same way, and agree on an empty sentence for a set with neither title nor detail.
  • The check is stricter, not looser. It now compares each set's Details cell for cell and checks that it is closed when the view appears. Dealing clients as a seeded deck (below from lib/random.mjs) makes sure every client is drawn in a run. "Seeing it all" no longer covers views whose set title or detail is over 60/140 characters. That follows from the spec dropping the cut, and the spec says so; it is not loosened to let the server pass.
  • Changeset and docs. The changeset is written for those who use the pages. web/AGENTS.md and the UI skill are updated to match.
  • Gates. The gates run at the head passes, harness included.

Nothing needs to change before this merges.

On what I read: the whole diff was too long to show here, and I couldn't get its list of files. I read the diffs of spec/OAUTH-PAGES.md, harness/checks/pages.mjs, harness/lib/sets.mjs, harness/look.mjs, web/src/lib/scopes.ts, web/src/lib/words.ts, web/src/lib/molecules/Grant.svelte, web/src/lib/molecules/Permission.svelte, web/src/lib/atoms/Icon.svelte, web/AGENTS.md, .claude/skills/ui/SKILL.md and .changeset/consent-permission-sets.md. If the pull changes any file beyond these, I haven't reviewed it.

All checks have passed

3 passed, 1 skipped

Merged as 49996df