Handle empty usage responses without leaving the panel in its loading skeleton.
- add a hasFetched flag to useUsageData so the UI can distinguish initial loading from an empty completed response
- update UsageIndicator to render the skeleton only before the first fetch completes and show the empty state afterward
- refresh dashboard hook and component tests to cover empty fetches, refresh behavior, and the new loading semantics
Files changed:
.../dashboard/app/components/UsageIndicator.tsx | 19 +-
.../components/__tests__/UsageIndicator.test.tsx | 395 +++++++++++----------
.../app/hooks/__tests__/useUsageData.test.ts | 42 ++-
packages/dashboard/app/hooks/useUsageData.ts | 5 +
4 files changed, 245 insertions(+), 216 deletions(-)
Fusion-Task-Id: FN-5886
Fusion-Task-Lineage: 8fa901a9-3167-4e33-a082-e5de95f692da
Mostly mechanical cleanup left over from the earlier test-consolidation pass:
- Update import paths to ../../ for mocks now that test files moved deeper
- Simplify mock setup (drop usePluginUiSlots inline mock, etc.)
- Move engine ipc + runtimes tests into __tests__/ subdirs
- Move dashboard utils tests into __tests__/ subdir
- Refresh fusion-plugin-hermes-runtime/dist artifacts
build-exe.test.ts: spawn-import fix from a parallel branch (resolved during
worktree merge of the CSS extraction work).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>