Skip to content

[P3] Demo viewer shows blank state during canvas load #11

@cursor

Description

@cursor

Summary

The outer page shows a spinner while loading the selected demo, but the inner <Suspense> around the canvas renders null, so users see an empty area while assets stream.

Impact

  • Confusing UX during demo transitions
  • Users may think the demo is broken
  • Inconsistent loading feedback

Files Affected

  • src/pages/DemosPage.tsx (lines 185-213)

Recommendation

Provide an inline fallback (small loader/overlay) inside DemoViewer to keep feedback consistent during demo swaps:

<Suspense fallback={<DemoLoadingOverlay />}>
  <Canvas>
    {/* demo content */}
  </Canvas>
</Suspense>

Or a simple spinner:

<Suspense fallback={
  <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100%' }}>
    <CircularProgress />
  </Box>
}>

Source: Code Review (PR #5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    copilot-assignedAssigned to GitHub Copilot Coding Agent

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions