سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 15:45 UTC
Phase 0: record 4/4 session reload PASS and add Commerce navigation browser regression (#148)
* docs: start read-only Phase 0 saved-session repeat-login stability validation * docs: record 4 of 4 session reload passes and authorize read-only catalog search smoke * test: assert real commerce tab changes view, sidebar and back-navigation from accounting * docs: record repeat-login pass, inconclusive F0-02 live navigation and controlled regression * docs: record 4/4 session reload and 120/120 navigation QA pass; keep real catalog gate open
davoodmehraban89 committed
Oct 15, 2026 at 20:47 UTC
e544127a8a4fbc062c1c8d3b4595ef9877793c4a
2 files changed
+43
PROJECT_STATE.md
+17
@@ -724,3 +724,20 @@ Owner reports login blocked with generic 'check internet/VPN' network error on l
724
- **No database mutation:** never changed `public.licenses`, membership, RLS, Auth, role or financial history. No tests submitted forms, switched organizations or changed financial records.
725
- **Remaining separate deliverables:** unstable initial login on owner's affected network and duration/retry acceptance (Phase 0); no-card production encrypted backup, second-device copy and isolated restore (`PRODUCTION_BACKUP_NOT_RUN / RECOVERY_NOT_VERIFIED`); other roadmap QA/deployment phases. Do not require Desktop Commander for basic GitHub/Supabase workflow.
726
- **Exact next step:** evaluate Phase 0 repeat-login stability using separate non-destructive browser checks and available evidence, or proceed with next safe backlog slice; do NOT revisit false expiry without regression evidence. Owner can keep the dedicated test profile for later read-only QA.
727
+
728
+
729
+### 2026-10-15 Owner continues Finora / Phase 0 repeated existing-session stability — STARTED (READ ONLY)
730
+- **Latest direction:** owner: «ادامه بده». Choose the highest-value non-destructive open slice: saved Test/Work-account session reload stability and startup/login status following successful real lifetime-license acceptance, while maintaining separate owner/admin identity.
731
+- **Live repository baseline verified:** protected main `a730a9e4a806058ae130b46c4dff92b9312eff04` (PR #147, documentation only). Exact main Quality `38772208876`, Security `38772209272`, Release gate `38772666911`, gated Pages `38772767566`: all SUCCESS. Thus production test now targets that documented release, not an unverified preview.
732
+- **Scope:** with saved `Finora ERP — Test / Work Account` browser profile, run read-only multiple reload/navigation cycles; record login/dashboard access, stable badge `وضعیت اشتراک : نامحدود`, visible organization/company ambiguity, any timeout/blank screen and browser-visible failures. Never post changes, inspect private financial record details, switch org, expose cookies/token or use owner's admin profile.
733
+- **Stop condition / acceptance:** at least 3 independent reload checks and bounded navigation; if any repro failure, diagnose/repair client startup in a branch with synthetic Playwright regression and exact-SHA Quality/Security/Pages. Otherwise document that the single test-browser route passes while affected owner ISP performance and non-saved fresh login remain OPEN. Separately, backup live extraction/restoration still NOT VERIFIED, no desktop subscription required for this read-only smoke.
734
+- **Execution started:** no Supabase/Cloudflare/R2/schema/Auth/licensing/financial writes authorized or planned. Rollback for QA-only notes is doc PR revert. Production rollback only if source fix separately shown necessary.
735
+
736
+- **Phase 0 F0-01 test-profile real-browser QA checkpoint:** TinyFish run [`b92edc28-63ed-40cc-9052-e1b539399738`](https://agent.tinyfish.ai/runs/b92edc28-63ed-40cc-9052-e1b539399738) COMPLETED, four sequential browser navigation/reload cycles on `https://factoreasy.ir` with separate saved test/work session. 4/4 loaded dashboard; no sign-in prompt, blank loading, or transient stuck state; exact license badge `وضعیت اشتراک : نامحدود` each time; no data writes. Browser agent **estimated** initial 2–3s and refresh ~1–2s; these estimates are NOT controlled performance traces and do not verify owner's affected ISP or cold signed-out login.
737
+- **Next scope (owner's ongoing Phase 0 continuation):** safe READ-ONLY `F0-02` catalog/search smoke with test/work session: navigate existing invoice item selector and query known `هارد` / `بلوک`, seller/contact lookup if visible; do NOT save/create/edit/post invoice, switch companies or expose record details. This tests UI/search accessibility only; tenant isolation and actual save cannot be inferred without separate controlled tests.
738
+
739
+- **F0-02 live read-only navigation attempt, NOT VERIFIED product search:** TinyFish [run `3583d6a5-196a-42ed-ba47-727021d9a224`](https://agent.tinyfish.ai/runs/3583d6a5-196a-42ed-ba47-727021d9a224) completed on saved test/work profile. Navigation from Accounting to Commerce was attempted, but the agent could not expose Commerce submenu or reach Sales Invoice. No product/contact selectors were inspected; no invoice created or financial data changed. This is inconclusive between interaction/scroll/navigation misunderstanding and a real UI bug. Mark **F0-02 REAL ACCOUNT PRODUCT/CONTACT LOOKUP NOT VERIFIED** rather than FAIL/PASS.
740
+- **Isolated browser regression added to distinguish source problem from agent limitation:** `scripts/phase0-modal-dashboard.spec.js` now clicks Accounting then Commerce tab and verifies invoice page activation, Commerce sidebar links, absence of Accounting links, and round trip Products → Invoices with synthetic session. CI test still PENDING. Do not patch production navigation or claim source bug unless reproduced and independently validated.
741
+
742
+- **PR #148 first QA checkpoint on exact code head `119093f80b07c27517e2bd857b55f07ce9f4018f`:** Quality [`38774914246`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38774914246) **SUCCESS**, Security [`38774914170`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38774914170) **SUCCESS**. Static job `116559947340` log reports **120/120 Playwright Chromium PASS** (new F0-02 Commerce actual tab-click UI test at sequence [77/120]); D1/C8/identity disposable DB jobs SUCCESS; CodeQL + Release safety SUCCESS. This demonstrates controlled navigation works; no user-session product options inspected. No code change or speculative UI repair is warranted based on this evidence alone.
743
+- **Acceptance verdict by scope:** F0-01 saved test/work session warm-route **4/4 PASS**, but owner affected-network first login and real cold signed-out flow remain NOT VERIFIED. F0-02 Commerce tab rendering in isolated Chromium **PASS**, but real account product/party selector exercise **NOT VERIFIED** due browser-agent navigation blocker. No real invoice or contact data was read or written. Next bounded action: user-authenticated UI walkthrough of sales invoice selector from known menu path or carefully scoped read-only browser replay; preserve company context and do not mutate production records. Await **final head PR #148** Quality/Security before protected merge, then verify exact main deploy.
scripts/phase0-modal-dashboard.spec.js
+26
@@ -59,3 +59,29 @@ test('dashboard cash/assets cards drill to accounts, rows to ledger, recent vouc
59
await page.locator('#finora-voucher-register-open').click();
60
await expect(page.locator('#view-journal')).toHaveClass(/active/);
61
});
62
+
63
+
64
+test('F0-02 commerce tab navigates away from accounting and exposes invoice, product and contact links',async({page})=>{
65
+ // Synthetic local UI test. No real Supabase session or financial writes.
66
+ await boot(page);
67
+ await page.waitForFunction(()=>typeof window.applyLicensedModuleUI==='function'&&typeof window.openModule==='function');
68
+ await page.evaluate(()=>{currentUser.modules=['full_suite'];applyLicensedModuleUI();});
69
+ const rail=page.locator('#module-rail');
70
+ await rail.locator('[data-module="accounting"]').click();
71
+ await expect(page.locator('#view-accounting-foundation')).toHaveClass(/active/);
72
+ await expect(page.locator('#module-panel-title')).toHaveText('حسابداری');
73
+ await expect(page.locator('#module-panel-links')).toContainText('ثبت سند حسابداری');
74
+ await rail.locator('[data-module="commerce"]').click();
75
+ await expect(page.locator('#view-invoices')).toHaveClass(/active/);
76
+ await expect(page.locator('#module-panel-title')).toHaveText('بازرگانی');
77
+ await expect(page.locator('#module-panel-links')).toContainText('فاکتورها');
78
+ await expect(page.locator('#module-panel-links')).toContainText('کالا و خدمات');
79
+ await expect(page.locator('#module-panel-links')).toContainText('اشخاص');
80
+ await expect(page.locator('#module-panel-links [data-view="view-journal"]')).toHaveCount(0);
81
+ await expect(rail.locator('[data-module="commerce"]')).toHaveClass(/active/);
82
+ await page.locator('#module-panel-links [data-view="view-products"]').click();
83
+ await expect(page.locator('#view-products')).toHaveClass(/active/);
84
+ await page.locator('#module-panel-links [data-view="view-invoices"]').click();
85
+ await expect(page.locator('#view-invoices')).toHaveClass(/active/);
86
+ await expect(page.locator('#module-panel-title')).toHaveText('بازرگانی');
87
+});