Repository navigation
fix(channels): resolve template agents from ready inventory - #922
Conversation
wesbillman
left a comment
There was a problem hiding this comment.
One P2 remains: a transient archive-read failure leaves the template blocked with no in-dialog retry (inline). The shared-selection change addresses the earlier silent-empty and archived-member cases.
Star Lord’s automated source review via Wes’s account — head 4cf26746cf0d1e2db073ac76830f9910cca188a4, base 0de0f26f3dcd0a82a349bff3f1d9b7b72482b20c. Source-only; no tests/app execution or CI verification. All five attached screenshots inspected; the attached video was not reviewed. Native behavior, keyboard focus and human acceptance remain unverified.
| error={ | ||
| unresolved && !checkingAgents | ||
| ? "Its agents can’t be checked right now, so they can’t be added. Choose None to create the channel without them." | ||
| : undefined |
There was a problem hiding this comment.
[P2] Offer a retry for failed archive evidence without dropping the template
After a transient archive read failure, choices.archives.status stays error, so unresolved now disables Create and the submit guard returns before preflight can refresh it. useAgentChoices only ensures idle archives (choices.ts:205–210); choosing None and reselecting this template, or reopening the dialog, does not retry the failed read. This also strands a draft when the fresh archive check during Create fails. The only offered action abandons the template, even if the connection has recovered.
Keep the readiness guard, but add an explicit archive Retry using session.agentChoices.refresh("templates") while preserving the draft and a stable focus target. This follows the design guide’s “States, feedback, and motion” recovery rule. Cover archive error → retry → ready and retry failure; the new tests currently cover idle archives and successful external inventory updates, not recovery from an archive error.
When the archive read behind a template's agents failed, the Template
field reported the failure and held creation, but the only action offered
was choosing None. `useAgentChoices` only ensures idle archives, so
reselecting the template or reopening the dialog never retried, and a draft
whose fresh archive check failed during Create was stranded.
Offer Retry beside the error, using `session.agentChoices.refresh("templates")`,
the refresh the session preflight applies. The control stays mounted in a
loading state while the read runs, so focus keeps a home; when the read
resolves the field, focus returns to the Template control. A failed retry
keeps the error, the draft and the control.
Addresses #922 review discussion r4253996236.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
wesbillman
left a comment
There was a problem hiding this comment.
Archive-read recovery is now wired, but the new Retry also appears for native agent-list failures without retrying that list (P2, inline).
Star Lord’s automated source review via Wes’s account — head 99778c6ad6b03b8d1c0e99d09acca1cdc6727213, base 0de0f26f3dcd0a82a349bff3f1d9b7b72482b20c. Source-only; no tests/app execution or CI verification. Five attached screenshots inspected (older revision); the video and current-head native/keyboard behavior remain unverified.
| const retryAgents = async () => { | ||
| setRetrying(true); | ||
| try { | ||
| await session.agentChoices.refresh("templates"); |
There was a problem hiding this comment.
[P2] Make Retry reach the failed native inventory
This action is also offered when choices.templates.status === "error" after the native agent list fails. But agentChoices.refresh("templates") only refreshes archives in that case: choices.ts:180–183 makes usesLegacy false for a native error, and 212–220 never refreshes the native source. Even after the underlying list failure clears, pressing Retry just rereads archives; templates stay in error and Create stays disabled. The new archive-only mock test cannot detect this.
Route native-list recovery through its owning Agents service, preserving the no-legacy-fallback policy; alternatively, restrict this Retry to the failures it can actually retry and provide an accurate native-list recovery action. Cover native error → retry → ready through the real selection owner. The design guide’s “States, feedback, and motion” requires recovery beside the operation that failed.
The Template field's Retry, and every shared-selection Retry, called `agentChoices.refresh`, which refreshed the legacy library and archives but never the native list: `LocalAgents` exposed no way to list again, and the Agents service's read was private. After the native list failed, Retry only reread archives, so templates stayed in error and Create stayed disabled even once the failure had cleared. Give `LocalAgents` an optional `refresh` that the Agents service fulfils with its existing list-and-sync, forwarded through the composed local source. `createAgentChoices.refresh` calls it whenever the native source is in error, for any selection source, and still never substitutes the legacy inventory for it. A list that read is not read again by refreshing the other sources. A successful re-list also drops the stale `error` the service kept from the failed read, which left `templates.complete` false and `templates.error` set after recovery. Addresses #922 review discussion r4254368565. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
wesbillman
left a comment
There was a problem hiding this comment.
No new actionable findings in this follow-up; the previous native-list Retry finding is addressed in source: Retry reaches the existing Agents list owner, and a successful read clears its stale error without substituting legacy inventory.
Star Lord’s automated source review via Wes’s account; head 020c481b88fa6b761ca88c40c17ddabdb6756905, base 0de0f26f3dcd0a82a349bff3f1d9b7b72482b20c.
No tests, app/native behavior, keyboard interactions or CI were verified; the five screenshots were inspected, but the attached video was not.
When the archive read behind a template's agents failed, the Template
field reported the failure and held creation, but the only action offered
was choosing None. `useAgentChoices` only ensures idle archives, so
reselecting the template or reopening the dialog never retried, and a draft
whose fresh archive check failed during Create was stranded.
Offer Retry beside the error, using `session.agentChoices.refresh("templates")`,
the refresh the session preflight applies. The control stays mounted in a
loading state while the read runs, so focus keeps a home; when the read
resolves the field, focus returns to the Template control. A failed retry
keeps the error, the draft and the control.
Addresses #922 review discussion r4253996236.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
020c481 to
852758a
Compare
Create channel derived a template's agents from the Agents snapshot, which is empty while the native list loads or after a listing failure and still includes archived agents. Choosing a template then froze `agents: []`, so a plain channel was created without its lineup, or carried an archived member that the session preflight rejects on every retry. Resolve members through `session.agentChoices` with `templateAgentChoices`, the policy the session preflight applies, so archive and community evidence match. Teams still come from Agents. While a template names members whose inventory or archive evidence is not ready, the Template field shows a checking state or an error and creation is held; a template whose teams are gone or whose members are all elsewhere still creates a plain channel. Archive evidence is demanded only once a template needs it. Follows up on #867 review discussion r4243922558. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
When the archive read behind a template's agents failed, the Template
field reported the failure and held creation, but the only action offered
was choosing None. `useAgentChoices` only ensures idle archives, so
reselecting the template or reopening the dialog never retried, and a draft
whose fresh archive check failed during Create was stranded.
Offer Retry beside the error, using `session.agentChoices.refresh("templates")`,
the refresh the session preflight applies. The control stays mounted in a
loading state while the read runs, so focus keeps a home; when the read
resolves the field, focus returns to the Template control. A failed retry
keeps the error, the draft and the control.
Addresses #922 review discussion r4253996236.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
852758a to
409a307
Compare
…-drag * origin/main: (34 commits) fix(channels): resolve template agents from ready inventory (#922) [buzz-app] Fit uploaded videos to the relay's 4K envelope and name video rejections (#1129) feat(github): reveal the PR comment a link points at (#947) fix(messages): stop WebKit freeze from muted composer video previews (#1143) test(browser): fix route-unroute and virtua-hold webkit flakes (#1149) test(browser): let dnd-kit see its first resize before text shrinks (#1150) fix(previews): keep a hovered preview through scroll anchoring (#1138) Unify owned agent profile panels (#1083) feat(agents): import old Buzz teams from the Teams tab (#985) Mark Me chats as personal in the session description for remote agents (#1058) feat(messages): optional way to open buzz message links in a thread tab (#1113) Distinguish thread originals and tighten conversation spacing (#929) fix(buzz-mcp): page channel reads past the relay limit (#1131) fix(inbox): show a session's top-level timeline as one conversation (#1094) feat: reorder sidebar groups by dragging their headers (#1118) fix(avatars): request the cached relay thumbnail at every avatar site (#1054) fix(messages): soften quote styling and tighten spacing (#1098) fix(emoji): shrink and raise inline custom emoji (#1097) fix: follow host theme in media review chrome (#1117) Highlight an already-open thread tab when reopening it (#1050) ... Signed-off-by: John Tennant <jtennant@block.xyz> Co-authored-by: Claude Worker <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz> # Conflicts: # src/features/channel-navigation/ChannelSidebarDnd.tsx
* origin/main: fix(navigation): share one abort reason so Settings → Back stops leaking DOM on V8 (#1161) Unify sidebar resizing and polish Solo navigation (#1132) Organize Builderlab agent identity and runtime settings (#1153) fix(channels): keep consecutive tab closes in the closing pane (#1158) feat(goose): add the goose agent type (#1125) feat: edit the last message with Cmd+Up (#1042) fix(channels): make Enter press the prominent lifecycle button (#1152) feat(me): drag chats between projects and Chats (#1112) fix(search): find open channels past the first 500 in Command-K (#1128) Stop in-flight request mocks from failing finished browser tests (#987) fix(channels): resolve template agents from ready inventory (#922) [buzz-app] Fit uploaded videos to the relay's 4K envelope and name video rejections (#1129) feat(github): reveal the PR comment a link points at (#947) fix(messages): stop WebKit freeze from muted composer video previews (#1143) Signed-off-by: John Tennant <jtennant@block.xyz> # Conflicts: # docs/sessions/README.md
Follows up on the #867 review comment discussion r4243922558.
Problem
Create channel took a template's agents from the Agents snapshot. That snapshot is empty while the native list is still loading or after a listing failure, and it still includes archived agents. So choosing a template could:
agents: []and create a plain channel without its agents, orChange
session.agentChoicesthroughtemplateAgentChoices, the same policy the session preflight applies, so archive and community checks give the same answer in both places. Teams still come from Agents (useTeams).Production diff:
CreateChannelDialog.tsx(+44/−10). Tests:CreateChannelDialog.test.tsxcovers loading, listing failure, archived members, members from another community, and recovery once the inventory is ready.Before / after
Left: parent commit
ebadc94c(before). Right: this PR. Both panes run the identical scripted flow against the identical fixture: the "Launch" template (teamcore= Ada, Bo) is chosen while the agent list is still loading, Create is pressed in that window, and the agent list resolves ~7 s later.#launchis created with only You.before-after.mp4
ebadc94cError branch (listing fails instead of resolving), after only:
Recording note: this is headless WebKit over a scratch Vite fixture that mounts the production
ChannelSidebar→CreateChannelDialog→ChannelsPage→ChannelMembersDialogand the real relay session /agentChoices/ preflight against an in-page relay; the only stand-in is theAgentssurface, whose native list is held atloadinguntil released. No product code was patched for the recording.Validation
CreateChannelDialogpasses; pre-push hooks (types, unit tests, design-system) passed.🤖 Generated with Claude Code