Repository navigation
Description
Hi there!
I keep running into what looks like stale cache/state issues in the UI.
Example
When I approve all tools:
Then navigate back to the overview page, the UI still shows that there are unapproved tools:
However, if I refresh the page manually, the overview updates correctly and shows that everything is approved.
Expected behaviour
After approving all tools, the overview page should immediately reflect the updated approval state without requiring a full browser refresh.
Actual behaviour
The action appears to succeed, but other parts of the UI still show the previous state until the page is refreshed.
Why this is confusing
I have noticed similar stale-state behaviour in several areas of the UI. It makes it difficult to know whether an action actually succeeded or whether the displayed state is outdated.
This is especially confusing when navigating between pages, because the UI can show different information depending on whether the user refreshed the page or only used client-side navigation.
Possible cause / suggestion
I do not know the Golang at all, but from a frontend perspective this looks like state invalidation or cache synchronization is missing after mutations.
In my own project, Reaparr, the frontend is based on Vue, Nuxt, RxJS, and Pinia stores. The approach I use there is:
- API data flows into Pinia stores
- Vue components only consume reactive store state / computed values
- Actions that mutate server-side state also update or refresh the relevant store state
- Other components automatically update because they depend on the same reactive source of truth
That kind of pattern helps avoid stale cache issues, because the API result from an action is propagated through the shared frontend state instead of each page keeping its own outdated copy.
For this project, maybe mutations like approving tools could either:
- update the shared frontend state directly after success,
toolsStore.ts - return the updated server/tool state and use that to update the UI
- have the overview page depend on computed properties from the
toolsStore.ts
Impact
This would make the UI feel much more reliable, especially for setups with many MCP servers and many tools, where manually refreshing after every action becomes a hassle.
Activity
Dumbris commentedon Apr 30, 2026
Hi Jason — diagnosed and split into two PRs:
mergeServershelper infrontend/src/stores/servers.tsupdates each existing server in place viaObject.assign, which adds and overwrites but never deletes. The backend'senrichServersWithQuarantineStats(internal/httpapi/server.go:1143-1148) only setsQuarantinewhenpending > 0 || changed > 0; once you approve everything the field disappears from the JSON entirely, and the stalequarantine: { pending_count: 5 }survives on the in-place reactive object. The author had already special-casedlast_errorfor this exact reason — fix(ui/store): clear missing server fields on merge (#438) #443 generalises that to a key-sync that handles every conditional field, so the same staleness you noticed elsewhere should also clear up.servers.changedSSE on approve, so a Servers tab open in another window also reactively updates instead of waiting for the active tab to finish itsfetchServers()call.Both have unit tests for the regression. Thanks for the precise repro and the Pinia / single-source-of-truth pointer in your write-up — your
mergeServersanalysis was exactly right and made the fix mechanical.fix(ui/store): clear missing server fields on merge (#438) (#443)
fix(runtime): emit servers.changed after tool approval (#438) (#444)