Files
solution-erp/docs/changelog/sessions/2026-06-19-S77-pe-ux-batch-10-deploy.md
pqhuy1987 095fb492cd [CLAUDE] Docs: S77 closeout — PE UX batch 10 deploy (#320->#329) + Mig 57 + test 354 + flush agent-memory
Closeout buoi san pham lon (anh Kiet FDC + Tra Sol + Bich Phuong, HMW-mode ON): 10 deploy prod-verified #320->#329, 10/10 cicd PASS. STATUS + HANDOFF + session log 2026-06-19-S77. State: Mig 56->57 (AddPeSuggestedPriceNotes) · test 344->354 (+10) · bundle cuoi BqKD3Y23/Cn-i349D · 88 tables · gotcha 70. Viec: co GAP pill moi danh sach+inbox · focus->revert list · Mig 57 ghi chu gia de xuat PRO/CCM + so phan cach + chinh ta + guard #70 · so am do-ngoac · muc con thut-gach · co gap GAN=NV/GO=Truong phong bat-doi-xung · tach chon-phieu(inline) khoi mo-rong(overlay)+nut Xem mo rong · chuong bao nguoi duyet · banner Tra-lai. 3 loi em tu bat review-truoc-deploy (guard#70 · asymmetric · double-mount). FD process-death Task H->recover-disk. Flush 5 sub-agent MEMORY (self-flush khi return). CARRY: curate L1 over-cap reviewer 45KB+cicd 37.6KB+inv 35.6KB keep-floor-hit manual (archive-gate A7 GATE PASS 186/186). Docs+memory only -> CI skip (gotcha #41).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 15:55:45 +07:00

61 lines
7.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# S77 (2026-06-19) — PE UX batch: 10 deploy prod-verified (anh Kiệt FDC + Tra Sol + Bích Phượng)
> Buổi sản phẩm RẤT LỚN, HMW-mode ON. Anh forward liên-tục chat Zalo từ 3 người dùng (anh Kiệt FDC + chị Trà Sol + Bích Phượng) — loạt tinh-chỉnh module Duyệt NCC (PE) realtime. Em-main điều phối + spawn specialist lẻ + cicd-monitor verify từng deploy. Cuối buổi anh "Xong thì session-end luôn".
## Kết quả tổng
| Chỉ số | Trước | Sau |
|---|---|---|
| Deploy | — | **10** (#320#329), **10/10 cicd PASS** |
| Migrations | 56 | **57** (`AddPeSuggestedPriceNotes`) |
| Tests | 344 | **354** (+10) |
| Bundle | jOqxW4-p / DbsznVvR | **BqKD3Y23 / Cn-i349D** (Run #329) |
| SQL tables | 88 | 88 (additive cols) |
| Gotchas | 70 | 70 (tái dùng #70) |
## 10 deploy
| # | Commit | Việc | Người yêu cầu |
|---|---|---|---|
| #320 | `8e68ed1` | Cờ GẤP **pill** 🔴 GẤP (PRO) / 🟢 GẤP (CCM) đồng bộ MỌI danh sách + inbox. NEW `PeUrgentChips` ×2 app (single source of truth). Data đã có từ S69 (Mig 53) — chỉ chưa render ở `PeListPanel` + `InboxPage` (chỉ tree-list + detail có). FE-only, 0 BE. | anh Kiệt |
| #321 | `398b01d` | PE **focus mode**: bấm phiếu → overlay full-bleed trượt từ phải, ẩn menu+list, phiếu full-width tự cuộn + panel duyệt. + responsive laptop nhỏ. | anh Kiệt |
| #322 | `3b98845` | **Revert** list về layout gốc (3-panel bám-trái lấp-đầy, KHÔNG canh giữa). Anh: "giữ như cũ" (overlay quá tay). Recover từ FD process-death. | anh |
| #323 | `94e0e12` | **Mig 57** `AddPeSuggestedPriceNotes` (ô ghi chú giá đề xuất PRO/CCM, 2 cột nvarchar(1000)) + **số phân cách VND** (`VndInlineEdit`/`BudgetCell`) + sửa chính tả "Bản"→"Bảng so sánh giá" + **guard #70** stale-echo. | Tra Sol + anh Kiệt |
| #324 | `e42d103` | Số âm → **đỏ + ngoặc** `(5.000.000)` hàng 7/8/9 (đồng bộ hàng "So sánh" đã có `fmtVndSigned`). | Tra Sol |
| #325 | `e29391e` | Mục con **thụt dòng + gạch đầu dòng** (`BudgetRow +indent`) phân biệt mục có-số (1-9, cha) vs không-số (con). | Tra Sol |
| #326 | `b5aa72d` | Cờ gấp authz **BẤT ĐỐI XỨNG**: GẮN = NV chức năng (Procurement/CostControl/Admin) / GỠ = chỉ **Trưởng phòng** (`DeptManager` + role chức năng) hoặc Admin. Handler `SetPurchaseEvaluationUrgent` gate theo `IsUrgent`; FE nút gate theo trạng thái hiện tại. | Tra Sol (clarify giữa-chừng) |
| #327 | `fa6654b` | **Tách chọn-phiếu (inline 3-panel "như cũ") khỏi mở-rộng (overlay)** + nút **"Xem mở rộng"** (`Maximize2`) mỗi dòng. `?expand=1` decouple `?id`: click row=inline (wide) / overlay (narrow); "Xem mở rộng"=id+expand; Thu gọn=bỏ expand giữ id; approve/đóng=về list. | anh (annotate) |
| #328 | `424131d` | **Chuông báo người duyệt** khi phiếu vào cấp họ (submit + mỗi approve-advance). `LogTransitionAsync` +block: `toPhase==ChoDuyet` → resolve current-level approvers (step.Levels Order==CurrentApprovalLevelOrder, exclude actor) → `NotifyManyAsync` Generic "Phiếu cần bạn duyệt". Best-effort, V2-only. BE-only no-mig. | Bích Phượng + Tra Sol |
| #329 | `e823694` | **Banner phiếu Trả lại** ở chế độ Xem (readOnly) hướng dẫn ✏️ Sửa → "Lưu & Gửi Duyệt" (nút submit chỉ hiện khi Sửa). | Bích Phượng |
## Cách chạy (orchestration)
- **em-main** điều phối + tự review diff TRƯỚC mỗi commit + commit/push + chốt scope.
- **frontend-designer ×3** (focus #321 / revert #322 / decouple #327) — FD2 visual loop, nhưng backend `:5443` DOWN cả buổi → stub-verify layout (gotcha #3); live authed verify = post-deploy (anh UAT).
- **implementer-frontend** — pill #320 + notes/separator/spelling #323 (2 app SHA-mirror).
- **implementer-backend ×2** — Mig 57 #323 + approver-notify #328.
- **test-specialist ×3** — suggested-price notes +7 (#323) · urgent authz **symmetric → asymmetric REDO** (#326, do Tra Sol clarify sau khi đã dispatch).
- **cicd-monitor ×10** — verify từng deploy (run + bundle rotate + Mig + smoke); 10/10 PASS.
## Bài học
1. **Review-TRƯỚC-deploy bắt 3 lỗi mà "build PASS" KHÔNG thấy** (đều là runtime, không phải compile):
- **guard #70 (stale-echo):** ô ghi chú giá đề xuất dùng absolute-set echo từ server-snapshot → lưu giá rồi lưu chú liên-tiếp đè mất. impl-FE bê đúng echo nhưng SÓT `peFetching` guard (đã có ở bảng ngân sách S76). Em-main grep-so-với-budget-pattern → vá.
- **luật cờ-gấp bất-đối-xứng:** Tra Sol clarify GIỮA-CHỪNG (sau khi em đã dispatch test-specialist cho luật symmetric "TP cho cả gắn+gỡ") → luật cuối = GẮN-NV/GỠ-TP. Em fix BE+FE + REDO test (1 vòng test-specialist thừa). **Lesson: spec đang được người dùng clarify realtime → confirm luật TRƯỚC khi dispatch sub-agent (tránh redo).**
- **double-mount (Task H):** FD viết comment "render khi chọn && CHƯA mở rộng" nhưng code điều-kiện sót `!isExpand` → inline `PeDetailTabs`/`PeWorkflowPanel` mount SAU overlay khi expand. Intent-comment ≠ implementation → em-main review render-condition + vá.
2. **frontend-designer process-death giữa Task H** (CLI thoát) → in-process state mất, task FAILED. Recovery: tin **disk/git truth** (edit hoàn-chỉnh trên disk + build PASS) — em-main build-verify + mirror fe-admin + commit, KHÔNG re-spawn (agent-kill recovery, `feedback_agent_kill_recovery`).
3. **Batch rapid tweaks:** anh fire tinh-chỉnh liên-tục → em gom build+verify trước, deploy tuần-tự, verify từng cái độc lập (cicd). 10 deploy nhưng mỗi cái isolated → dễ rollback + UAT từng bước. 0 production bug lọt.
4. **Backend-down (gotcha #3):** FD2 visual loop chạy stub layout-shell (backend :5443 down) → layout verify OK nhưng live-data verify defer post-deploy. Build PASS + em-main logic review = đủ tin để deploy; anh UAT confirm.
## §L auto-maintain (light — product session)
- **§L.a error-ledger:** 0 bug-production (3 lỗi bắt PRE-deploy = success của review-gate, không phải bug lọt). Không AS-class hit mới. test-spec REDO = process-inefficiency (clarify-after-dispatch) — ghi lesson, không RCA formal.
- **§L.b:** (a) STATUS Recently Done +S77 ✅ · (c) chore-flag = curate L1 over-cap (archive-gate dry-run: reviewer 45KB/cicd 37.6KB/inv 35.6KB keep-floor-hit manual; FD/test-spec WATCH; **A7 GATE PASS 186/186** integrity OK); sleep-check = last_sleep 2026-06-18 <7d, KHÔNG cần · (d) flush = 5 sub self-flush MEMORY khi return (git-status verified: cicd/FD/impl-BE/impl-FE/test-spec modified) · (e) pending = UAT items + carry logged specifics · (f) harvest = self-flush (KHÔNG dùng run-trace folder session này, toàn Agent-tool spawn lẻ) · (g) tooling-freshness = KHÔNG đổi skill/plugin/roster (toàn product).
- **Infra-adoption:** N/A (no infra/governance adoption product-only session).
## 🔴 NEXT SESSION
- **Em (carry GẤP):** curate L1 over-cap reviewer **45KB** + cicd-monitor 37.6KB + inv-codebase 35.6KB (keep-floor-hit **manual SPLIT/condense** newest large entries, KHÔNG auto-drain; archive integrity A7 PASS chỉ L1-hot truncate on-inject). FD 26KB / test-spec 27.7KB WATCH strike-1. Làm như op tập-trung (precedent S70/S71).
- **UAT (anh/anh Kiệt/Tra Sol/Bích Phượng):** cờ gấp GỠ chỉ TP · chuông báo người duyệt · banner Trả-lại · "Xem mở rộng" · ô ghi chú PRO/CCM · số phân cách + số-âm-đỏ-ngoặc + indent.
- **Ops giữ S58/S59:** tzutil VPS UTC+7 · anh Chương email typo · 5 real-staff pw · gán CNTT. **Monthly audit 2026-07-01:** re-tier STATUS/HANDOFF (history bloated) · docs/CLAUDE count-flush (Mig 57, test 354) + schema §16+ Mig 32-57.