سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 17:00 UTC
UI: make live shell scroll ownership cache-safe
* UI: make scroll ownership cache-safe in live shell * QA: guard live shell cache-buster * State: record live scrollbar cache root cause
davoodmehraban89 committed
Oct 2, 2026 at 12:11 UTC
a55933c421eb1ea75a863fadd5d51f3bb29d6b8d
3 files changed
+12
-1
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 video confirms the three-scrollbar defect is still visible after PR #35 deployment. | **ROOT CAUSE FOUND / HOTFIX IMPLEMENTED / CI PENDING** | Video matches the pre-fix mapping: cached `js/ui.js` can leave the document/body as the workspace scroll owner while rail/panel native RTL scrollbars remain on their left edges. The critical desktop ownership CSS is now duplicated in `index.html` (not dependent on JS cache) and the `ui.js` URL is version-bumped to `20261002-shell-scroll-ownership-v2`; regression test now asserts the live cache-buster. |
18
| 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. | **MERGED / MAIN CI + RELEASE + DEPLOY VERIFIED** | PR #35 merged as `4a8caf7447ddb5361fe56555a8a6bccc7a733602`. Desktop document scrolling is suppressed; module rail, subsystem links, and workspace are independent viewport-bound scroll owners with physical-right scrollbars while Persian content remains RTL; workspace navigation resets its own scroller; mobile/print retain normal flow. PR retest corrected one test-only mobile overflow expectation. Main Quality `36984349326` SUCCESS, Security `36984349300` SUCCESS, Release gate `36984494858` SUCCESS, gated Pages `36984556741` SUCCESS. |
19
| 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. |
20
| 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. |
index.html
+9
-1
@@ -141,6 +141,14 @@ body{background:#f6f9fc}
141
.module-panel-handle{position:fixed;z-index:325;top:50%;right:calc(var(--shell-rail) + var(--shell-panel) - 1px);transform:translate(50%,-50%);width:24px;height:54px;border:1px solid #cbd5e1;border-radius:10px 0 0 10px;background:#fff;color:#087c8a;box-shadow:0 4px 14px rgba(15,23,42,.12);cursor:pointer;font:700 20px/1 Arial,sans-serif;transition:right .2s ease,background .15s ease}
142
.module-panel-handle:hover{background:#effafb}
143
.module-panel-handle:focus-visible{outline:3px solid rgba(7,139,155,.22);outline-offset:2px}
144
+/* Critical desktop scroll ownership lives in HTML too, so a stale cached ui.js cannot restore the old mapping. */
145
+@media (min-width:821px){
146
+ html,body{height:100%;overflow-y:hidden!important}
147
+ .app-root{height:100vh;min-height:0;overflow:hidden}
148
+ .module-rail,.module-panel-links,.main-surface{direction:ltr;overscroll-behavior:contain;scrollbar-gutter:stable}
149
+ .module-rail>*,.module-panel-links>*,.main-surface>*{direction:rtl}
150
+ .main-surface{height:100vh;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}
151
+}
152
.module-panel-links{height:calc(100vh - var(--shell-top));overflow-y:auto;padding:11px}
153
.module-group{padding:5px 0 11px;border-bottom:1px solid #f0f3f7;margin-bottom:8px}
154
.module-group:last-child{border-bottom:0}
@@ -849,7 +857,7 @@ body{background:#f6f9fc}
857
<script src="js/core.js?v=20260928-security-v4"></script>
858
<script src="js/admin.js"></script>
859
<script src="js/sync.js?v=20260928-data-v4"></script>
852
-<script src="js/ui.js?v=20260928-phase1-shell-final"></script>
860
+<script src="js/ui.js?v=20261002-shell-scroll-ownership-v2"></script>
861
<script src="js/invoices.js?v=20260928-phase3-final"></script>
862
<script src="js/print.js?v=20260928-layout-v4"></script>
863
<script src="js/products.js"></script>
scripts/shell-scroll-ownership.spec.js
+2
@@ -3,6 +3,8 @@ const {test,expect}=require('@playwright/test');
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 uiSrc=await page.locator('script[src^="js/ui.js"]').getAttribute('src');
7
+ expect(uiSrc).toBe('js/ui.js?v=20261002-shell-scroll-ownership-v2');
8
const result=await page.evaluate(()=>{
9
const rail=document.getElementById('module-rail');
10
const panel=document.getElementById('module-panel-links');