board: spinner during first load instead of "no cards found"
An empty board on first load blurting "no cards found" was alarming on a board the user knew had cards. Track a cardsLoaded flag that flips on the first /api/cards (meta or full) response — or on a cached-cards hydration — and show a centred spinner placeholder while it's still false. The "no cards found" copy only shows once we've actually heard back and the set is genuinely empty. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d31e186bd9
commit
41272bd9ce
5 files changed
+27
-7
No files matched your search
@@ -6,6 +6,11 @@ export const state = {
|
||||
// Data
|
||||
cards: [],
|
||||
buckets: [],
|
||||
// True once we've got a real response from api/cards (or the
|
||||
// cached-cards hydration). Until then the board shows a spinner
|
||||
// instead of the "no cards found" placeholder — an empty board on
|
||||
// first load is an honest "still fetching" state, not a real empty.
|
||||
cardsLoaded: false,
|
||||
|
||||
// Filters & view — activeBucket is persisted across reloads via
|
||||
// localStorage. Numeric ids are stringified; the special filters
|
||||
|
||||
Reference in new issue
Block a user