fix: prevent race condition when switching tabs and changing headers#86
Draft
fix: prevent race condition when switching tabs and changing headers#86
Conversation
🤖 Pull request artifacts
|
bbb5296 to
4a991b0
Compare
4a991b0 to
b47f59f
Compare
…dd mutex mechanism to setBrowserHeaders to prevent concurrent execution Remove redundant updateOverrideHeaders calls since storageonChanged already handles updates Make DNR rule updates atomic in a single call Add e2e tests for tab switching race condition scenarios
d10f5c2 to
91b4762
Compare
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.
Summary
Ctrl+R).dcs-documents-backна запросе.What changed
src/shared/utils/setBrowserHeaders.tssrc/entities/*/utils/save.tsupdateOverrideHeaders— обновление теперь централизовано через обработчикstorage.onChangedвbackground.tests/e2e/dcs-documents-back-sync.spec.ts: проверяет, что при переключении вкладок/галочки иreloadна активной вкладке на сервер реально уходит корректныйdcs-documents-back.tests/e2e/tab-switching-race-condition.spec.ts: стресс-сценарии на переключение вкладок/профилей.tests/e2e/fixtures.ts: уникальныйuserDataDirна запуск, чтобы проекты не конфликтовали при параллельном выполнении.Test plan
pnpm test:e2e:ci tests/e2e/dcs-documents-back-sync.spec.tspnpm test:e2e:ci tests/e2e/tab-switching-race-condition.spec.tsCtrl+R→ убедиться, чтоdcs-documents-backв DevTools совпадает с выбранной строкой и 404 не появляется