-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Problem
The current Local DB status UI only exposes a single global status (active/syncing/failure). Users can’t tell which network is syncing or failing, what step the sync is currently in (fetching logs, decoding, persisting, etc.), or whether progress is being made. This makes troubleshooting difficult and contributes to “syncing forever” confusion.
Additionally, the sync engine already emits useful phase messages via the StatusBus trait, but the client-side status bus (ClientStatusBus) is currently a no-op, so those phase updates never reach the UI.
Goal
Provide granular, per-network visibility into local sync by surfacing:
- Per-network status (active/syncing/failure)
- Current sync phase (e.g., fetching logs, decoding, persisting)
- Basic progress context (block ranges, counts where available)
- Per-network timing (last successful sync time / block)
- Per-network error details (including which phase failed, when possible)
Scope / Approach (high level)
- Extend the client-exposed status types to include a typed sync phase and optional progress metadata.
- Implement a real
ClientStatusBusthat converts engine status messages into structured status updates and emits them through the existing status callback mechanism. - Update engine status messages where needed to include lightweight detail (e.g., block ranges / counts) so the UI can show meaningful progress.
- Update the webapp stores to maintain per-network status and compute an aggregate status for existing UI components.
- Add/update UI components to display a list of networks with their status, phase, last sync info, and error details.
Prerequisites
- Depends on the “Per-Network Independent Sync Cycles” work so that status is naturally tracked per network and emitted via per-network callbacks.
Acceptance Criteria
- UI can show status for each configured network independently.
- When syncing, UI shows the current phase (and optional detail, where available).
- On failure, UI shows a per-network error message (and phase if available) with copy support.
- Status updates are efficient and do not cause excessive re-renders.
- Tests cover status type serialization, status bus behavior, and store derivations.
coderabbitai
Metadata
Metadata
Assignees
Labels
No labels