Fix/issue 9 event poll - #143
Merged
Merged
Conversation
Description Establish a persistent WebSocket connection to deliver real‑time state updates. Problem Users currently need to manually refresh pages to see changes. Solution Implemented a socket.io client in src/components/. Event‑driven updates automatically refresh local state on incoming events. Optimized performance by syncing with local state instead of full reloads. Secure WebSocket handshake enforced. Acceptance Criteria State auto‑refreshes on events. Verified via latency tests. No manual refresh required. Closes Vero-protocol#27
Socket.IO client integration for real-time state updates
…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
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.
Description
Enable the dashboard feed to adapt dynamically by hooking into active network event streams instead of relying solely on static API responses.
Problem
Currently, users must refresh or wait for static responses to see task updates, which slows down visibility of completed work.
Solution
Implemented an on‑chain event poll/stream sub‑module targeting deployed contract parameter blocks.
Intercepted verified event payloads emitted on‑chain and triggered app‑wide updates.
Added dynamic card re‑sorting animations when task states flip to resolved.
Acceptance Criteria
Feed updates automatically on verified events.
Task cards re‑sort smoothly.
Verified via test suite.
closes #3