# fix\(providers\): replay reloads deferred by source writes \(\#494\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/504f535e52849fc9864f52ee74f227fe0478ab9c)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: 504f535e52849fc9864f52ee74f227fe0478ab9c

Requested commit: 504f535e52849fc9864f52ee74f227fe0478ab9c

Commit: 504f535e52849fc9864f52ee74f227fe0478ab9c

Tree: 4aa4a8e869b069467dd5f13af4a0c2e8646e0b50

Author: Simone

Committer: GitHub

## Message

```
fix(providers): replay reloads deferred by source writes (#494)

* fix(providers): replay reloads deferred by source writes

A provider-list reload requested while a source write was in flight (for
example by another provider's descriptor write finishing) was dropped and
never retried, so the roster kept the old descriptor values and an enum
field snapped back to its previous option after a successful save.
Remember the request and run it after the last source write finishes or
times out, keeping the source write's error visible.

Descriptor field writes, secret prompts, and actions now also wait for a
pending enable, API key, or source write for the same provider, matching
the existing guard in the other direction.

* fix(providers): keep source-write errors after the deferred reload

A successful provider list cleared errorText, so a rejected or timed-out
source write lost its error as soon as the deferred roster refresh
finished. The list command now carries the error it must retain through
the stale-result and no-descriptors retries and restores it on success.

---------

Co-authored-by: Lucenx9 <185146821+Lucenx9@users.noreply.github.com>
```

## Parents

- [6b186903627bbb27e07c1e718864d45712bb3228](https://git.cafe/lucenx/codexbar-plasma/commit/6b186903627bbb27e07c1e718864d45712bb3228?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/504f535e52849fc9864f52ee74f227fe0478ab9c?format=markdown)
