Skip to content

Distinguish price loading/unavailable, fix analytics 0-flash, surface silent save failures (#674-#677) - #705

Merged
Austinaminu2 merged 2 commits into
FlowwStar:mainfrom
Kingsman-99:price-loading-state-analytics-skeleton-draft-webhook-save-errors-674-675-676-677
Aug 30, 2026
Merged

Distinguish price loading/unavailable, fix analytics 0-flash, surface silent save failures (#674-#677)#705
Austinaminu2 merged 2 commits into
FlowwStar:mainfrom
Kingsman-99:price-loading-state-analytics-skeleton-draft-webhook-save-errors-674-675-676-677

Conversation

@Kingsman-99

Copy link
Copy Markdown
Contributor
  • Distinguish loading vs. unavailable price state in use-token-price.ts consumers #675: audited all 5 consumers of `use-token-price.ts`. Fixed two real gaps — `stream-card.tsx` rendered loading and unavailable identically (both showed nothing); now shows a skeleton pulse while loading. `create-form.tsx`'s "Fetching price…" indicator was dead code (nested inside a block that can only render once the price has already resolved, so `priceLoading` was always false there) — moved it out so it's actually reachable, and added a distinct "Price unavailable" message for the resolved-but-null case. `dashboard-stats.tsx` already handled this correctly; `create-confirmation.tsx` and the stream detail page only use the price for an XLM-denominated fee estimate that never renders a USD value, so there's nothing to distinguish there.
  • Fix analytics page stat cards flashing 0 during initial load #674: `analytics/page.tsx` called `useStreams({ enablePolling: false })` but never destructured `loading`, so the four stat cards flashed "0" before real data resolved. Destructured it and render a skeleton pulse per card while loading. (`hooks/use-streams.ts` had the same pre-existing corruption fixed elsewhere this session — two competing implementations merged together, duplicate declarations, two conflicting `return` statements — reconciled into one, since it directly blocked `loading` from working at all here.)
  • Surface use-form-draft.ts's silent save failures to the user #676: `use-form-draft.ts`'s `save()` silently discarded quota/unavailable errors. Added an optional `onSaveError` callback (fires once per failure streak, resets on the next successful save) and wired `create-form.tsx` to show a toast warning.
  • Wrap use-webhooks.ts's unguarded localStorage.setItem calls in try/catch #677: `use-webhooks.ts`'s `saveWebhooks`/`saveHistory` called `localStorage.setItem` unguarded — wrapped both in try/catch (returning a success flag) matching `use-form-draft.ts`'s pattern, and added the same `onSaveError` callback convention, wired to a toast in `webhook-settings.tsx`.

Closes #674
Closes #675
Closes #676
Closes #677

… silent save failures

- FlowwStar#675: audited all 5 consumers of use-token-price.ts. Fixed two real
  gaps — stream-card.tsx rendered loading and unavailable identically
  (both showed nothing); now shows a skeleton pulse while loading.
  create-form.tsx's "Fetching price…" indicator was dead code (nested
  inside a block that can only render once the price has already
  resolved, so `priceLoading` was always false there) — moved it out
  so it's actually reachable, and added a distinct "Price unavailable"
  message for the resolved-but-null case. dashboard-stats.tsx already
  handled this correctly; create-confirmation.tsx and the stream
  detail page use the price only for an XLM-denominated fee estimate
  that never renders a USD value, so there's nothing to distinguish
  there.
- FlowwStar#674: analytics/page.tsx called useStreams({ enablePolling: false })
  but never destructured `loading`, so the four stat cards flashed "0"
  before real data resolved. Destructured it and render a skeleton
  pulse per card while loading. (hooks/use-streams.ts had the same
  pre-existing corruption fixed elsewhere this session — two competing
  implementations merged together, duplicate declarations, two
  conflicting return statements — reconciled into one, since it
  directly blocked `loading` from working at all here.)
- FlowwStar#676: use-form-draft.ts's save() silently discarded quota/
  unavailable errors. Added an optional onSaveError callback (fires
  once per failure streak, resets on the next successful save) and
  wired create-form.tsx to show a toast warning.
- FlowwStar#677: use-webhooks.ts's saveWebhooks/saveHistory called
  localStorage.setItem unguarded — wrapped both in try/catch
  (returning a success flag) matching use-form-draft.ts's pattern, and
  added the same onSaveError callback convention, wired to a toast in
  webhook-settings.tsx.

Closes FlowwStar#674
Closes FlowwStar#675
Closes FlowwStar#676
Closes FlowwStar#677
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@Kingsman-99 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Austinaminu2
Austinaminu2 merged commit 67462bf into FlowwStar:main Aug 30, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants