1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 20:50:28 +00:00
Files
browser/apps
Miles Blackwood 73c37b6d97 Address PR feedback: extract constants, add reset method, and real-timer test
- Extract magic numbers (500ms, 300ms) to named constants
  - shadowDomCheckTimeoutMs and shadowDomCheckDebounceMs
  - Improves maintainability and self-documentation

- Add resetObservedShadowRoots() method to DomQueryService
  - Clears WeakSet tracking when mutation observer is recreated
  - Called on navigation (handleWindowLocationMutation)
  - Prevents stale shadow root references

- Add real-timer test for debouncing behavior
  - Uses actual debounce implementation instead of mock
  - Verifies 5 rapid mutations result in only 1 page update
  - Validates debouncing works in production timing
2026-01-30 15:48:11 -05:00
..