Skip to content

Move SDK DOM progress indicator into the app (#231) - #350

Open
yunus-dev-codecrafter wants to merge 1 commit into
crackedstudio:mainfrom
yunus-dev-codecrafter:feat/issue-231-sdk-progress-indicator-into-app
Open

Move SDK DOM progress indicator into the app (#231)#350
yunus-dev-codecrafter wants to merge 1 commit into
crackedstudio:mainfrom
yunus-dev-codecrafter:feat/issue-231-sdk-progress-indicator-into-app

Conversation

@yunus-dev-codecrafter

Copy link
Copy Markdown

closes #231

What changed

Moved the SDK's imperative DOM-based progress indicator out of the headless @sharibo/client and rebuilt it as a React component (app/src/components/ArtifactProgress.tsx) that subscribes to the existing subscribeToArtifactPrefetch API, announces progress through the app's shared usePoliteLiveRegion hook, and renders a token-styled progress bar. Also deleted the installIndicator/updateIndicator DOM code, exported the subscription API surface, and resolved a pre-existing prefers-reduced-motion merge conflict in style.css.

Why

Closes #231

The SDK's packages/client/src/artifacts.ts hand-built a DOM node (hardcoded colors, its own aria-live region, fixed positioning) inside an otherwise headless SDK, so it couldn't follow the app's theme, respect prefers-reduced-motion, or be positioned by the app. Moving the indicator into the app makes the SDK fully headless and reuses the app's single live region.

Testing

  • Circuit tests (cd circuits && npm test)
  • Contract tests (cd contracts && cargo test)
  • E2E against testnet (npm run e2e)
  • App tests added (cd app && npm test src/components/ArtifactProgress.test.tsx — 3 passing)
  • Live-region guard verified (SDK has no document. references; exactly one aria-live region in the rendered app)
  • Docs-only (no code changed)

Screenshots

The progress bar now renders inside the app card using existing design tokens (--accent2, var(--border), JetBrains Mono), showing "Preparing prover… N%" with an animated fill; it hides automatically once artifacts are ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the SDK's DOM progress indicator into the app

1 participant