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

The approval page lists what an app would get as the PDS's consent page does

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:console/permissions

What changes

The approval page says what an app would get as the PDS's consent page does. When an app asks to sign in as a group, the page used to list each raw scope string (atproto, repo:app.bsky.feed.post, a long space: string) as a bullet. Now each group shows a row for each kind of thing the app would get, as the space alpha PDS's consent page lists them: Bluesky, chat, each permission set, the repository, calling services (Authenticate), spaces. Each row has the PDS's icon, its title and a one-line description, in the PDS's order. A quiet "Details" button opens a dialog with what the PDS puts behind its "?":

  • Repository: collections ticked under Create, Update and Delete, and whether it can upload files.
  • Authenticate: each method, and the service it's called on.
  • Spaces: "All spaces on @riders.groups.test", using the group's handle rather than its DID, with its table.

A request for atproto alone says the app would only know it's signed in as the group. A request touching only Bluesky's collections gets one Bluesky row, as on the PDS. The scopes as asked are behind "Technical details", as on the PDS. What the app would not get is listed in the same rows, quieter, and each of those dialogs says it was asked for and won't be given. The PDS's warnings for every space on the network or the full identity appear above the button.

The host sends each permission set's title. Each getAuthorization label carries title (new, optional) beside text, from the set's lexicon.

Why

The two consent screens a person sees, their PDS's and the group's, should read alike. Scopes are parsed by @atproto/oauth-scopes at the spaces-alpha version the console's @atproto/lex packages pin, the same parser oauth-provider-ui uses at the commit CI pins, so the two agree on what a scope means. Descriptions say "the group's" where the PDS says "your", because the app acts as the group.

How it was checked

  • just look over the space alpha (GROUP_HOST_DEV_ENV), with real requests pushed to the host: mixed scopes, permission sets only, Bluesky only, atproto alone, each dialog open, on desktop and phone, light and dark. The pictures are below, with the page as it was first.
  • The PDS's own consent page was drawn for the same request, to compare against.
  • A fresh agent critiqued the pictures. From that, names now break only after a dot, Bluesky's lines say "the group's", the withheld dialogs say so, and the "atproto alone" line and the Authenticate intro are clearer.
  • svelte-check, harness/layers.mjs, just lex, and the authorization tests (updated for title) pass locally.
  • The e2e flow that signs an app in now checks the Bluesky row, its details and "Technical details". It runs on the runner.

Shortcomings

  • The critique raised points about the page that this pull leaves alone: it has no cards, and Decline sits under the act rather than beside it. It also questioned the PDS's own words ("Authenticate", "Use permissioned spaces", "Publish changes"), which are kept to match.
  • A permission set's row has no details dialog. The PDS expands a set into its permissions, and this page only has the set's title and detail.
  • Space types show as their NSIDs. The PDS names them from their declarations, which this page doesn't fetch.

authorize-app-alice-desktop-light.png

perm-mixed-alice-desktop-light.png

perm-mixed-alice-phone-dark.png

perm-repo-alice-phone-dark.png

perm-spaces-alice-phone-dark.png

perm-auth-alice-desktop-light.png

perm-tech-alice-desktop-light.png

perm-bsky-alice-desktop-light.png

perm-sets-alice-desktop-light.png

perm-bare-alice-desktop-light.png

pds-consent-desktop-light.png

Asked for changes

This replaces the raw scope bullets on the approval page with PDS-style rows (icon, title, one line, Details dialog) built by a new permissions.ts on @atproto/oauth-scopes. It also adds an optional title to each getAuthorization label. The parsing and the rendering read sensibly. I found one concrete bug, in the e2e flow.

The checks were still queued when I looked, so I read the diff without any results.

  • e2e syntax error. The new line in harness/e2e/flows.spec.mjs puts an apostrophe inside a single-quoted string. That is a syntax error, so the whole spec file fails to load, not only this test. Use double quotes or escape it. The PR says the e2e "runs on the runner", so this was probably never run locally.
harness/e2e/flows.spec.mjsline 563Outdated
await page.goto(await app.push())
await expect(page.getByRole('heading', { name: 'Sign in an app' })).toBeVisible()
// Said as her PDS says it: Bluesky, and in its details, the posts.
await expect(page.getByText('Use parts of the group's Bluesky account')).toBeVisible()
review.knotless.dev

'Use parts of the group's Bluesky account' ends the string at group'. This is a syntax error and breaks the whole spec file. Write it with double quotes, e.g. "Use parts of the group's Bluesky account".

Approved

The e2e syntax error from my earlier review is fixed. The string with the apostrophe now uses double quotes, and that was the only change since the last round. I found nothing else to ask for.

Approved

Since my last approval, the only change is the e2e flow. It now scopes the Bluesky row, its Details dialog and "Technical details" to Riders' form, because the user has two groups. The e2e workflow passed at this head, flows included, along with the lexicons, docs and rust-lint checks. The test and web workflows were still running when I looked. I have nothing new to ask for.

Approved

Carried forward: the change this pull makes at 91b9318351dc2acb3dd28445900645881c5087f1 is the one reviewed at e11e3bf0bb47effbe65c85c16b9d1431464e0ebb, so that review stands. What is new comes from its base.

Merged as 25f430b