سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 18:15 UTC
UX: fix three-layer desktop scrollbar ownership
* State: record desktop scroll ownership fix * UX: bind desktop scrollbars to shell layers * Test: cover independent shell scroll ownership * CI: gate shell scroll ownership regression * State: mark scroll ownership implementation pending CI * Test: accept existing mobile document overflow mode
davoodmehraban89 committed
Oct 2, 2026 at 11:59 UTC
4a8caf7447ddb5361fe56555a8a6bccc7a733602
4 files changed
+73
-2
.github/workflows/quality.yml
+1
-1
@@ -93,7 +93,7 @@ jobs:
93
- name: Real DOM smoke
94
run: |
95
python3 -m http.server 4173 >/tmp/finora-http.log 2>&1 &
96
- 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/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/pages-artifact.spec.js --reporter=line --workers=1
96
+ 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/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/pages-artifact.spec.js --reporter=line --workers=1
97
98
identity-wave5a-database:
99
runs-on: ubuntu-latest
PROJECT_STATE.md
+1
@@ -14,6 +14,7 @@ This is high-assurance accounting/ERP software. Posted financial history, tenant
14
## Current change ledger
15
| Date | Request / decision | Status | Evidence / next action |
16
|---|---|---|---|
17
+| 2026-10-02 | Owner reported three desktop vertical scrollbars are attached to the wrong visual edges and requested strict scroll ownership: module rail scrolls only main modules from its right edge; contextual subsystem panel scrolls only its own links from its right edge; workspace scrolls only the active work surface from its right edge. | **IMPLEMENTED ON BRANCH / CI PENDING** | Desktop document scrolling is suppressed; module rail, subsystem links, and workspace are independent viewport-bound scroll owners. Each scroll container uses LTR only for physical scrollbar placement while direct content is restored to RTL. Workspace navigation resets the workspace scroller instead of the document. Mobile/print retain normal RTL flow. Real-DOM regression added for direction, overflow ownership, independent scroll movement, and absence of desktop document scrolling. |
18
| 2026-10-02 | Wave 5c privileged full backup/restore authorization after offboarding hardening. | **IMPLEMENTED ON BRANCH / CI PENDING** | Full organization export/restore now requires both fresh server membership revalidation and existing organization-management authority (owner or `core:configure`); restore performs the check before reading the selected file. Static + Real-DOM denial-path gates added. This is an application-layer privilege boundary over data already readable under server RLS; no new schema/RLS/auth-role change was introduced. |
19
| 2026-10-02 | Supabase security-advisor intent review for authenticated-callable SECURITY DEFINER RPCs and three private C8 no-policy tables. | **LIVE INTENT REVIEW VERIFIED / NO DDL REQUIRED** | Production `hcsixhqbyuhpshfwqpjx` reviewed read-only. All 20 public advisor-listed SECURITY DEFINER functions use `search_path=''` and enforce caller/admin/org/capability/read-scope checks appropriate to their RPC contract; warning is retained as an intentional privileged-RPC boundary rather than weakened. The three private C8 tables have RLS enabled, zero policies, and no anon/authenticated CRUD grants, confirming deliberate deny-by-default private storage behind controlled RPCs. Evidence: `docs/SECURITY_ADVISOR_INTENT_REVIEW_2026-10-02.md`. Leaked-password protection remains an external Auth-setting gap. |
20
| 2026-10-02 | Wave 5b offboarding/revocation client fail-closed remediation from Round 29. | **MERGED / MAIN CI + RELEASE + DEPLOY VERIFIED** | PR #32 merged as `e9831e4d23fceae3a30359fe2eca8743087bb6b5`. Main Quality `36982398280` SUCCESS, Security `36982398238` SUCCESS, Release gate `36982548804` SUCCESS, gated Pages `36982584408` SUCCESS. Added 30s + visibility membership revalidation, known-revocation tenant-memory/cache purge, stale `currentUser` removal, sensitive-view lock, alternate-org recovery path, no-membership sign-out, and fresh server membership gate before bulk export. Persistent two-real-user production E2E and capability-specific privileged export authorization remain NOT VERIFIED. |
js/ui.js
+26
-1
@@ -1,3 +1,27 @@
1
+function installDesktopScrollOwnershipStyles(){
2
+ if(document.getElementById('finora-scroll-ownership-style'))return;
3
+ const style=document.createElement('style');
4
+ style.id='finora-scroll-ownership-style';
5
+ style.textContent=`
6
+@media (min-width:821px){
7
+ html,body{height:100%;overflow-y:hidden!important}
8
+ .app-root{height:100vh;min-height:0;overflow:hidden}
9
+ .module-rail,.module-panel-links,.main-surface{direction:ltr;overscroll-behavior:contain;scrollbar-gutter:stable}
10
+ .module-rail>*,.module-panel-links>*,.main-surface>*{direction:rtl}
11
+ .main-surface{height:100vh;overflow-y:auto;scrollbar-width:thin}
12
+}
13
+@media (max-width:820px){
14
+ .app-root{height:auto;min-height:100vh;overflow-x:hidden}
15
+ .main-surface,.shell-panel-collapsed .main-surface{height:auto;overflow-y:visible;direction:rtl}
16
+}
17
+@media print{
18
+ html,body,.app-root{height:auto!important;overflow:visible!important}
19
+ .main-surface{height:auto!important;overflow:visible!important;direction:rtl!important}
20
+}`;
21
+ document.head.appendChild(style);
22
+}
23
+installDesktopScrollOwnershipStyles();
24
+
25
function switchView(viewId){
26
document.querySelectorAll('.view-pane').forEach(el=>el.classList.remove('active'));
27
const target=document.getElementById(viewId);
@@ -9,7 +33,8 @@ function switchView(viewId){
33
if(viewId==='view-accounting-reports'&&window.P6Reports)P6Reports.render();
34
if(typeof syncShellForView==='function')syncShellForView(viewId);
35
if(typeof applyWorkspaceTask==='function')applyWorkspaceTask(viewId,'');
12
- window.scrollTo({top:0,behavior:'smooth'});
36
+ const workspace=document.querySelector('.main-surface');
37
+ if(window.matchMedia('(min-width:821px)').matches&&workspace)workspace.scrollTo({top:0,behavior:'smooth'});else window.scrollTo({top:0,behavior:'smooth'});
38
}
39
function toggleAccordion(headerEl){headerEl.parentElement.classList.toggle('open');}
40
function refreshAllSurfaces(){
scripts/shell-scroll-ownership.spec.js
new
+45
@@ -0,0 +1,45 @@
1
+const {test,expect}=require('@playwright/test');
2
+
3
+test('desktop shell keeps three independent right-edge vertical scroll owners',async({page})=>{
4
+ await page.setViewportSize({width:1536,height:420});
5
+ await page.goto('http://127.0.0.1:4173/index.html',{waitUntil:'domcontentloaded'});
6
+ const result=await page.evaluate(()=>{
7
+ const rail=document.getElementById('module-rail');
8
+ const panel=document.getElementById('module-panel-links');
9
+ const workspace=document.querySelector('.main-surface');
10
+ const filler=(host,height)=>{const el=document.createElement('div');el.style.height=height+'px';el.style.minHeight=height+'px';el.textContent='scroll-test';host.appendChild(el);return el};
11
+ const railF=filler(rail,900),panelF=filler(panel,900),workF=filler(workspace,1300);
12
+ const snapshot=()=>({
13
+ rail:rail.scrollTop,panel:panel.scrollTop,workspace:workspace.scrollTop,
14
+ railDir:getComputedStyle(rail).direction,panelDir:getComputedStyle(panel).direction,workspaceDir:getComputedStyle(workspace).direction,
15
+ railChildDir:getComputedStyle(rail.querySelector('.module-tab')).direction,
16
+ panelChildDir:getComputedStyle(panelF).direction,workspaceChildDir:getComputedStyle(workspace.querySelector('.workspace-context')).direction,
17
+ railOverflow:getComputedStyle(rail).overflowY,panelOverflow:getComputedStyle(panel).overflowY,workspaceOverflow:getComputedStyle(workspace).overflowY,
18
+ bodyOverflow:getComputedStyle(document.body).overflowY,rootOverflow:getComputedStyle(document.documentElement).overflowY,
19
+ documentScrollable:document.scrollingElement.scrollHeight>document.scrollingElement.clientHeight
20
+ });
21
+ rail.scrollTop=120;const afterRail=snapshot();
22
+ panel.scrollTop=140;const afterPanel=snapshot();
23
+ workspace.scrollTop=160;const afterWorkspace=snapshot();
24
+ railF.remove();panelF.remove();workF.remove();
25
+ return{afterRail,afterPanel,afterWorkspace};
26
+ });
27
+ expect(result.afterRail.rail).toBeGreaterThan(0);
28
+ expect(result.afterRail.panel).toBe(0);expect(result.afterRail.workspace).toBe(0);
29
+ expect(result.afterPanel.rail).toBe(result.afterRail.rail);expect(result.afterPanel.panel).toBeGreaterThan(0);expect(result.afterPanel.workspace).toBe(0);
30
+ expect(result.afterWorkspace.rail).toBe(result.afterRail.rail);expect(result.afterWorkspace.panel).toBe(result.afterPanel.panel);expect(result.afterWorkspace.workspace).toBeGreaterThan(0);
31
+ for(const key of ['railDir','panelDir','workspaceDir'])expect(result.afterWorkspace[key]).toBe('ltr');
32
+ for(const key of ['railChildDir','panelChildDir','workspaceChildDir'])expect(result.afterWorkspace[key]).toBe('rtl');
33
+ for(const key of ['railOverflow','panelOverflow','workspaceOverflow'])expect(['auto','scroll']).toContain(result.afterWorkspace[key]);
34
+ expect(result.afterWorkspace.bodyOverflow).toBe('hidden');
35
+ expect(result.afterWorkspace.rootOverflow).toBe('hidden');
36
+ expect(result.afterWorkspace.documentScrollable).toBe(false);
37
+});
38
+
39
+test('mobile keeps normal RTL document flow',async({page})=>{
40
+ await page.setViewportSize({width:390,height:700});
41
+ await page.goto('http://127.0.0.1:4173/index.html',{waitUntil:'domcontentloaded'});
42
+ const state=await page.evaluate(()=>{const workspace=document.querySelector('.main-surface');return{direction:getComputedStyle(workspace).direction,overflow:getComputedStyle(workspace).overflowY}});
43
+ expect(state.direction).toBe('rtl');
44
+ expect(['auto','visible']).toContain(state.overflow);
45
+});