سامانه صدور فاکتور و حسابداری
fix(phase0): make dark-mode UI legible with browser contrast regression (#92)
* docs(phase0): log F0-06 dark contrast verification scope before code * test(phase0): add dark/light contrast and shell readability browser gates * fix(ux): restore dark theme readable controls, forms and shell surfaces * fix(ux): version dark-theme contrast bundle for live cache refresh * test(phase0): require dark contrast browser gate in Quality workflow * test(phase0): update theme asset identity contract without weakening UX gates * docs(phase0): annotate controlled F0-06 dark contrast evidence and remaining visual gate * docs(phase0): record F0-06 theme controlled QA, limits and test evidence
davoodmehraban89 committed
Oct 12, 2026 at 11:04 UTC
745bdc847a3c2db22048d1d545da0fad0ae5cc67
7 files changed
+187
-5
.github/workflows/quality.yml
+1
-1
@@ -117,7 +117,7 @@ jobs:
117
- name: Real DOM smoke
118
run: |
119
python3 -m http.server 4173 >/tmp/finora-http.log 2>&1 &
120
- npx playwright test scripts/dom-smoke.spec.js scripts/platform-office.spec.js scripts/enterprise-license.spec.js scripts/enterprise-role.spec.js scripts/enterprise-invitation.spec.js scripts/enterprise-org-ux.spec.js scripts/identity-wave5a.spec.js scripts/identity-wave5b.spec.js scripts/identity-wave5c.spec.js scripts/branding-login.spec.js scripts/login-connectivity.spec.js scripts/shell-scroll-ownership.spec.js scripts/office-slice-c1.spec.js scripts/office-slice-c2.spec.js scripts/office-slice-c3.spec.js scripts/office-slice-c4.spec.js scripts/office-slice-c5.spec.js scripts/office-slice-c6.spec.js scripts/office-slice-c7.spec.js scripts/office-slice-c8.spec.js scripts/office-slice-c8-runtime.spec.js scripts/request-workflow-d2.spec.js scripts/request-workflow-d3b.spec.js scripts/request-workflow-d3c.spec.js scripts/request-workflow-d4a.spec.js scripts/taxpayer-print.spec.js scripts/chart-completeness.spec.js scripts/accounting-p0-journal.spec.js scripts/ux-hardening-r2.spec.js scripts/ux-keyboard-f2.spec.js scripts/phase0-selector-stress.spec.js scripts/phase0-invoice-persistence.spec.js scripts/phase0-modal-dashboard.spec.js scripts/accounting-document-workflow.spec.js scripts/admin-provisioning.spec.js scripts/pages-artifact.spec.js --reporter=line --workers=1
120
+ npx playwright test scripts/dom-smoke.spec.js scripts/platform-office.spec.js scripts/enterprise-license.spec.js scripts/enterprise-role.spec.js scripts/enterprise-invitation.spec.js scripts/enterprise-org-ux.spec.js scripts/identity-wave5a.spec.js scripts/identity-wave5b.spec.js scripts/identity-wave5c.spec.js scripts/branding-login.spec.js scripts/login-connectivity.spec.js scripts/shell-scroll-ownership.spec.js scripts/office-slice-c1.spec.js scripts/office-slice-c2.spec.js scripts/office-slice-c3.spec.js scripts/office-slice-c4.spec.js scripts/office-slice-c5.spec.js scripts/office-slice-c6.spec.js scripts/office-slice-c7.spec.js scripts/office-slice-c8.spec.js scripts/office-slice-c8-runtime.spec.js scripts/request-workflow-d2.spec.js scripts/request-workflow-d3b.spec.js scripts/request-workflow-d3c.spec.js scripts/request-workflow-d4a.spec.js scripts/taxpayer-print.spec.js scripts/chart-completeness.spec.js scripts/accounting-p0-journal.spec.js scripts/ux-hardening-r2.spec.js scripts/ux-keyboard-f2.spec.js scripts/phase0-dark-theme-contrast.spec.js scripts/phase0-selector-stress.spec.js scripts/phase0-invoice-persistence.spec.js scripts/phase0-modal-dashboard.spec.js scripts/accounting-document-workflow.spec.js scripts/admin-provisioning.spec.js scripts/pages-artifact.spec.js --reporter=line --workers=1
121
122
identity-wave5a-database:
123
runs-on: ubuntu-latest
PROJECT_STATE.md
+15
@@ -301,3 +301,18 @@ Owner reports login blocked with generic 'check internet/VPN' network error on l
301
- **Independent controlled regression:** corrected PR head `72a69b372ef59ffbb7dddebf81d64304b3559b04` Quality `38212287209` SUCCESS (83/83 real Chromium, includes *formal draft* preview+isolated iframe without watermark, subtotal/number retained, draft state and zero vouchers, pro-forma print; Golden financial invariants and 3 disposable DB jobs PASS); Security `38212287223` SUCCESS. Initial static CI failed because its historic assertion **required** the old watermark; intentionally inverted to disallow watermark without relaxing posting safeguards, then retested green.
302
- **Same merged-main SHA production gate:** Quality **`38212519911`**, Security **`38212519908`**, Release **`38212644579`**, gated Pages **`38212680498`** all SUCCESS. Skipped/cancelled concurrent duplicates not counted. On connected authorized remote Windows device, real domain HTML references exact `20261012-clean-invoice-print-v1` bundle; fetched live JavaScript has `stageInvoicePrint(containerHtml,spec)` and **no `draftMark`**. No owner login, actual tenant invoice or physical printer test made.
303
- **Acceptance status:** F0-04 **FIX RELEASED / CONTROLLED QA PASS / LIVE BUNDLE VERIFIED**, but **OWNER-AUTHENTICATED REPRINT STILL OPEN**. Phase 0 as a whole remains OPEN; F0-01 affected-ISP login, F0-02 real tenant lookup, F0-03 safe-scoped actual Supabase persistence, F0-06 broader UI, F0-07 role isolation and F0-08 old PR final disposal retain their previous gates. Next: owner reprints same existing invoice with browser hard refresh and confirms no watermark/unchanged totals; continue remaining Phase 0 read-only checks without waiting to build new modules.
304
+
305
+
306
+## 2026-10-12 Phase 0 F0-06 follow-up — owner-directed continuation / DARK-MODE READABILITY SLICE STARTED
307
+- **Latest instruction:** Continue completing the approved Finora phases. Do not promote Phase 0 until real-owner authentication/catalog/save/print and permission acceptance are actually passed. Source canonical protected main at kickoff `9e9e35cd96d294e6f6ad875a45de94a1f968e5d8`, after print fix #90 and its docs evidence #91. GitHub exact-head Quality `38213083866`, Security `38213083815`, Release `38213219253`, Pages `38213261477` all SUCCESS. Supabase `hcsixhqbyuhpshfwqpjx` ACTIVE_HEALTHY, 81 migrations (latest `20261011174445 posted_source_idempotency_index`).
308
+- **Independent safe work chosen:** `F0-06` — verify and correct dark-mode readability (buttons/panels, inputs, typography and organizational shell surfaces) based on current runtime and stale unmerged contrast PR #57 as reference, **without merging old PR** or altering shell scroll geometry, invoice business rules, underlying data, or database. `js/ux-hardening-r2.js` currently sets dark root colors yet leaves `.accordion-item` white and `.btn-secondary` pale background inheriting light foreground; potential contrast mismatch to be independently tested with Chromium computed colors. UX owns targeted visual contract, QA owns browser contrast assertions.
309
+- **Bounded implementation:** add controlled Playwright dark-mode contrast/restore regression to required Quality suite, verify before/after computed color contrast (WCAG normal-text 4.5:1 where appropriate); change theme styles only if failure reproduced; bump `index.html` bundle version; run static/GitHub Quality+Security, merge reviewed PR and verify exact protected-main release. Protect ordinary light theme and previously published printable invoice. No real tenant/browser, physical device screenshot, or owner visual acceptance is implied by controlled tests.
310
+- **Restrictions:** no Auth/RLS/roles/schema, production financial data/postings, migration, financial cutoff, account creation, external costs, or unreviewed #57/#39/#40 merges. Rollback: targeted PR revert and Pages gated redeploy. **Phase 0 remains OPEN** for F0-01/02/03/04/07 and owner F0-06 UI review.
311
+- **Status:** SPECIFIED / REGRESSION AND SOURCE REVIEW IN PROGRESS.
312
+
313
+
314
+### 2026-10-12 F0-06 dark-mode contrast targeted fix — PR QA PASSED / REAL OWNER VISUAL OPEN
315
+- **Reproduced from source:** `js/ux-hardening-r2.js` original dark class set light `--text` but left `.accordion-item` white, `.btn-secondary` pale, and `.module-panel` white, risking unreadable text and non-dark shell; old unmerged PR #57 was reviewed as design reference but **not merged**. No structural sidebar/nav/scroll changes made.
316
+- **Implemented in independent branch `qa/phase0-f006-dark-contrast-20261012`:** dark CSS overrides for card/accordion, secondary controls, form input/placeholder and disabled controls, table, combobox and module shell surfaces; retained light mode. `index.html` references `js/ux-hardening-r2.js?v=20261012-phase0-dark-contrast-v1`. Mandatory Quality includes `scripts/phase0-dark-theme-contrast.spec.js` with two real Chromium assertions (4.5:1 normal text contrast for dark accordion/button/input/shell and healthy return to light theme). `scripts/ux-hardening-r2-check.mjs` version and invariants updated; no finance, account, Auth, RLS, roles, schema, SQL or runtime navigation geometry change.
317
+- **Verification:** Initial PR static-quality attempt `38217822837` failed because an existing static contract still expected `20261011-combo-keyboard-f2-v5` bundle; fixed that contract without bypassing a test, then retested branch head `176b5e42f4a26266b61c7dcd75df2803b315f695`. Final tested head Quality **`38217926742` SUCCESS** (static job `114706936848`, **85/85 Playwright Chromium PASS, 52.2s**, both F0-06 tests passing; JS syntax 55 modules/52 MJS, Golden accounting, draft/posted invariants and three disposable database jobs PASS). Security **`38217926669` SUCCESS**, CodeQL and release safety; dependency review skipped (graph disabled).
318
+- **Acceptance classification:** Targeted theme contrast = **IMPLEMENTED + CONTROLLED_QA_PASSED** on branch. Owner-authenticated visual/browser acceptance of full F0-06 (RTL wheel/scroll, dark/light screens, all save/delete/import/export) is **NOT VERIFIED**; Phase 0 remains **OPEN**, all F0-01/02/03/04/07 gates unchanged. Next: finalize documentation-only branch updates, retest exact PR head, merge if gated, verify exact protected-main Quality/Security/Release/Pages + actual published JS version; do **not** call F0-06 or Phase 0 fully owner-accepted. Rollback targeted PR and gated redeploy.
docs/FINORA_PHASE0_ACCEPTANCE_REGISTER_2026-10-12.md
+1
-1
@@ -24,7 +24,7 @@ Status definitions: **CONTROLLED QA PASS** = actual Chromium or isolated tests w
24
| **F0-03** · Invoice lifecycle | `scripts/phase0-invoice-persistence.spec.js` passes **2/2** on mock RPC: save→reload→edit→print, retry without duplication; no ledger posting | **CONTROLLED QA PASS; real persistence UNVERIFIED** / P0 open | Only separately approved isolated account/test scope: actual server save/reload/edit/print and reconcile duplicate count; never post fake accounting in production. Commerce/QA. |
25
| **F0-04** · Print | Owner hardcopy/photo reproduced pale diagonal `پیشنویس — غیرقطعی` overlay on existing goods/services invoice; narrowly removed in PR #90; draft and pro-forma Chromium checks added, accounting state unchanged | **FIX RELEASED + CONTROLLED QA PASS; OWNER REPRINT UNVERIFIED** / P0 open | On the deployed PR #90 code, owner still checks a saved draft/ordinary sale invoice and purchase/pro-forma print: watermark absent, all rows/totals/dates visible; real printer/PDF and taxpayer-specific semantics are separate. Print QA. |
26
| **F0-05** · Large selectors | `scripts/phase0-selector-stress.spec.js`, **1,208 synthetic products + 1,206 persons** passed 2/2; keyboard/Persian/metadata covered | **CONTROLLED QA PASS for products/persons; real catalog and other high-volume selectors UNVERIFIED** / P1 open | Owner tenant/real workstation test plus assess account/project/contract selectors where applicable; measure interactive latency. UX/Perf. |
27
-| **F0-06** · Modal, keyboard, RTL, themes | Controlled modal/dashboard regression and keyboard/F2, Quality suite green | **CONTROLLED QA PARTIAL; full visual/flow acceptance UNVERIFIED** / P1 open | Owner screenshots, all critical save/delete/import/export and RTL scrolling/dark-light. UI/QA. |
27
+| **F0-06** · Modal, keyboard, RTL, themes | Controlled modal/dashboard and F2 regressions remain green. Focused dark contrast PR #92: real Chromium computed-color tests verify dark accordion, buttons, input and organizational shell at **>=4.5:1** contrast and successful return to light theme; PR head Quality **38217926742** passed **85/85 Chromium**, 3 disposable DB jobs + accounting Golden; Security **38217926669** succeeded. | **DARK CONTRAST CONTROLLED QA PASS; remaining controls and owner visual review UNVERIFIED** / P1 still open | Owner preview of dark/light account, modal and invoicing screens; save/delete/import/export keyboard and RTL visual ownership with redacted screenshots; full F0-06 sign-off remains outstanding. UI/QA. |
28
| **F0-07** · Access and release safety | GitHub Security PASS; Supabase 21+3+1 advisor results | **VERIFIED READ-ONLY metadata; dual-user tenant/RLS proof UNVERIFIED** / P0 open | Independent role/tenant negative E2E with authorized second identity, strict no-write safe plan; formal Phase 1 security audit. Security. |
29
| **F0-08** · Stale PR reconciliation | **9** live open PRs audited against current main; all `diverged` from main | **Read-only preliminary disposition RECORDED; no PR integrated** / P1 open | Review below and safely disposition PRs with owner/context; never merge stale sensitive code automatically. Coordination. |
30
index.html
+1
-1
@@ -935,7 +935,7 @@ body{background:#f6f9fc}
935
<script src="js/enterprise-iran.js?v=20260930-iran-erp-v1"></script>
936
<script src="js/enterprise-iran-v2.js?v=20260930-iran-erp-v2"></script>
937
<script src="js/selfcheck.js?v=20260928-release-1-0"></script>
938
-<script src="js/ux-hardening-r2.js?v=20261011-combo-keyboard-f2-v5"></script>
938
+<script src="js/ux-hardening-r2.js?v=20261012-phase0-dark-contrast-v1"></script>
939
940
</body>
941
</html>
js/ux-hardening-r2.js
+93
-1
@@ -120,7 +120,99 @@
120
}
121
},true);
122
123
- const THEME_CSS=`body.finora-theme-dark{--bg:#07111f;--surface:#0f1b2d;--card:#122238;--text:#e6edf7;--text-muted:#9db0c9;--border:#263a55;--primary:#22b8c7;color:var(--text);background:var(--bg)}body.finora-theme-dark .card,body.finora-theme-dark .modal-card,body.finora-theme-dark input,body.finora-theme-dark select,body.finora-theme-dark textarea{background:#122238!important;color:#e6edf7!important;border-color:#2b405d!important}body.finora-theme-dark table th,body.finora-theme-dark table td{border-color:#2b405d!important}body.finora-theme-dark .form-row[style*="background"]{background:#0d1a2c!important}`;
123
+ const THEME_CSS=`body.finora-theme-dark{
124
+ --bg:#07111f;--surface:#0f1b2d;--card:#122238;--card-bg:#122238;
125
+ --text:#f1f5f9;--text-muted:#b8c7da;--border:#405675;
126
+ --primary:#38c6d4;--primary-hover:#22aebb;
127
+ color:var(--text);background:var(--bg);color-scheme:dark
128
+}
129
+body.finora-theme-dark .main-surface,
130
+body.finora-theme-dark .view-pane{color:var(--text)}
131
+body.finora-theme-dark .sidebar,
132
+body.finora-theme-dark .app-shell-nav.sidebar,
133
+body.finora-theme-dark .module-panel,
134
+body.finora-theme-dark .module-panel-handle,
135
+body.finora-theme-dark .card,
136
+body.finora-theme-dark .modal-card,
137
+body.finora-theme-dark .accordion-item,
138
+body.finora-theme-dark .accordion-body,
139
+body.finora-theme-dark .kpi-unit,
140
+body.finora-theme-dark .table-responsive{
141
+ background:#122238!important;color:#f1f5f9!important;border-color:#405675!important
142
+}
143
+body.finora-theme-dark h1,
144
+body.finora-theme-dark h2,
145
+body.finora-theme-dark h3,
146
+body.finora-theme-dark h4,
147
+body.finora-theme-dark h5,
148
+body.finora-theme-dark h6,
149
+body.finora-theme-dark label,
150
+body.finora-theme-dark .form-group label,
151
+body.finora-theme-dark td,
152
+body.finora-theme-dark .kpi-val,
153
+body.finora-theme-dark .report-bar-value{color:#f1f5f9!important}
154
+body.finora-theme-dark p,
155
+body.finora-theme-dark small,
156
+body.finora-theme-dark .text-muted,
157
+body.finora-theme-dark .kpi-lbl,
158
+body.finora-theme-dark .report-bar-label,
159
+body.finora-theme-dark .sidebar-footer,
160
+body.finora-theme-dark .module-group-title,
161
+body.finora-theme-dark .module-panel-head small{color:#b8c7da!important}
162
+body.finora-theme-dark .app-shell-nav .brand-copy h2,
163
+body.finora-theme-dark .module-panel-head h3,
164
+body.finora-theme-dark .module-tab,
165
+body.finora-theme-dark .module-link,
166
+body.finora-theme-dark .shell-logout{color:#f1f5f9!important}
167
+body.finora-theme-dark .module-tab:hover,
168
+body.finora-theme-dark .module-link:hover,
169
+body.finora-theme-dark .module-link.active,
170
+body.finora-theme-dark .sidebar-menu li a:hover,
171
+body.finora-theme-dark .sidebar-menu li a.active{
172
+ background:#1b3552!important;color:#a5f3fc!important
173
+}
174
+body.finora-theme-dark .module-group,
175
+body.finora-theme-dark .module-panel-head,
176
+body.finora-theme-dark .app-shell-nav .brand-box{border-color:#405675!important}
177
+body.finora-theme-dark input,
178
+body.finora-theme-dark select,
179
+body.finora-theme-dark textarea,
180
+body.finora-theme-dark .form-control{
181
+ background:#0b1728!important;color:#f8fafc!important;border-color:#526985!important
182
+}
183
+body.finora-theme-dark input::placeholder,
184
+body.finora-theme-dark textarea::placeholder{color:#b8c7da!important;opacity:1}
185
+body.finora-theme-dark .form-control:disabled,
186
+body.finora-theme-dark input:disabled,
187
+body.finora-theme-dark select:disabled{
188
+ background:#17263a!important;color:#b8c7da!important;opacity:1
189
+}
190
+body.finora-theme-dark table th{
191
+ background:#1a2b42!important;color:#f8fafc!important;border-color:#405675!important
192
+}
193
+body.finora-theme-dark table td{
194
+ background:#122238!important;color:#f1f5f9!important;border-color:#405675!important
195
+}
196
+body.finora-theme-dark .accordion-header{
197
+ background:#182940!important;color:#f1f5f9!important
198
+}
199
+body.finora-theme-dark .btn-secondary{
200
+ background:#263b55!important;color:#f8fafc!important;border-color:#526985!important
201
+}
202
+body.finora-theme-dark .finora-combobox-list{
203
+ background:#0b1728!important;border-color:#526985!important;color:#f8fafc!important
204
+}
205
+body.finora-theme-dark .finora-combobox-option{
206
+ background:#0b1728!important;color:#f8fafc!important;border-color:#334a67!important
207
+}
208
+body.finora-theme-dark .finora-combobox-option:hover,
209
+body.finora-theme-dark .finora-combobox-option:focus{
210
+ background:#1b3552!important;color:#f8fafc!important
211
+}
212
+body.finora-theme-dark .form-row[style*="background"],
213
+body.finora-theme-dark .form-group[style*="background"]{
214
+ background:#0d1a2c!important
215
+}`;
216
function ensureThemeCss(){if($('finora-theme-r2-css'))return;const s=document.createElement('style');s.id='finora-theme-r2-css';s.textContent=THEME_CSS;document.head.appendChild(s)}
217
function resolveTheme(mode){if(mode==='dark'||mode==='light')return mode;const h=new Date().getHours();return h>=7&&h<19?'light':'dark'}
218
window.finoraApplyTheme=function(){ensureThemeCss();const mode=getMySettings()?.ui_theme||'auto',r=resolveTheme(mode);document.body.classList.toggle('finora-theme-dark',r==='dark');document.documentElement.dataset.finoraTheme=r}
scripts/phase0-dark-theme-contrast.spec.js
new
+74
@@ -0,0 +1,74 @@
1
+const {test,expect}=require('@playwright/test');
2
+const BASE=process.env.FINORA_TEST_BASE_URL||'http://127.0.0.1:4173/index.html';
3
+
4
+async function setup(page){
5
+ await page.goto(BASE,{waitUntil:'domcontentloaded'});
6
+ await page.waitForFunction(()=>typeof finoraApplyTheme==='function'&&!!document.getElementById('finora-theme-r2-css'));
7
+ await page.evaluate(()=>{
8
+ const fixture=document.createElement('section');
9
+ fixture.id='f0-dark-contract-fixture';
10
+ fixture.innerHTML=`
11
+ <section class="accordion-item" id="f0-theme-accordion">
12
+ <div class="accordion-header">تنظیمات حسابداری</div>
13
+ <div class="accordion-body">جزئیات حسابداری</div>
14
+ </section>
15
+ <button type="button" class="btn btn-secondary" id="f0-theme-secondary">انصراف</button>
16
+ <label for="f0-theme-field" id="f0-theme-label">شرح سند</label>
17
+ <input id="f0-theme-field" class="form-control" placeholder="توضیحات" value="اطلاعات آزمایشی">
18
+ <aside class="module-panel" id="f0-theme-shell">
19
+ <div class="module-panel-head"><h3>ماژولها</h3></div>
20
+ <button type="button" class="module-link" id="f0-theme-nav">حسابداری</button>
21
+ </aside>`;
22
+ document.body.appendChild(fixture);
23
+ document.body.classList.add('finora-theme-dark');
24
+ });
25
+}
26
+
27
+async function sample(page){
28
+ return await page.evaluate(()=>{
29
+ const color=s=>String(s).match(/[\d.]+/g)?.slice(0,3).map(Number)||[];
30
+ const lum=s=>{
31
+ const cs=color(s);if(cs.length!==3)return null;
32
+ return cs.map(v=>{const x=v/255;return x<=0.04045?x/12.92:((x+0.055)/1.055)**2.4})
33
+ .reduce((acc,v,i)=>acc+v*[.2126,.7152,.0722][i],0);
34
+ };
35
+ const get=id=>{
36
+ const c=getComputedStyle(document.getElementById(id));
37
+ const a=lum(c.color),b=lum(c.backgroundColor);
38
+ return {fg:c.color,bg:c.backgroundColor,contrast:a===null||b===null?0:(Math.max(a,b)+0.05)/(Math.min(a,b)+0.05),backgroundLuminance:b};
39
+ };
40
+ return {
41
+ accordion:get('f0-theme-accordion'),
42
+ button:get('f0-theme-secondary'),
43
+ input:get('f0-theme-field'),
44
+ label:get('f0-theme-label'),
45
+ shell:get('f0-theme-shell'),
46
+ nav:get('f0-theme-nav'),
47
+ rootDark:document.body.classList.contains('finora-theme-dark')
48
+ };
49
+ });
50
+}
51
+
52
+test('F0-06 dark mode maintains readable accounting panels, controls and shell',async({page})=>{
53
+ await setup(page);
54
+ const s=await sample(page);
55
+ expect(s.rootDark).toBe(true);
56
+ for(const part of ['accordion','button','input','shell'])
57
+ expect(s[part].contrast,part+' '+JSON.stringify(s[part])).toBeGreaterThanOrEqual(4.5);
58
+ for(const part of ['accordion','button','input','shell'])
59
+ expect(s[part].backgroundLuminance,part+' dark surface').toBeLessThan(0.18);
60
+ // The shell's transparent navigation controls inherit their own dark parent.
61
+ expect(s.nav.fg).not.toBe('rgb(51, 65, 85)');
62
+});
63
+
64
+test('F0-06 light mode remains legible after switching out of dark mode',async({page})=>{
65
+ await setup(page);
66
+ await page.evaluate(()=>document.body.classList.remove('finora-theme-dark'));
67
+ const s=await sample(page);
68
+ expect(s.rootDark).toBe(false);
69
+ expect(s.accordion.contrast).toBeGreaterThanOrEqual(4.5);
70
+ expect(s.button.contrast).toBeGreaterThanOrEqual(4.5);
71
+ expect(s.input.contrast).toBeGreaterThanOrEqual(4.5);
72
+ expect(s.accordion.backgroundLuminance).toBeGreaterThan(0.5);
73
+ expect(s.button.backgroundLuminance).toBeGreaterThan(0.5);
74
+});
scripts/ux-hardening-r2-check.mjs
+2
-1
@@ -8,7 +8,8 @@ const purchases=fs.readFileSync('js/purchases.js','utf8');
8
const commerce=fs.readFileSync('js/commercial-rnd.js','utf8');
9
const print=fs.readFileSync('js/print.js','utf8');
10
const ok=(v,m)=>{if(!v)throw new Error(m)};
11
-ok(index.includes('js/ux-hardening-r2.js?v=20261011-combo-keyboard-f2-v5'),'UX R2 module must be loaded.');
11
+ok(index.includes('js/ux-hardening-r2.js?v=20261012-phase0-dark-contrast-v1'),'UX R2 module must be loaded.');
12
+ok(ux.includes('--card-bg:#122238')&&ux.includes('body.finora-theme-dark .btn-secondary')&&ux.includes('body.finora-theme-dark .module-panel'),'F0-06 dark shell, card and button contrast styles must be loaded.');
13
ok(projects.includes('getMyGlobalProjects')&&projects.includes('attachExistingProject')&&projects.includes('linkedContactIds'),'Counterparty project management must reuse global project master data.');
14
ok(projects.includes('createAndAttachProject')&&projects.includes('openProjectAttachModal'),'Counterparty project UI must support select-existing or create-new in place.');
15
ok(ux.includes('select.options.length<8')&&ux.includes('finora-combobox-input')&&ux.includes('finora-combobox-option')&&!ux.includes('finora-select-search'),'Large selectors must use one integrated searchable combobox, not a separate search field plus select.');