Skip to content

Reusable skeleton/empty/error system + mobile/responsive pass across hosted views #24

Description

@harrymove-ctrl

Context

Hosted views use plain-text loaders ("Loading namespaces…" in NamespacesSimplePage, apps/web/src/main.tsx:5938; "Loading directory…" in ShowcasePage, main.tsx:2110) and ad-hoc red error text, with no shared skeleton/empty/error components. Styling is a single ~184KB apps/web/src/styles.css (--cm-* tokens, no Tailwind/shadcn), and mobile/responsive has not been audited. FailureExplainer already exists (used at main.tsx:2115) but isn't a reusable card.

Goal / user story

As a user on any device, I see polished skeletons while loading, helpful empty states with a next-step CTA, and recoverable error cards with Retry — on a layout that works down to phone width — instead of raw text that shifts or dead-ends.

Acceptance criteria

  • A reusable <Skeleton> (tokenized shimmer using --cm-*) is applied to hosted extraction, facts/graph, chat "thinking", the namespaces list, and the share page.
  • One <EmptyState> component (icon + title + CTA) replaces inline strings like "No namespaces yet" (main.tsx:5938).
  • A structured <ErrorCard> with a Retry action replaces raw red error text (e.g. NamespacesAppPage error at main.tsx:5967, ShowcasePage at main.tsx:2112); FailureExplainer is folded into it.
  • Retry re-invokes the relevant fetch (e.g. NamespacesAppPage.refresh(), main.tsx:5969) without a full reload.
  • Responsive pass: nav (appNavItems, main.tsx:1614), the Build console, and the constellation are usable at 360–768px with no horizontal scroll.
  • No new off-palette hex is introduced (extend --cm-*; namespace-memory.css already drifts — don't add to it).

Implementation notes

  • Add components under apps/web/src/components/ (e.g. Skeleton.tsx, EmptyState.tsx, ErrorCard.tsx) plus tokens in styles.css; replace the scattered subEmpty plain-text usages.
  • Wire Retry handlers to existing refresh functions; keep the light-app / dark-graph brand split intact.
  • Mobile: make AppShell nav collapsible; pair with the constellation mobile work.
  • Parts of this (EmptyState/ErrorCard extraction) are good-first-issue sized.

Sui Overflow angle

The Harbor bucket handshake (RESERVE→SIGN→FINALIZE plus the ~3s mirror_missing_grant window) and SEAL decrypt are inherently async with retry-able failures. This exact skeleton + structured-error system is what lets the demo show "creating on-chain bucket…" and graceful retry states instead of raw errors during the Sui-native storage flow.

Dependencies

Standalone and shippable. Enhances the routed namespace console issue and the onboarding-flow issue.

Part of the ContextMEM roadmap (#4) • Sui Overflow build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important: hardens the demo and core productgood-first-issueWell-scoped task suitable for a new contributorui-uxWeb app UI/UX, accessibility, and responsive design

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions