Skip to content

Preserve latency threshold across concurrent requests - #207

Open
dajiaohuang wants to merge 1 commit into
aitboudad:mainfrom
dajiaohuang:fix/preserve-latency-threshold
Open

dajiaohuang wants to merge 1 commit into
aitboudad:mainfrom
dajiaohuang:fix/preserve-latency-threshold

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

  • Keep the original latency timer when additional requests start while the loading bar is already active.
  • Add fake-time regression coverage for concurrent starts crossing the initial threshold.

Previously, each start() emitted a state that caused switchMap to cancel and restart the timer. A sustained sequence of overlapping requests could therefore indefinitely postpone the bar even after the first request exceeded latencyThreshold.

Validation

  • Core tests: 2 suites, 20 tests passed (jest packages/core/src --runInBand --coverage=false).
  • Prettier check passed for both changed files.
  • git diff --check passed.

Tests use synthetic progress and fake timers only; no application, browser profile, or external service was accessed.

This branch has not been deployed

No deployments
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