Skip to content

fix(app): keep plugin update findings until the settled list agrees - #64525

Merged
jlongster merged 1 commit into
devfrom
app-plugin-update-findings
Nov 17, 2026
Merged

jlongster merged 1 commit into
devfrom
app-plugin-update-findings

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Issue for this PR

Follow-up to #64511, which merged before this commit was pushed.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Fixes issues a review of #64511 found in the Plugins tab update controls:

  • Update button reappears after an update. The server reloads its plugins after plugin.update and plugin.check return, so a list fetched in between still carries the old outdated flag. Any list load used to clear what the update learned, so Update came back until the next reload. Lists with ready: false are now ignored, and a finding is dropped only once a settled list agrees with it.
  • A slow check can undo an update. Checks and updates share one id counter. A check result now never overwrites a package whose finding came from a later update, or a package that is still updating.
  • Check for updates shows with no package plugins. It's now hidden unless a package plugin is listed, as in the TUI.
  • Buttons wrap on narrow widths. The check and row buttons no longer wrap their text, and the header row wraps instead.

How did you verify your code works?

  • New machine tests for a stale list followed by a settled one, and for a check racing an update. Seven tests pass.
  • bun run typecheck in packages/app and bun run lint:changed pass.
  • Driven end to end in the desktop app with OpenCode Drive. The isolated server had opencode-wakatime@latest installed, and the installed copy's version number was edited down so an update showed. The run clicked Check for updates and Update. It confirmed a new 1.4.0 install, that Update stayed hidden for the 2 s after the update while the server reloaded, and that a second check offered nothing.

Screenshots / recordings

Screenshots from the Drive run are in the Slack thread. The bot can't upload attachments to GitHub.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Requested by: @jlongster (James Long via Slack)

The server reloads plugins after check and update return, so a list read in between carried stale flags and the Update button came back. Ignore lists while the server is not ready, drop a finding only once a list agrees, let a check never overwrite a newer update's finding, hide Check for updates without package plugins, and keep the buttons from wrapping.

@opencodejr opencodejr Bot 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.

The change looks sound. A plugin list loaded while the server is still reloading (ready: false) is now ignored. A result from a check or update stays until a settled list agrees with it, so a disagreeing list keeps it and Update can't reappear early. A check result is no longer applied to a package with a newer update result or one that is still updating. Hiding Check for updates when no package plugin is listed, and the no-wrap button changes, are small and limited to these controls.

I read the diff and traced how plugin.list, plugin.check and plugin.update report ready and outdated on the server. The new machine tests pass (7 of 7) and the tsc -b type check passes (the typecheck script fails here with Script not found "check"). I couldn't drive the desktop/web Plugins tab here, so I didn't check the UI behaviour myself.

Public API: unchanged. The app only reads the existing optional ready field of the plugin list response.

No blocking concerns.

@jlongster
jlongster merged commit cb41d3d into dev Nov 17, 2026
11 checks passed
@jlongster
jlongster deleted the app-plugin-update-findings branch November 17, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant