wrolpi/app/src
lrnselfreliance 306386e801
app: Flasher saved configs and Statistics distinguish pending from empty (#733)
The Flasher's saved configurations started as [] with no loading
flag, and the Saved Firmwares tab is the default tab, so every load
painted "No saved configurations yet." until the fetch returned.  The
api helper returned [] on a non-OK response too, so a failed fetch
read as an empty list.

useStatistics used useState() with no initial value, so the
Statistics page's first render saw undefined and flashed "Failed to
fetch statistics" for one frame before the effect set {} and the
spinner appeared.

Invariants now enforced and tested:
* null = pending, undefined = fetch failed, [] / object = loaded.  The
  api helper returns undefined (and toasts) on a non-OK response.
* The Saved Firmwares tab shows a placeholder while pending, an error
  on failure, and "No saved configurations yet." only once the server
  confirmed there are none.  Only the newest configs request may write
  state, since save and delete refetch.
* The Statistics page shows its loader while pending and its error
  only for a failed fetch.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-26 17:05:02 -06:00
..
api controller: VNC toggle, gated on the Desktop running 2026-07-29 18:10:05 -06:00
components app: Flasher saved configs and Statistics distinguish pending from empty (#733) 2026-09-26 17:05:02 -06:00
contexts Bookmarks: a nav menu of user links, stored in bookmarks.yaml (#729) 2026-09-26 13:11:36 -06:00
hooks app: Flasher saved configs and Statistics distinguish pending from empty (#733) 2026-09-26 17:05:02 -06:00
themes review: the color-scheme half of this was already there 2026-08-08 18:05:54 -06:00
types ui: the last Semantic UI file, and the stylesheet with it 2026-08-08 18:04:03 -06:00
api.js app: Flasher saved configs and Statistics distinguish pending from empty (#733) 2026-09-26 17:05:02 -06:00
App.css files: left-align the preview toolbar (#698) 2026-09-03 16:03:17 -06:00
App.js Bookmarks: a nav menu of user links, stored in bookmarks.yaml (#729) 2026-09-26 13:11:36 -06:00
babel-pins.test.js build: put the @babel pins back, and make them fail loudly if dropped again (#653) 2026-08-08 18:54:34 -06:00
DashboardPage.js ui: two upload dialogs that had drifted apart (#664) 2026-08-13 15:15:04 -06:00
DashboardPage.test.js ui: the dashboard's status panel links without looking like a link 2026-08-08 18:05:54 -06:00
Events.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-08 18:04:01 -06:00
import-cycles.test.js fix: break the import cycle that put useCalculators in the TDZ 2026-08-08 18:05:47 -06:00
index.css ui: the last Semantic UI file, and the stylesheet with it 2026-08-08 18:04:03 -06:00
index.js Fixing changes before merge. 2023-02-08 21:18:51 -07:00
logo.svg Renaming examples to avoid grouping of pdf with ebooks. Reworking URLs for media files to avoid escaping url safe characters. 2023-03-29 13:46:39 -06:00
no-semantic-ui.test.js ui: the last of Semantic UI, in name and in dead CSS 2026-08-08 18:05:54 -06:00
reportWebVitals.js Renaming examples to avoid grouping of pdf with ebooks. Reworking URLs for media files to avoid escaping url safe characters. 2023-03-29 13:46:39 -06:00
setupTests.js ui: the last of Semantic UI, in name and in dead CSS 2026-08-08 18:05:54 -06:00
Tags.cy.js test: the component suite's twelve failures, none of them about the component 2026-08-08 18:05:54 -06:00
Tags.js files: left-align the preview toolbar (#698) 2026-09-03 16:03:17 -06:00
Tags.test.js ui: the last of Semantic UI, in name and in dead CSS 2026-08-08 18:05:54 -06:00
test-fixtures.js ui: the last of Semantic UI, in name and in dead CSS 2026-08-08 18:05:54 -06:00
test-fixtures.test.js ui: the last of Semantic UI, in name and in dead CSS 2026-08-08 18:05:54 -06:00
test-utils.js style: spell it "color" everywhere 2026-08-08 18:05:50 -06:00
test-utils.test.js style: spell it "color" everywhere 2026-08-08 18:05:50 -06:00