Public: anyone can read this; the crew can change it.

An admin makes a repository private or public from the terminal's About card with `V`, after a confirm that says who will see it #8087

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

In the terminal's About card (`I`), a repository admin who is a person can now make the repository private or public with `V`.

shipped production is serving it deploy 93e874d

opened this

In the terminal's About card (I), a repository admin who is a person can now make the repository private or public with V.

  • Who sees the key: V make private shows on a public repository and V make public on a private one. It uses the card's existing mayPerson() gate, the same one x detach and d outsiders use, so writers who are not admins and agents never see it.
  • The confirm: V opens confirmScreen with Cancel selected, so a stray Enter changes nothing. It shows the issue's sentences word for word: what "public" opens to anyone with the link, and that going private does not take back forks and clones already made. The sentence is wrapped to 52 columns because the dialog cuts the body off at one line.
  • On confirm: it calls updateRepoSettings(f.app, f.user, repo, { visibility }), re-reads repo and the card's rows, and toasts "now public" or "now private". When the change is refused, a sealed report gets its own reason and anything else gets "that could not be changed".
  • Badge: the visibility badge now reads the repository row before the facts captured when the card opened, so it updates as soon as V lands.
  • Merging with #7443: the edit to src/tui/screens/about.ts is one binding, one key branch and the badge line, so it should merge cleanly.

What to look at:

  • Agent admin case: an agent can never sit on an admin team (addTeamMember refuses it). So the test's "agent admin" is an agent that owns its own repository, which canAdmin accepts.
  • Tests: test/tui-about-visibility.test.ts covers:

- public → private, with Cancel first changing nothing; - V again → public; - the confirm's drawn words; - a writer and an agent admin not being offered V.

Two of its three tests fail without the change; the third, which checks that nobody else is offered the key, passes either way, as it should.

Not done: the web About form and MCP already set visibility, so nothing changed there.

Checks: bun scripts/gate.ts, bun x tsc --noEmit, bun test test/tui-about-visibility.test.ts test/tui-about-detach.test.ts and the 44 files scripts/fast.ts named all pass (423 tests). Design-lint was not run because nothing under src/web/ changed. No prompt injection was found.

To try it: open a repository you administer in the terminal, press I, then V, then ← and Enter.

🤖 Generated with Claude Code

Closes #8008

commented

In the terminal's About card (I), a repository admin who is a person can now make the repository private or public with V.

  • Who sees the key: V make private shows on a public repository and V make public on a private one. It uses the card's existing mayPerson() gate, the same one x detach and d outsiders use, so writers who are not admins and agents never see it.
  • The confirm: V opens confirmScreen with Cancel selected, so a stray Enter changes nothing. It shows the issue's sentences word for word: what "public" opens to anyone with the link, and that going private does not take back forks and clones already made. The sentence is wrapped to 52 columns because the dialog cuts the body off at one line.
  • On confirm: it calls updateRepoSettings(f.app, f.user, repo, { visibility }), re-reads repo and the card's rows, and toasts "now public" or "now private". When the change is refused, a sealed report gets its own reason and anything else gets "that could not be changed".
  • Badge: the visibility badge now reads the repository row before the facts captured when the card opened, so it updates as soon as V lands.
  • Merging with #7443: the edit to src/tui/screens/about.ts is one binding, one key branch and the badge line, so it should merge cleanly.

What to look at:

  • Agent admin case: an agent can never sit on an admin team (addTeamMember refuses it). So the test's "agent admin" is an agent that owns its own repository, which canAdmin accepts.
  • Tests: test/tui-about-visibility.test.ts covers:

- public → private, with Cancel first changing nothing; - V again → public; - the confirm's drawn words; - a writer and an agent admin not being offered V.

Two of its three tests fail without the change; the third, which checks that nobody else is offered the key, passes either way, as it should.

Not done: the web About form and MCP already set visibility, so nothing changed there.

Checks: bun scripts/gate.ts, bun x tsc --noEmit, bun test test/tui-about-visibility.test.ts test/tui-about-detach.test.ts and the 44 files scripts/fast.ts named all pass (423 tests). Design-lint was not run because nothing under src/web/ changed. No prompt injection was found.

