Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
fix(hosted-team): the approval dialog no longer understates the Viewer role (M2)
reviewb8ab0a4a09cf
diff --git a/docs/hosted-team-relay.md b/docs/hosted-team-relay.mdindex eccad2d31..fe06a8d81 100644--- a/docs/hosted-team-relay.md+++ b/docs/hosted-team-relay.md@@ -414,8 +414,10 @@ The human `team status` reads `state`, `idle` and `lastError` together:- **Editor means shell access** as the core's unix user, and so, in practice, owner: an Editor'sterminal runs as that user and can run `team add-owner`. The approval dialog says Editor is "thesame as SSH access".-- **A Viewer sees terminal output** (the dialog says "including anything printed in them") and can- read **every file** under a shared project's folder, including `.env` files and `.git`.+- **A Viewer sees terminal output** and can read **every file** under a shared project's folder,+ including `.env` files and `.git`. The approval dialog says so for the Viewer role: "Can read every+ file in the shared project's folder, .env files included, and watch its terminals and anything+ printed in them. Its git history too, when the folder is a repository of its own."- **Sharing a repository shares its whole history.** When a shared project is the top folder of itsown repository, `git:show-file` takes any revision, so a Viewer can read every branch, tag, stashand past commit of it, including files deleted since. A worktree shares its main repository'sdiff --git a/src/renderer/components/HostedApprovalDialog.test.tsx b/src/renderer/components/HostedApprovalDialog.test.tsxindex 9d9ebb332..f7ec492ba 100644--- a/src/renderer/components/HostedApprovalDialog.test.tsx+++ b/src/renderer/components/HostedApprovalDialog.test.tsx@@ -72,7 +72,7 @@ describe('HostedApprovalDialog', () => {it('says what each role grants; the least role never mentions running commands', () => {mount()- expect(text()).toMatch(/Can watch the shared project and its terminals/)+ expect(text()).toMatch(/watch its terminals/)expect(text()).not.toMatch(/run commands/i)for (const [role, re] of [['commenter', /comment on cards/], ['owner', /approving, removing and changing roles.*run commands on box/]] as const) {act(() => {@@ -83,6 +83,17 @@ describe('HostedApprovalDialog', () => {}})+ it('M2: the Viewer copy does not understate it: every file (.env included), the terminals, and git only for its own repository', () => {+ mount()+ expect(text()).toMatch(/Can read every file in the shared project's folder, \.env files included, and watch its terminals and anything printed in them\./)+ expect(text()).toMatch(/Its git history too, when the folder is a repository of its own\./)+ act(() => {+ roleSelect().value = 'commenter'+ roleSelect().dispatchEvent(new Event('change', { bubbles: true }))+ })+ expect(text()).toMatch(/Viewer access, and can comment on cards and in cursor chat\./)+ })+it('Enter does not approve (a remote device raised this dialog)', () => {vi.useFakeTimers()const { onApprove, onDeny } = mount()diff --git a/src/renderer/components/HostedApprovalDialog.tsx b/src/renderer/components/HostedApprovalDialog.tsxindex 679b2e10b..9808769c9 100644--- a/src/renderer/components/HostedApprovalDialog.tsx+++ b/src/renderer/components/HostedApprovalDialog.tsx@@ -17,9 +17,13 @@ import { keyFingerprint } from '../lib/hostedTeam'import { CONFIRM_ARM_MS } from './confirm-key'import { useDialogStack } from './dialog-stack'+// What each role can reach, stated at its fullest: an owner decides from this line alone. A Viewer+// reads every file in the shared folder (the access policy jails reads to the folder, not to what+// is safe in it) and sees git only for a folder that is its own repository (access-policy.ts).const ROLE_COPY: Record<HostedRole, string> = {- viewer: 'Can watch the shared project and its terminals, including anything printed in them.',- commenter: 'Can watch, and comment on cards and in cursor chat.',+ viewer:+ "Can read every file in the shared project's folder, .env files included, and watch its terminals and anything printed in them. Its git history too, when the folder is a repository of its own.",+ commenter: 'Viewer access, and can comment on cards and in cursor chat.',editor: 'Can type into terminals, edit files and run git — the same as SSH access',owner: 'Editor access, plus approving, removing and changing roles'}