Skip to content

refactor(store): simplify queue - remove task state tracking#359

Merged
mihar-22 merged 1 commit intomainfrom
refactor/store-queue-simplification
Jan 31, 2026
Merged

refactor(store): simplify queue - remove task state tracking#359
mihar-22 merged 1 commit intomainfrom
refactor/store-queue-simplification

Conversation

@mihar-22
Copy link
Copy Markdown
Member

Summary

Phase 1 of Store v2: Simplify the queue by removing task state tracking.

  • Remove task.ts and all task state types (PendingTask, SuccessTask, ErrorTask)
  • Remove queue.tasks, queue.subscribe, queue.reset
  • Remove store.queue getter (queue is now internal)
  • Remove guard combinators (all, any, timeout) - keep only Guard type
  • Keep only: queue.enqueue, queue.abort, queue.destroy
  • Wrap handlers with abortable() for consistent abort behavior

Breaking Changes

  • store.queue no longer exposed
  • Queue no longer generic, no longer tracks task state
  • InferStoreTasks, UnionFeatureTasks, TasksRecord types removed
  • Guard combinators removed (guards still work, just no combinators)

Notes

This PR intentionally leaves Lit/React platform bindings broken - they still reference removed types (store.queue, TasksRecord, etc.). Those will be fixed in Phase 2 (PR 2: Remove Platform Queue Bindings).

Test Plan

  • pnpm -F @videojs/store test src/core - 115 tests pass
  • pnpm lint - no issues
  • pnpm -F @videojs/store build - succeeds (warnings expected for broken bindings)

BREAKING CHANGE: Queue no longer tracks task state (pending/success/error).

- Remove task.ts and all task state types
- Remove queue.tasks, queue.subscribe, queue.reset
- Remove store.queue getter (queue is now internal)
- Remove guard combinators (all, any, timeout)
- Keep only: queue.enqueue, queue.abort, queue.destroy
- Wrap handlers with abortable() for consistent abort behavior
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vjs-10-demo-html Error Error Jan 31, 2026 7:44am
vjs-10-demo-react Error Error Jan 31, 2026 7:44am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
vjs-10-website Skipped Skipped Jan 31, 2026 7:44am

Request Review

@mihar-22 mihar-22 merged commit be7f87c into main Jan 31, 2026
4 of 6 checks passed
@mihar-22 mihar-22 deleted the refactor/store-queue-simplification branch January 31, 2026 07:45
This was referenced Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant