On-chain event poll for task verification with auto-sort animation - #7
Open
Meet-hybrid wants to merge 52 commits into
Open
On-chain event poll for task verification with auto-sort animation#7Meet-hybrid wants to merge 52 commits into
Meet-hybrid wants to merge 52 commits into
Conversation
…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
…ermination and encryption
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
… add profile fetching service
Implement live contributor activity tracking and profile fetching
…esetSocketClientForTests
…ort animation - Add useTaskChainEvents hook: polls for task_verified events, emits into the shared useEvents bus, and invalidates chain state cache - Export busPublish from useEvents so the poller can publish globally - Add task_verified / task_completed event types with icons to eventMonitorUtils - Update TaskCard: subscribe to polled events, auto-resort completed tasks to bottom, animate transitions with scale/fade classes on state flip - Add i18n keys for typeTaskVerified / typeTaskCompleted (en, es, fr) - Write unit tests for useTaskChainEvents and extend TaskCard tests for vote, sort order, and animation classes
…of-history feat: add ZK-proof submission history panel
…ard-widget-customization feat: add customizable dashboard widget layouts with GridStack
…abet connect button
…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
…-task-vote feat: optimistic update loop for task Verify Quality button
…ring Feat/task filtering
…at-global-search feat-global-search
…ian-dashboard Add dev-only tool to mock wallet publicKey (reduces reconnect friction)
…-localization feat: add language localization support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements an on-chain event polling sub-module that simulates task verification events, intercepts them app-wide, and animates task card re-sorting when tasks flip to resolved.
Changes
New files
src/hooks/useTaskChainEvents.ts— polling hook that simulates on-chaintask_verifiedevents at a configurable interval (default 3s), emits into the shared event bus viabusPublish, and callsinvalidateChainStatefor task-related cache keyssrc/hooks/__tests__/useTaskChainEvents.test.ts— 3 unit tests verifying polling behavior, disabled mode, and event emissionModified files
src/hooks/useEvents.ts— exportbusPublishso external modules (like the poller) can publish to the global event bussrc/components/EventMonitor/eventMonitorUtils.ts— addtask_verified(ShieldCheck) andtask_completed(ThumbsUp) event type entriessrc/components/TaskCard.tsx— subscribe to polled events viauseTaskChainEvents+useEvents, auto-sort completed tasks to the bottom, animate withscale-[1.02]+animate-in zoom-in-95 fade-inon state change, emit events on Vote clicksrc/i18n/config.ts— addtypeTaskVerified/typeTaskCompletedtranslation keys in en, es, frsrc/components/__tests__/TaskCard.test.tsx— extend tests: vote removes button, sort order (completed at bottom), animation class applied on voteVerification
txBuilder,logger,VoteButton,MultiSigPreviewerare unrelated