Skip to content

Migrate SSE provider onto package transport with execution-error context #626

Description

@jonathansick

Branch

tickets/DM-55470

Type

AFK

Jira Key

DM-55470

Jira URL

https://rubinobs.atlassian.net/browse/DM-55470

Blocked by

#622, #624

Parent PRD

#620

Task Order

6

Parallel with

Scope

Migrate apps/squareone/src/components/TimesSquareHtmlEventsProvider/TimesSquareHtmlEventsProviderClient.tsx onto the package transport: delete its inline HtmlEvent type and the direct fetchEventSource usage, and consume subscribeToHtmlEvents + createHtmlEventsUrl from @lsst-sqre/times-square-client instead, passing the bounded-reconnect options (5 attempts, 1 s backoff) added in the earlier slice.

Preserve the behavior PR #610 added: the connectionFailed state, the once-per-subscription Sentry capture (makeReportError, tags site: 'times-square-sse'), and the role="alert" banner. Extend TimesSquareHtmlEventsContext (in TimesSquareHtmlEventsProvider.tsx, including the dynamic-import loading fallback defaults) with the execution-error fields (executionError object from the validated event).

Update the provider tests. Create the squareone app changeset (minor) for the DM-55470 UI work; later slices extend it.

See PRD #620 §Scope (apps/squareone first bullet) and acceptance criterion 5.

Acceptance criteria

  • TimesSquareHtmlEventsProviderClient contains no SSE transport code of its own — no fetchEventSource import, no inline HtmlEvent type.
  • TimesSquareHtmlEventsContext exposes executionError; existing fields and defaults are unchanged.
  • Bounded reconnects, connectionFailed, Sentry capture, and the alert banner behave as before (existing tests updated and passing).
  • squareone changeset created (minor).

Metadata

Metadata

Assignees

Labels

prd-taskImplementation task from a PRD

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions