Repository navigation
fix(dashboard): cancel the compression tab's saved-badge timer on unmount - #15350
Merged
Merged
Conversation
…ount
The 2s timer that clears the 'saved' badge was never cancelled, so it fired into a torn-down
jsdom tree in CI ('window is not defined' as a vitest unhandled error, failing the UI job on
otherwise green runs).
Contributor
CI Coverage Report
Coverage artifact was not available for this run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
setTimeoutthat clears the "saved" badge inCompressionSettingsTab(#14723) was never cancelled. In CI it fired after the jsdom environment was torn down:ReferenceError: window is not definedfrom react-dom, reported as a vitest unhandled error that fails the UI job although all 431 files pass (seen on #15325, attempts 1 and 2).The timer is now kept in a ref, replaced on the next save and cleared on unmount. New test in
compression-settings-tab-partial-save.test.tsx: fails on the old component, passes now (8/8 locally).