Add canUseLocalStorage guard to file tree browser

What does this MR do and why?

Guards direct localStorage access in the repository file tree browser with AccessorUtilities.canUseLocalStorage() so the code does not throw when localStorage is unavailable (private/incognito mode, disabled storage, quota exceeded, SSR/non-browser environments).

Tests added for the new guard paths; existing behavior is unchanged.

References

Screenshots or screen recordings

No UI changes.

How to set up and validate locally

  1. Visit about:config Firefox
  2. Set dom.storage.enabled to false
  3. Open a repository
  4. The file tree browser should work without any issues
  5. If you see a localStorage error unrelated to the repository it falls under #601167

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jacques Erasmus

Merge request reports

Loading
Loading