From c958630ce367550ad8276d10f67571a10947aa9a Mon Sep 17 00:00:00 2001 From: ChuckBuilds Date: Thu, 16 Jul 2026 14:37:09 -0400 Subject: [PATCH] chore(web): fix remaining real Codacy findings (2 of 6) - htmx-config.js: two more unused catch bindings dropped (optional catch binding), matching the earlier fix. - app-early.js: second forEach arrow (the stub updatePluginTabs copy) braced so the callback no longer returns tab.remove()'s value. The other 4 findings ("Non-serializable expression must be wrapped with $(...)") are deliberately NOT "fixed": that rule belongs to a browser-automation (WebdriverIO-style) lint context and is misfiring on ordinary arrow-function constants. Converting them to function declarations would look compliant but BREAK the code - all four arrows intentionally capture the enclosing Alpine component's `this` for the stub-to-full enhancement logic. The right remedy is disabling that pattern for this repo in Codacy's Code Patterns settings (or dismissing the four findings), not a code change. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ --- web_interface/static/v3/js/app-early.js | 2 +- web_interface/static/v3/js/htmx-config.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web_interface/static/v3/js/app-early.js b/web_interface/static/v3/js/app-early.js index 7eff0307..2f95db38 100644 --- a/web_interface/static/v3/js/app-early.js +++ b/web_interface/static/v3/js/app-early.js @@ -322,7 +322,7 @@ } // Clear existing plugin tabs (except Plugin Manager) - existingTabs.forEach(tab => tab.remove()); + existingTabs.forEach(tab => { tab.remove(); }); debugLog('[STUB] updatePluginTabs: Cleared', existingTabs.length, 'existing tabs'); // Add tabs for each installed plugin diff --git a/web_interface/static/v3/js/htmx-config.js b/web_interface/static/v3/js/htmx-config.js index 23a3c8fd..731ce69c 100644 --- a/web_interface/static/v3/js/htmx-config.js +++ b/web_interface/static/v3/js/htmx-config.js @@ -182,11 +182,11 @@ (document.head || document.body).appendChild(newScript); } } - } catch (e) { + } catch { // Silently ignore script execution errors } }); - } catch (e) { + } catch { // Silently ignore errors in script processing } }