Skip to content

[DesignTheme] Tolerate blocked localStorage during startup#4857

Merged
vnbaaij merged 6 commits into
devfrom
copilot/fix-localstorage-securityerror
May 13, 2026
Merged

[DesignTheme] Tolerate blocked localStorage during startup#4857
vnbaaij merged 6 commits into
devfrom
copilot/fix-localstorage-securityerror

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

Pull Request

📖 Description

A SecurityError from localStorage during FluentUI startup could abort theme initialization early enough to prevent Fluent custom element registration. This change makes storage access non-fatal so blocked persistence degrades gracefully instead of breaking all Fluent web components on the page.

  • Theme storage hardening

    • Route theme persistence through guarded storage access in ThemeStorage
    • Fall back to in-memory storage when window.localStorage is unavailable or throws
    • Treat read / write / remove failures as non-fatal
  • Bootstrap path hardening

    • Replace direct localStorage.getItem(...) usage in loading-theme.js with safe storage reads
    • Ignore and clear invalid persisted theme payloads instead of breaking startup
  • Resulting behavior

    • Theme persistence becomes best-effort
    • fluent-design-theme registration and downstream Fluent element registration continue even when browser privacy settings block storage
try {
  const storage = window.localStorage;
  return storage == null ? memoryStorage : storage;
} catch {
  return memoryStorage;
}

🎫 Issues

  • Handle browser SecurityError from localStorage during FluentUI startup/theme initialization.

👩‍💻 Reviewer Notes

  • Focus review on the two storage entry points:
    • src/Core.Assets/src/Design/ThemeStorage.ts
    • src/Core/wwwroot/js/loading-theme.js
  • Recommended smoke test:
    • simulate a blocked window.localStorage
    • verify customElements.get("fluent-design-theme") is defined
    • verify pages still render upgraded Fluent components

📑 Test Plan

  • Manual browser repro with window.localStorage forced to throw SecurityError during startup
  • Core library build validation
  • Existing core unit-test suite was exercised; unrelated pre-existing failures remain outside this change scope

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

⏭ Next Steps

  • Consider consolidating the guarded storage fallback into a shared JS utility if more startup paths need the same behavior.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6562 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.Fpqg3l --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7650420327376008183,8944856811589620878,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9974608442809264542,17704172690964978898,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --virtual-time-budget=5000 --dump-dom REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6715 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.V7svss --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,6199369688436918274,3489501208979327526,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,2236751553720916477,7698183581020163837,4 --trace-process-track-uuid=3190708989122997041 (dns block)
  • clients2.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6562 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.Fpqg3l --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7650420327376008183,8944856811589620878,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9974608442809264542,17704172690964978898,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --virtual-time-budget=5000 --dump-dom REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6715 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.V7svss --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,6199369688436918274,3489501208979327526,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,2236751553720916477,7698183581020163837,4 --trace-process-track-uuid=3190708989122997041 (dns block)
  • clientservices.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6562 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.Fpqg3l --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7650420327376008183,8944856811589620878,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9974608442809264542,17704172690964978898,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --virtual-time-budget=5000 --dump-dom REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6715 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.V7svss --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,6199369688436918274,3489501208979327526,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,2236751553720916477,7698183581020163837,4 --trace-process-track-uuid=3190708989122997041 (dns block)
  • redirector.gvt1.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6562 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.Fpqg3l --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7650420327376008183,8944856811589620878,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9974608442809264542,17704172690964978898,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --virtual-time-budget=5000 --dump-dom REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6715 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.V7svss --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,6199369688436918274,3489501208979327526,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,2236751553720916477,7698183581020163837,4 --trace-process-track-uuid=3190708989122997041 (dns block)
  • safebrowsingohttpgateway.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6562 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.Fpqg3l --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7650420327376008183,8944856811589620878,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9974608442809264542,17704172690964978898,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --virtual-time-budget=5000 --dump-dom REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6715 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.V7svss --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,6199369688436918274,3489501208979327526,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,2236751553720916477,7698183581020163837,4 --trace-process-track-uuid=3190708989122997041 (dns block)
  • www.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6562 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.Fpqg3l --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7650420327376008183,8944856811589620878,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9974608442809264542,17704172690964978898,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --virtual-time-budget=5000 --dump-dom REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=6715 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.V7svss --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,6199369688436918274,3489501208979327526,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,2236751553720916477,7698183581020163837,4 --trace-process-track-uuid=3190708989122997041 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested review from Copilot and removed request for Copilot May 12, 2026 20:18
