Skip to content

Make the async operations panel a live submission queue driven by real contract operations#504

Open
ekwe7 wants to merge 6 commits into
Remitwise-Org:mainfrom
ekwe7:Make-the-AsyncOperationsPanel-a-live-submission-queue-driven-by-real-contract-operations
Open

Make the async operations panel a live submission queue driven by real contract operations#504
ekwe7 wants to merge 6 commits into
Remitwise-Org:mainfrom
ekwe7:Make-the-AsyncOperationsPanel-a-live-submission-queue-driven-by-real-contract-operations

Conversation

@ekwe7

@ekwe7 ekwe7 commented Jun 18, 2026

Copy link
Copy Markdown

close #478
Description:
This PR replaces the hardcoded splitStages and splitQueue sample data in the
AsyncOperationsPanel with a live, persistent operations store.

Key Changes:

  • Operations Store: Introduced lib/context/AsyncOperationsContext.tsx using useReducer to
    track AsyncOperation states (building, awaiting-signature, submitting, confirmed,
    failed), capped at three concurrent operations.
  • Global Integration: Added AsyncOperationsProvider to app/layout.tsx.
  • Component Refactoring:
    • components/AsyncOperationsPanel.tsx: Refactored to consume the new
      AsyncOperationsContext and map operation statuses to UI states.
    • components/AsyncSubmissionStatus.tsx: Updated to derive pending status directly from
      Verification:
  • Validated state transitions via tests/unit/asyncOperationsStore.test.ts.
  • Verified npm run lint and npx tsc --noEmit to ensure type safety and code quality.
  • Ensured design requirements (three-card cap, responsive collapse) are met.

To stage and commit these changes manually, you can run:

1 git add lib/context/AsyncOperationsContext.tsx app/layout.tsx
components/AsyncOperationsPanel.tsx components/AsyncSubmissionStatus.tsx
tests/unit/asyncOperationsStore.test.ts
2 git commit -m "feat(async): drive AsyncOperationsPanel from a live operations store"

ekwe7 added 6 commits June 18, 2026 00:11
Implements the Add/Edit Savings Goal flow by lifting goalsData into
 component state and providing a fully accessible modal form.

 Key changes:
 - Integrated lib/validation/savings-goals for real-time form validation.
 - Externalized all strings and error messages to en.json for full i18n
      support.
 - Implemented modal accessibility (focus trap, ESC to close, and
      motion-reduce).
- Recomputed daysLeft and isOverdue dynamically from the target date.
 - Added 100% test coverage for goals utilities and validation logic.
 - Improved UI robustness with line-clamping for long titles and descriptions
… reflection

Cleans up unrelated syntax errors, missing imports, and type issues in app/ and components/ to ensure a green CI build for the savings goals feature.
  Adds set/edit limit control and a spent-vs-limit progress bar with
  near/over-limit warning states. Includes validation logic for
  spending limits and improves accessibility of the utilization
  display.
  apiClient

  Enhance API request resilience by centralizing retry logic in
  lib/client/apiClient.ts. Added support for retries on 5xx server errors,
  429 rate limiting, and network failures using configurable exponential
  backoff. Included comprehensive unit tests to verify the retry behavior
  and ensure session expiry handling remains correctly sequenced.
- Wrap application in WalletProvider in app/layout.tsx to enable wallet connection context.
- Update components/WalletButton.tsx to replace hardcoded mock address and state with real data from useWallet
     hook.
- Ensure proper handling of connection, disconnection, and wallet address display using the Stellar wallet kit.
- Replace hardcoded splitStages/splitQueue with a live AsyncOperationsContext.
 - Implement operations reducer tracking states: building, awaiting-signature,
     submitting, confirmed, failed.
 - Cap visible operations at three cards.
- Integrate provider in app/layout.tsx.
 - Add Vitest coverage for reducer state transitions.
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.

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

1 participant