Repository navigation
Prompt mirror: leave a prompt upstream shows answerable to its card (#808 row 5) - #1433
Conversation
…808 row 5) Upstream already shows a delegated task's approval with Approve / Decline in the parent thread, and opens its question from the parent's "needs you" banner, for every task whose machine this app is connected to (a linked machine's task counts, through delegatedFrom). The mirror kept a read-only copy beside it. - The mirror drops an open question or approval whose task thread is among upstream's children asking this parent, matched on the task's own machine. Secrets, pairing codes and not-known cards stay: upstream shows none. - A question or approval of a task on a linked machine this app is not connected to says it is answered there, and that connecting the machine to this app lets the owner answer it here. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: code · reviewer: claude-opus-5-5 (lens sub-agent) · read at: 82e8b68 lens code: not safe blocker: none Checked and fine: the match key is (task machine ?? parent machine, thread id), so the same thread id on another machine does not match (a test covers it). Secret, pairing and unknown cards always stay. Only open questions and approvals are dropped. Polling still counts every card. No upstream file changes (the diff touches only State question: runs again: the filter is pure and runs on each render with no stored state, so a rerun gives the same result. Stops half-way: nothing is written, so a reload just reads again. Old or empty state: empty 🤖 Generated with Claude Code |
…ns upstream hides Upstream's child list keeps a machine's last thread list after its connection drops (and loads a cached one at start-up), so the mirror now drops a question or approval only when the task's machine is one this app is connected to; otherwise the card stays and says "not connected". While the parent itself waits on the owner, or a run stop is unresponsive, upstream hides its "Subagent waiting" banner, so a child's question stays on the mirror's card then (approvals still go: upstream's approval cards show). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Fix round 1 at 77993c1: a card drops only for a child on a machine this app is connected to now, and a child's question stays while the parent waits on the owner or a stop is unresponsive. State: a reconnect drops the card on the next render and a disconnect while the page is open brings it back at once with "not connected" (the filter is pure, with no stored state). At start-up a cached list counts for nothing until its machine connects. Empty lists drop nothing. Local: logic file 19/19, with the 2 new cases failing on the round-0 rule; format, lint, knip, typecheck and react compiler pass. The browser file could not run here (headless Chromium lacks 🤖 Generated with Claude Code |
|
lens: code · reviewer: claude-opus-5-5 (lens sub-agent, round 2) · read at: 77993c1 lens code: safe blocker: none round 1, fixed: a card now drops only for a child whose machine is in Checked and fine: State question: runs again: the filter is pure and runs on every render from the current connections, shell, run stop and the last server read, so a reconnect drops the card and a disconnect brings it back with nothing kept in between. Stops half-way: there is no write. A failed read shows nothing and keeps no old cards (existing test), and the next change or poll reads again. Old or empty state: a cached child list counts for nothing until its machine connects. An empty child list or empty connected set drops nothing. A gone or answered child leaves both upstream's list and the server's mirror. A restart loses nothing, because nothing is stored. 🤖 Generated with Claude Code |
Part of #808 (row 5, part 1).
Finding. Upstream already lets the owner answer a delegated task's approval in the parent thread (its child approval cards, Approve / Decline, sent straight to the task's machine) and opens a task's question from the parent's "needs you" banner. That holds for every task whose machine this app is connected to: a task on a linked machine counts, through the child thread's
delegatedFrom. The fork's prompt mirror still showed a read-only copy of the same prompt beside upstream's card ("Answer it in the task's own thread on that machine"), so the owner saw two cards, and the one from the fork said to go somewhere else. Rebuilding answer buttons in the fork would have duplicated upstream's card, so this part keeps the fork side thin.What changes (fork files only, web):
entriesNotShownHere: the mirror drops an open question or approval only when its task's thread is one of upstream's children asking this parent (useChildThreadInputs) and the task's machine is one this app is connected to now (useConnectedEnvironmentIds). Upstream builds its child list from every machine's last thread list: on a disconnect it keeps the old list (status "cached"), and at start-up it loads a cached list before the machine connects. For such a machine the mirror keeps its card, with the "not connected" text below. The match uses the task's own machine: the same thread id on another environment does not match. Secrets, pairing codes and cards that are not known always stay, because upstream shows none of them in the parent.useConnectedEnvironmentIds) now says so: "This app is not connected to , so it is answered there, in the task's own thread. Connect to this app to answer it here." This is the design's "no route = needs you at ". Tasks on this machine, and tasks on machines this app is connected to, keep the old text. Secret and pairing cards keep their own text (row 6).State question. The mirror stays read-only and holds no answer state. Every answer goes through upstream's card to the asking machine, which refuses a second answer (two clients, or the orchestrator and the owner). A child that is gone or answered drops out of upstream's list and out of the server's mirror. If this app loses its connection while a prompt is open, upstream keeps the machine's last thread list, so its card may stay (stale). The mirror's card returns at once anyway, because the drop rule needs the machine in the connected set and the server still lists the prompt. That card then says "not connected". The same holds at start-up, while a machine's list is only cached. Empty lists (no children, or none on a connected machine) drop nothing. Nothing is stored, so a restart loses nothing.
Left for row 5: nothing for questions and approvals once a machine is connected to this app; upstream answers them. If the owner wants the parent to answer for a machine this app is not connected to, that needs a relay through the parent server, which the design leaves out of this version ("the card says where it must be answered"). Secrets and sign-ins are row 6; T3's own and OS prompts are row 7.
Tests (failing first):
promptMirror.logic.test.tsxhas 7 new cases (drop rules, machine match, a listed machine that is not connected or only cached, a question while upstream hides its banner, kept kinds, same list when nothing is dropped, not-connected text). The two round-1 cases fail on the round-0 head; all 19 pass here.useForkPromptMirrorItems.browser.test.tsxgets three new cases: a card goes once upstream lists the task's thread on a connected machine; a cached list at start-up keeps the card until the machine connects, and a disconnect while the page is open brings it back; a child's question stays while the parent waits on the owner or a stop is unresponsive. Its old text check now expects the not-connected wording. Browser tests could not run on the machine that wrote this (the headless browser does not start there), so CI is their first run.Checks run locally:
vp run check:changedpasses format, lint, knip, typecheck and the react compiler; its test step fails only on the browser file above. The fork-checks scripts (schema, upstream files, seams) pass, and no upstream file changes.🤖 Generated with Claude Code