سامانه صدور فاکتور و حسابداری
Extend Phase 1 shell regression invariants
davoodmehraban89 committed
Sep 28, 2026 at 17:33 UTC
15529d93c8cf17e59d1688ec59ed661b40f2bf55
1 file changed
+7
-2
scripts/quality-check.mjs
+7
-2
@@ -17,7 +17,7 @@ for(const v of ['view-purchases','view-payments'])if(!index.includes(`data-view=
17
if(!index.includes("frame-ancestors 'none'")||!index.includes('upgrade-insecure-requests'))throw new Error('Production CSP hardening missing');
18
if(!index.includes('name="referrer" content="strict-origin-when-cross-origin"'))throw new Error('Referrer policy metadata missing');
19
if(!index.includes('فینورا — نسخه ۱.۰')||!index.includes('نسخه ۱.۰'))throw new Error('Visible application version is inconsistent');
20
-for(const shellId of ['module-rail','module-panel','module-panel-links','global-command-search','command-search-results'])if(!ids.includes(shellId))throw new Error('Phase 1 shell missing #'+shellId);
20
+for(const shellId of ['module-rail','module-panel','module-panel-links','global-command-search','command-search-results','topbar-company','topbar-fiscal-year','workspace-title','workspace-context-text'])if(!ids.includes(shellId))throw new Error('Phase 1 shell missing #'+shellId);
21
for(const cls of ['module-rail','module-panel','topbar','global-search'])if(!index.includes('class="'+cls)&&!index.includes('class="sidebar '+cls)&&!index.includes('class="'+cls+' '))throw new Error('Phase 1 shell class missing: '+cls);
22
23
@@ -36,7 +36,7 @@ const must={
36
'selfcheck.js':['datastore.payments','invoices.has','purchases.has'],
37
'payments.js':['commitSavePayment','invoiceOutstanding','purchaseOutstanding','companyOk','legacyOk','amount>outstanding',"direction!=='inbound'","direction!=='outbound'",'projectId',"paymentMethod!=='credit'","old.invoiceType===invoiceType"],
38
'idle-and-reports.js':['rep-purchase-total','rep-expense-total','rep-accrual-profit','rep-cash-net','report-financial-summary'],
39
- 'ui.js':["dock.dataset.view===viewId",'FINORA_MODULES','FINORA_COMMANDS','renderModulePanel','global-command-search'],
39
+ 'ui.js':["dock.dataset.view===viewId",'FINORA_MODULES','FINORA_VIEW_HOME','FINORA_COMMANDS','renderModulePanel','updateShellContext','global-command-search',"localStorage.setItem('finora.shell.panelCollapsed'"],
40
'accounting.js':['productMovement','getInventorySnapshot','getProjectFinancials','accrualProfit','cashNet','i.prodId||i.productId','companyId===active','companyOk'],
41
'drilldown.js':['openContactLedger','openDashboardDetail','openReportDetail','openFinancialSummaryDetail',"status==='cleared'"],
42
'sync.js':['getMyPurchases'],
@@ -52,3 +52,8 @@ for(const needle of ['github/codeql-action/init@v3','github/codeql-action/analyz
52
console.log('Static quality and security invariants passed for '+files.length+' JavaScript modules.');
53
if(all['invoices.js']?.includes('inboundSettlements'))throw new Error('Dashboard must not double count cheque settlements');
54
if(!all['drilldown.js']?.includes('const net=receivable-payable'))throw new Error('Contact ledger must use allocated invoice balances');
55
+
56
+for(const view of ['view-dashboard','view-invoices','view-purchases','view-payments','view-cheques','view-expenses','view-contacts','view-products','view-reports','view-settings'])
57
+ if(!all['ui.js'].includes("'"+view+"'"))throw new Error('Shell canonical view mapping missing '+view);
58
+for(const cssNeedle of ['--shell-rail','--shell-panel','.module-tab.active','.module-panel{','.topbar{','.shell-panel-collapsed .main-surface','@media(max-width:820px)'])
59
+ if(!index.includes(cssNeedle))throw new Error('Phase 1 responsive shell CSS missing '+cssNeedle);