Repository navigation
FIX-2339: Teammates lab opens a message or task in a session popup - #4212
Conversation
coder leaves the teammates list and stays on the roster as the hidden worker coding tasks go to. Each coding task shows as a background item under the teammates and as a card in the conversation that started it; both open to the run, read only, and its result lands as the coding task's. lead's instructions say start a coding task. FIX-2154 D4 gets a dated amendment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
…nfig The lab's host now runs on the existing constant run source, a git checkout the operator names in TEAMMATES_WORKDIR, listed in localRepositories. Unset, missing or not a checkout, the lab fails at start; it never falls back to the current directory or its own checkout. Project tools, TEAMMATES_PROJECTS and the start-up project writes are gone, and so are the header project select, the New project form, the needs-project card and the repository approval card. Task cards say running and done. No WORKER.md mentions a project. ER-8 and FIX-2154 D3 get dated amendments scoped to this lab; packages/ is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
…ad of offering The lead worker is now chief-of-staff (teammates.chief-of-staff), shown as Chief of Staff. Its WORKER.md gains general tool-use guidance: act rather than offer, ask a teammate now when asked about them, hand work to whoever fits, and ask the user only what no tool can find. It adds no project text. researcher and writer each get a line saying who they are. README, TEAM.md, tests and the two teammates-lab goals follow the rename. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiEe3E83otCATaGAJdW
…unused import Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K
The project tools were the only thing asking for approval, but waitForUser is a control tool every agent worker has. Without the entry and answerApproval a worker that asked would stop with nothing on the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K
A --thread-width token (46rem) in the lab's theme caps both the message list and the composer, centred, so their edges line up with Talk open or closed. The composer's box starts at one line and grows with its text up to a cap. The assistant's text takes the column's full width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiEe3E83otCATaGAJdW # Conflicts: # labs/teammates/README.md # labs/teammates/test/fake-lab.ts
The conversation follows new content, a streamed answer's growth included, only while the reader is at the end, scrolling the list itself and smoothly; scrolled up, it stays put and offers Jump to latest. The answering line comes from the conversation's items as well as the timed request list, and shows only before an answer's text starts. A task card is drawn the moment it is filed and fills in place when the board's row lands. Unchanged entries keep their objects and Entry and TaskCard are memoized, so a chunk redraws only the growing answer. A send's own stream now keeps tool results and components, so a card lands in order beside the text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd
Talk toggling narrows or widens the center column, which rewraps a draft; the box only refit on text changes. A ResizeObserver refits it on a width change. Addresses Codex review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiE77dZBto1MJmMqd8e
…lder card stable reuseById compares with looseDeepEqual from @flow-state-dev/core/helpers instead of JSON.stringify. A task card drawn before its board row lands gets one placeholder object per entry, so the memoized card skips re-renders while the answer streams. Drops a duplicated doc comment on the task entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd
Matches the FSD prompt inputs (packages/ui, kitchen-sink) and drops the scrollHeight effect and ResizeObserver: the browser regrows the box when Talk narrows the column. Follows the Cursor review on Codex's resize finding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiE77dZBto1MJmMqd8e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiE77dZBto1MJmMqd8e
…ering The conversation's poll reads recent requests instead of only in-progress ones, and answeringOf takes the ended request ids: the newest request's in-progress item counts only while its record hasn't ended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiE77dZBto1MJmMqd8e
#4183 (FIX-2288) changed the lab's files without rewriting the table, so the lab's inventory test is red on main and on every PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K (cherry picked from commit 091232e)
A message a worker sent is one line, "Messaged researcher", and a task is one line, "Coding task: X" or "Asked writer to X". Either opens the other worker's session in a read-only popup over the thread, live: the recipient's turn on the message, or the task's run and result. Esc, the close button or a click outside closes it, and the thread keeps its place. Background items open the same popup; the "Coding tasks" view is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
…(port of #4204) Ported from #4204 so this PR's CI isn't red on main's worker-calls hook timeout; it no-ops once main carries the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Second look + architecture pass (read-only; for the implementing agent to triage)Verdict: the approach is right. One shared Worth fixing here
Optional (refactor-while-here, only because this PR already touches these files)
Checked and fine
Stacking note: this is based on #4211, so re-check the diff once that merges. Generated by Claude Code |
…to claude/project-thread-zxxb0p # Conflicts: # labs/teammates/README.md # labs/teammates/src/adapter.ts # labs/teammates/src/components/Entry.tsx # labs/teammates/test/screen.test.tsx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
There was a problem hiding this comment.
Simplify review (FIX-2339)
Reviewed with parallel code-quality, performance, and reuse passes over labs/teammates (+ goal runner updates). Verdict: the popup-over-thread approach is the cleaner product shape for this issue; I am approving with follow-up notes, not because the diff is complexity-free.
Approach — did this go too far?
What got simpler: Deleting Runs.tsx and the openRun center-column hijack is a real win. The conversation column is always the selected teammate; background tasks and inter-worker messages open in an overlay instead of replacing the main thread. Worker selection no longer needs choose() to clear a run view. watchRun only runs while a task popup is open, which is better than streaming every expanded inline card on the thread.
What got heavier: ~200 lines of new UI (SessionPopup, Popups, Steps) and adapter work (watchExchange, shared toSteps / exchangeOf, SessionStep). That cost is appropriate if the requirement is: stay on the current thread, show a live recipient-side exchange for a sent message, and match the Claude Code-style lab’s “sheet over workspace” pattern.
Simpler approaches considered:
| Alternative | Why it’s smaller | Why this PR didn’t take it |
|---|---|---|
Inline <details> on task/sent lines (pre–FIX-2339) |
No portal, no watchExchange, no second renderer |
Doesn’t give a modal session viewer or keep the parent thread visible while the exchange runs |
Reuse labs/claude-code-style Sheet now |
~60 fewer lines of overlay chrome | Portal target differs (document.body vs SheetArea); comment already tracks FIX-2287 for a shared primitive |
| Open message popup by navigating to the recipient | No watchExchange |
Breaks “watch Chief of Staff while researcher reads your message” |
@flow-state-dev/react + ItemsRenderer in the popup |
Drops custom toSteps / Steps |
Large lab architecture shift; fine as a later epic, not this PR |
Bottom line: The team traded navigation complexity for adapter + overlay complexity. For FIX-2339, that trade looks directionally correct. The main “smell” is parallel lab implementations (overlay shell, useWatch shape, stick-to-bottom elsewhere), not the popup state machine itself.
Follow-ups (optional / later — not merge blockers)
- FIX-2287 — Extract shared overlay frame from
SessionPopupand claude-code-styleSheet(header, Esc, backdrop, focus restore); keep portal target as a prop. StepsvsEntry— Two conversation dialects will drift when a new step kind appears; a shared presentational mapper (even lab-local) would shrink future diffs.Popupmessage variant —from/to/textduplicate data already on the thread entry and in steps once the exchange starts;{ kind: "message", messageId, to }(+ header fromwatchTalk) would slim openers.- Background list — One
BackgroundItemsblock per teammate each callswatchTasks; for demo scale it’s fine, but one session (e.g. whoever files coding tasks) matches kitchen-sink’s single background panel and avoids N identical feeds. MessagePopup+ sidebar — ExtrawatchTalk(popup.to)while the sidebar already polls per row; same pre-existing pattern as Conversation + TalkPanel, worth a shared poll bus only if logs grow.- Hire/fire — Removing
setOpenRun(undefined)withoutsetPopup(undefined)can leave a stale overlay after roster refresh (small UX edge).
Skipped (needs product or large refactor)
- Radix
Dialogfor focus trap (lab has no Radix today; hand-rolled popup is understandable). - Merging Teammates into kitchen-sink.
- Framework-level
watchExchangeonWorkforceClient.
Verification
pnpm test in labs/teammates — 43 tests passed (including new popup/Esc/background flows).
Automation simplify review — no code changes pushed from this run.
Sent by Cursor Automation: Review For Best Approach
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3172821a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…to claude/project-thread-lgx46h # Conflicts: # labs/teammates/README.md # labs/teammates/src/components/Conversation.tsx # labs/teammates/src/components/Entry.tsx # labs/teammates/src/components/TaskCard.tsx # labs/teammates/test/fake-lab.ts
There was a problem hiding this comment.
Code Snob: already tight. No POC. Head 93f41a3a1ed2e2313b02b30a6cee4ecd48f9ac39.
Read labs/teammates/src/components/SessionPopup.tsx, Popups.tsx, App.tsx, adapter.ts (toSteps, exchangeOf, watchRun, watchExchange, conversationOf), Conversation.tsx, Entry.tsx (SentLine), TaskCard.tsx, WorkersList.tsx, the deleted Runs.tsx, lib/use-watch.ts, test/fake-lab.ts, test/screen.test.tsx, and steps 2 and 5 in goals/teammates-lab/a-worker-talks-to-another-while-you-talk/run.mts. The only FIX-2339 commit after e3172821a unexports toSteps and exchangeOf.
A rewrite does not shrink this contract.
Runs.tsxis already gone. What is left is the frame, the two readers, andSteps. Hooks cannot sit behindpopup.kindin one component, and watching both kinds subscribes to the one that is closed.PopupViewis that switch.taskLineis the string the thread and the dialog both show.repliedInis the one scan the line and the dialog share. Inlining either copies it. Moving them underlib/does not delete a line.watchExchangeresolves the recipient because the conversation has the sender's session. Passingsessionsthrough is more props than theliveflag.conversationOfis already the cache.toStepsandtoEntrieswalk the same items to different results: a result line versus asaidstep, a sent id versustoandtext, tools only on the popup. One walker is both switches.SentLineandTaskCardshare a class string. A shared button still needs the icon, the label, the status, and the two data attributes.TaskCardstays off thePopupunion and passes a task id.openTaskandopenMessagekeepmemoon a stable function.setPopupis already stable, but the children would then build the popup and take the session id and the worker id. Same size. Thetypeof adapter.watchRuncast is shorter than annotating that callback. WideninguseWatchis a second signature for one call.SessionStep.streamingis unread. Dropping the field and the two spreads leaves thetoStepswalk.labelandtitleare the same string at both call sites. One prop drops the duplicate attribute and leaves the portal, the focus effect, andSteps.- The fixture walks entries because it has no
requestId, and it hardcodes the harness line because it has no block provenance.
The Sheet line stays. That shared overlay is already the follow-up named on this PR.
Sent by Cursor Automation: Code Snob
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93f41a3a1e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… sent step Tab and Shift+Tab wrap inside the popup, and focus behind it comes back in. A sendMessage wait-again or refused call is a tool step, not a message sent. README inventory regenerated (the merge counted conflict stages). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
A call's reply is its tool's result, never a message, so the message log's repliedAt on a call row marks the sent line and its popup replied. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd
…to claude/project-thread-lgx46h # Conflicts: # labs/teammates/README.md
Main carries the stack this PR sat on as squashed commits, so the tree is main plus this PR's own changes; ports of #4204 and the claude-code-style inventory are now main's own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd
…to claude/project-thread-lgx46h # Conflicts: # labs/teammates/README.md # labs/teammates/src/App.tsx # labs/teammates/test/screen.test.tsx
One request can answer more than once (a worker draining its own plan answers, works, and answers again), so answeringOf no longer treats a completed assistant message as the request's end; only the request list does. The conversation shows its 'answering' line only until the turn's answer text starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d7b1ed14f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A reply sent to a worker running a task lands in that task's session, not its conversation; the message log row's toSession says where. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ac048dd3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A taker that dies after its receipt is taken over and emits a second one; the popup shows the last receipt's turn, the one that answered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ad42a1e7c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…versation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
…to claude/project-thread-lgx46h # Conflicts: # labs/teammates/README.md
|
@claude resolve conflicts |
…-lgx46h # Conflicts: # labs/teammates/README.md # labs/teammates/src/adapter.ts # labs/teammates/src/components/Conversation.tsx # labs/teammates/src/components/Entry.tsx # labs/teammates/src/components/TaskCard.tsx
|
Conflicts resolved in fbbc168. #4211 had merged, so the base is now Generated by Claude Code |


Requested by Jake · project thread
Closes FIX-2339 (under FIX-2152). Stacked on FIX-2338 (#4211).
What changes
Runs.tsx) is gone. While its popup is open, the item shows as current.SessionPopup.tsx) is read only and portaled. It is sized to the thread's column, and Esc, the close button or a backdrop click closes it. Focus moves in, then goes back to the opener. The thread under it keeps its scroll position.SessionStep(given · said · sent · tool · harness) replacesRunStep.watchRunreturns these steps.watchExchange(worker, messageId)reads the recipient's conversation and takes the turn whose received-message item carries the message id.AgentMarkdownand the adapter's item mapping.Sheet.sendMessagethat waited again or was refused is a tool step, not a message sent. A call answered through its result (repliedAtin the message log) reads as replied.Verification
labs/teammatesvitest: 54/54 pass, on FIX-2338: new content in the Teammates lab settles in place #4211 at 8e016ff (merged in). New or changed screen tests:aria-expanded.src/, 4 of the 17 screen tests fail: both popup tests and the two step-2 line tests.inventory.mjs,check-retired-termsand goalstscpass.toStepsandrepliedInunit tests inentries.test.ts.Product sign-off is from the product lead on agent-mailbox #46.
No changeset: private lab.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi