Skip to content

Implement Stop Stream Capability for DevIndex #9188

@tobiu

Description

@tobiu

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:

  1. Proxy Enhancement (src/data/proxy/Stream.mjs):
    • Implement an abort() method using AbortController.
    • Ensure the fetch request and stream reader are properly cancelled.
    • Gracefully handle the abort signal without throwing visible errors to the user (unless intended).
  2. 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.
  3. UI Implementation (apps/devindex/view/home/StatusToolbar.mjs):
    • Add a "Stop" button (icon: fa-stop or fa-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.

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions