@davoodmehraban89 / Factor-easy / commits / 144c726
Fork 0

سامانه صدور فاکتور و حسابداری

docs(state): record owner-reproduced login handler race and read-only hang before fix

davoodmehraban89 committed Oct 12, 2026 at 20:27 UTC 144c726dafff0c2e216edad70b0e3cb6e8d7f045
1 file changed +7
PROJECT_STATE.md
+7
@@ -47,6 +47,13 @@ The latest user message is the sole source of new instructions. Read AGENTS.md t
47 - **Live deployed asset readback on authorized remote Windows device:** unauthenticated read-only GET of `https://factoreasy.ir/?phase0_login_release=20261012` returned HTML containing `js/core.js?v=20261012-login-ready-v2`, `js/bootstrap.js?v=20261012-login-ready-v2`, and `auth-login-status`. Independent GET of live versioned `js/core.js` contained `finoraBoundedAuthFetch` and `FinoraAppAssetsReady` strings. No password, local cookie, login session, customer records or financial writes accessed.
48 - **Acceptance:** FIX_RELEASED + CI_CONTROLLED_QA_PASSED. Owner's affected ISP/device real sign-in/response timing, two-user RLS, full post-login `pullAll()` latency, live company/accounting and physical printer are **NOT VERIFIED**. F0-01 and Phase 0 remain **OPEN**. No Auth server/RLS/role/schema or stored finance data mutated. Next safest step is authenticated owner-device F0-01 test (without sharing any credential) and targeted read-only timings for login to workspace; only if latency persists consider a separately tested data-hydration change. Rollback: revert merged #104 and gated redeploy, no DB rollback.
49
50 +### 2026-10-12 P0 owner photo: inert login connectivity button / lingering session hydration (OPEN FIX)
51 +- **User evidence:** Owner's photographed latest production login shows `در حال آماده‌سازی محیط کار...` although no fresh credentials are visible, and clicking `بررسی اتصال به سرور ورود` reportedly has no visible response. This is **owner-reported real UI failure**, not evidence of an actual failed Auth HTTP request. Related [issue #106](https://github.com/davoodmehraban89/Factor-easy/issues/106).
52 +- **Confirmed source-level root cause for inert buttons under production CSP:** the Pages builder externalizes static `onclick` handlers into `js/generated-event-handlers.js` and appends that script only at the bottom of the HTML **after dozens of parser-blocking ERP scripts**, whereas `js/core.js` enables all login buttons and declares them ready early. Thus the user can click apparently enabled controls before their production event listeners are installed. Local (unbuilt) Chromium tests retain raw inline handlers, so existing coverage did not detect the gap.
53 +- **Separate suspected hang:** restored Supabase session calls `enterApp()` before a manual login and awaits `FinoraAppAssetsReady`, profile and sequential `pullAll()` without a bounded read timeout. The screenshot matches a pending restore but does not identify the precise stalled request.
54 +- **Implementation authority and safety:** change only Pages event-binding ordering and bounded READ-ONLY hydration with visible retry/error; ensure diagnostic handler is loaded before buttons enable; add realistic built Pages Chromium test with artificially stalled unrelated JS and a synthetic restored-session read. Preserve the legacy ERP script execution order and tenant-safe, atomic datastore replacement; no modification to Supabase Auth/RLS/roles/schema, stored financial records or real customer users.
55 +- **Acceptance:** demonstrate diagnostic click starts changing UI before intentionally delayed ERP script completes in built CSP artifact; synthetic stuck read must time out and return operable login without prematurely entering app; complete Golden/92+ Chromium/3 DB/Security checks and gated release; actual affected owner ISP acceptance still OPEN. Rollback narrow PR; no DB rollback.
56 +
57 ## Current change ledger
58 | 2026-10-07 | Owner requested accounting/product usability refinement from live screenshots: automatic non-user-entered floating-detail codes, contextual in-product guides (especially accounting/chart/dimensions), remove duplicate product internal tax ID and use product code as internal item ID, strengthen in-control product/person search, introduce hierarchical product group/subgroup coding with deterministic 6-digit product codes, and keep sale/purchase commercial-document workspace layout stable while only semantic fields change. | **IMPLEMENTED / LOCAL VERIFICATION PASSED / CI PENDING** | Baseline main = `7e58c75f7d754f378d94ca3f356c1ae580aa7ee3`. Automatic dimension type/value codes, contextual guides, product-code-as-internal-ID, normalized multi-token search, and additive six-digit product coding implemented. Existing historical codes preserved. Commercial sale/purchase workspaces now share a stable `صدور سند تجاری` header/actions layout; duplicate purchase sidebar injection removed; the public selector is the single document-type selector and the legacy internal invoice-kind control is hidden. Local syntax/static/commerce/UX/accounting phases 2–6/Golden checks passed; protected-branch CI remains pending. |
59