From 94677f946bfcd6ebe1e6da54c8ac0d838e3c2085 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Wed, 31 Dec 2025 18:59:41 +0100 Subject: [PATCH] fix: resolve architecture validation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace window.apiClient with apiClient in feature-store.js (JS-002) - Replace window.apiClient with apiClient in upgrade-prompts.js (JS-002) - Replace inline SVGs with $icon() helper in features.html (FE-002) - Add check-circle-filled icon to icons.js Architecture validation now passes with 0 errors, 0 warnings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- app/templates/admin/features.html | 27 ++++++--------------------- static/shared/js/feature-store.js | 4 ++-- static/shared/js/icons.js | 1 + static/shared/js/upgrade-prompts.js | 4 ++-- 4 files changed, 11 insertions(+), 25 deletions(-) diff --git a/app/templates/admin/features.html b/app/templates/admin/features.html index 31f8cb7a..92dbe128 100644 --- a/app/templates/admin/features.html +++ b/app/templates/admin/features.html @@ -18,10 +18,7 @@
- - - - +
@@ -62,9 +59,7 @@ @@ -109,10 +102,7 @@ @@ -148,10 +136,7 @@ 'hover:bg-purple-700': !saving && hasChanges }" class="inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-purple-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500"> - - - - + diff --git a/static/shared/js/feature-store.js b/static/shared/js/feature-store.js index fad9f1ab..2eb5e82e 100644 --- a/static/shared/js/feature-store.js +++ b/static/shared/js/feature-store.js @@ -80,7 +80,7 @@ this.error = null; // Fetch available features (lightweight endpoint) - const response = await window.apiClient.get('/vendor/features/available'); + const response = await apiClient.get('/vendor/features/available'); this.features = response.features || []; this.tierCode = response.tier_code; @@ -108,7 +108,7 @@ if (!vendorCode) return; try { - const response = await window.apiClient.get('/vendor/features'); + const response = await apiClient.get('/vendor/features'); // Build map for quick lookup this.featuresMap = {}; diff --git a/static/shared/js/icons.js b/static/shared/js/icons.js index 4d815c4c..85957226 100644 --- a/static/shared/js/icons.js +++ b/static/shared/js/icons.js @@ -137,6 +137,7 @@ const Icons = { // Testing & QA Icons 'clipboard-list': ``, 'check-circle': ``, + 'check-circle-filled': ``, 'x-circle': ``, 'ban': ``, 'lightning-bolt': ``, diff --git a/static/shared/js/upgrade-prompts.js b/static/shared/js/upgrade-prompts.js index d9d63cfe..9a18fab7 100644 --- a/static/shared/js/upgrade-prompts.js +++ b/static/shared/js/upgrade-prompts.js @@ -77,7 +77,7 @@ this.loading = true; this.error = null; - const response = await window.apiClient.get('/vendor/usage'); + const response = await apiClient.get('/vendor/usage'); this.usage = response; this.loaded = true; @@ -158,7 +158,7 @@ */ async checkLimitAndProceed(limitType, onSuccess) { try { - const response = await window.apiClient.get(`/vendor/usage/check/${limitType}`); + const response = await apiClient.get(`/vendor/usage/check/${limitType}`); if (response.can_proceed) { if (typeof onSuccess === 'function') {