Skip to content

Make the AsyncOperationsPanel a live submission queue driven by real contract operations #478

@Baskarayelu

Description

@Baskarayelu

📋 Description

components/AsyncOperationsPanel.tsx and components/AsyncSubmissionStatus.tsx render the contract-progress UI on app/split/page.tsx, but the stages and queue (splitStages, splitQueue) are hardcoded sample arrays. The panel is meant to be a live "stack" of in-flight contract submissions (build → sign → submit → confirm).

This issue introduces a small operations store so the panel reflects real async operation state.

Why this matters: async contract operations (sign + submit) take 15–45s. Users need a persistent, truthful queue showing what's pending, signing, or confirmed — not a static demo list.

🎯 Requirements & Context

Functional requirements

  • Add an operations store (context or a store under lib/context) tracking operations with status: building | awaiting-signature | submitting | confirmed | failed.
  • Drive AsyncOperationsPanel queue items from the store instead of splitQueue.
  • Cap visible cards at three (newest highest), per the existing design note, and collapse inline on mobile.
  • Wire AsyncSubmissionStatus pending from the active operation.

Context & constraints

  • Reuse existing Tailwind tokens; no new colors.
  • Keep the complete items visible briefly then drop.

🛠️ Suggested Execution

git checkout -b feat/async-operations-store
  • Add the store, refactor the panel to consume it, add TSDoc, add a Vitest test for the store reducer/transitions.
npm run lint
npx tsc --noEmit
npm run test:coverage
npm run build
  • Edge cases: more than three concurrent ops, a failed op, signature rejected, op completes while another starts, reduced motion, mobile inline collapse.
  • a11y: status changes announced via aria-live.

Example commit message

feat(async): drive AsyncOperationsPanel from a live operations store

Replaces hardcoded splitStages/splitQueue with a status store
(building/signing/submitting/confirmed/failed) capped at three cards.

✅ Acceptance Criteria & Guidelines

Requirement Target
Operations store with status transitions Required
Panel + status driven by store Required
Three-card cap + mobile collapse Required
Store test coverage ≥ 90%
Accessibility + responsive + lint + build Required
Timeframe 96 hours from assignment

💬 Community & Support

Join the RemitWise contributor community on Discord: https://discord.gg/CtQuPZFMA

Comment to claim before starting. 🚀

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions