Show warning when in AI Tutor version and attempting to reload browser #70062
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR shows the browser warning 'Reload site? Changes you made may not be saved' when a user attempts to reload browser when in AI Tutor version view, i.e. when the accept-reject flow is triggered, and the user is prompted to either accept or reject the model's updates.
After update
Screen.Recording.2025-12-16.at.4.19.34.PM.mov
Warning!!
We have entered Pixel Lock for Hour of AI! All merges to the
stagingbranch from Dec 2 through Dec 12 must go through live change review and be deemed critical for supporting the Hour of AI. External contributions will not be accepted at this time.For non-critical changes, please change your base to
staging-nextand delete this warning. We will mergestaging-nextintostagingon Dec 15, 2025.Links
Testing story
Tested locally in weblab2 levels with weblab2-accept-reject flag on.
Deployment strategy
Follow-up work
I noticed that the 'Continue' button is still enabled when the AI tutor's response is pending. I think we should probably disabled the 'Continue' button when waiting for the model response.
It is disabled when in AI tutor version view.
Privacy
Security
Caching
PR Creation Checklist: