next: Delete account in Settings, asking no new scope; Identity & data and Instagram import gone
MergedThis adds a Delete account action to Settings and removes the Identity & data and Import from Instagram rows. The action's deletes block uses getAccountDeletionPlan with repeat, then calls deleteAccount and signs out. It lists only the ten social.grain.* collections Grain already writes, so sign-in asks for no new scope. It is gated on typing the handle, and the confirm text is clear.
I read next/views/grain-settings.json, which is the only hand-written change. It looks right:
- The view's own
serviceisdid:web:grain.social#grain_appview, and both calls use that same service. deleteAccounttakes the account's DID through$did.- Nothing else in the view still refers to the removed rows or the "Tools" heading.
I did not read the rest of the diff, which is the vendor/hud bump to 42d0f76. AGENTS.md says that directory is copied from HUD and never edited by hand, and HUD's own checks cover it. I can't verify that bump from here. The pull body says it was tested end to end on web and iOS.
The checks on the previous head all passed. On this head, check and lexicons pass. next, test, web and next-image were still running when I looked.
The pull body states two ordering constraints. getAccountDeletionPlan must be deployed in grain-serve first, and hud-next must run HUD 42d0f76. Make sure both are in place before merging.
Thanks. Every check now passes at 5711f09: web, check, next, test, next-image; lexicons and e2e were skipped. HUD 42d0f76 is on app/shell with just cov at 100%, and the vendor copy is that sha, as vendor/hud/COMMIT says. Both ordering constraints still hold: grain-serve's getAccountDeletionPlan (855d068 on main) has to be deployed and hud-next has to run 42d0f76 before this merges.
5 passed, 2 skipped
- next: Delete account in Settings, asking no new scope; Identity & data and Instagram import gone
- main
What changes
Delete account. Settings has a destructive Delete account above Sign out, in the account section. It asks with grain.social's words and makes you type your handle to confirm. HUD then asks
social.grain.server.getAccountDeletionPlanfor a page of deletes and commits each page at the account's PDS in one applyWrites, repeating until nothing is left, with a count on the button. It then callssocial.grain.server.deleteAccountwith the account's DID, so grain forgets the account (preferences, notification state, push tokens, mutes, story views), and signs the account out. The atproto account and other apps' records are untouched.Gone: the rows opening grain.social's Identity & data and Import from Instagram pages.
No new scope at sign-in. Delete account's
collectionsare the tensocial.grain.*collections Grain's views already write, so sign-in asks exactly what next.grain.social asks today and nobody is asked to consent again. Groups' collections (social.grain.group.{decline,item,submission}) are left out, because groups don't work yet. If an account has group records, HUD stops at the plan that names them and deletes none of that plan. It never calls deleteAccount or signs out, and it says "Some records can't be deleted here yet: social.grain.group.item. Signing in doesn't ask to delete them, so nothing more was deleted." The web shows that under the button, iOS in an alert. A later change can ask for the group scopes at deletion time only.vendor/hud at 42d0f76. HUD's Action
deletes(a73ef12, the gallery's) gainsrepeat,thenandcollections(836baa7). 42d0f76 adds the refusal naming what is left. It also moves an Action's failure in a Stack to right under its button: on the web it had been drawn after everything in Settings, out of sight. Only the operator's own clients can run a repeating plan.Why
Under HUD, grain-serve holds no session for the account, so its cookie path can't delete the records. Instead the app deletes them at the PDS, as a gallery's Delete does with
getDeletionPlan. grain-serve, asked with a service token, forgets the account once its PDS lists nosocial.grain.*collection.How it was checked
End to end against HUD's reference PDS. The throwaway alice.test was seeded with 219 Grain records: 8 galleries of 8 photos, each photo with EXIF and a gallery item, plus favorites, comments, a follow, a story and a profile. HUD served Grain's next/ as its pages, at its public origin over a Cloudflare quick tunnel, so that Grain's web is the operator's own client as on next.grain.social. did:web:grain.social pointed at a local stand-in for grain-serve, which plans as
getAccountDeletionPlandoes (its order, 200 a plan) and recordsdeleteAccount. No real account or appview was involved.alice, and withbob.test, and turns on for@ALICE.TEST.describeRepolists onlyapp.bsky.*. The stand-in saw three plans (200, 19, 0), thendeleteAccountwith alice's DID, with nothing left. The browser was signed out and its session cookie gone.?action=deleteand no group scope.app.bsky.*,deleteAccountwith her DID, signed out. With a group record it shows "Couldn't delete account" with the same message and stays signed in.-D warnings,just cov(100% of lines and functions), svelte-check, web unit tests (36) and SSR,just lint,just lex.node next/check-apps.mjs,npm run check; next/ builds.The end-to-end runs used HUD 46f47fa. That is 42d0f76's change before I rebased it onto app/shell's 9332f5b, a tab-root change that doesn't touch this. Signing in on the web found that the sign-in screen's redirect needed
{ external: true }. That fix is now f04f35b on feature/hud, merged here.Shortcomings
getAccountDeletionPlanis merged to main (855d068) and must be deployed before this. hud-next must run 42d0f76.getAccountDeletionPlan's lexicon is bundled by hand in HUD until grain's lexicons carry it.deleteswithrepeaton a Covers select is accepted by the view check but never exercised.