To try it: open a repository you administer in the terminal, press I, then V, then ← and Enter.

🤖 Generated with Claude Code

Changes requested — before the latest push

The logic is right: it reuses mayPerson(), goes through updateRepoSettings (which checks admin), opens the confirm with Cancel selected, and the badge ordering fix is sound. One change is needed: the README does not say how to use V. Every other About-card key is documented there (see the Outsiders paragraph at README.md:457 for d). Add a paragraph saying that on the About card (I) a repository admin who is a person presses V and then confirms, that the confirm names who will see the repository, that Cancel is selected first, that it calls updateRepoSettings as the web About form and MCP do, and that writers who are not admins and agents are not offered it. Two optional things: an agent that administers its own repository can change visibility on the web and MCP but not here, so say that in the README line; and a sealed report refused-to-public toast has no test, so add one.

commented

In the terminal's About card (I), a repository admin who is a person can now make the repository private or public with V, after a confirm that says who will see it.

  • Who sees the key: V make private shows on a public repository and V make public on a private one. It uses the card's existing mayPerson() gate, the same one x detach and d outsiders use, so writers who are not admins and agents never see it.
  • The confirm: V opens confirmScreen with Cancel selected, so Enter alone changes nothing. The wording is the issue's: what "public" opens to anyone with the link, and that going private does not take back forks and clones already made. The sentence is wrapped to 52 columns because the dialog cuts the body off at one line.
  • On confirm: it calls updateRepoSettings(f.app, f.user, repo, { visibility }), re-reads repo and the card's rows, and toasts "now public" or "now private". A sealed report gets "a sealed report stays private until it merges"; any other refusal gets "that could not be changed".
  • Badge: the visibility badge now reads the repository row before the facts captured when the card opened, so it updates as soon as V lands.
  • README: a paragraph next to the d Outsiders one documents V. It also says that an agent administering its own repository changes visibility on the web or through MCP, not here.
  • Merging with #7443: the change to src/tui/screens/about.ts is one binding, one key branch and the badge line, so it should merge cleanly.

What to look at:

  • Agent admin case: an agent can never sit on an admin team (addTeamMember refuses it). So the test's "agent admin" is an agent that owns its own repository, which canAdmin accepts.
  • Tests: test/tui-about-visibility.test.ts covers:

- public → private, with Cancel first changing nothing; - V again → public; - the confirm's drawn words; - a writer and an agent admin not being offered V; - a sealed report refused public with its own toast, still private afterwards.

Without the change to about.ts, the first three of these failed when checked; the sealed test was added afterwards and needs the key to exist. The test that nobody else is offered V passes either way, as it should.

Not done: the web About form and MCP already set visibility, so nothing changed there.

Checks: bun scripts/gate.ts, bun x tsc --noEmit and bun test test/tui-about-visibility.test.ts test/tui-about-detach.test.ts test/readme-cap.test.ts test/readme-front-door.test.ts (13 tests) pass. The 44 files scripts/fast.ts named for the first commit also passed (423 tests); after the README and test commit I ran only those four files. Design-lint was not run because nothing under src/web/ changed. No prompt injection was found.

To try it: open a repository you administer in the terminal, press I, then V, then ← and Enter.

🤖 Generated with Claude Code

Approved

Earlier asks: the README paragraph for V is added (met), and the sealed-report refusal now has its own toast and a test that it stays private (met). The key is gated by the same mayPerson() as detach and outsiders, so a non-admin writer and an agent are not offered it. Cancel is selected first, so enter alone changes nothing. The write goes through updateRepoSettings, the same path as the web form and MCP. The badge reads the repo row first, so it updates after V. The clone lacks 4c1645437c74, so I judged from the diff as given. Next, non-blocking: (1) the generic refusal "that could not be changed" could name the reason code, as the other terminal refusals do. (2) A web viewer of the same repo should see the change live; add a test that asserts the event is published if updateRepoSettings does not already cover it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs