- Replace hard-coded 'overview' comparison with runtime defaultTab
(isAPMode ? 'wifi' : 'overview') in both enhancement paths, so
activeTab is preserved correctly in AP mode
- Add Alpine.initTree(el) call in the plugin config fetch() fallback
so Alpine directives in the injected HTML are initialized, matching
the pattern used by loadOverviewDirect and loadWifiDirect
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two co-occurring bugs prevented plugin setting tabs from loading:
1. Both stub-to-full app() enhancement paths (tryEnhance and
requestAnimationFrame) could fire independently, with the second
overwriting installedPlugins back to [] after init() already fetched
them. Added a guard flag (_appEnhanced) and runtime state preservation
to prevent this race.
2. Plugin config x-init only loaded content if window.htmx was available
at that exact moment, with no retry or fallback. Added retry loop
(up to 3s) and fetch() fallback for resilience.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>