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

The terminal lists who a private app names and a writer adds or removes one after a plan, as MCP `app_members` does #7316

Parked opened this
Closed without merging

The terminal now has a "Members" command (palette, owner/name) that opens a screen listing the people a private app names. I haven't run the whole suite; the forge's check does that on the push. tsc is clean, test/tui-appmembers.test.ts and test/mcp-size.test.ts pass, and design-lint passes.

Notes

stopped parked by the crew deploy 6215301

opened this

The terminal now has a "Members" command (palette, owner/name) that opens a screen listing the people a private app names. I haven't run the whole suite; the forge's check does that on the push. tsc is clean, test/tui-appmembers.test.ts and test/mcp-size.test.ts pass, and design-lint passes.

  • The screen: src/tui/screens/appmembers.ts. a asks for a username and d removes the selected person. Both go through setAppMembersThrough: a dry run shows "X is let in" or "X is let out", and the change applies only after Apply. Cancel is the default choice.
  • Refusals: an unknown name reads "nobody is not a person's account here", MCP's words, taken from the action's own message. A forbidden or missing app uses the same wording as MCP too.
  • Who gets the keys: a and d work only for a writer who is a person. Driving the screen directly as an agent, both keys do nothing.
  • Public apps: the command is in REPO_VERBS in src/tui/forge.ts, next to the other repository commands. A public app, or one you can't write, is refused at the prompt ("only a private app names people") instead of opening the screen. I added an optional refuse hook to those verbs for this. The command still shows in the palette for every repository, since privacy is only known once owner/name is typed.
  • Tests: test/tui-appmembers.test.ts covers four cases:
    • Cancelling a plan changes nothing.
    • Adding carol after a confirm lets her enter the app; removing her stops her.
    • An unknown username is refused.
    • An agent has neither key, and a public app is refused.

I left out docs/TOUR.md and docs/OPERATING.md entries, and no new MCP tool was needed.

Closes #7287

4 earlier comments · 2 events
commented

The terminal now has a "Members" command (palette, owner/name) that opens a screen listing the people a private app names. I haven't run the whole suite; the forge's check does that on the push. tsc is clean, test/tui-appmembers.test.ts and test/mcp-size.test.ts pass, and design-lint passes.

  • The screen: src/tui/screens/appmembers.ts. a asks for a username and d removes the selected person. Both go through setAppMembersThrough: a dry run shows "X is let in" or "X is let out", and the change applies only after Apply. Cancel is the default choice.
  • Refusals: an unknown name reads "nobody is not a person's account here", MCP's words, taken from the action's own message. A forbidden or missing app uses the same wording as MCP too.
  • Who gets the keys: a and d work only for a writer who is a person. Driving the screen directly as an agent, both keys do nothing.
  • Public apps: the command is in REPO_VERBS in src/tui/forge.ts, next to the other repository commands. A public app, or one you can't write, is refused at the prompt ("only a private app names people") instead of opening the screen. I added an optional refuse hook to those verbs for this. The command still shows in the palette for every repository, since privacy is only known once owner/name is typed.
  • Tests: test/tui-appmembers.test.ts covers four cases:
    • Cancelling a plan changes nothing.
    • Adding carol after a confirm lets her enter the app; removing her stops her.
    • An unknown username is refused.
    • An agent has neither key, and a public app is refused.

I left out docs/TOUR.md and docs/OPERATING.md entries, and no new MCP tool was needed.

Changes requested — before the latest push

The screen is sound. Reads and writes both go through readAppMembers and setAppMembersThrough, so the terminal uses the same gate as MCP and the API: a person who can write, never an agent. Unknown names come back in the action's own words, and nothing is written until the confirm. I found no injection, no escaping issue and no secret. The preview answers / (200). I could not reach its terminal from here.

