Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix active page race condition in Web Story #39350

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

ychsieh
Copy link
Contributor

@ychsieh ychsieh commented Aug 9, 2023

There are 2 known cases where the race condition happen:

  1. The visibility of the story becomes inactive before the active page is set(~20k / day):
    image
  2. By tapping, keying down, or clicking on the navigational button, the navigation happens before the active page is set(~40k / day):
    image

This PR adds the async handler to finish the operation once the active page is set, instead of failing the entire story directly.

Context: #38979

@amp-owners-bot
Copy link

amp-owners-bot bot commented Aug 9, 2023

Hey @gmajoulet, @newmuis! These files were changed:

extensions/amp-story/1.0/amp-story.js
extensions/amp-story/1.0/test/test-amp-story.js

@ychsieh ychsieh merged commit 49139c9 into ampproject:main Aug 14, 2023
10 checks passed
@ampprojectbot
Copy link
Member

Warning: disparity between this PR Percy build and its main build

The Percy build for this PR was approved (either manually by a member of the AMP team, or automatically if there were no visual diffs). However, during a continuous integration step we generated another Percy build using the commit on the main branch that this PR was merged into, and there appears to be a mismatch between the two.

This is possibly an indication of an issue with this pull request, but could also be the result of flakiness. Please inspect the two builds < This PR's Percy build / main commit's Percy build > and determine further action:

  • If the disparity appears to be caused by this PR, please create an bug report or send out a new PR to fix
  • If the disparity appears to be a flake, please @-mention ampproject/wg-approvers in a comment
  • If there is no disparity and this comment was created by mistake, please @-mention ampproject/wg-infra
  • If unsure, @-mention ampproject/wg-approvers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants