سامانه صدور فاکتور و حسابداری
docs(state): register tested login-ready fix, failures, and owner acceptance boundary
davoodmehraban89 committed
Oct 12, 2026 at 19:59 UTC
b8e2529bdbda00a1c2825e892854f0aa5977eb75
1 file changed
+7
PROJECT_STATE.md
+7
@@ -33,6 +33,13 @@ The latest user message is the sole source of new instructions. Read AGENTS.md t
33
- **Narrow intended correction:** preserve ordered script dependencies while fetching parser-blocking app JS in parallel; initialize the login form before non-auth extensions finish; keep authenticated app transition gated on complete scripts and tenant-scoped data loading; make login-in-progress/busy/error state visible rather than leaving an apparently inert form. Add Chromium network-throttled before/after regression and preserve all accounting/Golden/Security/DB gates. No mutation of real accounts, RLS, schema, roles, financial data or Auth server settings.
34
- **Acceptance:** fresh login form becomes actionable before intentionally delayed optional app module, mocked/unauthenticated negative tests show no credential disclosure or duplicate sign-in, restored session never renders partial app, app status never silently ignores a second click. Gate release on same-SHA Quality/Security/Release/Deploy; owner affected-network authenticated acceptance remains separately OPEN. Rollback: revert single scoped PR and gated redeploy.
35
36
+### 2026-10-12 Phase 0 login interactivity repair — PR #104 CONTROLLED QA PASS / MERGE PENDING
37
+- **Verified baseline and root cause:** pre-fix email/password controls painted before the application finished downloading numerous parser-blocking scripts. Core login initialization also previously waited for all 14 extension scripts to settle. Once clicked, `authBusy` silently ignored repeat clicks while authenticated `enterApp()` awaited account + `pullAll()` with no inline stage status. This matches a plausible mechanism for the owner's reported unresponsive/spinning login; **affected ISP production session not reproduced**.
38
+- **Patch in [PR #104](https://github.com/davoodmehraban89/Factor-easy/pull/104):** priority preload of versioned `js/core.js` and `js/login-connectivity.js` in HTML; explicit disabled-until-handler-ready auth controls; immediate `initAuthSystem()` after core runs and the auth DOM exists, without waiting for 14 optional ordered extension requests. Restored and newly authenticated sessions wait `FinoraAppAssetsReady` before tenant-scoped hydration; the original 41 classic ERP script execution order remains unchanged (trial `defer` was rolled back after browser regressions). Login now reports ready / authenticating / waiting for modules / loading company records / slow network / error, and duplicate clicks never trigger duplicate Auth calls. Auth HTTP requests have a bounded 12s abort using the Supabase client fetch adapter; record/ledger writes and reads are unchanged.
39
+- **Actual Chromium regressions added:** optional extension held 3.5 seconds while password form was enabled at **379ms** in one controlled runner sample; mocked incomplete hydration retains progress and suppresses duplicate sign-in; synthetic hung Auth transport aborts without modifying records endpoint behavior; optional CDN outage and ordered extensions still covered. Synthetic times are **not** owner workstation benchmarks.
40
+- **Exact tested feature-head SHA `872d26e144aab81dc6c04a5eae536f02e15ec1b3`:** [Quality `38277314941`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38277314941) SUCCESS; static quality job **92/92 actual Chromium Playwright PASS (53.7s)**, 55 JS / 52 MJS syntax PASS, Golden accounting + immutable posted-history PASS; disposable PostgreSQL C8/D1/identity jobs all SUCCESS. [Security `38277315134`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38277315134) SUCCESS. Earlier full-defer attempt failed regression (16/92), rolled back; next failure 91/92 arose from duplicate role=status and was corrected without weakening the test. **This documentation follow-up commit has not yet received same-head CI.**
41
+- **Acceptance boundaries:** coded fix and controlled QA verified; protected-main merge, exact-SHA Release/Deploy and live domain readback are **PENDING**. Owner-authenticated sign-in on affected ISP, latency after tenant `pullAll()`, real user/password and device-specific stability remain **NOT VERIFIED / F0-01 OPEN**. Phase 0 remains OPEN. No accounts, Auth server config, schema, RLS, permissions, production data or financial history modified. Rollback: revert #104 and gated Pages redeploy.
42
+
43
## Current change ledger
44
| 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. |
45