feat(frontend): offline-aware API queue for retryable actions (#241)#298
Open
Shikhar-404exe wants to merge 1 commit into
Open
feat(frontend): offline-aware API queue for retryable actions (#241)#298Shikhar-404exe wants to merge 1 commit into
Shikhar-404exe wants to merge 1 commit into
Conversation
…#241) - Queue service: enqueue, retry(id), retryAll, remove, clear, persist to localStorage, auto-replay on reconnect - React context provider wrapping queue service with isOnline, pendingCount, queue state - API integration: all 9 mutating functions (startTask, deleteTask, bulkDeleteTasks, clearAllTasks, cancelTask, createWorkflow, runWorkflow, updateWorkflow, deleteWorkflow) tagged retryable, enqueue when offline instead of failing - Sidebar indicator: cloud_off/cloud_sync icon, pending count badge, dropdown with item list and Retry All button - 17 service tests, 7 context tests, 15 API integration tests
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.
Offline-Aware Queue System #241
Adds offline support for retryable write actions by queueing requests during connectivity loss and replaying them automatically when the connection returns.
Highlights
offlineQueue.tsservice with:enqueueretryretryAllremoveclearsubscribelocalStorageReact Integration
Added
OfflineQueueContext.tsxto provide:isOnlinependingCountqueueIntegrated globally using
<OfflineQueueProvider>.API Changes
Enhanced
request<T>()with:retryablelabelRetryable mutations are queued while offline and replayed later.
Supported actions:
startTaskdeleteTaskbulkDeleteTasksclearAllTaskscancelTaskcreateWorkflowrunWorkflowupdateWorkflowdeleteWorkflowRead-only GET requests remain non-retryable.
UI
Added
OfflineQueueIndicatorinSidebar.tsxfeaturing:Testing
Added comprehensive coverage: