Parent
Part of #463
Severity
Medium
Problem
When a debounced refresh fires while _refreshInFlight is true, _triggerRefresh returns immediately after _pendingStructural was already cleared. That refresh is lost with no reschedule. If the skipped refresh carried structuralChange: true, loadAvailableThemes(reloadExtensions: false) may run next and leave LocalExtensionRegistry stale until another install/uninstall.
Evidence
lib/core/theme/theme_folder_watcher.dart (~91–107)
- Bugbot review
dev vs main (2026-07-27)
Acceptance
Suggested fix
Keep _pendingRefresh / _pendingStructural |= structural; when in-flight ends, if pending, schedule another _triggerRefresh.
Parent
Part of #463
Severity
Medium
Problem
When a debounced refresh fires while
_refreshInFlightis true,_triggerRefreshreturns immediately after_pendingStructuralwas already cleared. That refresh is lost with no reschedule. If the skipped refresh carriedstructuralChange: true,loadAvailableThemes(reloadExtensions: false)may run next and leaveLocalExtensionRegistrystale until another install/uninstall.Evidence
lib/core/theme/theme_folder_watcher.dart(~91–107)devvsmain(2026-07-27)Acceptance
Suggested fix
Keep
_pendingRefresh/_pendingStructural |= structural; when in-flight ends, if pending, schedule another_triggerRefresh.