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

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

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

Synced Dec 3, 15:45 UTC

docs: checkpoint Issue229 linked-draft UI 4-gate green code verification

davoodmehraban89 committed Nov 22, 2026 at 17:33 UTC 7eca5d61337c905b0170400ff48e8eaba20afeb3
1 file changed +9
PROJECT_STATE.md
+9
@@ -638,3 +638,12 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
638 - **New bounded problem:** `js/invoices.js::invoiceDocumentStatusLabel` advertises a linked draft as “پیش‌نویس قابل ویرایش” even though current UI rightly blocks source-only edits; `finalizeInvoiceDocumentUi`, `purFinalizeUi`, `purDeleteDraftUi` still show a confirmation prompt if invoked directly on linked draft and only fail deeper in the RPC/guard path, creating false user expectations. Do not make backend calls for impossible operations.
639 - **Plan/acceptance:** within same isolated Draft PR232 add transparent linked-draft read-only labels to sale and purchase registers, and early fail-closed UI guards for linked-draft finalization/deletion (plus direct sale finalize guard), *before* any confirmation dialog or `jeRpcAutoPost`/generic mutation. Add real Playwright browser test proving (a) labels no longer promise edit, (b) direct UI APIs do not open confirmation, call posting RPC, or mutate source/linked journal. Re-run exact-head Quality/WP1/WP2/Security. Keep unlinked draft flows and posted correction unchanged. **No SQL, RLS, schema, roles, Auth, financial engine, merge, publication or hosted writes.** Client controls are never a substitute for server `accounting:approve` enforcement.
640 - **Safety boundary:** Codex-main remains only implementer of atomic source+linked journal draft / independent approval fixes. Existing one browser expected-RED and both real JWT expected-RED probes must remain; no false issue closure.
641 +
642 +
643 +### 2026-11-22 — ISSUE229-UI-DRAFT-ACTIONS: verified completion checkpoint (after code and CI)
644 +- **Owner request:** continue, keep execution heartbeats concise and put A–F percentages **only once at the end**; provide clickable URLs for every GitHub Actions gate, state current active phase and ask only for blocking owner action.
645 +- **Exact verified code commit:** `948e22debb327781452b11936a378eaf1815aff1` on [Draft PR232](https://github.com/davoodmehraban89/Factor-easy/pull/232). New UI and browser acceptance: `js/invoices.js` and `js/purchases.js` now describe a source-linked journal `draft` as awaiting safe server operations (not “editable”), reject linked-source sale or purchase direct Finalize and purchase Delete **before showing confirmation or invoking legacy autopost**, and preserve unlinked draft/posted/reversal behavior. `scripts/accounting-document-workflow.spec.js` adds a real browser test checking that neither confirmation nor automatic posting occurs and local linked source/journal graph stays unchanged; 8 focused source-order invariant checks also passed. **This is UX/interaction hardening, NOT a backend authorization fix.**
646 +- **ALL FOUR exact-code GitHub CI SUCCESS:** [Quality #45029608398](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45029608398): `255 passed (3.8m)` Chromium and `4 passed` Pages, including new browser test `P0 #229 linked draft direct actions deny before confirm, sync or autopost`; [WP1 #45029608465](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45029608465): disposable ledger/proof SUCCESS; [WP2 #45029608446](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45029608446): local Supabase JWT E2E SUCCESS; [Security #45029608451](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45029608451): checks SUCCESS (Dependency Review conditional SKIPPED). The single purchase-Save `test.fail(true)` remains known P0 expected RED; CI green does **not** imply product Save or permission bug fixed.
647 +- **P0 evidence still current:** WP2 log at exact code SHA emitted both `FINORA_ISSUE229_APPROVAL_EXPECTED_RED` and `FINORA_ISSUE229_PURCHASE_APPROVAL_EXPECTED_RED`: a genuine non-owner JWT with commerce:create but **no accounting:approve** POSTED a sale and credit purchase by legacy autopost. **Issue #216 and #229 OPEN**; `main` remains `dab1a45fcfc4f12e675cfe055e477138cd3e99fa`; PR232 Draft, NOT merged/deployed; no financial SQL, RLS, schema, Auth, permissions, hosted data or posted history modified.
648 +- **Owner end-of-turn manual progress estimate (six phases 0–5 mapped A–F):** A architecture/audit **90%**, B server accounting core **50%**, C draft-first source-linked accounting **20%**, D ledger health **55%**, E operational UX **53%**, F release readiness **10%**. Marginal E advance reflects verified browser UI controls only; estimates are non-measured and product/server acceptance still P0 blocked.
649 +- **Next authorization needed:** before starting Codex-main financial server implementation, explicit owner approval for a **separately scoped migration/RBAC/RPC implementation in disposable local test DB only**, with rollback, negative/positive real JWT approval boundary, historical snapshot/fingerprint invariants and independent review; never production writes or mass posted→draft downgrade. After actual fix, remove remaining purchase Save xfail and convert real JWT P0 repro markers into negative seller + positive approver acceptance, then re-run all four exact-code gates. This documentation-only successor commit will have its own CI; do not attribute code-SHA green to a new SHA until verified.