@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / e33f32e
Fork 0

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

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 3, 17:00 UTC

docs(phase0): record owner unstable login and isolated one-file Pages login scope

davoodmehraban89 committed Oct 13, 2026 at 10:05 UTC e33f32eb8b9a83fcafdc3f6634f718ffc76ddc16
1 file changed +8
PROJECT_STATE.md
+8
@@ -158,6 +158,14 @@ The latest user message is the sole source of new instructions. Read AGENTS.md t
158 - **Next discriminator:** owner keeps **same computer and browser** and temporarily changes only Internet access to a phone mobile hotspot; clicks the same built-in connectivity test once more, returns only four status codes and optional login success/time. If Auth and REST respond on hotspot, investigate current ISP/DNS/routing/firewall/proxy. If both still time out, assess local device/browser/proxy or service edge via privacy-safe diagnostics before any code change. Do not request email/password/tokens/cookies/HAR. No Auth/RLS/schema/roles, financial history, invoice or OTP modifications. A bounded runtime fix, if proven necessary, needs independent Chromium/Golden/DB/Security gates and owner retest. Issue #106 OPEN.
159 - **Change boundary:** evidence-only documentation update and Issue #106 comment; rollback revert docs-only PR. No runtime change or customer production mutation.
160
161 +### 2026-10-13 F0-01 owner unstable login / single local login asset — REQUEST RECORDED / IMPLEMENTATION GATED
162 +- **Current owner request:** logging in to Finora sometimes works (latest observation currently inside ERP), sometimes stalls or requires all files to load; owner requests a smaller, faster, more stable login boot path, preferably one local login file, without waiting unnecessarily for every enterprise module. This is a user-reported real-browser instability, not an approved change to the underlying authentication mechanism.
163 +- **Verified baseline before changes:** protected `main=1fa5cf99be9eb790d1192b7597d2dbf65cc9d3fa`; previous docs-only PR #122 merged (exact-main CI running on recheck), preceding protected main Quality/Security/Release/Pages PASS. Live Supabase project `hcsixhqbyuhpshfwqpjx` ACTIVE_HEALTHY; previous read-only migrations 82. Remote owner Windows device via available Desktop Commander OFFLINE. No authenticated owner session, production waterfall, active owner stopwatch or end-user credentials are available for remote verification.
164 +- **Source findings / limit:** Pages build already makes **three ordered critical JS groups + one extension bundle**, reducing former 52 ERP files to four internal ERP bundles. `js/core.js` initializes the login form *before* slow ERP groups, which only gate authenticated workspace hydration; `js/login-connectivity.js` is separate and the four credential-free tests occur **only when owner clicks the diagnostic button**, not on every page load. Previous second-device owner photo showed `SITE_JS_OK | MANIFEST_OK | AUTH_TIMEOUT | REST_TIMEOUT` after an approximately 40-second failed sign-in, so Supabase cross-origin network path is a leading independent source of instability. Packing JS into one file **cannot** repair that external network reachability.
165 +- **Authorized bounded implementation:** In production Pages artifact only, merge the two sequential, same-origin local login logic scripts `js/login-connectivity.js` and `js/core.js` into **one content-hashed Pages login bundle** while retaining early generated CSP handlers and original source/development individual scripts. Do not combine the vendor Supabase SDK into it or accidentally defer the login controls behind ERP accounting assets. Add an early browser `preconnect` hint to the existing Supabase origin (public origin only). Do **not** auto-run four diagnostics, bypass `FinoraAppAssetsReady`, loosen RLS/role/tenant isolation, increase auth timeouts, change server/Auth configuration or introduce a paid proxy.
166 +- **Verification requirement:** targeted built Pages Chromium CSP/login readiness while accounting bundle artificially delayed; one Pages login bundle request/zero requests for old two scripts; standalone source compatibility; blocked accounting bundle must fail closed; full Playwright suite/Golden accounting/three disposable PostgreSQL jobs/CodeQL and PR-head security. Do not merge without exact PR-head Quality and Security PASS. After merge require protected-main exact SHA Quality/Security/Release/Pages. **F0-01/Issue #106 and Phase 0 stay OPEN** until owner verifies real login stability on affected network. If CI uncovers regression, fix/retest in branch; if irreparable, do not publish.
167 +- **Rollback:** revert isolated PR through guarded Quality/Security/Release/Pages; this code-only delivery has no Supabase DB or financial-history rollback.
168 +
169 ## Current change ledger
170 | 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. |
171