Repository navigation
feat(claude-code): bundle the Claude Code agent type by default - #818
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3a96d201b
ℹ️ 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".
| @@ -13,6 +13,8 @@ const HANDOVER_MS = 2 * 60_000; | |||
|
|
|||
| export const inject = ["react", "agents2", "host", "relay"]; | |||
| export const apply: PluginModule["apply"] = (ctx) => { | |||
| // Only the desktop app can start `claude`; no unusable type in a browser. | |||
| if (!isTauri()) return; | |||
There was a problem hiding this comment.
Gate the bundled agent off unsupported Windows hosts
On Windows desktop, isTauri() is true, so this registers and advertises the agent type even though its manifest starts the installer with bash and reads files with base64; the native host executes these programs directly, and standard Windows installations provide neither. A Windows user without Claude therefore gets an Install action that fails with Could not start bash, while a preinstalled Claude can still fail when a tool reads a file. Either restrict registration to the supported desktop platforms or provide Windows-native process declarations and validation.
AGENTS.md reference: AGENTS.md:L81-L85
Useful? React with 👍 / 👎.
| manifest: { ...claudeCodeManifest, apiVersion: 1 }, | ||
| module: claudeCode, | ||
| enabledByDefault: true, |
There was a problem hiding this comment.
Adopt shared controls before enabling the bundled plugin
Registering this as a source-bundled plugin leaves tabs.ts using its former external-plugin workaround: it hand-builds Button/Field substitutes and styles native selects as buzz-input, despite DESIGN.md requiring source plugins to import the shared controls and finite choices to use Select. This bypasses shared behavior such as Button's focusable loading state and spinner, Field's description/error wiring, and the Base UI Select keyboard/popup contract—for example, starting Install or Save disables the focused hand-built button instead of preserving the shared pending interaction. Replace those helpers with the shared Button, Field, Input/Textarea, and Select components now that direct imports are available.
AGENTS.md reference: AGENTS.md:L35-L41
Useful? React with 👍 / 👎.
kalvinnchau
left a comment
There was a problem hiding this comment.
🤖 One upgrade blocker: existing Claude Code installations make the entire plugin catalog enter recovery. Fix the migration before merging.
| serde_json::from_str(include_str!( | ||
| "../../../src/bundled/claude-code/manifest.json" | ||
| )) | ||
| .expect("claude code manifest"), |
There was a problem hiding this comment.
🤖 [P1] Migrate existing Claude Code installations before classifying the ID as bundled
A profile that installed the previous buzz.claude-code plugin now fails Manager::read() at lines 512–516 because installed entries cannot have bundled IDs. Reproduced by installing/enabling the old plugin with the base CLI, then using the same isolated profile with this commit: plugin list, plugin disable buzz.claude-code, and plugin remove buzz.claude-code all exit 1 with Invalid installed plugin identity. The desktop enters catalog recovery and activates no plugins, including unrelated bundled plugins; resetting the registry drops other installed entries and overrides.
Add a targeted migration for this formerly installable ID before validation, preserving enabled preferences and other registry state, plus a base-to-head/restart regression test. Keep validation for unrelated bundled-ID collisions intact.
wesbillman
left a comment
There was a problem hiding this comment.
Two changes needed: unsupported-platform gating and shared-control adoption, detailed inline and consistent with the existing reports. I have not reopened the explicitly documented manual-uninstall upgrade tradeoff.
Star Lord automated source review via Wes’s account — head b3a96d201b09c1acb8704da10c93e199cfdbb9bb, base 8da84af7ac8af9fddf237dc00065126d7dabe681. Source-only; no tests, app launch, CI verification, or native bundled-agent run.
| @@ -13,6 +13,8 @@ const HANDOVER_MS = 2 * 60_000; | |||
|
|
|||
| export const inject = ["react", "agents2", "host", "relay"]; | |||
| export const apply: PluginModule["apply"] = (ctx) => { | |||
| // Only the desktop app can start `claude`; no unusable type in a browser. | |||
| if (!isTauri()) return; | |||
There was a problem hiding this comment.
[P2] Do not register the default type on unsupported Windows hosts
Confirmed the existing platform finding: isTauri() includes Windows, but the unchanged manifest requires bash for Install and base64 for file uploads, and host_process.rs:294–298 executes those programs directly. A Windows desktop without those Unix tools now advertises a default type whose setup/upload actions fail. Match the terminal plugin’s supported-platform gate (or provide and validate Windows-native process declarations), and cover Windows plus browser registration explicitly.
| @@ -177,6 +179,11 @@ export const bundledPlugins: readonly BundledPlugin[] = [ | |||
| module: agents2, | |||
| enabledByDefault: true, | |||
| }, | |||
| { | |||
| manifest: { ...claudeCodeManifest, apiVersion: 1 }, | |||
There was a problem hiding this comment.
[P2] Use shared controls when promoting these tabs to bundled UI
Confirmed the existing control finding. tabs.ts:40–99 still builds external-plugin substitutes: pending Install/Save sets native disabled, removing the focused action from keyboard navigation, and field descriptions have no accessible connection to their controls. DESIGN.md:637–639,697–704 requires retained loading focus and connected help/error text; the shared Button and Field implement these. Replace the local helpers with shared Button/Field/Input/Textarea/Select now that direct imports are supported, and cover pending, failed-save/retry and cancel focus behavior.
wesbillman
left a comment
There was a problem hiding this comment.
One change needed: add the missing DCO sign-off to commit 5bd42e7528bcb4a42894231febe0e3c0f8649382. Its message has co-author credit but no Signed-off-by, contrary to AGENTS.md:196–204; the hosted DCO Check confirms 1/2 commits are missing certification. Preserve authorship and existing credit, add only a valid certification, and verify DCO at the updated head.
The previous platform/control findings are addressed in source; no new actionable code defect found in the migration or shared-control fixes.
Star Lord automated source review via Wes’s account. Head 5bd42e7528bcb4a42894231febe0e3c0f8649382; base 8da84af7ac8af9fddf237dc00065126d7dabe681. No tests or app execution. CI snapshot: DCO and Rust/tool integration failed; other jobs unfinished. Native bundled-agent acceptance remains unverified.
Moves the plugin from src/agent-plugins into src/bundled and adds it to both bundled lists (JS index and the native plugin-manager catalog), enabled by default. Desktop only: the browser host cannot start `claude`, so the type is not registered there. Drops the separate installable-plugin build. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: ART <ea39c1c8acf57180161ef4ba4ed68abf8589f5291956b909a5aa991fc66664ca@buzz.block.builderlab.xyz>
…rols - Registry read drops an installed buzz.claude-code entry now that the id is bundled, keeping a disabled install's setting. Other installed entries with bundled ids still fail. - Register the type only on Mac/Linux desktop: setup and file uploads run bash and base64. - Rebuild the tabs with the shared Button, Field, Input, Select and Textarea, so pending actions keep focus and help text is attached. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: ART <ea39c1c8acf57180161ef4ba4ed68abf8589f5291956b909a5aa991fc66664ca@buzz.block.builderlab.xyz>
5bd42e7 to
a97f78c
Compare
* 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
Ships the Claude Code agent type with the app, so it's on by default instead of needing
pnpm plugin:claude-codeplus Load from folder.src/agent-plugins/claude-code→src/bundled/claude-code(same directory depth, so relative imports don't change).src/bundled/index.ts(web/JS) andbundled_manifests()+enabled_by_defaultincrates/plugin-manager/src/lib.rs(desktop catalog).native_catalog_matches_desktop_bundleskeeps the two in sync.applyreturns early unlessisTauri()and the platform is Mac or Linux, the same gate the terminal plugin uses. The browser host can't start processes, and setup and file uploads runbashandbase64, which stock Windows lacks.tabs.tsx) use the sharedButton,Field,Input,SelectandTextareanow that they can import app components, so pending Install/Sign in/Save keep keyboard focus and help text is attached to its control.vite.claude-code.config.tsand theplugin:claude-codescript.The id stays
buzz.claude-code, so existing agents (typedbuzz.claude-code/claude-code) carry over. Bundled plugins already getpluginOwnerwith revisionbundled, andhost_grantsreads the bundled manifest'sprocesses, sohost.spawnworks without any change.Upgrade: a profile that folder-loaded
buzz.claude-codeupgrades in place. The registry'sread()drops that installed entry, and if it was disabled the bundled copy starts off. Every other installed entry with a bundled id still fails with "Invalid installed plugin identity".Validation: full
vitest run643 files / 8999 tests pass (claude-code 48/48, including Windows/browser registration and focus during pending, failed-save retry and cancel),tsc --noEmit,biome check,design:check,cargo clippyandcargo test -p buzzodz-plugins(including an upgrade test for an old installed entry and the catalog parity test). Not yet run: a native desktop session starting a Claude Code agent from the bundled copy.🤖 Generated with Claude Code