Skip to content

Keep saved plugin settings visible across separate query notifications - #7714

Merged
ymichael merged 2 commits into
mainfrom
bb/flake-plugin-settings-autosave
Nov 18, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/flake-plugin-settings-autosave

Conversation

@ymichael

@ymichael ymichael commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Plugin settings could briefly revert a successfully saved text value when React received mutation completion before the refreshed settings query. The field synchronized from its still-old props after the pending flag cleared. This also explains the intermittent autosave assertion that expected the new text but received the previous value.

What changed

Use the successful mutation response while the field is waiting for refreshed props. Once the stored value changes, that external value takes precedence. Existing guards preserve a newer unsaved draft and failed-save state.

How you verified

The existing autosave test now releases actual TanStack notifications one React commit at a time. It fails against the old implementation and passes with the fix, then checks external updates and preservation of unsaved text. All 33 affected component/query cases pass, including the 20 settings cases, along with 7 Turbo lint/typecheck tasks.

A real browser against an isolated source app reproduced the old-value rollback across 12 separately delivered notification callbacks. The identical schedule keeps the saved value visible after the fix. Browser input also verified a newer draft during a held PUT, a second blur/save, HTTP 503 failure with the draft retained, retry, and persistence after reload. API and matching source CLI reads agree with the visible saved value.

The complete integration branch containing this and the related flake repairs passed the unchanged native CI workflow: 47 successful jobs and one skipped job. This uses normal Turbo cache reuse; it is not a claim that every task reran from scratch. The earlier standalone PR run failed in the secondary-panel readiness case repaired by #7684. That fix is now merged into main and included in this branch; fresh standalone CI passes.

AGENT GENERATED

@ymichael
ymichael merged commit b7dbb93 into main Nov 18, 2026
34 checks passed
@ymichael
ymichael deleted the bb/flake-plugin-settings-autosave branch November 18, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant