Skip to content

[FEAT] Add useTransformStatus Hook with Same Pattern as useProcessingStatus #814

Description

@Emmzyemms

Description:
The transform feature (Issue #27) requires a dedicated hook that reuses the SSE + polling fallback pattern.

Acceptance Criteria:

  • app/hooks/useTransformStatus.ts mirrors useProcessingStatus.ts in structure
  • Accepts jobId: string | null and enabled: boolean
  • Updates transformStore.jobs[jobId] on each SSE event
  • Falls back to polling GET /api/transform/[id] every 3 seconds on SSE error
  • Cleans up SSE connection and polling interval on unmount
  • Unit tests covering SSE happy path, SSE fallback, completion, and cleanup

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions