You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: keep defineExpose(refresh), centralize refresh signal in useBillingContext
Per review feedback: defineExpose('refresh') on UsageLogsTable was a
legitimate stateless imperative command (no state to desync), so the
refetchKey-prop replacement was the wrong fix for the wrong problem.
Reverted UsageLogsTable to expose refresh() again via a template ref,
matching this repo's own defineExpose convention
(docs/guidance/vue-components.md, src/components/AGENTS.md,
.agents/checks/vue-patterns.md).
What still needed fixing was where the "should credits UI refresh"
decision lived: CreditsPanel had its own local watch(balance) +
revision counter, and PlanCreditsPanelContent had none at all (so a
top-up while on its Activity tab never refreshed that table). Moved
the skip-first-hydration balance-watch into useBillingContext as a new
exposed `usageLogsRefreshSignal`, the shared composable that already
owns `balance`. Both CreditsPanel and PlanCreditsPanelContent now just
watch that one signal and call their own table ref's refresh() -
the "when" lives once in the data layer; the "how" (an imperative
command) stays where Vue's defineExpose convention says it belongs.
usePaginatedQuery's page/limit/total derivation is unchanged - that
part was never in dispute.
0 commit comments