-
-
Notifications
You must be signed in to change notification settings - Fork 202
Implement Stop Stream Capability for DevIndex #9188
Copy link
Copy link
Closed
Labels
Description
This task implements a "Stop Stream" capability for the DevIndex application to allow users to cancel large data streams. This is a critical usability feature for users on slow or metered connections.
Objectives:
- Proxy Enhancement (
src/data/proxy/Stream.mjs):- Implement an
abort()method usingAbortController. - Ensure the fetch request and stream reader are properly cancelled.
- Gracefully handle the abort signal without throwing visible errors to the user (unless intended).
- Implement an
- Store Integration (
src/data/Store.mjs):- Expose an
abort()method that delegates to the active proxy. - Ensure the store state (
isLoading,isStreaming) is correctly reset upon cancellation.
- Expose an
- UI Implementation (
apps/devindex/view/home/StatusToolbar.mjs):- Add a "Stop" button (icon:
fa-stoporfa-ban) next to the progress bar. - Bind the button's visibility to the store's loading state.
- Wire the click event to the store's
abort()method.
- Add a "Stop" button (icon:
Acceptance Criteria:
-
Stream.abort()successfully cancels the network request. -
Store.abort()stops the loading process and resets loading flags. - The grid remains functional with the data loaded up to the point of cancellation.
- A "Stop" button appears in the StatusToolbar during streaming and disappears when finished or stopped.
- Clicking the "Stop" button cancels the stream immediately.
Reactions are currently unavailable