Skip to content

feat(agents): bring beta teams over with Import from old Buzz - #814

Open
wpfleger96 wants to merge 47 commits into
mainfrom
hayt/beta-team-migration
Open

wpfleger96 wants to merge 47 commits into
mainfrom
hayt/beta-team-migration

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

🤖 Import from old Buzz now brings each agent's beta team over as a 1.0 team, with beta's name and shared instructions. Agents imported before this change can be restored into their teams.

Builds on #775 (editable agent teams) and #774 (strip old team text from imported prompts), both merged.

Controller (native)

  • Import: each imported agent records imported.betaTeam: the beta team ID, the 1.0 team ID, the name, whether old Buzz still had the team, which old Buzz install it came from, the original beta text (betaText, never changed afterwards) and a status (pending, completed or skipped). A team old Buzz had already deleted starts as skipped.

  • Team ID: beta- plus the SHA-256 hex of the beta team ID, so importing more members later joins the same team and a re-import never creates a copy. Names are trimmed, fall back to "Team from old Buzz", and are cut to the app's 120 UTF-16 code unit limit without splitting a character.

  • Previews: the import preview and the agent summary show {teamId, name, status}. The text is never included.

  • agent_control_beta_teams: this account's pending agents in a community, grouped by team.

  • agent_control_beta_team_finish: finishes one agent in one native write, after checking its revision, community and owner. completed requires a readable team that lists the agent. It adds the team to the agent's team links without removing any, then runs feat(teams): edit shared team instructions in their own record #775's team-text resolver (now the shared sync_doc) on the same document. skipped requires the team's current catalog head to be a deleted-team marker; catalog decoding now keeps that deletion flag, and heads saved without it still read as live. Any refusal writes nothing, and the agent stays pending.

  • Restore for earlier imports: agent_control_beta_team_restore_preview groups selected agents by their beta team, using old Buzz's files when they still list every member, or otherwise the agents' own unlinked copies, marked as inferred. An inferred group with no text is never offered. agent_control_beta_team_restore then starts the whole group in one all-or-nothing write, checked against the preview's token, texts and every member's revision, owner and community. After that, members finish like any pending agent.

  • Known limit: the app checks for clashing team texts before it saves the member list. If another device edits only the text of an overlapping team between that check and the save, the step doesn't catch it. Native finish still refuses the conflicting texts, so the agent stays pending instead of getting the wrong instructions.

App

  • Import from old Buzz has a rerunnable team step and labels each agent "Joins team X".
  • From old Buzz section on the Agents page: finds the beta teams of agents imported earlier and restores them, and offers "Finish team setup" for pending teams. When members had different beta texts, "Choose instructions…" asks which to keep. Both old Buzz libraries are offered unless the host reports exactly one; older hosts that report none get both. "All teams from old Buzz are set up" shows only after pending teams were read successfully. If that read fails, its error shows a Try again button that reads pending teams again, even when no agent is left to find teams for; a successful read clears that error without hiding a Finish or Restore error. While a team is being set up the section doesn't say it is reading teams, and only finding teams spins Find teams; every control stays disabled while either runs.
  • Focus: after a successful Finish setup or Restore, focus moves to the section once that action's own row is gone, but only if focus was left on the page body. A pending row and a restore preview for the same team are told apart, so a surviving preview doesn't hold the handoff. While the section is hidden (for example during a team catalog reload) the handoff waits and runs when the section returns. It ends without moving focus when the action fails or is refused (a refused restore puts focus on Find teams again) or when the person moves focus to another control or clicks anywhere outside the row (clicking empty space moves no focus, so the click itself cancels it). A successful Try again, whose button goes away with the error, hands focus to the section under the same conditions: only from the body, and only if the person hasn't moved focus or clicked elsewhere meanwhile.
  • Shared header (content-header.css): when space runs out, every Header and InlineHeader now wraps its actions as whole controls below the title and explanation (which keep at least 12rem) instead of squeezing the text, and header actions get a --space-2 gap. This matches what Settings already did. On the Agents page, Refresh teams and Create team are now 8px further apart.

