Skip to content

fix: suspend hidden/offline view reads without closing SSE (WI-2126) - #498

Open
stefan-ernst wants to merge 1 commit into
mainfrom
wi-2126-background-reads
Open

stefan-ernst wants to merge 1 commit into
mainfrom
wi-2126-background-reads

Conversation

@stefan-ernst

Copy link
Copy Markdown
Contributor

Summary

  • Expand WI-2126 to defer item and collection/workspace SSE-triggered view reads while hidden or offline, keeping SSE connections open and reconciling once on recovery.
  • Gate SLA/public-board/Zammad polling, delayed collection reconciliation, support metrics, and board SLA ticks. Preserve initial loads, explicit actions, notification delivery, and authoritative deletion.
  • Serialize refresh bursts, retain recovery behind slow requests, cancel obsolete Zammad requests, and clean up listeners/timers and stale responses on scope changes/unmount.
  • Fix offline-only recovery tracking. Align the Biome schema with its pinned version.

Companion tests: https://github.com/Windshiftapp/core-tests-internal/pull/42

Validation

  • 182 focused frontend tests passed under Bun across 13 files; regression failures also demonstrated against unchanged origin/main.
  • cd frontend && bun run --bun typecheck — zero errors/warnings.
  • cd frontend && bun run --bun check — all frontend guards passed.
  • Biome checked changed non-Svelte source and test files; git diff --check passed in both repositories.
  • E2E_KEEP_ARTIFACTS=1 ../core-tests/run-e2e.sh tests/view-background-sync.spec.ts tests/item-detail-sse-live.spec.ts tests/collection-board-sse-live.spec.ts tests/collection-list-tree-sse-delete.spec.ts — 8 passed, no retries/skips, including fresh frontend/server builds.

Focused unit command:

VITEST_RUNTIME=bun ../core-tests/run-overlay-script.sh . scripts/run-frontend-tests.sh \
  src/lib/composables/viewEventStreamBackground.test.js \
  src/lib/composables/useItemEventStream.test.js \
  src/lib/composables/useCollectionEventStream.test.js \
  src/lib/utils/backgroundSync.test.js \
  src/lib/utils/backgroundRefresh.test.js \
  src/lib/widgets/componentPollingBackground.test.js \
  src/lib/widgets/SupportMetricsWidget.test.js \
  src/lib/stores/collectionContext.test.js src/lib/stores/notifications.test.js \
  src/lib/features/items/ItemSLAPanel.test.js src/lib/features/sla/slaState.test.js \
  src/lib/api/integrations.test.js src/lib/pages/PublicBoard.test.js

Full frontend suite under Bun: 3,612 tests passed, but 9 files failed in unrelated OpenUI/Zod imports and Vite generated-config imports through symlinked dependencies. Those failures reproduce against unchanged origin/main; they are not suppressed. The tests PR adds an explicit Bun runtime option without changing the legacy default or installation/lockfile contract.

No Go tests or full cross-browser suite run; this is a frontend-only change. No workspace reference-scheduler redesign or notification suspension.

@github-actions

Copy link
Copy Markdown

Size Change: 0 B 🆕

Total Size: 0 B

compressed-size-action

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