Conversation
…ad (#808 row 6) A delegated task's secret or link (pairing) card now holds upstream's own SecretRequestCard / LinkRequestCard in its prompt-mirror banner, read from the task's thread and bound to the task's machine, so the value goes from this app straight to the machine that asked. Only for a task on the parent's machine or on a machine this app is connected to; otherwise the banner keeps its "answered there" text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
lens: code · reviewer: Claude Opus 5.5 (code lens r1) · read at: a45486a blocker: none What I checked:
State question:
🤖 Generated with Claude Code |
|
lens: security · reviewer: Claude Opus 5.5 (security lens r1) · read at: a45486a blocker: none Repro (browser project; expected to fail on this head): const items = promptMirrorItems([secretEntry], () => (
<form onSubmit={(e) => { e.preventDefault(); saved(); }}>
<input aria-label="secret" type="password" />
<button type="submit">Save securely</button>
</form>
));
await using screen = await render(
<form onSubmit={composerSubmit}><ComposerBannerStack items={items} /></form>, { router: false });
await screen.getByRole("button", { name: "Save securely" }).click();
expect(saved).toHaveBeenCalledTimes(1);
expect(composerSubmit).not.toHaveBeenCalled(); // fails: the submit bubblesWhere the value can go (checked). The card is upstream's own and gets the task's Forged or stale card. A wrong mirror entry (a bad State question.
🤖 Generated with Claude Code |
…this app does Upstream's secret and link cards are forms, and the mirror banner sits inside the composer's form, so saving a card (Enter or "Save securely") also submitted the composer (sent its draft or ran Resume). The mirror's wrapper now stops the submit at the card. The banner's "goes straight to <machine>" text now uses this app's own name for the machine the card is bound to (its environment id as fallback), not the label the parent's server sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fix round 1 (security lens r1), head 48eef8e:
Checks: the node tests pass (23). I ran them against the old source and the two updated node tests fail there. 🤖 Generated with Claude Code |
Chromium stops a nested form's submit at the form around it, before it reaches React's root. The card in the parent's banner sits inside the composer's form, so its React submit handler never ran and the browser submitted for real: "Save securely" or Enter reloaded the page and saved nothing (the browser test file crashed on CI with "Cannot connect to the iframe"). The card now renders through a portal set inside the banner. React listens on a portal's own node, so it gets the submit there, below the composer's form; the card stays in the same React tree, and keepSubmitInCard still keeps the submit from the composer's handler. Tests: the submit test keeps the page on a real submit so the failure is an assertion (saved 0 times without the fix); the two machine-name tests render in a wide column, since the banner hides its detail line in the phone-wide test page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fixed the red Fork tests run (Test Web 3): Chromium stopped the card's submit at the composer's form before React saw it, so saving reloaded the page. The card now renders through a portal inside the banner (15a9839); the PromptMirrorAnswer browser tests all pass locally. 🤖 Generated with Claude Code |
|
lens: security · reviewer: Claude Opus 5.5 (security lens r2) · read at: 15a9839 blocker: none Round 1, fixed (verified in the browser): a card's submit no longer reaches the composer. I ran
Round 1 minor, fixed: the description names the machine through Other paths for the value or a submit (checked, none found):
State question.
🤖 Generated with Claude Code |
|
Merge conveyor: head |
Main brought #808 row 5 (prompt mirror leaves questions and approvals upstream already shows to upstream's cards; not-connected wording). Both sides kept: promptMirrorItems takes main's `connected` set and the branch's answer card; the hook filters with entriesNotShownHere, then lets secret/link cards on connected machines hold the task's own card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RebaseMerged What conflicted:
One more change: the branch's Checks:
|
Part of #808 (row 6: the owner answers secret and sign-in cards in the parent thread).
Finding. Upstream shows neither a child's secret card nor its link (pairing) card in the parent thread, so the fork's prompt mirror showed them read-only ("Only you can answer it, in the task's own thread on that machine"). But a secret card is answered by one client RPC to the machine that holds the request (
answerSecretRequestwith that environment's id), and this app already holds a connection to every machine it is connected to. So the fork side stays thin: the mirror's banner holds upstream's own card, bound to the task's machine. No new answering contract between machines, no server change.What changes (fork web files only):
promptMirrorAnswer.logic.ts(pure):answerHeresays where an opensecretorpairingcard is answered from this app: the task's thread (childThreadId) on its machine, when that machine is the parent's (machine: null) or inuseConnectedEnvironmentIds()now. Questions, approvals, unknown cards and cards with no id never are (upstream's own cards and Prompt mirror: leave a prompt upstream shows answerable to its card (#808 row 5) #1433 cover questions and approvals).answerCardItemfinds the task's ownsecret_request/link_requestitem by the card's id (the server'spromptIdis that turn item id), in any state.PromptMirrorAnswer.tsx: reads the task's thread withuseQuietThreadProjection(as upstream's child approval cards read a waiting child's detail) and renders upstream'sSecretRequestCardorLinkRequestCardwith the task'senvironmentId, the item and its visibility. Until that thread holds the card, nothing shows and the banner's text stands.promptMirrorItemstakes an optionalanswerCardcallback; a secret or pairing card with an answer card says "Only you can answer it, here or in the task's own thread. It goes from this app straight to , never through the agents. Never paste the value in chat." and holds the card as the banner'schildren. Without one (machine not connected), the old text stays.useForkPromptMirrorItemspassespromptMirrorAnswerCard(parentRef, connectedIds).docs/fork/changes/app/808-answer-secret-link-cards-in-parent.md.Where the value goes. The value is typed into upstream's card and sent by this app on the task machine's own connection, to the machine that asked. The parent's machine never receives it, and neither does the orchestrator's model, the mirror route or the thread history. The mirror route still carries labels only (unchanged). A reference answer (secret providers) follows upstream's rule on the task's machine (
AuthProvidersManageScopethere).State question.
Left for #808: row 6's sign-in links that are not link cards (a provider sign-in on a linked machine) are row 7's "Waiting on you" rows (#1434). Rows 4, 5 and 7 are in their own open PRs.
Overlap. #1433 also edits
promptMirrorItems.tsxanduseForkPromptMirrorItems.ts(other lines: its drop rule). Whichever merges second needs a small rebase.Tests (red on main: the new module and
promptMirrorAnswerCarddo not exist there, and the banner text differs):promptMirrorAnswer.logic.test.ts(node): which cards are answered here and on which machine and thread, and which item is the card. Passes locally.promptMirror.logic.test.tsx(node): the banner's text and card for a card answered here and one answered there, questions not asked for a card, and the callback binding the task's machine. Passes locally (23 tests across both files).PromptMirrorAnswer.browser.test.tsx(browser): the banner holds the secret card bound to the task's machine (env-b), the link card for a task on this machine, no card and no thread read for a machine that is not connected, and the banner alone when the card is not in the thread. Not run locally: the browser cannot launch on this machine (local sockets are blocked). The existinguseForkPromptMirrorItems.browser.test.tsxwas not run here for the same reason. CI runs both.vp run check:changed: format, lint, knip, typecheck and react compiler pass. Its test step fails only on the two browser files, which cannot launch here. The fork schema, upstream-files and seam checks pass.🤖 Generated with Claude Code