سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 14:30 UTC
docs(state): record final tested login repair, deployment, live parity and owner gate
davoodmehraban89 committed
Oct 12, 2026 at 21:02 UTC
dcf08743e7bbd153128938bace3cdf93ff812fd9
1 file changed
+8
PROJECT_STATE.md
+8
@@ -54,6 +54,14 @@ The latest user message is the sole source of new instructions. Read AGENTS.md t
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
+### 2026-10-12 Phase 0 owner login evidence: PR #107 RELEASED / OWNER F0-01 OPEN
58
+- **Owner's photographic/video reproduction:** login shows `در حال آمادهسازی محیط کار...` while «بررسی اتصال به سرور ورود» does not respond. The prior #104 "form ready" status did not guarantee production CSP click listeners had loaded. Live impact seen on owner Chrome. Root cause for inert buttons was the `scripts/build-pages.mjs` CSP event handler generator installing `js/generated-event-handlers.js` only at the end of HTML after many synchronous ERP scripts; JS core had already enabled buttons. Session restore also uses organization-specific `fetchCurrentUser`/`pullAll` overrides without a bounded cancellation path, allowing a pending/read-late hydrate.
59
+- **Code correction:** [PR #107](https://github.com/davoodmehraban89/Factor-easy/pull/107) **MERGED** to protected `main` runtime **`23c5f5426bc2f8ad48c6323f1d43b7cf5b556875`**. Production generated event handlers now execute before login core. Read-only diagnostic script executes before core; controls remain disabled until click binding is present. All original ERP script execution/dependency order is preserved. Login hydration has a bounded 25s read barrier with visible error/retry, and `AbortSignal` passes through profile, organizational membership/roles/license, and current-organization-scoped paginated records. Late/aborted read cannot atomically replace `datastore` or `syncSnap`; tenant ID is checked before snapshot commit. No server Auth, roles, RLS, schema, migrations or production customer/financial data changed.
60
+- **Pre-merge PR head `0911c25cd039785a853b52f0189737c01cdfbe57`:** Quality [`38283874464`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38283874464) SUCCESS, Security [`38283874574`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38283874574) SUCCESS. Multiple earlier PR branches FAILED Chromium while catching real organization-scoped `pullAll` override and testing cancellation; failures were corrected rather than bypassed.
61
+- **Exact merged-main quality/security:** [Quality `38284275379`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38284275379) SUCCESS with **96/96 Chromium Playwright (1.5m)**, Golden accounting journey, 55 JavaScript modules syntax, relevant integrity checks and three disposable PostgreSQL C8/D1/identity suites PASS. [Security `38284275367`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38284275367) SUCCESS. [Release Gate `38284524466`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38284524466) SUCCESS; gated [Pages deploy `38284609169`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38284609169) SUCCESS. Earlier duplicate Release `38284453656` CANCELLED and Pages `38284586024` SKIPPED, not counted.
62
+- **Independent live HTTP readback:** authorized Windows device `DESKTOP-71SJ63M` fetched public `https://factoreasy.ir` without cookies/credentials. Exact runtime execution order checked by full `<script src=...` tags (not misleading early preload tags): connectivity `99995`, static generated listeners `100072`, core login `100128`, sync reader `100258` offsets, all increasing. Live `js/generated-event-handlers.js` has `FinoraLoginActionsBound=true`; `js/organization-rbac.js` contains cancel-aware `finoraOrganizationRead` and organizational `pullAll(options={})`.
63
+- **Acceptance boundary:** `LOGIN_CODE_FIXED_RELEASED / CONTROLLED_QA_PASSED / LIVE_ASSET_PARITY_PASSED`; owner affected-ISP real sign-in, true Auth/session + organization + tenant records latency and actual loaded workspace remain **NOT VERIFIED**, so **F0-01 and Phase 0 are OPEN**. Follow-up [Issue #106](https://github.com/davoodmehraban89/Factor-easy/issues/106) is kept OPEN. Owner should hard refresh on affected Chrome, click connectivity diagnostic (no credentials), then privately sign in and report delay/results. If still affected, gather privacy-safe timing without HAR/auth secrets; avoid speculative DB/RLS changes. Rollback this code by reverting #107 then gated deploy, never roll back financial DB data.
64
+
65
## Current change ledger
66
| 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. |
67