Copilot AI requested review from Copilot and removed request for Copilot May 12, 2026 20:19
Copilot AI requested review from Copilot and removed request for Copilot May 12, 2026 20:21
Copilot AI requested review from Copilot and removed request for Copilot May 12, 2026 20:22
Copilot AI requested review from Copilot and removed request for Copilot May 12, 2026 20:24
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

✅ All tests passed successfully

Details on your Workflow / Core Tests page.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

Summary - Unit Tests Code Coverage

Summary
Generated on: 5/12/2026 - 8:30:13 PM
Coverage date: 5/12/2026 - 8:30:03 PM
Parser: Cobertura
Assemblies: 1
Classes: 258
Files: 368
Line coverage: 61.2% (6315 of 10313)
Covered lines: 6315
Uncovered lines: 3998
Coverable lines: 10313
Total lines: 34707
Branch coverage: 53.5% (3204 of 5985)
Covered branches: 3204
Total branches: 5985
Method coverage: Feature is only available for sponsors
Tag: 6309_25760118126

Coverage

Microsoft.FluentUI.AspNetCore.Components - 61.2%
Name Line Branch
Microsoft.FluentUI.AspNetCore.Components 61.2% 53.5%
Microsoft.FluentUI.AspNetCore.Components.AccordionChangeEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.ActionButton`1 50%
Microsoft.FluentUI.AspNetCore.Components.ActionLink`1 0%
Microsoft.FluentUI.AspNetCore.Components.CalendarExtended 95% 86.6%
Microsoft.FluentUI.AspNetCore.Components.CalendarTitles 87% 76.6%
Microsoft.FluentUI.AspNetCore.Components.CheckboxChangeEventArgs 50%
Microsoft.FluentUI.AspNetCore.Components.ColumnBase`1 26.2% 20.8%
Microsoft.FluentUI.AspNetCore.Components.ColumnKeyGridSort`1 0% 0%
Microsoft.FluentUI.AspNetCore.Components.ColumnOptionsLabels 100%
Microsoft.FluentUI.AspNetCore.Components.ColumnResizeLabels 100%
Microsoft.FluentUI.AspNetCore.Components.ColumnResizeOptions`1 0% 0%
Microsoft.FluentUI.AspNetCore.Components.ColumnSortLabels 100%
Microsoft.FluentUI.AspNetCore.Components.CommunicationToast 0% 0%
Microsoft.FluentUI.AspNetCore.Components.CommunicationToastContent 0%
Microsoft.FluentUI.AspNetCore.Components.ComponentParameters 16.6% 0%
Microsoft.FluentUI.AspNetCore.Components.Components.DateTime.RangeOfDates 100% 50%
Microsoft.FluentUI.AspNetCore.Components.Components.Tooltip.TooltipGlobalOp
tions
40%
Microsoft.FluentUI.AspNetCore.Components.Components.Tooltip.TooltipOptions 0%
Microsoft.FluentUI.AspNetCore.Components.Components.Tooltip.TooltipService 57.5% 30%
Microsoft.FluentUI.AspNetCore.Components.ConfirmationToast 0%
Microsoft.FluentUI.AspNetCore.Components.CountdownTimer 0% 0%
Microsoft.FluentUI.AspNetCore.Components.CustomEmoji 0% 0%
Microsoft.FluentUI.AspNetCore.Components.CustomIcon 0%
Microsoft.FluentUI.AspNetCore.Components.DataGrid.Infrastructure.AsyncQuery
ExecutorSupplier
38.4% 50%
Microsoft.FluentUI.AspNetCore.Components.DataGrid.Infrastructure.ColumnsCol
lectedNotifier`1
87.5% 50%
Microsoft.FluentUI.AspNetCore.Components.DataGrid.Infrastructure.Defer 100%
Microsoft.FluentUI.AspNetCore.Components.DataGrid.Infrastructure.DisplayAtt
ributeExtensions
66.6% 50%
Microsoft.FluentUI.AspNetCore.Components.DataGrid.Infrastructure.InternalGr
idContext`1
90.4% 100%
Microsoft.FluentUI.AspNetCore.Components.DataGridCellFocusEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.DataGridRowFocusEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.DataGridSortEventArgs`1 0%
Microsoft.FluentUI.AspNetCore.Components.DialogEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.DialogHelper 0%
Microsoft.FluentUI.AspNetCore.Components.DialogInstance 86.6% 75%
Microsoft.FluentUI.AspNetCore.Components.DialogParameters 91.1% 100%
Microsoft.FluentUI.AspNetCore.Components.DialogParameters`1 100%
Microsoft.FluentUI.AspNetCore.Components.DialogReference 36.3% 37.5%
Microsoft.FluentUI.AspNetCore.Components.DialogResult 0% 0%
Microsoft.FluentUI.AspNetCore.Components.DialogService 4.1% 2.6%
Microsoft.FluentUI.AspNetCore.Components.Emoji 0% 0%
Microsoft.FluentUI.AspNetCore.Components.EmojiCompress 0% 0%
Microsoft.FluentUI.AspNetCore.Components.EmojiExtensions 0% 0%
Microsoft.FluentUI.AspNetCore.Components.EmojiInfo 0%
Microsoft.FluentUI.AspNetCore.Components.Extensions.AdditionalAttributesExt
ensions
100% 100%
Microsoft.FluentUI.AspNetCore.Components.Extensions.BooleanExtensions 100% 100%
Microsoft.FluentUI.AspNetCore.Components.Extensions.DateTimeExtensions 81.2% 85%
Microsoft.FluentUI.AspNetCore.Components.Extensions.EnumExtensions 70.5% 59%
Microsoft.FluentUI.AspNetCore.Components.Extensions.FluentInputExtensions 28.5% 33.3%
Microsoft.FluentUI.AspNetCore.Components.Extensions.UrlFormatterExtensions 100% 75%
Microsoft.FluentUI.AspNetCore.Components.FluentAccessibilityStatus 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentAccordion 59.2% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentAccordionItem 83.7% 63.6%
Microsoft.FluentUI.AspNetCore.Components.FluentAnchor 90% 67.8%
Microsoft.FluentUI.AspNetCore.Components.FluentAnchoredRegion 87.7% 60%
Microsoft.FluentUI.AspNetCore.Components.FluentAppBar 64.6% 42.1%
Microsoft.FluentUI.AspNetCore.Components.FluentAppBarItem 80.5% 42.8%
Microsoft.FluentUI.AspNetCore.Components.FluentAutocomplete`1 85.7% 71.8%
Microsoft.FluentUI.AspNetCore.Components.FluentBadge 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentBodyContent 100%
Microsoft.FluentUI.AspNetCore.Components.FluentBreadcrumb 100%
Microsoft.FluentUI.AspNetCore.Components.FluentBreadcrumbItem 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentButton 84.3% 64.5%
Microsoft.FluentUI.AspNetCore.Components.FluentCalendar 83.4% 77.4%
Microsoft.FluentUI.AspNetCore.Components.FluentCalendarBase 94.1% 81.2%
Microsoft.FluentUI.AspNetCore.Components.FluentCalendarDay 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentCalendarMonth 92.3% 64.2%
Microsoft.FluentUI.AspNetCore.Components.FluentCalendarYear 84.6% 58.3%
Microsoft.FluentUI.AspNetCore.Components.FluentCard 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentCheckbox 91.1% 87%
Microsoft.FluentUI.AspNetCore.Components.FluentCollapsibleRegion 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentCombobox`1 69% 57.6%
Microsoft.FluentUI.AspNetCore.Components.FluentComponentBase 90.9% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentCounterBadge 92.3% 84.8%
Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid`1 55.4% 49.2%
Microsoft.FluentUI.AspNetCore.Components.FluentDataGridCell`1 80% 73.9%
Microsoft.FluentUI.AspNetCore.Components.FluentDataGridRow`1 56.2% 37.5%
Microsoft.FluentUI.AspNetCore.Components.FluentDatePicker 81.8% 53.7%
Microsoft.FluentUI.AspNetCore.Components.FluentDesignSystemProvider 100% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentDesignTheme 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentDialog 57.3% 60%
Microsoft.FluentUI.AspNetCore.Components.FluentDialogBody 100%
Microsoft.FluentUI.AspNetCore.Components.FluentDialogFooter 66.6% 44.1%
Microsoft.FluentUI.AspNetCore.Components.FluentDialogHeader 85.1% 75%
Microsoft.FluentUI.AspNetCore.Components.FluentDialogProvider 59.2% 57.1%
Microsoft.FluentUI.AspNetCore.Components.FluentDivider 86.9% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentDragContainer`1 71.4%
Microsoft.FluentUI.AspNetCore.Components.FluentDragEventArgs`1 0%
Microsoft.FluentUI.AspNetCore.Components.FluentDropZone`1 22.2% 4.3%
Microsoft.FluentUI.AspNetCore.Components.FluentEditForm 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentEmoji`1 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentFlipper 100%
Microsoft.FluentUI.AspNetCore.Components.FluentFooter 100%
Microsoft.FluentUI.AspNetCore.Components.FluentGrid 72.2% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentGridItem 87.5% 82.5%
Microsoft.FluentUI.AspNetCore.Components.FluentHeader 100%
Microsoft.FluentUI.AspNetCore.Components.FluentHighlighter 80% 20%
Microsoft.FluentUI.AspNetCore.Components.FluentHorizontalScroll 60.6% 20%
Microsoft.FluentUI.AspNetCore.Components.FluentIcon`1 88.3% 81.2%
Microsoft.FluentUI.AspNetCore.Components.FluentInputBase`1 72.5% 64.8%
Microsoft.FluentUI.AspNetCore.Components.FluentInputFile 90% 79.6%
Microsoft.FluentUI.AspNetCore.Components.FluentInputFileBuffer 100%
Microsoft.FluentUI.AspNetCore.Components.FluentInputFileEventArgs 92.3%
Microsoft.FluentUI.AspNetCore.Components.FluentInputLabel 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentKeyCode 88.6% 90%
Microsoft.FluentUI.AspNetCore.Components.FluentKeyCodeEventArgs 100% 75%
Microsoft.FluentUI.AspNetCore.Components.FluentKeyCodeProvider 40% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentLabel 98% 88.8%
Microsoft.FluentUI.AspNetCore.Components.FluentLayout 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentListbox`1 94.4% 83.3%
Microsoft.FluentUI.AspNetCore.Components.FluentMain 100%
Microsoft.FluentUI.AspNetCore.Components.FluentMainLayout 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentMenu 60.4% 51.3%
Microsoft.FluentUI.AspNetCore.Components.FluentMenuButton 73.1% 25%
Microsoft.FluentUI.AspNetCore.Components.FluentMenuItem 74% 41.6%
Microsoft.FluentUI.AspNetCore.Components.FluentMenuProvider 95.2% 83.3%
Microsoft.FluentUI.AspNetCore.Components.FluentMessageBar 48.7% 23.9%
Microsoft.FluentUI.AspNetCore.Components.FluentMessageBarProvider 70.4% 59%
Microsoft.FluentUI.AspNetCore.Components.FluentMultiSplitter 81.7% 66.6%
Microsoft.FluentUI.AspNetCore.Components.FluentMultiSplitterEventArgs 100%
Microsoft.FluentUI.AspNetCore.Components.FluentMultiSplitterPane 97.1% 91%
Microsoft.FluentUI.AspNetCore.Components.FluentMultiSplitterResizeEventArgs 100%
Microsoft.FluentUI.AspNetCore.Components.FluentNavBase 55.1% 16.6%
Microsoft.FluentUI.AspNetCore.Components.FluentNavGroup 60.9% 34.3%
Microsoft.FluentUI.AspNetCore.Components.FluentNavLink 55.2% 40.6%
Microsoft.FluentUI.AspNetCore.Components.FluentNavMenu 61.1% 33.3%
Microsoft.FluentUI.AspNetCore.Components.FluentNavMenuGroup 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentNavMenuItemBase 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentNavMenuLink 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentNavMenuTree 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentNumberField`1 63.8% 55.1%
Microsoft.FluentUI.AspNetCore.Components.FluentOption`1 80% 61.5%
Microsoft.FluentUI.AspNetCore.Components.FluentOverflow 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentOverflowItem 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentOverlay 74% 62%
Microsoft.FluentUI.AspNetCore.Components.FluentPageScript 100%
Microsoft.FluentUI.AspNetCore.Components.FluentPaginator 68.5% 72.2%
Microsoft.FluentUI.AspNetCore.Components.FluentPersona 100% 78.1%
Microsoft.FluentUI.AspNetCore.Components.FluentPopover 79.1% 77.7%
Microsoft.FluentUI.AspNetCore.Components.FluentPresenceBadge 60.9% 29.1%
Microsoft.FluentUI.AspNetCore.Components.FluentProfileMenu 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentProgress 81.2% 68.1%
Microsoft.FluentUI.AspNetCore.Components.FluentProgressRing 97.6% 92.8%
Microsoft.FluentUI.AspNetCore.Components.FluentPullToRefresh 94% 89.2%
Microsoft.FluentUI.AspNetCore.Components.FluentRadio`1 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentRadioContext 70% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentRadioGroup`1 78.5% 16.6%
Microsoft.FluentUI.AspNetCore.Components.FluentRating 78.4% 78.2%
Microsoft.FluentUI.AspNetCore.Components.FluentSearch 88.5% 83.3%
Microsoft.FluentUI.AspNetCore.Components.FluentSelect`1 96.4% 92.8%
Microsoft.FluentUI.AspNetCore.Components.FluentSkeleton 40.9% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentSlider`1 84.7% 68.4%
Microsoft.FluentUI.AspNetCore.Components.FluentSliderLabel`1 65.8% 33.3%
Microsoft.FluentUI.AspNetCore.Components.FluentSortableList`1 88.3% 67.8%
Microsoft.FluentUI.AspNetCore.Components.FluentSortableListEventArgs 83.3%
Microsoft.FluentUI.AspNetCore.Components.FluentSpacer 100% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentSplashScreen 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentSplitter 70.7% 40%
Microsoft.FluentUI.AspNetCore.Components.FluentStack 82.9% 33.3%
Microsoft.FluentUI.AspNetCore.Components.FluentSwitch 82.6% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentTab 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentTabs 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentTextArea 85%
Microsoft.FluentUI.AspNetCore.Components.FluentTextField 88.8% 60%
Microsoft.FluentUI.AspNetCore.Components.FluentTimePicker 83.3% 58.3%
Microsoft.FluentUI.AspNetCore.Components.FluentToast 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentToastProvider 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentToolbar 68.9% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentTooltip 68.9% 72.7%
Microsoft.FluentUI.AspNetCore.Components.FluentTooltipProvider 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentTreeItem 89.4% 77.7%
Microsoft.FluentUI.AspNetCore.Components.FluentTreeView 79.7% 65.6%
Microsoft.FluentUI.AspNetCore.Components.FluentValidationMessage`1 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentValidationSummary 100% 87.5%
Microsoft.FluentUI.AspNetCore.Components.FluentWizard 96% 86.8%
Microsoft.FluentUI.AspNetCore.Components.FluentWizardStep 95.8% 88.3%
Microsoft.FluentUI.AspNetCore.Components.FluentWizardStepArgs 100%
Microsoft.FluentUI.AspNetCore.Components.FluentWizardStepChangeEventArgs 100%
Microsoft.FluentUI.AspNetCore.Components.GlobalState 31.8% 50%
Microsoft.FluentUI.AspNetCore.Components.GridItemsProviderRequest`1 54.5% 20.8%
Microsoft.FluentUI.AspNetCore.Components.GridItemsProviderResult 100%
Microsoft.FluentUI.AspNetCore.Components.GridItemsProviderResult`1 100%
Microsoft.FluentUI.AspNetCore.Components.GridSort`1 35.1% 25.9%
Microsoft.FluentUI.AspNetCore.Components.HeaderFooterContent`1 100% 50%
Microsoft.FluentUI.AspNetCore.Components.HierarchicalGridItem`2 0% 0%
Microsoft.FluentUI.AspNetCore.Components.HierarchicalGridUtilities 0% 0%
Microsoft.FluentUI.AspNetCore.Components.HorizontalScrollEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.Icon 83.7% 91.1%
Microsoft.FluentUI.AspNetCore.Components.IconFromImage 100%
Microsoft.FluentUI.AspNetCore.Components.IconInfo 100%
Microsoft.FluentUI.AspNetCore.Components.IconsExtensions 0% 0%
Microsoft.FluentUI.AspNetCore.Components.Identifier 66.6% 62.5%
Microsoft.FluentUI.AspNetCore.Components.IdentifierContext 66.6% 41.6%
Microsoft.FluentUI.AspNetCore.Components.IDialogService 0%
Microsoft.FluentUI.AspNetCore.Components.INavMenuItemsOwner 0%
Microsoft.FluentUI.AspNetCore.Components.Infrastructure.EventCallbackSubscr
ibable`1
100% 100%
Microsoft.FluentUI.AspNetCore.Components.Infrastructure.EventCallbackSubscr
iber`1
100% 87.5%
Microsoft.FluentUI.AspNetCore.Components.InputHelpers`1 62.1% 48.6%
Microsoft.FluentUI.AspNetCore.Components.InternalAppBarContext 100% 100%
Microsoft.FluentUI.AspNetCore.Components.InternalDialogContext 80%
Microsoft.FluentUI.AspNetCore.Components.InternalListContext`1 80% 66.6%
Microsoft.FluentUI.AspNetCore.Components.InternalToastContext 0%
Microsoft.FluentUI.AspNetCore.Components.KeyCodeService 60.3% 28.5%
Microsoft.FluentUI.AspNetCore.Components.KeyDown 0% 0%
Microsoft.FluentUI.AspNetCore.Components.LibraryConfiguration 88.8% 50%
Microsoft.FluentUI.AspNetCore.Components.ListComponentBase`1 61.5% 62.5%
Microsoft.FluentUI.AspNetCore.Components.LoadedEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.LuminanceChangedEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.MenuChangeEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.MenuService 63.8% 0%
Microsoft.FluentUI.AspNetCore.Components.Message 51.6% 0%
Microsoft.FluentUI.AspNetCore.Components.MessageBox 50% 0%
Microsoft.FluentUI.AspNetCore.Components.MessageBoxContent 0%
Microsoft.FluentUI.AspNetCore.Components.MessageOptions 78.5%
Microsoft.FluentUI.AspNetCore.Components.MessageService 28.9% 28.5%
Microsoft.FluentUI.AspNetCore.Components.NavMenuActionArgs 0% 0%
Microsoft.FluentUI.AspNetCore.Components.OfficeColorUtilities 0%
Microsoft.FluentUI.AspNetCore.Components.Option`1 0%
Microsoft.FluentUI.AspNetCore.Components.OptionsSearchEventArgs`1 100%
Microsoft.FluentUI.AspNetCore.Components.OverflowItem 100%
Microsoft.FluentUI.AspNetCore.Components.PaginationState 63.6% 56.2%
Microsoft.FluentUI.AspNetCore.Components.ProgressFileDetails 100%
Microsoft.FluentUI.AspNetCore.Components.ProgressToast 0% 0%
Microsoft.FluentUI.AspNetCore.Components.ProgressToastContent 0%
Microsoft.FluentUI.AspNetCore.Components.PropertyColumn`2 92.5% 71.7%
Microsoft.FluentUI.AspNetCore.Components.RenderFragmentDialog 100%
Microsoft.FluentUI.AspNetCore.Components.Resources.TimeAgoResource 76.1% 100%
Microsoft.FluentUI.AspNetCore.Components.SelectAllTemplateArgs 100%
Microsoft.FluentUI.AspNetCore.Components.SelectColumn`1 86.7% 82.6%
Microsoft.FluentUI.AspNetCore.Components.SelectDatesHoverEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.ServiceCollectionExtensions 59.2% 66.6%
Microsoft.FluentUI.AspNetCore.Components.SortedProperty 0%
Microsoft.FluentUI.AspNetCore.Components.SplashScreenContent 0% 0%
Microsoft.FluentUI.AspNetCore.Components.SplitterCollapsedEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.SplitterResizedEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.StandardLuminanceExtensions 0% 0%
Microsoft.FluentUI.AspNetCore.Components.TabChangeEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.TemplateColumn`1 83.3% 0%
Microsoft.FluentUI.AspNetCore.Components.TimeAgoOptions 100%
Microsoft.FluentUI.AspNetCore.Components.ToastInstance 0% 0%
Microsoft.FluentUI.AspNetCore.Components.ToastParameters 0%
Microsoft.FluentUI.AspNetCore.Components.ToastParameters`1 0%
Microsoft.FluentUI.AspNetCore.Components.ToastResult 0% 0%
Microsoft.FluentUI.AspNetCore.Components.ToastService 0% 0%
Microsoft.FluentUI.AspNetCore.Components.TreeChangeEventArgs 100%
Microsoft.FluentUI.AspNetCore.Components.TreeViewItem 100%
Microsoft.FluentUI.AspNetCore.Components.TreeViewItemExpandedEventArgs 100%
Microsoft.FluentUI.AspNetCore.Components.UploadedFileDetails 0%
Microsoft.FluentUI.AspNetCore.Components.Utilities.CssBuilder 100% 100%
Microsoft.FluentUI.AspNetCore.Components.Utilities.InlineStyleBuilder 96.4% 87.5%
Microsoft.FluentUI.AspNetCore.Components.Utilities.InternalDebounce.Debounc
eAction
52.3% 18.7%
Microsoft.FluentUI.AspNetCore.Components.Utilities.InternalDebounce.Debounc
eTask
0% 0%
Microsoft.FluentUI.AspNetCore.Components.Utilities.InternalDebounce.Dispatc
herTimerExtensions
82.9% 70%
Microsoft.FluentUI.AspNetCore.Components.Utilities.JSModule 0% 0%
Microsoft.FluentUI.AspNetCore.Components.Utilities.RangeOf`1 96.7% 94.4%
Microsoft.FluentUI.AspNetCore.Components.Utilities.Splitter 82.8% 81.8%
Microsoft.FluentUI.AspNetCore.Components.Utilities.StyleBuilder 100% 91.6%
Microsoft.FluentUI.AspNetCore.Components.ZIndex 100%
System.Text.RegularExpressions.Generated 76.4% 53.1%

Copilot AI changed the title [WIP] Fix localStorage SecurityError during script init for FluentUI elements [DesignTheme] Tolerate blocked localStorage during startup May 12, 2026
Copilot AI requested a review from vnbaaij May 12, 2026 20:26
@vnbaaij vnbaaij marked this pull request as ready for review May 12, 2026 20:44
@vnbaaij vnbaaij requested a review from dvoituron as a code owner May 12, 2026 20:44
Copilot AI review requested due to automatic review settings May 12, 2026 20:44
@vnbaaij vnbaaij enabled auto-merge (squash) May 12, 2026 20:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hardens DesignTheme startup and persistence so that browser SecurityErrors (or blocked/unavailable localStorage) don’t abort theme initialization early enough to prevent Fluent custom element registration.

Changes:

  • Adds a guarded storage accessor with an in-memory fallback, and treats storage read/write/remove failures as non-fatal.
  • Routes persisted theme reads in loading-theme.js through safe parsing/clearing logic rather than direct localStorage.getItem(...) + JSON.parse(...).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Core/wwwroot/js/loading-theme.js Replaces direct localStorage reads during bootstrap with guarded storage access and safe theme parsing/clearing.
src/Core.Assets/src/Design/ThemeStorage.ts Centralizes theme persistence behind a safe getStorage() accessor and makes storage failures non-fatal (with in-memory fallback).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Core/wwwroot/js/loading-theme.js
Comment thread src/Core.Assets/src/Design/ThemeStorage.ts
@vnbaaij vnbaaij merged commit ba56b68 into dev May 13, 2026
7 checks passed
@vnbaaij vnbaaij deleted the copilot/fix-localstorage-securityerror branch May 13, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

localStorage SecurityError during script init prevents customElements.define for all FluentUI elements

4 participants