Skip to content

fix(timing-framework): respect toggleTime when avoidStreamEndFlag is set#151

Closed
qiyundai wants to merge 1 commit into
devfrom
fix/avoid-stream-end-flag
Closed

fix(timing-framework): respect toggleTime when avoidStreamEndFlag is set#151
qiyundai wants to merge 1 commit into
devfrom
fix/avoid-stream-end-flag

Conversation

@qiyundai
Copy link
Copy Markdown
Collaborator

@qiyundai qiyundai commented Jun 1, 2026

Summary

  • Fixes ?avoidStreamEndFlag=true so the chrono-box schedule shows the timed fragment for the current period instead of fast-forwarding to the last slot.
  • avoidStreamEndFlag now only disables Mobile Rider blocking (overrun hold on active streams); it no longer reuses underrun/liveStreamEnd early-advance paths meant for streams that naturally ended.
  • Aligns worker-traditional.js (production path via chrono-box) and worker.js; removes erroneous nextScheduleItem mutation in the module worker.

Test plan

  • npx wtr test/unit/features/timing-framework/worker.test.js --node-resolve --port=2000 (45 passed)
  • ESLint on changed JS files
  • Manual: event page with multiple MR timed fragments + ?avoidStreamEndFlag=true shows current-period fragment
  • Manual: ?serverTime=<ms>&avoidStreamEndFlag=true at a known schedule window
  • Manual: without flag, active MR session still holds slot past toggleTime (overrun unchanged)

Made with Cursor

avoidStreamEndFlag was reusing stream-ended early-advance paths, causing
the schedule to skip to the last timed fragment. Only disable MR blocking;
natural underrun and liveStreamEnd still apply when streams actually end.

Co-authored-by: Cursor <cursoragent@cursor.com>
@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Jun 1, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

@qiyundai
Copy link
Copy Markdown
Collaborator Author

qiyundai commented Jun 1, 2026

Superseded by #152, which includes this fix plus traditional worker alignment in a single merge to dev.

@qiyundai qiyundai closed this Jun 1, 2026
@qiyundai qiyundai deleted the fix/avoid-stream-end-flag branch June 1, 2026 17:06
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