Name templated benches after their template and invite the roster - #279
Merged
Conversation
A bench created from a named template should carry that template's own name (the blank template keeps its generic one), and a template's participants should actually join the room the moment it's created, not just get registered as agent-directory definitions.
TheGreatAxios
force-pushed
the
cl-template-roster
branch
from
August 22, 2026 02:39
84f5a84 to
b435761
Compare
createWorkbenchFromTemplate hardcoded every bench's name to "New Workbench", throwing away the picked template's own name even though the manifest already carries one (manifest.title). It also stopped at creating each participant's agent-directory definition, never adding it to the room — so a code-review bench's greeting promised three reviewers while the room held only Myra. instantiateWorkbenchTemplate now invites every non-Myra participant into the workbench right after resolving its agent-directory id, whether that id came from a fresh create or an existing definition (a definition already existing tenant-wide is not the same as already being a participant of this new room, so skipped creates still need inviting).
TheGreatAxios
force-pushed
the
cl-template-roster
branch
from
August 22, 2026 02:47
b435761 to
b3c3eed
Compare
The template instantiation port widened to carry each existing agent's id alongside its handle, so an already-created reviewer can still be invited. The real eval target's implementation was left returning bare names and no longer satisfied the port.
The template ports grew inviteParticipantAgent, which is what puts a template's roster in the room rather than only in the agent directory. The real eval target never implemented it, so the eval could not observe the behavior it exists to cover.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
Driving the app live (sign in, "New workbench", pick Code review, create), two bugs surfaced that no test caught:
The bench was named "New Workbench", not "Code review".
createWorkbenchFromTemplate(apps/web/src/instant-agent-create.ts) unconditionally passedNEW_WORKBENCH_TITLEas the room's name, even though the picked template's manifest already carries its owntitle("Code review"). Every templated bench looked identical in the sidebar.Myra's greeting says "Three reviewers read every pull request and post what they'd change," but the room held only Myra.
instantiateWorkbenchTemplate(packages/workflow-catalog/src/instantiate.ts) created the three reviewer agent-directory definitions but never added them as room participants — its own doc comment said as much: "inviting the reviewers into the room… are the next slice." Confirmed by reading the code, not by driving the app a second time:POST /workbenches/:id/invite(@corbits/chat-ui'sinviteAgent) is the only route that actually joins an agent to a room, and nothing on the template-create path ever called it.Which of the two possibilities #2 turned out to be
Not "the reviewers join later, after GitHub connects" — there's no such deferred-join mechanism anywhere in the create or connect-GitHub path. It was purely a missing slice: the reviewers are meant to be present immediately (their agent definitions get created synchronously, in the same request), the room just never invited them. So the fix invites them, rather than rewriting the greeting to describe a future state.
The fix
apps/web/src/instant-agent-create.ts:name: manifest?.title ?? NEW_WORKBENCH_TITLE— a named template names the bench; the blank template ("Just start talking") keeps the generic title, since there's nothing better to call it.packages/workflow-catalog/src/instantiate.ts:instantiateWorkbenchTemplatenow calls a newinviteParticipantAgent(id)port for every non-Myra participant right after resolving its agent-directory id — whether that id came from a freshcreateParticipantAgentcall or an already-existing definition. (An agent definition already existing tenant-wide is not the same as already being a participant of this new room, so a skipped create still needs an invite.)listAgentHandlesnow returns{handle, id}pairs instead of bare handles, since the id is what the invite call needs.apps/web/src/instant-agent-create.tswires the new port toinviteAgentfrom@corbits/chat-ui(POST /workbenches/:id/invite), the same call the existing "Invite agent" dialog and "Add Jimmy" quick-create already use.What a first-time user now sees after picking "Code review"
The bench is named "Code review" in the sidebar, and the room opens with Myra plus all three reviewers already present as participants — matching exactly what Myra's greeting promises.
Ticket-worthy detail (Linear MCP was disconnected while writing this PR)
Found but out of scope for this fix: the picker row's copy ("Three reviewers read every pull request and post what they'd change.") is duplicated as a static literal in
apps/web/src/workbench-templates.ts, separate from the live catalog manifest'spromisefield that the in-room greeting reads (packages/workflow-catalog/src/templates.ts). PR #275 made the greeting read live; the picker row itself still has to be hand-kept in sync. Worth a follow-up ticket to have the picker read the same live value instead of a second hardcoded copy.Test plan
bun testinpackages/workflow-catalog— 13 pass, including new coverage that every reviewer (created or already-existing) gets invited, and Myra never is.bun testinapps/web(instant-agent-create.test.ts) — 2 pass: blank template keeps the generic title; code-review template names the bench "Code review" and invites all three reviewers with the ids their create calls returned.tsc --noEmitclean in both packages.eslintclean on the four changed files.prettier --writerun on changed files.