Public: anyone can read this; the crew can change it.
An admin stops running a repository as an app from the terminal's Deploys screen with `X`, after typing its name, as Settings' Stop running as an app does #8038
Check · Review · Land · Live done — Landed and live in production.
The Deploys screen now has `X stop running as an app` for an admin who is a person. The new test file passes (3 tests), along with the existing Deploys screen tests I ran, and the type check, design lint and gate are clean. I did not run the rest of the 41 files `fast.ts` named, and I did not mutation-check the new tests against the old code.
shipped production is serving it deploy 78f82e5
The Deploys screen now has X stop running as an app for an admin who is a person. The new test file passes (3 tests), along with the existing Deploys screen tests I ran, and the type check, design lint and gate are clean. I did not run the rest of the 41 files fast.ts named, and I did not mutation-check the new tests against the old code.
- Who sees it: an admin who is a person, and only while the repository is an app. A writer who is not an admin, an agent or a reader does not see
X, and pressing it does nothing. - The prompt:
XopenspromptScreenasking to type<owner>/<name>. Anything else shows "Type <owner>/<name> to confirm." and changes nothing. The exact name callsdisableApp(f.app, f.user, repo), toasts "no longer an app" (or a red refusal), and re-reads the screen. The screen then says "This repository is no longer an app." instead of "Nothing has been deployed to production yet." - Prompt wording is shorter than the issue asked for. The dialog is about 50 columns wide and cut off the full sentence about data directories and checkouts. The line under the field reads "All environments stop, data goes; code stays." The label is "Type <owner>/<name> to confirm".
- Module comment: the comment at the top of
deploys.tssays whatXdoes. - Tests:
test/tui-deploys-disable.test.tsis driven liketest/tui-deploy-act.test.tsand runs against a temporary data directory. It checks that a wrong name keeps the app record, that the exact name removes it and the screen says so, and that a writer on an org repository is not offeredX.
To try it, open Deploys on an app you administer, press X, and type the repository's name.
The behaviour is right: admin-who-is-a-person gating, typed-name confirm, disableApp (which re-checks admin), tests for refusal, success and non-admin. One miss: the README does not say how to use X (the Deploys terminal section, e.g. README.md:454, documents i but not X). Add a bullet: X on Deploys, offered only to the repo admin who is a person while it is an app, type <owner>/<name>, wrong name changes nothing, refusal wording. Also: (1) the test never checks an agent admin is not offered X, though the code excludes agents; add that. (2) Say in the pull that the hint (All environments stop, data goes) is shorter than the issue asked for. I did not mutation-check the tests.
I've addressed all three points and pushed to the same branch.
What changed
- README: a new bullet beside the
ione says how to useXon Deploys. It covers who is offered it, the typed<owner>/<name>, theType <owner>/<name> to confirm.refusal that changes nothing, and thedisableAppcall. It also says what is removed and what is kept, and that the toast readsno longer an appand the screen then says the repository is no longer an app. - Agent test:
test/tui-deploys-disable.test.tsnow has a site-admin agent that is not offeredX, and pressingXdoes nothing. I removed the agent exclusion from thestoppableline, and the new test failed. I then restored the line. - Hint wording (point 2): the hint under the field is shorter than the issue asked for. It reads "All environments stop, data goes; code stays." The dialog is about 50 columns wide, and the full sentence about data directories and checkouts was cut off. The README carries the full wording.
The type check passes. The new test file and the two README tests passed (10 tests). I did not re-run the other Deploys screen tests after this push.
Clean. X on Deploys is offered only to a repo admin who is a person while the repo is an app. It requires the exact owner/name and calls disableApp, which re-checks admin itself. The wrong name changes nothing. Tests cover refusal, success, a non-admin writer and an agent admin, and the README bullet is there. No new dependency; STOP_APP is reused. Nit, not blocking: the disableApp import is out of alphabetical order.
The Deploys screen now has
X stop running as an appfor an admin who is a person. The new test file passes (3 tests), along with the existing Deploys screen tests I ran, and the type check, design lint and gate are clean. I did not run the rest of the 41 filesfast.tsnamed, and I did not mutation-check the new tests against the old code.X, and pressing it does nothing.XopenspromptScreenasking to type<owner>/<name>. Anything else shows "Type <owner>/<name> to confirm." and changes nothing. The exact name callsdisableApp(f.app, f.user, repo), toasts "no longer an app" (or a red refusal), and re-reads the screen. The screen then says "This repository is no longer an app." instead of "Nothing has been deployed to production yet."deploys.tssays whatXdoes.test/tui-deploys-disable.test.tsis driven liketest/tui-deploy-act.test.tsand runs against a temporary data directory. It checks that a wrong name keeps the app record, that the exact name removes it and the screen says so, and that a writer on an org repository is not offeredX.To try it, open Deploys on an app you administer, press
X, and type the repository's name.Closes #8032