From afd1a4df19b17680b39977b8563e6b51da9e7a68 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Wed, 31 Dec 2025 20:56:10 +0100 Subject: [PATCH] fix: extend TPL-009 to vendor templates and fix billing data inheritance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Extended TPL-009 architecture rule to check vendor templates for invalid block names (was only checking admin templates) - Fixed billing.js to inherit base Alpine data via ...data() spread, resolving undefined errors for dark, isSideMenuOpen, vendorCode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- scripts/validate_architecture.py | 4 ++-- static/vendor/js/billing.js | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/validate_architecture.py b/scripts/validate_architecture.py index 819de2a8..a9a83e83 100755 --- a/scripts/validate_architecture.py +++ b/scripts/validate_architecture.py @@ -816,8 +816,8 @@ class ArchitectureValidator: # TPL-008: Check for call table_header() pattern (should be table_header_custom) self._check_table_header_call_pattern(file_path, content, lines) - # TPL-009: Check for invalid block names - if is_admin: + # TPL-009: Check for invalid block names (admin and vendor use same blocks) + if is_admin or is_vendor: self._check_valid_block_names(file_path, content, lines) if is_base_or_partial: diff --git a/static/vendor/js/billing.js b/static/vendor/js/billing.js index b19861fd..500cabdf 100644 --- a/static/vendor/js/billing.js +++ b/static/vendor/js/billing.js @@ -5,6 +5,9 @@ const billingLog = window.LogConfig?.createLogger('BILLING') || console; function billingData() { return { + // Inherit base data (dark mode, sidebar, vendor info, etc.) + ...data(), + // State loading: true, subscription: null,