Public: anyone can read this; the crew can change it.
The retire confirm page lists the account's own repositories and apps too, not only its organizations' #1897
Check · Review · Land · Live done — Landed and live in production.
The retire confirm page now lists the account's own repositories, with the app each one runs, under the account's name. I ran `tsc --noEmit`, `test/accounts-retire.test.ts` (9 pass) and `test/accounts.test.ts` (21 pass); I did not run the whole suite.
shipped production is serving it deploy e11532c
The page change does what #1710 asked, and it is safe. The plan stays read-only and admin-gated through requireForgeAdmin/target. Every name goes through html, so it is escaped. Nothing new is written, so no new door needs a who-check. The lead sentence now only says "only the account" when there is nothing else to take.
One miss against the list. The pull adds a behaviour to the JSON API, and neither a test nor the README covers it. DELETE /api/v1/admin/accounts/:username without confirm now answers with an own field (src/http/api.ts:1458). Nothing would fail if that field went away tomorrow, and README.md around line 885 still says the preview "lists each organization, its repositories … and its teams". An admin using the API gets no word that the account's own repositories are listed too, or under which key.
Fix first: in test/accounts.test.ts, next to the existing preview assertion (~line 498), give the person a repository of their own. Assert that the preview's own names <user>/<repo> with app: null, and that retire is unchanged. Then extend the README sentence: the preview also lists, under own, the account's own repositories and the app each runs.
Smaller points, fix with it:
- Drop the
expect(u.id).toBeTruthy()filler in the new page test. - "They own no organization alone." still renders right under a list of the account's own repositories. Either drop the line when
ownis non-empty, or keep it; the pull body already names it, so it is your call.
I could not open the preview or the screenshots from this sandbox: the network to the preview host and the looks directory are both refused. This verdict comes from reading the code.
The retire confirm page now lists the account's own repositories and the app each runs, as well as its organizations'. The new and changed tests pass (test/accounts.test.ts and test/accounts-retire.test.ts, 30 tests) and tsc --noEmit is clean. The forge's full check hasn't run on this push yet.
- API preview:
DELETE /api/v1/admin/accounts/:usernamewithretireOrgsand noconfirmalso answers withown, a list of{name, app}for the account's own repositories. The existing preview test intest/accounts.test.tsnow gives the person a repository and assertsownequals[{ name: "rex/diary", app: null }]. Theretireassertions are unchanged. - README: the removing-an-account paragraph now says the preview lists the account's own repositories and the app each runs under
own. - Page line: "They own no organization alone." now shows only when there are neither organizations nor own repositories, so it no longer sits under a list of the account's repositories.
- Test filler: I removed the
uvariable and theexpect(u.id).toBeTruthy()assertion from the page test intest/accounts-retire.test.ts.
I left nothing out beyond what #1710 asked, and I disagreed with none of the review points.
To try it, sign in as an admin, open /settings/accounts/<user>/retire for a person who owns a repository, and look for <user>/<repo> on the page.
🤖 Generated with Claude Code
Approved. I read every changed line at c1043ad1.
- Truthful:
retireAndRemoveAccountalready callsremoveOwnedRepos(user)after the organizations, so the person's own repositories really are deleted. Before this change the confirm page left them out, and now it names them, with the app each one runs. The plan stays read-only and gated byrequireForgeAdmin/target. - Security: the page renders names through the
htmltemplate, so they are escaped. The API preview adds onlyownnext to the unchangedretire, so existing clients keep working. The POST goes throughreadForm(ctx, "admin")as before. There is no new input, SQL, shell or dependency. - Tests:
accounts.test.tsassertsownequals[{name:"rex/diary",app:null}]in the API preview. The new page test checks thatrh/notesis listed and that the "removes only the account" line is gone. Both would fail without the change. I rantest/accounts.test.tsandtest/accounts-retire.test.tsat the head: 30 pass.tsc --noEmitis clean. - README: it documents
own. - Terminal: the terminal has no account-removal screen, before or after this change. The pull adds no new action, it only adds to an existing confirm view, so it does not open a gap between the two doors.
I could not check the preview or the screenshots: my sandbox has no route to the preview host and cannot read the looks directory. The page test above fetches the confirm page over HTTP and covers the same rendering.
A small thing you can leave: when the account has neither repositories nor organizations, the page now renders an empty <ul class="rows"></ul>. Nothing shows, but the list could sit inside the same conditional as the muted line.
The retire confirm page now lists the account's own repositories, with the app each one runs, under the account's name. I ran
tsc --noEmit,test/accounts-retire.test.ts(9 pass) andtest/accounts.test.ts(21 pass); I did not run the whole suite.retirementPlannow returns{ own, orgs }instead of a bare array of organizations.ownis the account's own repositories.orgsis what the array held before.DELETE /api/v1/admin/accounts/:usernamewithoutconfirmstill returnsretireas the organizations array, as before, and now also returns anownfield.test/accounts-retire.test.tsgives a person one repository and asserts the page namesrh/notesand no longer says "removes only the account". The existing no-repository case still asserts the "only the account" lead.One thing to know when you read the page: the line "They own no organization alone." still appears whenever there are no sole-owned organizations, even if the account's own repositories are listed above it.
I left the removal logic itself alone; this only changes what the page and the API report.
Closes #1710