Repository navigation
fix(details): keep list rows on show while a refresh loads - #2277
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Turning an MCP server on or off made the Details popover's MCP flyout flicker: the rows briefly turned into "Loading…" (and the footer disappeared), then came back.
Why
The toggle calls
Server.Invalidate("/api/mcp"), and eachmcp.status.changedevent callslists.invalidate, which also cleared the parsed rows.Server.Invalidatedrops the cached read entirely, so the nextServer.Resourcestarts again fromTicket::Empty:status: "loading"at generation 0.lists.readtakes that as a first load and shows the loading message until the refetch lands. A single toggle can send several status events, so it can flicker more than once.Change (
plugins/details, no Rust)lists.invalidatekeeps the parsed items and marks themrefreshinginstead of deleting them.lists.readkeeps showing arefreshingentry's rows while its read loads again from generation 0. The new answer replaces them when it lands, since its generation is always newer. An error still drops them and shows the failed state.mcp.js's threeServer.Invalidate("/api/mcp")calls now go throughenv.invalidate()(lists.invalidate(env, "mcp", null)). The server sees the same invalidation, and the flyout knows a refresh is in progress.Only refreshes started by an invalidation fall back to the old rows. A first open, a server switch, and the Retry button (
Invalidate("/api/")) still show "Loading…" as before. Plugins and skills get the same fix throughlists.invalidate.Verification
node --checkonplugins/details/*.js;plugin-props,external-open,file-sizeandfolder-shapeguardrails pass.Requested by: Brendan via Slack