Hayt and others added 18 commits October 8, 2026 20:16
Old Buzz once stored team instructions inside an agent's prompt behind an
exact delimiter. The runtime now adds the team section itself, so an
imported copy delivered the text twice. Only the imported copy is changed;
the preview flags affected agents without exposing the prompt.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Agents imported before the import-time cut still carry old Buzz's team
section in their saved prompt, so team Save would deliver it twice. Opening
the store now cuts it from beta imports only and bumps their revision.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Cleaning on every open cut a second delimiter section on the next launch,
including from fresh imports. A per-agent mark saved with the cleaned prompt,
and set at import, makes it one-time. A failed cleanup write now becomes an
inventory warning instead of disabling the whole agent controller.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
…te errors

A write error after the new file landed (such as a failed directory sync) was
hidden by the matching re-read. The re-read now only checks the file is still
readable, and the error, which names which case it was, is always shown.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Ordinary teams gain team text by moving to the portable record format;
the ordinary record is retired and the portable record wins for both the
app catalog and the native roster. Save refuses giving an agent two
different team texts, naming the other team; teams without text never
conflict.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Save, delete and the first catalog load per session write each team's
current text into members' local settings via agent_control_team_sync and
clear it for agents no team with text lists. Nothing restarts; running
members show restart-needed. Deploy to channel no longer writes text or
restarts agents.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Team Save and the app-start sync now copy each team's current text to the
members its signed roster lists, clear it for agents that left their last
team with text, and keep both for teams the app could not read. Teams with
no text never count. Conflicting texts are refused before any write. Text
imported from old Buzz stays until a team with text claims the agent, then
that team's text replaces it. Team text joins the restart-required diff.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Link refresh, text copy and the conflict check now run on one in-memory
document that is saved only after all of them pass. A team the app could
not read never releases a binding, even when its roster changed.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
The edit dialog and delete flow kept the head they loaded, so retrying after a failed instruction sync hit a revision conflict instead of resending. They now keep the head they saved.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Deleted teams were skipped when collecting team texts, so the controller treated them as unreadable and kept their links and copied text. A selected tombstone now goes to the sync as empty text; unreadable live teams are still left out.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
The main webview lacked the team-sync command permission, and the startup sync started the channel catalog read before channel discovery, which the startup-order test forbids. The sync now waits for the catalog the channel views load after discovery.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Team text lives in a private buzz-team-text-v1 record keyed by team id, so instructions no longer depend on exporting members or converting a team to portable. The capture IPC and conversion path are removed.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Retries now recheck conflicts against a fresh catalog, delete and import keep the event ids needed to confirm an uncertain write, a head seen once stays authoritative even if it never decoded, and browser admission matches native for text manifests and client ids via one shared corpus.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
A members-only save now confirms this team's text head too, and the save check waits out any catalog read already in flight instead of reusing its older result.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Startup cleanup cut after the last baked team heading in any uncleaned beta import, deleting owner text when a 1.0 edit contained that heading. Cut only while the saved prompt still equals the retained original system_prompt; otherwise just mark it cleaned.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
… into hayt/beta-team-migration

* origin/hayt/strip-imported-team-suffix:
  fix(agents): skip cleanup for prompts edited since import
  test(agents): reopen a real beta import and always report cleanup write errors
  fix(agents): clean each imported prompt once, without blocking startup
  fix(agents): clean baked team text from earlier beta imports
  test(agents): cover the stripped team instructions notice
  fix(agents): strip baked team instructions from imported prompts

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Imported agents keep their old Buzz team (hashed 1.0 ID, name, immutable beta text, status) so the app's rerunnable team step can recreate it. Finishing an agent binds it and resolves team text in one write; restore initializes earlier imports through the same call.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
@wpfleger96
wpfleger96 changed the base branch from main to duncan/agent-teams-save October 9, 2026 18:30
Hayt and others added 11 commits October 9, 2026 14:35
Finishing one restored member re-resolves team text across the document and bumps the other members' revisions, so per-member restore checks against the preview refused every member after the first. Restore now initializes betaTeam for the group at once; members then finish as ordinary pending agents.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
… limit

