Skip to content

feat: optimistic update loop for task verification - #6

Open
Meet-hybrid wants to merge 30 commits into
mainfrom
feat/optimistic-task-vote
Open

feat: optimistic update loop for task verification#6
Meet-hybrid wants to merge 30 commits into
mainfrom
feat/optimistic-task-vote

Conversation

@Meet-hybrid

Copy link
Copy Markdown
Owner

Implements optimistic UI updates when clicking Verify Quality on guardian tasks.

  • Instantly shifts status to loading/pending state
  • Increments vote count badge by +1 immediately
  • Reverts changes and fires error toast if transaction fails
  • Simulated Soroban consensus delay (1.5s) with 15% failure probability
  • Injectable submitVote prop for testing

onajidavid87-web and others added 30 commits June 21, 2026 12:54
…nvalidation system to cache on-chain data with stale-while-revalidate semantics.

Added a custom React hook that integrates with the existing useChainState invalidation system to cache on-chain data with stale-while-revalidate semantics.
Key features:
- Module-level shared cache — multiple hook instances with the same cacheKey share cached data (same pattern as useChainState/useEvents)
- useChainState integration — listens to syncVersion changes and automatically re-fetches when the chain state is invalidated (WebSocket events, polling, or manual force-sync)
- Stale-while-revalidate — returns cached data immediately while re-fetching in the background (isValidating distinguishes initial load from background refresh)
- Request deduplication — concurrent fetches for the same cache key within dedupIntervalMs (default 2s) are deduplicated
- mutate(data) — optimistic local cache updates
- revalidate() — manual re-fetch
- onSuccess/onError callbacks
src/hooks/__tests__/useOnChainCache.test.ts

Closes Vero-protocol#25
A custom React hook that integrates with the existing useChainState i…
…llet-session-security

feat(auth): implement automatic 15-minute inactivity wallet session t…
feat: Add real-time ConsensusWidget to dashboard grid
…igning

Title: feat: implement multi-transaction signing for Soroban operations
Implement live contributor activity tracking and profile fetching
…of-history

feat: add ZK-proof submission history panel
…ard-widget-customization

feat: add customizable dashboard widget layouts with GridStack
…ilder mocks for SDK compat

- logger: pass Uint8Array directly to subtle.decrypt instead of extracting .buffer via bytesToArrayBuffer — cross-realm ArrayBuffer from jsdom is rejected by Node's webcrypto.subtle
- VoteButton: add missing mockUseNetwork variable, remove duplicate mock
- txBuilder: call .build() on SorobanDataBuilder, add results array with auth/xdr to match newer @stellar/stellar-sdk expectations
…lient

feat: Socket.IO client integration for persistent WS state updates
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.

7 participants