Skip to content

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

Open
Menjay7 wants to merge 3 commits into
Remitwise-Org:mainfrom
Menjay7:yaro
Open

Make the AsyncOperationsPanel a live submission queue driven by real contract operations#496
Menjay7 wants to merge 3 commits into
Remitwise-Org:mainfrom
Menjay7:yaro

Conversation

@Menjay7

@Menjay7 Menjay7 commented Jun 17, 2026

Copy link
Copy Markdown

Summary

Transform AsyncOperationsPanel from a static or mock-driven component into a real-time submission queue powered by actual contract operations.

This PR introduces live tracking of contract submissions, displaying their lifecycle from initiation through confirmation or failure, and providing users with immediate visibility into ongoing asynchronous activities.

Problem

The current AsyncOperationsPanel does not reflect real contract activity:

Operations are placeholder or locally simulated.
Users cannot monitor actual contract submissions.
Status updates are disconnected from blockchain execution state.
Failed and pending operations are difficult to diagnose.
The UI lacks a reliable source of truth for asynchronous actions.
Solution

Connect AsyncOperationsPanel directly to contract operation events and maintain a live queue of in-flight and completed submissions.

Features
Live Submission Queue

Track real contract operations in real time:

Queue
├── Operation A → Pending
├── Operation B → Submitting
├── Operation C → Confirmed
└── Operation D → Failed
Supported States
Queued

Submitting

Pending Confirmation

Confirmed
└── Failed
Real-Time Updates
New contract submissions appear immediately.
Status changes propagate automatically.
Completed operations remain visible for inspection.
Failed operations surface actionable error information.
Queue ordering remains deterministic.
Implementation Details
Operation Source Integration

Wire the panel to real contract activity:

Contract submission events
Transaction hashes and identifiers
Confirmation and finalization events
Failure and rejection notifications
Retry or resubmission events where applicable
Queue State Management

Introduce centralized queue management:

Contract Operation

Operation Store

AsyncOperationsPanel

Real-Time UI Updates
Operation Metadata

Each queue item displays:

Operation type
Submission timestamp
Current status
Transaction identifier
Error details when applicable
UI Improvements
Pending Operation
Deploy Contract
Status: Pending Confirmation
Tx: abc123...
Successful Operation
Transfer Funds
Status: Confirmed
Tx: def456...
Failed Operation
Rotate Treasury
Status: Failed
Reason: Insufficient authorization
Error Handling

Gracefully handle:

Contract submission failures
Network interruptions
Missing transaction receipts
Duplicate operation events
Reconnection and event replay scenarios
Unexpected provider errors
State Synchronization

Ensure:

Operations are deduplicated.
Updates are applied idempotently.
Queue ordering remains stable across refreshes.
State can recover after reconnects.
Historical operations remain consistent.
Testing

Added tests covering:

Queue Behavior
Operations are added on submission.
Status transitions update correctly.
Queue ordering remains deterministic.
Duplicate events are ignored.
Real-Time Updates
Confirmation events update existing entries.
Failure events transition operations correctly.
Reconnection restores operation state.
Event replay remains idempotent.
UI States
Empty queue rendering.
Pending operations.
Confirmed operations.
Failed operations.
Multiple simultaneous submissions.
Error Conditions
Missing transaction data.
Provider failures.
Partial event streams.
Invalid operation payloads.
Benefits
Provides users with immediate visibility into real contract activity.
Eliminates discrepancies between UI state and blockchain state.
Improves debugging and operational transparency.
Reduces uncertainty during long-running transactions.
Establishes a foundation for notifications, retry actions, and operation history.
Breaking Changes
AsyncOperationsPanel now relies on real contract operation events instead of placeholder data.
Consumers using mock operation APIs may need to migrate to the new operation store and event-driven interfaces.
Tests depending on static panel content will require updates.

Closes: Replace the placeholder AsyncOperationsPanel implementation with a live, event-driven submission queue powered by real contract operations.closed #478

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

2 participants