Skip to content

feat(byo): from an approved card, the page is the act; above the copy, only what the paste needs - #2293

Merged
lilyshen0722 merged 1 commit into
mainfrom
growth/byo-compact-card
Oct 17, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
growth/byo-compact-card

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

From Cofounder's BYO walk 2 (2026-10-16). Every #2287 fix was live, yet time to copy didn't move (2:40.7 vs 2:40.3): plain words aren't fewer words. 127 words sat before "Get my connect command", and 112 down to the command. This applies the move that worked on the hosted page (130 → 38).

Builds on #2289 (where the listener runs). Measured on a local build of this branch against prod, Mac, 1440×900:

walk 2 this PR
words before the button 127 21
button top y=647 y=278
words before the command's Copy 112 41
Copy top — y=337

At 390×844 the whole command box sits above the fold, with no horizontal scroll.

From an approved card, the page is the act

  • The connect card's link now carries from=card, plus the tool the proposer was told. connect_local_agent takes an optional adapter: claude | codex, validated at proposal, and only a listed value reaches the link.
  • On such a link the page skips "Where should it run?" and the name and pod fields. What's left:
    • a title naming the tool ("Connect your Claude Code" / "Connect your Codex");
    • one lead line;
    • "It joins as . Change";
    • the button;
    • "Other ways to connect".
  • The key is still minted by the click, never on load. The click is the consent, and a reload or a back button would otherwise mint another key.
  • The act enables only once the pod list confirms the pod. If the link's pod is one the person can't install into, it's replaced first, and the line names the replacement.
  • Only where the command exists (feat(byo): the page offers the listener only where it runs, and Windows gets PowerShell lines for MCP #2289): a Mac with either tool, or Linux with Codex. A Claude Code card on Linux, or any card on Windows, opens the full page and its notice. The compact page promises "One command in Terminal", so it must not open onto a page that shows none.
  • A link without from=card (the new pod's "connect an agent" button) keeps the full page.

The command page: above the copy, only what the paste needs

  • No eyebrow or lead once the command is shown.
  • Above the copy: the heading, "Run this in Terminal", the OS line, and a shorter needs line: "Needs Node 18+ with npm and Claude Code signed in. Run all four lines in one Terminal window."
  • Below it: the waiting state, the keep-open note, what the command does, then the key-once line.

Scout

  • The adapter: Scout passes it on the card, and its prompt says the command follows the card.
  • No Claude Code connect card on Linux, WSL or Windows. The cause is ubuntu run 38982219348: bwrap execvp …/.local/bin/claude: No such file or directory, and on Ubuntu 24.04 AppArmor setting up uid map: Permission denied. fix(cli): a Connect-page seat starts with the daemon's default environment, on a host that can run it #2288 refuses that listener at start. Scout offers "Run it here" or the MCP command instead, and says why.
  • After deploy, existing Scouts need refresh-native-agent-configs --app scout.

Tests

  • V2AgentBYOFromCard (11 tests): the card asks nothing it settled; no key on load; Codex opens on Codex; Change keeps the choices; an unknown pod is replaced; the act waits for the pod list; no from=card gives the full page; Linux with Claude Code gives the full page; Linux with Codex is compact; Windows is never compact; on the command page, key-once and "what it does" come after the command.
  • Backend: the connect path carries from=card and the adapter, and an unlisted adapter never reaches it; an adapter outside the list is refused at proposal; Scout's Mac/Linux/Windows rule.
  • Mutations, each failing a test:
    • compact never shown;
    • card adapter ignored;
    • key-once moved back above the box;
    • act enabled before the pod is confirmed;
    • the OS gate removed (two tests);
    • from=card dropped in the backend (three tests).
  • On the feat(byo): the page offers the listener only where it runs, and Windows gets PowerShell lines for MCP #2289 tests, two assertions follow the shorter Mac/Linux needs copy. Their Windows and Linux arms are unchanged.

zh-CN

The skill's two passes (voice, terminology), then adjudicated: glossary wins on terms, voice on rhythm.

key en zh reason
compactByo.titleClaude Connect your Claude Code 接入你的 Claude Code Both passes keep it: 接入 as in agentByo.title / firstRun.steps.connect.title
compactByo.titleCodex Connect your Codex 接入你的 Codex The product is "Codex"; "Codex CLI" is kept for the binary (listen.toolCodex)
compactByo.lead One command in Terminal, about 2 minutes. 在终端里运行一条命令,约2分钟完成。 Both passes add 完成: the bare 约2分钟。 read clipped, and this matches agentByo.description
listen.title Run this in Terminal 在终端里运行这段命令 Voice: a heading verb without an object reads unfinished, and 这段命令 mirrors "this"
listen.needs Needs Node 18+ with npm and {{tool}} signed in. Run all four lines in one Terminal window. 需要 Node 18+(含 npm)和已登录的 {{tool}}。四行都要在同一个窗口里运行。 Voice for rhythm (a plain noun list instead of 且; 终端 is already in the heading). Both passes keep 都要, the bundle's precedent

The terminology pass also flagged three older strings that use 连接 where the BYO flow uses 接入 (inviteModal.agentHint, inviteModal.connectOwnAgent, yourTeam.empty.text). They're out of scope here and left for a later sweep.

🤖 Generated with Claude Code

https://claude.ai/code/session_0157AG2wo8mJYqKezXNs48Ya

…, only what the paste needs

QA BYO walk 2 (2026-10-16): every #2287 fix was live and time to copy did
not move (2:40.7 vs 2:40.3): plain words are not fewer words. 127 words
sat before "Get my connect command" and 112 down to the command.

From the card. The connect card's link now carries from=card, and the
adapter the proposer was told (connect_local_agent takes an optional
adapter: claude | codex, validated at proposal; only a listed value
reaches the link). On such a link the page skips "Where should it run?"
and the name and pod fields: a title naming the tool, one lead line,
"It joins <pod> as <name>. Change", the button, "Other ways to connect".
21 words before the button (was 127), button at y=278 (was 647). The key
is still minted by the click, never on load: the click is the consent,
and a reload or back would otherwise mint another. The act is enabled
once the pod list confirms the pod, so a link's pod the person cannot
install into is replaced first and the line shows the replacement. A
link without from=card (the new pod's "connect an agent" button) keeps
the full page.

Only where the command exists (#2289): the compact page promises "One
command in Terminal", so it opens only where the listener runs, a Mac
with either tool or Linux with Codex. A Claude Code card on Linux or
Windows, or any card on Windows, opens the full page and its notice.

The command page. No eyebrow or lead once the command is shown. Above
the copy: the heading, "Run this in Terminal", the OS line, a shorter
needs line ("Needs Node 18+ with npm and Claude Code signed in. Run all
four lines in one Terminal window."). Below it: the waiting state, the
keep-open note, what the command does, then the key-once line. 42 words
before the copy (was 112), Copy at y=337 at 1440. The Windows lines are
unchanged.

Scout passes adapter on the card; its prompt says the command follows
the card. It no longer proposes a Claude Code connect card on Linux, WSL
or Windows (ubuntu run 38982219348; #2288 refuses that listener): it
offers "Run it here" or the MCP command, and says why. zh-CN through the skill's two passes and an adjudication (in
the PR body).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0157AG2wo8mJYqKezXNs48Ya

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SECURITY-GATE: PASS @ d559fda. Independent read (Cofounder operator session; not a Commonly seat). Scope: approvalActionService.ts, nativeRuntimeService.ts, V2AgentBYO.tsx.

  • adapter is allowlisted three times: at proposal (validateParams), at execution (executeConnectLocalAgent), and again on the page (only claude or codex). It is concatenated into the connect path unencoded, but only an allowlisted literal can get there, so there is no injection path.
  • from=card is a URL parameter, so any link can carry it. It only changes layout. On the compact page the destination pod is named above the button ("joins as "), and the button stays disabled until the person's own pod list contains that pod. A forged link can't make the click land in a pod that isn't shown to the person or that they can't install into. The name still goes through sanitizeAgentName.
  • No change to when the key is minted: still only by the click (submit), never on load or on approve. reservedAgentNameRefusal and assertAgentRuntimeMayJoinPod still run at execution.
  • Non-blocking: the "people in this pod can @mention it" line (listen.body) now sits below the command rather than above it. It's still on the same screen before anything runs, so this is fine. Keep it on that screen in later trims, because it's the line that says what running the command allows.

GATE: PASS

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Written by sprint-review, a Commonly agent — code gate at d559fda8d. pod thread

Base 3c4fb50f8 (= origin/main). Tier 1 green at this head (run 38985818939). BASE/RESTORED: frontend 2 suites / 21 passed, backend 3 suites / 57 passed.

"The key is minted only by the click" — verified structurally

The one that would be bad to get wrong, since ?from=card makes the page an act. submit appears in this component only as an onClick: grep -n "submit\b" | grep -v onClick leaves nothing but class names and the submitting flag, and no useEffect references submit, issueToken or the issue endpoint. So a crafted ?from=card&… link cannot mint a runtime token on load; the click is the only path, and the click is gated on the pod list confirming the pod (U2 reds the act waits for the pod list: nothing is minted for a pod the page has not confirmed).

Six of seven mutations red by name

mutation failures
U1 compact ignores listenerAvailable 2 — a Claude Code card opened on Linux gets the full page, not the promise of one command, on Windows no card is compact, Codex included
U2 the pod gate dropped from the compact button 1
U4 from=card no longer compacts 6
U5 (backend) the adapter unvalidated at proposal 1
U6 (backend) an unlisted adapter reaches the connect link 1
U7 (backend) from=card dropped from the link 3
U3 the page stops validating ?adapter= green, 21 passed

U1 is the property that matters most across the stack: a compact "one command in Terminal" view never opens where #2288 refuses the listener. Both arms name the exact cells I cross-tabbed on #2289.

Non-blocking: the page's own ?adapter= validation is load-bearing and unpinned

prefill.adapter is validated on the page — (a === 'claude' || a === 'codex' ? a : null) — and U3 shows nothing notices when that is removed. The backend's two checks do not cover this: they guard the link the card generates, and ?adapter= is a URL parameter anyone can type or send.

Two lines make it load-bearing, and I am reporting these as read, not executed — my attempt to demonstrate it end-to-end did not run (the probe failed to drive the issue flow in both arms, so it produced no result in either direction, and I am not claiming one):

  • :165 useState<'claude' | 'codex'>(prefill.adapter || 'claude')
  • :712 …\ncommonly agent run ${issued.agentName} --adapter ${listenAdapter}

That is a direct interpolation of a URL parameter into the command the page tells a person to paste into their shell. With the page-side check present the value can only be claude or codex; with it removed, an arbitrary string lands in that line. The fix is already in place — the finding is only that no test holds it there, and this is the single assertion I would add to the new suite: render with ?from=card&adapter= something unlisted and expect the command to say --adapter claude.

GATE: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant