Repository navigation
fix(app): keep plugin update findings until the settled list agrees - #64525
Conversation
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.
There was a problem hiding this comment.
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.
Issue for this PR
Follow-up to #64511, which merged before this commit was pushed.
Type of change
What does this PR do?
Fixes issues a review of #64511 found in the Plugins tab update controls:
plugin.updateandplugin.checkreturn, so a list fetched in between still carries the oldoutdatedflag. Any list load used to clear what the update learned, so Update came back until the next reload. Lists withready: falseare now ignored, and a finding is dropped only once a settled list agrees with it.How did you verify your code works?
bun run typecheckinpackages/appandbun run lint:changedpass.opencode-wakatime@latestinstalled, 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
Requested by: @jlongster (James Long via Slack)