Skip to content

fix(plugins): show WebBridge updates in partial state - #5090

Merged
liruifengv merged 2 commits into
mainfrom
port/webbridge-partial-update
Nov 19, 2026
Merged

liruifengv merged 2 commits into
mainfrom
port/webbridge-partial-update

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Requirement or Bug

When the browser extension (WebBridge) is in the partial state and a newer catalog build is available, the plugins page shows the row as having an update but offers no update button — the user cannot act on the update hint.

Bug Reproduction Steps

  1. Install the WebBridge plugin.
  2. Get the capability into the partial state (wiring incomplete) while the catalog carries a newer build than the installed one.
  3. Open the plugins page: the row reports an available update, but no update button is rendered.

Root Cause

pluginRowShowsInstall only offered the update button for capability rows whose state was ready:

row.installedPlugin === undefined || (capability.state === 'ready' && row.updateAvailable)

WebBridge's install/update flow is idempotent and safe to run from the partial state, so the ready-only gate wrongly hid the button. This is a fundamental fix (widening the gate for the one capability that supports it), not a workaround.

Code Changes

  • packages/app-client/src/composables/usePlugins.ts: the update button is now offered when row.updateAvailable and the capability is either ready or WebBridge (capability.id === 'kimi-webbridge'), including its partial state. All other capabilities keep the ready-only gate.
  • packages/app-client/test/usePlugins.test.ts: two tests — a partial WebBridge row with a newer catalog build offers the update; other partial capabilities still do not.
  • Changeset: patch bump for kimi-code-app.

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
Update button on a partial WebBridge row with an update available Hidden Shown; clicking runs the same idempotent install/update flow as ready None — the old behavior was the bug N/A
Update button on partial rows of other capabilities Hidden Hidden (unchanged, pinned by a new test) — —

Affected users: desktop users with a partially-set-up WebBridge who are prompted that an update exists. Affected modules: app-client plugins composable, covered by packages/app-client/test/usePlugins.test.ts (91 tests passing).

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (internal change; no issue).
  • I have added tests that prove my feature works.
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c137a5e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kimi-code-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T07:27:59.223206Z c137a5e New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f92ee8d83b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

if (capability.install.running) return true;
return row.installedPlugin === undefined || (capability.state === 'ready' && row.updateAvailable);
return row.installedPlugin === undefined ||
(row.updateAvailable && (capability.id === 'kimi-webbridge' || capability.state === 'ready'));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve disabled WebBridge state during updates

When the installed WebBridge wiring plugin is disabled, detection marks its skill step missing, so the capability becomes partial; this new condition now exposes an Update button for that row. Clicking it invokes capability installation, whose WebBridge implementation explicitly calls setPluginEnabled(..., true) (packages/agent-core-v2/src/app/capability/entries/kimiWebbridge.ts:154-162,345-346), silently reversing the user's disable choice. Preserve the prior enabled state during an update, or keep this affordance hidden for disabled wiring.

AGENTS.md reference: AGENTS.md:L117-L117

Useful? React with 👍 / 👎.

@pkg-pr-new

pkg-pr-new Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@c137a5e
npx https://pkg.pr.new/@moonshot-ai/kimi-code@c137a5e

commit: c137a5e

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c137a5e324

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

if (capability.install.running) return true;
return row.installedPlugin === undefined || (capability.state === 'ready' && row.updateAvailable);
return row.installedPlugin === undefined ||
(row.updateAvailable && (capability.id === 'kimi-webbridge' || capability.state === 'ready'));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update the daemon binary from partial rows

When partial means the daemon is stopped while its existing binary and wiring are present, this newly exposed update button routes through setupCapability, but kimiWebbridge.install sets installNewBinary to false because readyBefore is false and daemon-binary is already ok (packages/agent-core-v2/src/app/capability/entries/kimiWebbridge.ts:257-279). The flow therefore installs the newer wiring and restarts the old daemon, then clears the catalog update even though the binary was not updated, potentially leaving incompatible component versions. Pass explicit update intent so this path refreshes the binary as ready-state updates do.

AGENTS.md reference: AGENTS.md:L190-L192

Useful? React with 👍 / 👎.

@liruifengv
liruifengv merged commit 08997af into main Nov 19, 2026
17 checks passed
@liruifengv
liruifengv deleted the port/webbridge-partial-update branch November 19, 2026 07:33
@github-actions github-actions Bot mentioned this pull request Nov 19, 2026
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.

2 participants