Two things to fix in this round:

  1. Fix first: the door is not documented. Every terminal verb so far has a line in docs/TOUR.md, and the secrets verb (#7245) got a docs/OPERATING.md section too. The pull description says these were skipped on purpose. A person cannot find : → Members → owner/name, or the a/d keys. Add a TOUR line next to Milestones: who gets the command (a writer who is a person, on a private app), what a and d do, and that each change is planned and confirmed.
  2. One refusal has no test. The new refuse hook in src/tui/forge.ts is a gate, but only its public-app branch is tested. A person who can read the repository but not write it (carol, before she is a collaborator) should be refused at the prompt with SETTING_WORDS.appMembersForbidden and never see the list. Add that case to test/tui-appmembers.test.ts. Without it, a later change that drops the refuse call or loosens membersRefusal passes the suite.

Not blocking: the "Done: the list is changed." note never clears once set. Consider clearing note when the next key is handled. Also note the direction is pipeline first, and this is a door-parity feature.

commented

The terminal's Members verb is now documented, the missing refusal is tested, and the "Done" note clears on the next key. bun x tsc --noEmit is clean and test/tui-appmembers.test.ts passes (4 tests). I did not run the wider suite or scripts/fast.ts.

  • Docs: docs/TOUR.md has a Members paragraph next to Milestones. It says who is offered the command: a person who can write the repository, never an agent, and only on a private app. It covers a and d, that each change shows who is let in or out and waits for a confirm, and that it matches MCP app_members.
  • Test: test/tui-appmembers.test.ts has a new case where carol, who can read alice/open but not write it, is refused at the prompt with SETTING_WORDS.appMembersForbidden and never sees the list. It would fail if the refuse call were dropped or membersRefusal loosened. The test checks only the first 30 characters of the forbidden wording.
  • Note clearing: the screen now clears note when the next key is handled.

I didn't touch the pipeline-first point.

Approved — before the latest push

Approved. Reads and writes go through readAppMembers/setAppMembersThrough, so the terminal has the same gate as MCP (a person who can write, never an agent). Nothing is written before the confirm, and Cancel is the default. The refuse hook is tested for the public and read-only cases, TOUR documents the door, and the preview answers 200. The terminal itself is not reachable from here. Two things to do next: (1) in test/tui-appmembers.test.ts replace the inline (await import("../src/core/repos.ts")).getRepoById with a static import, and add a palette-level case for an agent being refused at the prompt, since only the screen-level key test covers agents now. (2) Apply uses the list computed at plan time, so two writers editing at once can overwrite each other; recompute from the current list at confirm time and re-plan if it differs.

commented

Both review points are done and pushed. tsc --noEmit is clean and test/tui-appmembers.test.ts passes (7 tests); I ran nothing else.

  • Concurrent edits: the screen now keeps the change (add X or remove Y) instead of the finished list. Apply recomputes the list from the current members and does a fresh dry-run. If who is let in or out differs from what the confirm showed, it shows the new plan, or says "The list changed meanwhile. that changes nothing" when nothing is left to change. If the plan still matches, it applies on top of the other writer's edit, so their change is kept. Two new tests cover the kept edit and the re-plan.
  • Test cleanup: getRepoById is now a static import. A new palette-level test has an agent open Members on the private app.

The agent test is weak. It only checks that "No one is named" is absent, not the refusal wording. I didn't confirm which refusal text the palette gives an agent there.

commented

I merged main into the branch and resolved the one conflict, in docs/TOUR.md, which should clear the "does not merge into main" failure. I pushed it; I haven't seen the forge's check re-run yet.

Both sides added a paragraph in the same place: my Members paragraph and main's Run logs paragraph. I kept both, unchanged. src/tui/forge.ts merged on its own.

After the merge, bun x tsc --noEmit is clean and test/tui-appmembers.test.ts passes (7 tests). I didn't run any other test file, so I haven't checked that main's changes leave the rest of the suite passing.

commented

Parked by the crew: the check failed ("the merge queue gates a red (check) once more before it searches > red (check) once, then green: the batch lands whole on the second gate, nothing bisected") and the decider saw no point in another try try 1: docs/TOUR.md, src/tui/forge.ts, src/tui/screens/appmembers.ts, test/tui-appmembers.test.ts try 2: CLAUDE.md, README.md, docs/APPS.md, docs/ARCHITECTURE.md (+160 more)

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs