Skip to content

Commit c73fce4

Browse files
Harden theme fallback resolver and compatibility modes
1 parent ad6d102 commit c73fce4

18 files changed

Lines changed: 803 additions & 37 deletions

archive/folderview.plus-2026.03.19.21.txz.sha256

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d042b6ba8db495e182c6a96f566cbbb36a36fd5b02c8fb1d778485365930f76d folderview.plus-2026.03.21.04.txz

folderview.plus.plg

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@
66
<!ENTITY launch "Settings/FolderViewPlus">
77
<!ENTITY plugdir "/usr/local/emhttp/plugins/&name;">
88
<!ENTITY pluginURL "https://raw.githubusercontent.com/&github;/dev/folderview.plus.plg">
9-
<!ENTITY version "2026.03.21.03">
10-
<!ENTITY md5 "de86426fa42edffd34a1458f37c6e109">
9+
<!ENTITY version "2026.03.21.04">
10+
<!ENTITY md5 "b6733917dbe8956fe54e1e88c8a785c7">
1111
]>
1212

1313
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" icon="folder-icon.png" support="https://forums.unraid.net/topic/197631-plugin-folderview-plus/" min="7.0.0">
1414
<CHANGES>
1515

16+
###2026.03.21.04
17+
- UX: Refined settings and on-screen update messaging for clarity and consistency.
18+
- Fix: Improved backend release-note parsing and category detection for accurate summaries.
19+
- Quality: Strengthened release automation and regression guards to prevent note drift.
20+
21+
1622
###2026.03.21.03
1723
- Maintenance: Release rollup since main `2026.03.19.29`; merged all `dev` improvements through `2026.03.21.01` into `main`.
1824
- Feature: Expanded Docker folder quick actions with icon-row `Focus/Pin/Lock` controls plus `Open all WebUIs` and `Clone folder`.

scripts/theme_runtime_guard.sh

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ DOCKER_CSS="${PLUGIN_DIR}/styles/docker.css"
88
VM_CSS="${PLUGIN_DIR}/styles/vm.css"
99
DASHBOARD_CSS="${PLUGIN_DIR}/styles/dashboard.css"
1010
SETTINGS_CSS="${PLUGIN_DIR}/styles/folderviewplus.css"
11+
SETTINGS_JS="${PLUGIN_DIR}/scripts/folderviewplus.js"
12+
SETTINGS_PAGE="${PLUGIN_DIR}/FolderViewPlus.page"
1113
DOCKER_JS="${PLUGIN_DIR}/scripts/docker.js"
1214
VM_JS="${PLUGIN_DIR}/scripts/vm.js"
1315
STYLES_CUSTOM_PHP="${PLUGIN_DIR}/styles/custom.php"
@@ -45,24 +47,36 @@ require_file "${DOCKER_CSS}"
4547
require_file "${VM_CSS}"
4648
require_file "${DASHBOARD_CSS}"
4749
require_file "${SETTINGS_CSS}"
50+
require_file "${SETTINGS_JS}"
51+
require_file "${SETTINGS_PAGE}"
4852
require_file "${DOCKER_JS}"
4953
require_file "${VM_JS}"
5054
require_file "${STYLES_CUSTOM_PHP}"
5155
require_file "${SCRIPTS_CUSTOM_PHP}"
5256

53-
require_contains "${DOCKER_CSS}" '--fvplus-theme-foreground:[[:space:]]*var\(--text,[[:space:]]*currentColor\)' 'docker theme foreground token'
54-
require_contains "${VM_CSS}" '--fvplus-theme-foreground:[[:space:]]*var\(--text,[[:space:]]*currentColor\)' 'vm theme foreground token'
55-
require_contains "${DASHBOARD_CSS}" '--fvplus-theme-foreground:[[:space:]]*var\(--text,[[:space:]]*currentColor\)' 'dashboard theme foreground token'
56-
require_contains "${DOCKER_CSS}" '--fvplus-status-started:[[:space:]]*var\(--fvplus-theme-foreground\)' 'docker started token wiring'
57-
require_contains "${VM_CSS}" '--fvplus-status-started:[[:space:]]*var\(--fvplus-theme-foreground\)' 'vm started token wiring'
58-
require_contains "${DASHBOARD_CSS}" '--fvplus-status-started:[[:space:]]*var\(--fvplus-theme-foreground\)' 'dashboard started token wiring'
57+
require_contains "${DOCKER_CSS}" '--fvplus-theme-foreground:[[:space:]]*var\(--fvplus-runtime-theme-foreground,[[:space:]]*var\(--text,[[:space:]]*currentColor\)\)' 'docker theme foreground token'
58+
require_contains "${VM_CSS}" '--fvplus-theme-foreground:[[:space:]]*var\(--fvplus-runtime-theme-foreground,[[:space:]]*var\(--text,[[:space:]]*currentColor\)\)' 'vm theme foreground token'
59+
require_contains "${DASHBOARD_CSS}" '--fvplus-theme-foreground:[[:space:]]*var\(--fvplus-runtime-theme-foreground,[[:space:]]*var\(--text,[[:space:]]*currentColor\)\)' 'dashboard theme foreground token'
60+
require_contains "${DOCKER_CSS}" '--fvplus-status-started:[[:space:]]*var\(--fvplus-runtime-status-started,[[:space:]]*var\(--fvplus-theme-foreground\)\)' 'docker started token wiring'
61+
require_contains "${VM_CSS}" '--fvplus-status-started:[[:space:]]*var\(--fvplus-runtime-status-started,[[:space:]]*var\(--fvplus-theme-foreground\)\)' 'vm started token wiring'
62+
require_contains "${DASHBOARD_CSS}" '--fvplus-status-started:[[:space:]]*var\(--fvplus-runtime-status-started,[[:space:]]*var\(--fvplus-theme-foreground\)\)' 'dashboard started token wiring'
5963

6064
require_contains "${DOCKER_CSS}" '\.folder-state\.fv-folder-state-started' 'docker started state class token selector'
6165
require_contains "${DOCKER_CSS}" 'i\.folder-load-status\.started' 'docker started icon selector'
6266
require_contains "${VM_CSS}" '\.folder-state\.fv-folder-state-started' 'vm started state class token selector'
6367
require_contains "${VM_CSS}" 'i\.folder-load-status\.started' 'vm started icon selector'
68+
require_contains "${SETTINGS_CSS}" '--fvplus-theme-text-primary:[[:space:]]*var\(--text,[[:space:]]*currentColor\)' 'settings semantic primary token'
69+
require_contains "${SETTINGS_CSS}" '--fvplus-settings-text-primary:[[:space:]]*var\(--fvplus-theme-text-primary,[[:space:]]*var\(--fvplus-settings-safe-text-primary\)\)' 'settings token resolver chain'
6470
require_contains "${SETTINGS_CSS}" '--fvplus-settings-surface-muted:' 'settings tokenized surfaces'
6571
require_contains "${SETTINGS_CSS}" '--fvplus-settings-accent:' 'settings tokenized accent'
72+
require_contains "${SETTINGS_CSS}" '#fv-setup-assistant-dialog[[:space:]]*\{' 'wizard dialog token block exists'
73+
require_contains "${SETTINGS_CSS}" 'color-scheme:[[:space:]]*dark' 'wizard dark color scheme'
74+
require_absent "${SETTINGS_CSS}" '--fv-wizard-text-primary:[[:space:]]*var\(--text' 'wizard text token must not follow host text token directly'
75+
require_absent "${SETTINGS_CSS}" '--fv-wizard-text-primary:[[:space:]]*var\(--fvplus-settings-text-primary\)' 'wizard text token must not follow settings token directly'
76+
require_contains "${SETTINGS_JS}" 'const buildResolvedThemeSnapshot = \(modeInput = null\) =>' 'theme resolver snapshot helper'
77+
require_contains "${SETTINGS_JS}" 'const applyResolvedThemeTokens = \(reason = '\''runtime'\''\) =>' 'theme resolver apply helper'
78+
require_contains "${SETTINGS_JS}" 'const runThemeSelfHeal = async \(\) =>' 'theme self-heal action'
79+
require_contains "${SETTINGS_PAGE}" 'runThemeSelfHeal\(\)' 'theme self-heal button wiring'
6680

6781
require_absent "${DOCKER_JS}" '\.css\(\s*["'"'"']color["'"'"']\s*,\s*statusColors' 'docker inline status color painting'
6882
require_absent "${VM_JS}" '\.css\(\s*["'"'"']color["'"'"']\s*,\s*statusColors' 'vm inline status color painting'

src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/FolderViewPlus.page

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@ if (!empty($fvplusRuntimeConflicts)) {
157157
<span>Lazy threshold</span>
158158
<input id="docker-lazy-preview-threshold" type="number" min="10" max="200" step="1" onchange="changeRuntimePref('docker', 'lazyPreviewThreshold', this.value)">
159159
</label>
160+
<label class="setting-select" for="docker-theme-compat-mode">
161+
<span>Theme fallback mode</span>
162+
<select id="docker-theme-compat-mode" onchange="changeRuntimePref('docker', 'themeCompatibilityMode', this.value)">
163+
<option value="auto">Auto (recommended)</option>
164+
<option value="host">Force host theme</option>
165+
<option value="safe">Force safe palette</option>
166+
<option value="highcontrast">High contrast safe</option>
167+
</select>
168+
</label>
160169
<div class="setting-help">Use performance mode + lazy previews for larger libraries to reduce render overhead.</div>
161170
</div>
162171
<div class="settings-mini-card">
@@ -353,6 +362,15 @@ if (!empty($fvplusRuntimeConflicts)) {
353362
<span>Lazy threshold</span>
354363
<input id="vm-lazy-preview-threshold" type="number" min="10" max="200" step="1" onchange="changeRuntimePref('vm', 'lazyPreviewThreshold', this.value)">
355364
</label>
365+
<label class="setting-select" for="vm-theme-compat-mode">
366+
<span>Theme fallback mode</span>
367+
<select id="vm-theme-compat-mode" onchange="changeRuntimePref('vm', 'themeCompatibilityMode', this.value)">
368+
<option value="auto">Auto (recommended)</option>
369+
<option value="host">Force host theme</option>
370+
<option value="safe">Force safe palette</option>
371+
<option value="highcontrast">High contrast safe</option>
372+
</select>
373+
</label>
356374
<div class="setting-help">Use performance mode + lazy previews for larger libraries to reduce render overhead.</div>
357375
</div>
358376
<div class="settings-mini-card">
@@ -874,6 +892,7 @@ if (!empty($fvplusRuntimeConflicts)) {
874892
<div class="backup-actions">
875893
<button type="button" onclick="runDiagnostics()"><i class="fa fa-stethoscope"></i> Run health check</button>
876894
<button type="button" onclick="runThemeDiagnostics()"><i class="fa fa-paint-brush"></i> Theme diagnostics</button>
895+
<button type="button" onclick="runThemeSelfHeal()"><i class="fa fa-magic"></i> Theme self-heal now</button>
877896
<button type="button" onclick="repairDiagnostics('sync_docker_order')"><i class="fa fa-sort"></i> Rebuild Docker order index</button>
878897
<button type="button" onclick="repairDiagnostics('normalize_prefs')"><i class="fa fa-wrench"></i> Validate and normalize prefs</button>
879898
<button type="button" onclick="repairDiagnostics('repair_paths')"><i class="fa fa-folder-open"></i> Repair plugin paths</button>

0 commit comments

Comments
 (0)