Native catalog decoding dropped the deletion flag, so a live team that had merely lost the agent passed the skip check and stopped its beta text for good. Beta names were cut at 120 Unicode scalars while the app counts 120 UTF-16 units, so a non-BMP character at the boundary made team setup unfinishable.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Imported agents keep their old Buzz team pending until the open community's
team catalog is ready; the step runner then writes the roster, publishes the
beta text only when the team never had instructions, and finishes each member
natively. Finish team setup and restore for earlier imports live in the panel.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
…ecks

The pre-import clash check had no way to see a candidate's old Buzz team instructions, so it compared an empty text and passed. This read-only command is bound to the current preview token and candidate, and keeps the ordinary preview text-free.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
…il it succeeds

Overlapping passes could deliver stale text after a save, and app-start sync latched done before it ran, so a busy controller or transient failure skipped delivery for the whole session. A conflict now names the agent and both teams.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Team text now reaches agents only through team sync, which checks every roster. The older command could deliver text to one agent without that check, and nothing in the app called it any more.

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
A rejected native sync leaves agent control in error and a failed catalog read leaves the catalog unready, so the retry silently stopped. Retries now re-read both and count a failed re-read as an attempt. The conflict check selects agents by community like the Agents page, so native wss agents get named teams, and callbacks after cleanup do nothing.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
The pre-import clash check compared an empty text, so an agent already on another team with different instructions passed it. It now reads the candidate's old Buzz text through the native read-only command first.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Base automatically changed from duncan/agent-teams-save to main October 9, 2026 21:03
Duncan added 4 commits October 9, 2026 17:07
* origin/main: (22 commits)
  feat(teams): edit shared team instructions in their own record (#775)
  Use Sonner for bottom-right app toasts (#813)
  Allow bounded stdin data for fixed plugin host commands (#769)
  Add native Codex agents with CLI defaults (#751)
  Register placeholder Builderlab agent type in Agents2 (#788)
  feat(claude-code): bundle the Claude Code agent type by default (#818)
  perf(datetime): share compact clock formatting (#609)
  fix(agents): restore Rust test compilation on main (AgentEdit effort) (#821)
  polish inbox controls and resizable previews (#770)
  fix(reactions): open the reactor preview on a short hover (#730)
  perf(messages): batch timestamp locale and timezone lookups (#592)
  feat(agents): carry effort level in agent and team exports (#779)
  fix(agents): strip baked team instructions from imported prompts (#774)
  fix(agents): show renamed Buzz 1.0 agents in browser and publish rename profiles (#702)
  feat(channels): drag channels into and out of Starred (#745)
  test(mentions): wait for picker search focus before sending keys (#816)
  feat(conversation): show unjoined channel links by name, with a preview (#796)
  Polish Canvas-backed Todos panel and recovery (#804)
  docs: define shared composition rules for Buzz UI (#802)
  feat(channels): copy a channel link from the channel menu (#811)
  ...

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

# Conflicts:
#	crates/agent-controller/src/import.rs
#	crates/agent-controller/src/import/tests.rs
#	crates/agent-controller/src/store.rs
#	src-tauri/build.rs
#	src-tauri/capabilities/default.json
#	src-tauri/src/agents.rs
#	src-tauri/src/browser_permissions_tests.rs
#	src-tauri/src/lib.rs
#	src-tauri/src/relay/kit.rs
#	src/bundled/agents/AgentImport.test.tsx
#	src/bundled/agents/AgentImport.tsx
#	src/features/agents/control-native.ts
#	src/features/agents/control.ts
#	src/features/agents/team-instructions.ts
… beta import

The roster save only guards its own record, so a text-only edit to an overlapping team between the clash check and the save is not detected. Native finish and the delivery check still refuse, so the agent never runs with mixed instructions. The runner test now holds a read to pin that limit.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
…unfenced text edit

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
@wpfleger96
wpfleger96 marked this pull request as ready for review October 9, 2026 21:26
@wpfleger96
wpfleger96 requested review from a team as code owners October 9, 2026 21:26

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 One retry-path defect found; see inline comment.

Comment thread src/bundled/agents/BetaTeamSetup.tsx Outdated

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change needed: keep restore discovery rerunnable after empty results and stale-preview refusals. The existing empty-result finding is confirmed; the inline comment covers the stale-preview path that the same recovery fix should handle.

Star Lord’s automated source review via Wes’s account — head fcfd0472453d836579cf77149cc92099c83ff9b1, base 8cef21d09b5723b102a036a8fd3d1ee24d02470f.

Source-only: no tests or app execution; native/live-relay migration and rendered focus behavior remain unverified. The hosted CI snapshot is red (JavaScript 2/2); its cause is not established.

Comment thread src/bundled/agents/BetaTeamSetup.tsx Outdated
Duncan added 3 commits October 10, 2026 11:46
* origin/main:
  fix(me): share Messages sidebar working indicators and activity (#817)
  fix(messages): show typed angle-bracket text instead of dropping it (#803)
  fix(codex): default agent workspace to ~/.buzz (#831)
  View Codex and Claude sessions started in Buzz (#826)
  feat(codex): run bundled Codex with danger-full-access (#832)
  feat(codex): bundle the Codex agent type by default (#830)
  test(channels): split combined invitation paging test (#829)
  fix(dev): rebuild Vite's dependency cache on every dev start (#823)
  docs(agents): add buzz-specific test-audit skill (#797)
  fix: make inbox detail channel heading open its context (#819)
  fix(agents2): run each agent in one copy of the app (#790)
  Add Codex agents to Agents2
  fix(builderlab): complete AgentsNative mock in test (#824)

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

# Conflicts:
#	src/bundled/builderlab/index.test.tsx
Once a preview existed, the library picker and Find button disappeared, so an empty result or a revision refusal from start_beta_teams left no way to retry. Find stays available and replaces the preview token; a refused restore moves focus to it.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
A library change or a new Find left the previous preview's Restore live, which could save the other library's instructions or reuse an expired token. A refused restore also hid the section through the control's error status, consuming the focus handoff before Find was back on screen.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change remains: preserve the new focus handoff across the controller’s error → ready transition (inline). The persistent Find/source controls address the previous retry dead end.

Star Lord’s automated source review via Wes’s account — head ad232d64b8cd644cd48a680d9afb33445bc2db18, base 82d165d5b6fd7dc1f3e9784675d27c04aacdbeae.

Follow-up scope: the retry fix, its controller integration, and merge resolution. Source-only: tests and app not run; native migration, rendered keyboard behavior, and current CI remain unverified.

Comment thread src/bundled/agents/BetaTeamSetup.tsx Outdated

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes requested in this follow-up: the remaining focus finding is addressed by retaining the handoff until readiness and a mounted Find button. The new real-controller regression covers error → ready recovery, and changing libraries or starting another Find now discards the previous preview.

Star Lord’s automated source review via Wes’s account — head b0a307eef56025984b66ca49427fb8e50aa4c680, base 82d165d5b6fd7dc1f3e9784675d27c04aacdbeae.

Source-only: tests/app not run; rendered keyboard behavior and native migration remain unverified, and JavaScript, browser journeys, and Rust checks were still running in the hosted CI snapshot.

The restore controls were an unstyled strip below every agent group, and
they vanished once each agent had a team, leaving no done state. The
section now sits under Agent teams with a heading, keeps its library
picker and Find in every state, and names old Buzz libraries the same way
in every picker.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change needed: the new completion state can report “All teams from old Buzz are set up” when the pending-team read failed (inline). The earlier retry/focus fix remains intact through the layout move.

Star Lord’s automated source review via Wes’s account — head 7f1089c57628435bae1beccdb77e752bf8110827, base 82d165d5b6fd7dc1f3e9784675d27c04aacdbeae.

Follow-up scope: the permanent section, source controls, and instruction-choice dialog. Source-only: tests/app not run; native migration and rendered keyboard behavior remain unverified. JavaScript and Rust checks passed in the hosted snapshot; four browser-journey checks were still running.

Comment thread src/bundled/agents/BetaTeamSetup.tsx Outdated

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 One minor progress-state defect found; see inline. The existing pending-read completion finding remains unresolved.

Comment thread src/bundled/agents/BetaTeamSetup.tsx Outdated
Unknown inventory no longer hides the Development library, a failed pending-team read no longer reports setup as done, focus survives a finished row, and inline header actions wrap whole below the copy when space runs out.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The false-completion state is fixed, but the retry portion of the previous finding remains unresolved; see the inline follow-up. No additional changes requested in this delta.

Star Lord automated source review via Wes’s account. Head 88218bb32529421fe65a2b13b4ca54b6ac84eccf; base 82d165d5b6fd7dc1f3e9784675d27c04aacdbeae. No tests or app/native workflows run; rendered focus/layout and CI unverified.

Comment thread src/bundled/agents/BetaTeamSetup.tsx Outdated

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 One minor focus-lifecycle regression found; see inline. The existing pending-team read retry finding remains unresolved.

Comment thread src/bundled/agents/BetaTeamSetup.tsx
The handoff stayed armed after failed or refused choices, so a later unrelated render could pull focus to the section. It now belongs to one team row and ends on failure, on focus moving elsewhere, or when that row disappears.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One prior change remains: complete the pending-team read retry/error-clear path. This focus-only update leaves it unchanged. The stale-focus finding is addressed in source by binding the handoff to one row and clearing it on failure or focus moving elsewhere; no new findings in this delta.

Star Lord’s automated source review via Wes’s account — head fad36e6f6ad79085c557b9331a6535f5d071fce7; base 82d165d5b6fd7dc1f3e9784675d27c04aacdbeae.

Source-only: tests/app not run; rendered keyboard behavior and native migration remain unverified. Current CI not checked.

A failed pending-team read had no way to retry when every agent already had a recorded team, and its error outlived a later successful read. One busy flag also made Finish setup and Restore say they were reading teams.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change needed: preserve focus when the new pending-team retry succeeds (inline). The previous retry/error-clear request is otherwise addressed, and setup no longer presents discovery progress.

Star Lord’s automated source review via Wes’s account — head bb3c540d30024aa5ad59220edf58efddac2f6147; base 82d165d5b6fd7dc1f3e9784675d27c04aacdbeae.

Source-only: tests/app not run; rendered keyboard behavior, native migration, and current CI remain unverified.

)
}
/>
{readProblem && (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Preserve focus when the retry clears its error

Keyboard activation of Try again leaves focus on this button while betaTeams runs. A successful read calls setReadProblem(null) (line 233), so this conditional removes the focused button. The existing settle handoff is armed only by Finish/Restore (settled, line 263), not by retry, and refind only handles a refused restore. Thus an ordinary failed read → keyboard retry → success drops focus onto the page body instead of keeping it with the restored teams. The new test uses fireEvent.click, so it never focuses the removed control.

Keep the focused retry control mounted, or transfer focus to a surviving row/section only if the user has not moved elsewhere. Add a keyboard-activated retry regression asserting a surviving focus target after success. This follows DESIGN.md’s “States, feedback, and motion” requirement to preserve a focused retry control when results become empty or populated.

Key the focus handoff by row kind and team so a surviving preview of the same team doesn't hold it, keep it armed while the section is hidden by a catalog reload, and hand focus to the section when a successful retry removes its button.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes requested in this follow-up. The retry-focus finding is addressed; distinct pending/preview keys and waiting for the mounted section also preserve the intended completion handoff.

Star Lord’s automated source review via Wes’s account — head 2c14693b79a3ba2737f325bd6a53cac2998d2a57; base 82d165d5b6fd7dc1f3e9784675d27c04aacdbeae.

Source-only: tests/app not run; native migration and rendered keyboard/layout behavior remain unverified. JavaScript, Rust, and browser journeys were still running in the hosted CI snapshot.

Clicking empty space fires no focusin, so a pending handoff survived and later pulled focus to the section. Pointerdown outside the originating element now cancels it too.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes requested in this follow-up: the click-away listener clears the pending handoff during catalog reloads and retry reads without cancelling the initiating instruction choice.

Star Lord’s automated source review via Wes’s account — head d1b34951a672a6124ee99c205a0544d9a66821c7; base 82d165d5b6fd7dc1f3e9784675d27c04aacdbeae.

Source-only: tests/app not run; native migration and rendered keyboard/pointer/layout behavior remain unverified. Hosted CI snapshot: JavaScript (2/2) and browser journeys still running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants