Repository navigation
fix(frontend): keep the settings plugin list stable across refreshes - #1582
Open
abdulrafey1 wants to merge 10 commits into
Open
abdulrafey1 wants to merge 10 commits into
abdulrafey1 wants to merge 10 commits into
Conversation
Two quick toggles start two refreshes. If the older one answered last it overwrote the newer list, and a switch snapped back. Drop any response, or failure, from a refresh that is no longer the newest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every toggle and config save refreshes the plugin list, and the settings page swapped the whole list for a spinner each time. Show the spinner only on the first load, so the list and its state stay put. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A settings switch stays focusable while its toggle runs, so keyboard focus is not dropped to the page. A refresh that answers before a newer one now updates the list instead of being dropped; only stale responses are ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the newest refresh failed and an older one answered after it, the older list replaced the error and left the plugins loading until the next refresh. The failure now counts as applied, so older answers that arrive later are dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FatimaSaleem21
approved these changes
Dec 3, 2026
zaira-bibi
requested changes
Dec 3, 2026
The settings page guessed a first load from an empty list, so a user with no plugins saw the spinner on every refresh. The dashboard, the plugin page and the sidebar swapped to a spinner on every refresh too, which blanked a plugin page after a config save. The provider now turns loading on once per token, until that token's first answer, and a later refresh leaves it off. No page has to work out what a first load is. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signing out counts as the newest applied request, which drops a fetch still in flight. No test failed when that was removed, so the signed-out user's plugins could come back unnoticed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The settings row passed the aria-disabled classes into the shared switch, which already styles its disabled state. The switch now styles both, so a caller only sets the state. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
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.
Part of: Its difficult to find plugins in the Config tab
What
Toggling plugins quickly on the settings page could snap a switch back, swap the list for a spinner and drop
keyboard focus; this keeps the list, its state and focus stable while plugins refresh, so a filter typed above it
in the last PR of this stack survives a toggle. The sidebar, the dashboard and a plugin's own page no longer swap
to a spinner on a refresh either.
Changes
newer list; only the newest refresh reports an error)
loadingon once pertoken, until that token's first answer, and a later refresh leaves it off; the settings page, the dashboard, a
plugin's page and the sidebar keep their content while plugins refresh)
aria-disabledratherthan
disabled, so focus stays on it; an older refresh that answers first is shown until the newer one arrives)newest refresh failed no longer hides the error)
Switchstylesaria-disabledbesidedisabled)How to Test
/dashboard/settingswith several plugins.turns into a spinner.
again before it finishes does nothing.
cd frontend && bun run vitest run tests/core/plugins/context.test.ts tests/app/dashboard/settings/page.test.tsx tests/core/settings/components/ui/SettingsRow.test.tsxEnvironment Variables
Test Coverage
Measured on the top branch of this stack, which contains this one.
Notes
Second of four stacked PRs; based on the query filter bar PR.
This description was written with the assistance of an LLM (Claude).
🤖 Generated with Claude Code