b223466ded0145907994f1195b2c64fd9fff43fc
359 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| b223466ded |
[CLAUDE] Docs: setup RAG Framework v1.3 governance + eval framework
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m52s
- docs/governance/README.md: Path B delegation stub → AI_INFRA canonical Phase/BC vocabulary documented (9 phase + 10 BC SOLUTION_ERP-specific) - .claude/rag.json: add _decision_log block (10 rationale entries) + add .claude/agents/**/*.md to corpus_paths (fix Case D harvest gap) - eval/evaluator.md: inline executor spec v1.0 (Spec A strict) - eval/golden-set-solution_erp.jsonl: 14-entry golden set v1.1 (5 gotcha + 3 pattern + 3 decision + 3 negative) - eval/runs/2026-05-26-baseline-v1.0-failed.json: v1.0 attempt recall@5=0.455 FAIL — root cause diagnosis Case A/C/D - eval/runs/2026-05-26-baseline-v1.1-pending.json: v1.1 attempt pending CLI restart for accurate numbers - eval/trial-state-lock.json: 2-section split (quality_gate + drift_monitor) per v1.3 §6.2, 4-week milestones 2026-05-26 → 2026-06-23 CRITICAL lesson: bootstrap.py --project flag overrides collection name only. Use --config D:\...\SOLUTION_ERP\.claude\rag.json for correct project root. Old projects.json had root_path=AI_INFRA for solution_erp (Anti #24) — FIXED. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
|||
| c506919d7d |
[CLAUDE] Skill: S27 audit late drift fix include batch (mig 26→31, gotcha 44→49)
3 file skill modified bởi S27 audit late (drift trigger +8 gotcha vượt §9.4 threshold) — committed log `docs/changelog/skill-audit-2026-05-late.md` đã ghi chi tiết 5 patches, NHƯNG 3 file SKILL.md tự thân chưa được include trong commit batch S29 wrap `e199603` (em main quên git add `.claude/skills/`). Changes confirm S27 audit late patches: - .claude/skills/README.md: ef-core-migration cell `26 mig → 31 mig` + Session marker `S19 → S23 t1 (Mig 31 F2 per-Approver-slot)` + docs/gotchas count `44 → 49 bẫy` - .claude/skills/dependency-audit-erp/SKILL.md: gotcha count `41 → 49 bẫy` - .claude/skills/ef-core-migration/SKILL.md: description `26 mig → 31 mig` + heading `26 → 31 migration hiện có` + Tests note `77 → 111 test pass` + DbSet cho 59 bảng note `26 → 31 mig` Verify: - git diff 3 file content already match docs/changelog/skill-audit-2026-05-late.md spec → S27 patches confirmed apply - KHÔNG drift NEW post S29 — chỉ catch-up include batch missing CI skip per paths-ignore (.claude/skills/** match docs-only pattern). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| e199603420 |
[CLAUDE] Docs+Memory: Session 29 FINAL wrap — Plan CA + Plan B Contract V2 cumulative
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m31s
20 commits S29 push 4 CI Runs PASS (#229+#230 Plan CA, #231+#232 Plan B).
2 big plans END-TO-END deployed prod.
Changes (docs + memory + scripts — CI skip per paths-ignore):
docs/:
- STATUS.md: S29 FINAL wrap header với cumulative summary 20 commits +
multi-agent ROI ~565K + 8 patterns NEW + state stats (33 mig, 60 tables,
51 gotcha, 14 AppRoles, 34 active users, 4× bundle rotate)
- HANDOFF.md: S29 FINAL wrap header với end-to-end V2 capability + pending S30+
follow-up (anh restart CLI MCP RAG hot-reload, UAT verify V2, test bundle
Plan B, curate dedicated session)
- gotchas.md: +gotcha #51 INFRASTRUCTURE vs DEMO seed phân biệt (Plan B
Hotfix CICD lesson) với decision tree + seed classification table
- changelog/sessions/2026-05-22-s29-plan-ca-plan-b-contract-v2-wire.md:
Session log đầy đủ 20 commits + 4× Smart Friend pattern proven + 8
patterns NEW + file-touched list + NEW capability end-to-end test plan
.claude/agent-memory/:
- 4 MEMORY.md flush S29 wrap entry FIFO each agent perspective:
- Investigator (25.2 KB just over threshold) — Plan CA + Plan B pre-flight
2 spawn + 3 patterns NEW (terrain map, V1+V2 coexist, reference templates)
- Implementer (35.4 KB over hard threshold, defer curate S30) — 5 spawn
cookie-cutter + E3 stopped + Pattern 12-bis NEW (cross-module entity mirror)
- Reviewer (23.0 KB compacted) — 4 spawn 2 MAJOR catches + Cat 3 security
cross-module validation foundation reinforced
- CICD Monitor (24.9 KB) — 4 Runs verify + CRITICAL DemoSeed gate catch +
Stage 4.6 sqlcmd seed verify foundation + Discovery #6 gotcha #51 cross-ref
- implementer/pattern_master_page_mirror.md (NEW Plan CA Chunk B Pattern 16-bis)
scripts/:
- plan-ca-{verify-menu,verify-perms,run-perms}.{sql,ps1} (5 verify scripts)
- plan-b-{verify-prod,run-verify}.{sql,ps1} (2 verify scripts)
Smart Friend pattern proven 4× cumulative S22 #44 + S25 #48 + S29 Reviewer
#ApplicableType + S29 CICD #DemoSeed.
Pending S30+:
- Anh restart CLI hot-reload MCP RAG cho 4 sub-agents (commit
|
|||
| 38f1c4d2d9 |
[CLAUDE] Infra: Plan B Hotfix CICD — SeedSampleContractWorkflowV2 OUT of DemoSeed gate
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m32s
CICD Monitor post-deploy verify (Run #231 SUCCESS) caught CRITICAL: SeedSampleContractWorkflowV2Async nested inside `if (!demoSeedDisabled)` branch → prod has DemoSeed:Disabled=true (Plan T S23 t10) → seed SKIP → QT-HD-V2-001 KHÔNG tồn tại prod → Drafter Workspace dropdown V2 EMPTY → V2 contract path BLOCKED end-to-end UAT. Fix: PROMOTE SeedSampleContractWorkflowV2 ra ngoài DemoSeed gate. Lý do architectural: - Sample workflow là INFRASTRUCTURE config (như Roles + Departments + Catalogs) - KHÔNG phải demo data wipeable - Production cần để Drafter create V2 contract - Admin có thể edit/delete/disable qua Designer sau seed (idempotent skip) Pattern lesson reusable cross-project: phân biệt INFRASTRUCTURE seed (always run) vs DEMO seed (gated by flag). Bảng phân loại: - INFRASTRUCTURE always: Roles, Departments, Catalogs, MenuTree, AdminPerms, Templates - DEMO gated: DemoUsers (30 sample, Plan T disabled prod), DemoContracts, DemoPE, SampleWorkflows - INFRASTRUCTURE NEW post-S29: SampleContractWorkflowV2 (cần cho V2 path work) Verify: - dotnet build PASS 0 err - Mig 32 + Mig 33 prod đã apply (Run #231 success) - Sample seed sẽ chạy on next IIS recycle post-push - Idempotent: skip nếu QT-HD-V2-001 already exists (rare race admin tự seed Designer trước) Post-deploy expect: - ApprovalWorkflows table +1 row Code=QT-HD-V2-001 ApplicableType=3 IsActive=1 IsUserSelectable=1 - Drafter login fe-user → /contracts/new → Workspace dropdown "Quy trình duyệt V2" có 1 option CICD Monitor ROI: caught BEFORE bro UAT 401/empty dropdown experience. Smart Friend guard pattern proven 4× cumulative S22 #44 + S25 #48 + S29 Plan B Reviewer ApplicableType + S29 Plan B CICD DemoSeed gate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 3e92584238 |
[CLAUDE] App: Plan B Hotfix Reviewer — CreateContractCommand validate ApplicableType=Contract
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m30s
Reviewer pre-push verify (agentId ace4799) catch MAJOR security gap: CreateContractCommand thiếu validation guard rằng ApprovalWorkflowId pin phải có ApplicableType=Contract(3). Attacker forge POST body với V2 PE workflow ID (ApplicableType=1/2 DuyetNcc) → contract pin sai workflow type → Service ApproveV2Async sẽ run pattern PE workflow trên Contract entity → behavior nondeterministic + audit log nhầm. Fix: Mirror PE pattern PurchaseEvaluationFeatures.cs:62-77. Validation block thêm vào CreateContractCommandHandler.Handle sau activeWfId query: 1. Load aw entity by Id (throw NotFound nếu invalid Guid) 2. Verify aw.ApplicableType == Contract(3) (throw Conflict nếu mismatch) Defense-in-depth: FE Workspace dropdown (Chunk D |
|||
| 14feb6955d |
[CLAUDE] FE-Admin+FE-User: Plan B Chunk E3 — ContractDetailPage Section 5 LevelOpinionsV2 dynamic
Em main solo sau Implementer E3 stuck mid-task. Minimum viable mirror PE Section 5 LevelOpinionsSectionV2 pattern. V2 contract pin ApprovalWorkflowId → render dynamic Section 5 với opinion data UPSERT từ Service ApproveV2Async (Plan B Chunk B2 |
|||
| 48f6d22b3d |
[CLAUDE] App: Plan B Chunk E2 — ContractDetailDto +ApprovalWorkflowId + LevelOpinions[] populate
Mirror PE PeDetailBundle pattern. Expose V2 workflow state cho FE Section 5
Chunk E3 (Implementer pending) render dynamic LevelOpinionsSectionV2.
Changes:
- ContractDtos.cs:
- ContractDetailDto +3 fields (default null backward compat):
- Guid? ApprovalWorkflowId (V2 pin)
- int? CurrentApprovalLevelOrder
- List<ContractLevelOpinionDto>? LevelOpinions
- NEW record ContractLevelOpinionDto (mirror PE 12 fields)
- ContractFeatures.cs GetContractQueryHandler:
- Load LevelOpinions via 3-step JOIN (ContractLevelOpinions + ApprovalWorkflowLevels.Include(Step) + Users)
- Map to ContractLevelOpinionDto với StepOrder/Name + LevelOrder/Name + Approver/SignedBy resolve
- OrderBy StepOrder + LevelOrder
- Null fallback Comment "" (CS8604 silence)
- Empty list khi V2 pin nhưng KHÔNG có opinion (workflow start lúc Drafter trình)
- Skip load nếu V1 (ApprovalWorkflowId null) → null marker FE detect
FE Chunk E3 sẽ:
- Detect V2 mode qua `bundle.approvalWorkflowId != null`
- Fetch ApprovalFlow shape via existing /api/approval-workflows-v2/{ApprovalWorkflowId}
- Render Section 5 dynamic forEach Step → forEach Level → 1 OpinionBox với opinion data from LevelOpinions[]
Verify:
- dotnet build PASS 0 err, 0 warn (clean)
- dotnet test 111/111 PASS — 0 regression
- V1 legacy contract Detail unchanged (ApprovalWorkflowId=null + LevelOpinions=null)
Plan B chain status (8/9 chunks done):
- A1
|
|||
| 62b50d112b |
[CLAUDE] FE-Admin+FE-User: Plan B Chunk D — ContractCreatePage Workspace V2 Select dropdown
Mirror PE PeWorkspaceCreateView Workspace pattern. Drafter pick V2 workflow IsUserSelectable=true filter ApplicableType=Contract(3). Changes × 2 app: - Add useQuery fetch /api/approval-workflows-v2?applicableType=3 + filter client-side isUserSelectable=true (mirror PE Mig 25 pattern) - Add Select dropdown "Quy trình duyệt V2 (tùy chọn)" trong ContractHeaderForm (create mode panel 2) - Wire approvalWorkflowId vào CreateContractCommand POST body - Conditional UI: blank = V1 fallback auto pick (7 prod contract behavior giữ nguyên); user pick V2 → pin ApprovalWorkflowId Mig 32 schema - Hint khi 0 workflows V2 admin ghim → message rõ V1 fallback Verify: - npm run build × 2 app PASS 0 TS err (1.32MB fe-user, 1.40MB fe-admin) - Mirror 2 app §3.9: +44 LOC mỗi file = +88 LOC total byte-similar - API endpoint /api/approval-workflows-v2 existing (Mig 25 Plan AA S24) - BE CreateContractCommand.ApprovalWorkflowId field đã add Chunk E1 (em main commit prior) — FE wire safe - Backward compat: V1 contract path unchanged khi user bỏ trống dropdown Plan B chain (6 chunks): - A1 |
|||
| b51fc94ca6 |
[CLAUDE] Skill: Add MCP RAG tools cho 4 sub-agent definitions
Add mcp__rag-unified__search_memory + mcp__rag-unified__cross_project_search vào tools list 4 agents (Investigator + Implementer + Reviewer + CICD Monitor). Tại sao: - Sub-agent spawn KHÔNG inherit MCP server access từ parent session - 4 agents previously CHỈ có Read/Grep/Glob/Bash → re-read MD files manually - Plan B pre-flight Investigator phải Read PE Mig 22-26 thủ công thay vì 1 RAG query - Plan CA Reviewer Cat 1 wire claim verify KHÔNG retrieve historical gotcha cross-session - Plan CA Hotfix 1 silent sidebar drop nếu Implementer có RAG → catch Pattern 16-bis trước commit Trade-off accepted (anh chốt full 4 agents): - Token cost spawn cao hơn (~5-10K extra per RAG query) - Risk noise dilute focus → mitigate by skill-specific prompt focus Pitfall #1 reinforced (S27 multi-agent setup): - Session đang chạy KHÔNG hot-reload registry - Anh restart Claude Code CLI để spawn S30+ pick up MCP RAG tools - Plan B Chunk D Implementer đang chạy dùng config CŨ (no MCP) — KHÔNG affect Verify post-restart (Anh): - Spawn test Investigator → call mcp__rag-unified__search_memory thử - Pass = MCP tools loaded; Fail = YAML syntax issue (fallback wildcard mcp__rag-unified__*) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| ef2330871d |
[CLAUDE] App: Plan B Chunk E1 — CreateContractCommand +ApprovalWorkflowId V2 pin field
Mirror PE CreatePurchaseEvaluationCommand pattern. Drafter pick V2 workflow qua Workspace Select dropdown (Chunk D FE Implementer running parallel) → ApprovalWorkflowId pin lúc create. Fallback V1 auto activeWfId nếu null (7 prod contract giữ behavior). Changes: - CreateContractCommand record +Guid? ApprovalWorkflowId = null (optional) - Handler line 96 wire entity.ApprovalWorkflowId = request.ApprovalWorkflowId - Both V1 + V2 fields persist (Service ApproveV2Async branch dispatch theo V2 first) Verify: - dotnet build PASS 0 err - Backward compat: existing caller (KHÔNG pass ApprovalWorkflowId) → fallback null - V1 contract path UNCHANGED Plan B chain status: - A1 |
|||
| 1f199b01a5 |
[CLAUDE] Infra: Plan B Chunk B2 — UPSERT ContractLevelOpinion + ResolveActorFullName helper
Replace TODO marker trong Chunk B |
|||
| 26c98d3c11 |
[CLAUDE] Domain+App+Infra: Plan B Chunk C — Mig 33 ContractLevelOpinions cookie-cutter mirror PE Mig 26
- Domain/Contracts/ContractLevelOpinion.cs (NEW entity mirror PE — AuditableEntity, 4 field core + 2 nav) - Domain/Contracts/Contract.cs (+LevelOpinions nav collection) - Migrations/20260522052240_AddContractLevelOpinions.cs (3-file rule: .cs + .Designer.cs + Snapshot) - Configurations/ContractLevelOpinionConfiguration.cs (NEW separate file, mirror PE pattern) - IApplicationDbContext.cs + ApplicationDbContext.cs (+DbSet<ContractLevelOpinion>) UNIQUE composite (ContractId, ApprovalWorkflowLevelId) — 1 row per HĐ × Level. FK Cascade Contract + Restrict ApprovalWorkflowLevel. SignedByUserId KHÔNG nav (denorm SignedByFullName tránh cascade khi xoá user). Mirror PE Mig 26 pattern (S19 2026-05-09) EXACT — UPSERT row khi Approver duyệt qua Service ApproveV2Async (Plan B Chunk B em main |
|||
| 138469db4e |
[CLAUDE] Infra+App: Plan B Chunk B — Service ApproveV2Async branch + gen mã HĐ adapt
Mirror PE PurchaseEvaluationWorkflowService.cs:ApproveV2Async (line 446-634).
V1 legacy giữ behavior cũ — 7 prod contract chạy nhánh này. V2 mới pin
ApprovalWorkflowId chạy ApproveV2Async helper.
Changes:
- ContractWorkflowService.cs:
- TransitionAsync +skipToFinal=false param F2 (Mig 31 Plan K mirror PE)
- Drafter trình init CurrentApprovalLevelOrder=1 nếu V2 schema pin
- APPROVE STEP branch V2/V1 dispatch theo ApprovalWorkflowId
- +ApproveV2Async helper ~150 LOC (mirror PE pattern):
- Load AW.Steps.Levels OR-of-N
- Match approver actor.Id ∈ pendingLevelGroup.ApproverUserId
- Add ContractApproval row + enrich comment skipPrefix
- skipToFinal F2: AllowApproverSkipToFinal guard + advance pointer last
- Advance level/step normal
- Terminal: gen mã HĐ RG-001 + Phase=DaPhatHanh (khác PE just DaDuyet)
- IContractWorkflowService.cs: TransitionAsync +skipToFinal=false param
- ContractFeatures.cs: caller TransitionAsync use named arg ct: ct (skip optional)
TODO Chunk C: UPSERT ContractLevelOpinion (table chưa tồn tại — Mig 33
sẽ scaffold + entity + EF config). Block UPSERT add ở đây sau Chunk C done.
Verify:
- dotnet build SolutionErp.slnx PASS 0 err, 2 pre-existing DocxRenderer warn
- dotnet test 111/111 PASS (58 Domain + 53 Infra) — 0 regression
- V1 legacy path UNCHANGED (7 prod contract giữ behavior)
Plan B chain (6 chunks):
- A1
|
|||
| a85e437478 |
[CLAUDE] Infra: Plan B Chunk A2 — Mig 32 Contract V2 schema + Configuration + Seed sample workflow
Cookie-cutter mirror PE Mig 23+24 GỘP thành 1 Mig 32 (ADD 2 column +
FK + IX). Mirror Mig 26 pattern cho FK Restrict.
Files added/modified:
- Migrations/20260522051059_AddApprovalWorkflowToContract.cs (3-file rule ✅)
- Migrations/20260522051059_AddApprovalWorkflowToContract.Designer.cs
- Migrations/ApplicationDbContextModelSnapshot.cs (updated)
- Configurations/ContractConfiguration.cs (+HasIndex + FK Restrict ApprovalWorkflows)
- Persistence/DbInitializer.cs (SeedSampleContractWorkflowV2 idempotent QT-HD-V2-001)
Mig 32 Up():
- ADD COLUMN Contracts.ApprovalWorkflowId Guid? NULL
- ADD COLUMN Contracts.CurrentApprovalLevelOrder int? NULL
- ADD INDEX IX_Contracts_ApprovalWorkflowId (filtered NOT NULL)
- ADD FK FK_Contracts_ApprovalWorkflows_ApprovalWorkflowId Restrict
Seed sample workflow (UAT smoke + admin Designer default):
- Code: QT-HD-V2-001 Name: "Quy trình duyệt HĐ mẫu UAT V2"
- ApplicableType: 3 (Contract) IsActive: true IsUserSelectable: true
- 1 Step "Bước 1 - Phòng CCM" + 1 Level + Approver Lê Văn Bình CCM
- Idempotent: skip nếu Code+Version existing
V1 coexist: 7 prod contract giữ WorkflowDefinitionId; V2 mới pin
ApprovalWorkflowId. Service ApproveV2Async (Chunk B em main) sẽ branch.
Verify (Implementer):
- dotnet build SolutionErp.slnx PASS 0 err (em main WIP stashed for verify)
- dotnet ef database update Dev PASS (Mig 32 applied)
- 3-file rule Mig: mig.cs + Designer.cs + Snapshot.cs
Plan B chain (6 chunks):
- A1
|
|||
| 58898e8fbe |
[CLAUDE] Domain: Plan B Chunk A1 — Contract +2 fields V2 (ApprovalWorkflowId + CurrentApprovalLevelOrder)
Mirror PE Mig 22-24 pattern. V1+V2 coexist (7 V1 contract giữ WorkflowDefinitionId, V2 mới pin ApprovalWorkflowId). Fields added: - ApprovalWorkflowId Guid? — pin schema mới ApprovalWorkflowsV2 - CurrentApprovalLevelOrder int? — Cấp đang chờ duyệt (1/2/3) trong Step Service ApproveV2Async branch (Chunk B) sẽ dispatch: - if (contract.ApprovalWorkflowId is Guid awId) ApproveV2Async - else ApproveV1Legacy (giữ behavior 7 V1 contract) Verify: - dotnet build SolutionErp.slnx PASS 0 err, 2 pre-existing DocxRenderer warn - No migration (Chunk A2 sẽ scaffold Mig 32) Plan B chain (6 chunks): - A1 (this) Entity +2 fields (em main) - A2 Mig 32 schema (Implementer Case 2 cookie-cutter) - B Service ApproveV2Async branch (em main critical ~200 LOC) - C Mig 33 ContractLevelOpinions (Implementer) - D FE Workspace V2 (Implementer) - E FE Section 5 LevelOpinionsV2 (Implementer) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 6eec8d78fb |
[CLAUDE] Docs+Memory: Plan CA wrap — gotcha #50 + Implementer Pattern 16-bis + STATUS
docs/gotchas.md: - Add gotcha #50 "Page move cross-app Layout.tsx resolvePath staticMap missed mirror → silent sidebar drop" - Reference Hotfix 1 commit |
|||
| e55d96b856 |
[CLAUDE] FE-User: Plan CA Hotfix 1 — Add 7 master/catalog leaf routes vào resolvePath staticMap
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m24s
Bug UAT bro screenshot 2026-05-22: eoffice sidebar group "DANH MỤC" expand chỉ thấy "Danh mục chi tiết" (Catalogs sub-group), 3 leaf Suppliers/Projects/ Departments + 4 sub-catalog leaves KHÔNG render. Root cause: fe-user/src/components/Layout.tsx:238 `MenuLeaf` component `if (!path) return null` → silent drop khi resolvePath(key) trả null. Implementer Chunk B ( |
|||
| 68bceddabb |
[CLAUDE] Infra: Plan CA Chunk D2 hotfix — Password ≥12 chars cho catalog.manager (S22+2 policy)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m31s
Reviewer spawn pre-push verify catch CRITICAL bug Chunk D |
|||
| 4a592cfadb |
[CLAUDE] Infra: Plan CA Chunk D — Seed demo user catalog.manager + role CatalogManager
DbInitializer.cs SeedDemoUsersAsync array thêm 1 entry: - Email: catalog.manager@solutions.com.vn (password default User@123456 per SeedDemoUsersAsync logic) - FullName: "NV Quản lý Danh mục" - Dept: PRO (Cung ứng) - Position: "Nhân viên Quản lý Danh mục Dùng chung" - Roles: [AppRoles.CatalogManager] Cấp 1 demo user mặc định để bro UAT login fe-user verify 9 menu danh mục (Master + Suppliers + Projects + Departments + Catalogs + 4 sub-catalogs). Admin có thể tạo thêm user gán role CatalogManager qua /system/users + /system/permissions Matrix tự reflect 9 menu key. Verify: - dotnet build SolutionErp.slnx PASS 0 err, 2 pre-existing DocxRenderer warn - Idempotent: SeedDemoUsersAsync skip nếu user existing email - DbInitializer chạy mỗi lần API startup → demo user auto-seed lên prod sau deploy Plan CA wrap (4 chunk): - A |
|||
| c995f42e0d |
[CLAUDE] FE-Admin+FE-User: Plan CA Chunk C — Sidebar filter 2 app (admin HIDE + user SHOW)
fe-admin/src/components/Layout.tsx: - Add ADMIN_HIDDEN_MASTER_KEYS Set với 9 menu key danh mục - Extend isAdminHidden predicate: hide Ct_* + ADMIN_HIDDEN_MASTER_KEYS - Master/Suppliers/Projects/Departments/Catalogs/4 sub-catalogs giờ ẩn khỏi admin sidebar fe-user/src/components/Layout.tsx: - Remove `Master, Suppliers, Projects, Departments` khỏi USER_HIDDEN_KEYS - Catalogs (root + 4 leaf) auto-visible qua tree-inherit từ Master - Giữ ẩn `System, Users, Roles, Permissions, Forms, Reports` (admin tools) Verify: - npm run build × 2 app PASS 0 TS err - fe-admin bundle `index-BQidGwKU.js` 1,404 KB gz 357 KB (rotate) - fe-user bundle `index-Co8LTtad.js` 1,317 KB gz 342 KB (rotate) - Pattern 5 (mirror 2 app §3.9) applied — cùng 1 plan touch 2 file Layout Plan CA chain: - Chunk A |
|||
| 80d39a06fb |
[CLAUDE] Domain+Infra: Plan CA Chunk A — Add role CatalogManager + seed 9 menu CRUD
- AppRoles.cs +CatalogManager const + update All array (6 LOC)
- DbInitializer.cs RoleLabels +CatalogManager ("DM", "Nhân viên Quản lý danh mục")
- DbInitializer.cs +SeedCatalogManagerPermissionsAsync() method ~50 LOC
- Wire seed call vào SeedAdminPermissionsAsync chain (idempotent, mirror SeedPePermissionDefaults pattern)
Permission scope: 9 menu key CRUD all true
- Master (root) + Suppliers + Projects + Departments
- Catalogs (root) + CatalogUnits + CatalogMaterials + CatalogServices + CatalogWorkItems
Verify:
- dotnet build SolutionErp.slnx PASS 0 err, 2 pre-existing DocxRenderer warn
- Idempotent: skip per-(role,menuKey) existing row
- 0 FE touch (Chunk B Implementer parallel commit
|
|||
| 06a441cf4e |
[CLAUDE] FE-User: Plan CA Chunk B — Move 4 master pages từ fe-admin → fe-user
- Copy SuppliersPage/ProjectsPage/DepartmentsPage/CatalogsPage (948 LOC mirror) - Extend menuKeys.ts với 5 key Catalogs* (CatalogUnits/Materials/Services/WorkItems) - Add 7 route App.tsx (/master/suppliers + /master/projects + /master/departments + 4 catalogs tab) - fe-user component parity verified (DataTable, PageHeader, PermissionGuard, 6 shadcn ui) Verify: - fe-user npm run build PASS 0 TS err (1916 modules, 14.14s) - 4 file SHA256 byte-identical mirror fe-admin (all 4 hash match) - 0 BE touch (Chunk A em main solo parallel) Pending Chunk C: sidebar filter 2 app (fe-admin HIDE 9 menu, fe-user SHOW) Pending Chunk D: smoke verify + role demo user Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 3cb54e032e |
[CLAUDE] Docs: Session 26 FINAL wrap — 2 architectural decisions + RAG indexing verify
Anh chốt 2 decisions cuối session sau commit
|
|||
| bf93abd467 |
[CLAUDE] Docs: Session 26 chốt cuối — 6 Plan AG series PE tree view + Plan AI RAG global MCP setup
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m39s
Update: - docs/STATUS.md: Last updated S26 cumulative wrap - docs/HANDOFF.md: TL;DR S26 chốt cuối với 3 pattern reusable NEW - docs/changelog/sessions/2026-05-21-s26-pe-tree-view-rag-setup.md: NEW session log đầy đủ - docs/guides/multi-agent-setup-guide.md: NEW ~750 lines onboarding 4 dự án future - .claude/agent-memory/*/MEMORY.md: 4 agent flush S26 entries - .claude/rag.json: NEW project config cho RAG bootstrap Plans done S26: - Plan AG/AG2/AG3/AG4/AG5/AG6 — 6 commits 0bf6c7e..d99069a PE List tree view UI iteration - Plan AI Phase 0-4 — RAG global MCP setup (Voyage-4-large + Qdrant Windows native binary v1.18.0 NO Docker + FastMCP 3.3.1 stdio + SQLite FTS5 BM25 + RRF k=60 + Anthropic Contextual Retrieval prepend) - SOLUTION_ERP bootstrap: 126 files → 2,392 chunks indexed 60.9s (~484K Voyage tokens = 0.24% free tier 200M/month) Multi-agent ROI S26: 5 spawn (Inv 2 audit 5Q + RAG distribution research 4 study cases + Imp 1 Case 2 + Rev 1 pre-commit + CICD 1 Run #222) ~123K + em main solo Plan AG2-AG6 polish + Plan AI Phase 0-4 ~280K = ~28% solo equivalent. 3 patterns reusable cross-project NEW S26: 1. Pattern 19 Implementer — HTML native <details>/<summary> + Tailwind named groups (group/proj+year+sup) + localStorage Set<string> cho hierarchical 3-level tree UI when no Accordion lib 2. RAG User-level Global MCP — 1 server localhost serve N project + per-project .claude/rag.json (Approach A — 1 dev solo scenario, không phải team VPS) 3. Qdrant Windows native binary deployment — no Docker overhead, qdrant-x86_64-pc-windows-msvc.zip 28.3MB chính thức GitHub release Pending S27+: - Memory CURATE 4 agent (cicd-monitor 74KB OVER 50KB hard threshold URGENT) - Plan AI Phase 5 bootstrap 4 project còn lại (NamGroup/DH Y Dược/Ashico/Vipix) - Plan AI Phase 6 file watcher + Windows Task Scheduler Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| d99069a305 |
[CLAUDE] FE-User+FE-Admin: Plan AG6 — Compact PE card 3 row gọn đẹp
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m21s
Anh feedback 2026-05-21: "Cho thông tin bên trong này nó gọn đẹp lại nhé". PE card hiện 4-5 row hơi dài. Compact xuống 3 row tightly packed: Row 1: [Tên gói thầu] [Status badge] Row 2: PE/2026/A/035 · 10:40 19/05/2026 Row 3: 👤 Drafter · Phòng ban [✓ HĐ if any] Changes: - py-2.5 → py-2 (compact vertical padding) - Drop Type label "Duyệt NCC" badge redundant (page header đã hiện) - Combine maPhieu + createdAt vào 1 row với separator · - Combine drafter + department + contract badge vào 1 row (conditional render) - "✓ Đã tạo HĐ" → "✓ HĐ" short label inline cuối row 3 - Separator color slate-300 nhẹ hơn slate-500 Verify: - npm build fe-user PASS 0 TS err 1292.66 KB (gzip 337.19 KB) - npm build fe-admin PASS 0 TS err 1404.01 KB (gzip 357.70 KB) - 2 file SHA256 IDENTICAL 3645307C... (mirror §3.9) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 083b601ea4 |
[CLAUDE] FE-User+FE-Admin: Plan AG5 — PE List tree 3-level Project > Năm > NCC > PE
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m32s
Anh feedback 2026-05-21: "Folder cấp dưới dự án là theo năm và dưới năm là theo NCC nhé". Plan AG3 chỉ 1-level Project > PE. Plan AG5 extend xuống 3 cấp: Năm + NCC. Group structure: - Level 1: 📁 Project (bg-slate-50, font-medium 13px) - Level 2: 📅 Năm {year} (border-l ml-3, 12px) - Level 3: 🏢 NCC (border-l ml-3, 12px, italic slate-400 nếu "Chưa chọn NCC") - Leaf: PE card (border-l ml-3, giữ nguyên content) Sort: - Project A-Z (vi locale) - Năm DESC (2026 trước 2025) - NCC A-Z (vi locale) - PE within NCC: createdAt DESC Fallback: - empty projectName → "(Dự án đã xoá)" - selectedSupplierName null (PE chưa DaDuyet) → "(Chưa chọn NCC)" group + italic style Drop redundant selectedSupplierName line trong PE card (đã hiện ở NCC group header). localStorage keys: - Project: projectId - Năm: `${projectId}::y${year}` - NCC: `${projectId}::y${year}::s${supplierId|'_none_'}` Verify: - npm build fe-user PASS 0 TS err 1292.68 KB (gzip 337.18 KB) 1907 modules - npm build fe-admin PASS 0 TS err 1404.02 KB (gzip 357.70 KB) 1926 modules - 2 file SHA256 IDENTICAL E5FE4979... (mirror §3.9) - KHÔNG BE change, KHÔNG Mig, KHÔNG test (UAT mode) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 2bf01184ca |
[CLAUDE] App+FE-User+FE-Admin: Plan AG4 — bổ sung Drafter + Department vào PE List card
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m27s
Anh UAT 2026-05-21: PE card danh sách thiếu người tạo + phòng ban tạo. Bổ sung 4 field qua BE JOIN Users + Departments LEFT (cả 2 nullable theo PE entity). BE — 4 file: - PurchaseEvaluationDtos.cs: +4 fields DrafterUserId/DrafterName/DepartmentId/DepartmentName - PurchaseEvaluationFeatures.cs ListHandler: JOIN Users + Departments LEFT, projection +4 - PurchaseEvaluationFeatures.cs InboxHandler: mirror JOIN + projection +4 - CreateContractFromEvaluationFeatures.cs ListApproved: mirror JOIN + projection +4 FE — 4 file × 2 app mirror: - types/purchaseEvaluation.ts: PeListItem +4 fields - pages/pe/PurchaseEvaluationsListPage.tsx: PE card render thêm dòng "👤 {drafterName} · {departmentName}" giữa Mã phiếu và Supplier. Conditional: chỉ render khi có ít nhất 1 field. Verify: - dotnet build clean 0 err - dotnet test SolutionErp.slnx 111/111 PASS (58 Domain + 53 Infra) — no regression - npm build fe-user PASS 0 TS err 1290.31 KB (gzip 336.79 KB) 1907 modules - npm build fe-admin PASS 0 TS err 1401.66 KB (gzip 357.30 KB) 1926 modules - 2 FE PE List file SHA256 IDENTICAL C6996194... (mirror §3.9) - KHÔNG Mig (chỉ DTO + projection extend) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| fbad4a9251 |
[CLAUDE] FE-User+FE-Admin: Plan AG3 — PE List tree consistent (drop single-PE flat branch)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m19s
Anh feedback 2026-05-21: "nếu có 1 thì cũng để tương tự luôn nhé, đừng để khác các thằng kia". Plan AG2 render single-PE project flat card + UPPERCASE label phía trên — khác phong cách với multi-PE project (folder <details>). UX inconsistent. Plan AG3 drop nhánh single-PE flat. Mọi dự án dù 1 hay nhiều PE đều render <details> folder collapsed với badge count "(N)" — consistent visual. Diff: -60 LOC (drop entire single-PE flat block). Verify: - npm build fe-user PASS 0 TS err - npm build fe-admin PASS 0 TS err - 2 file SHA256 IDENTICAL 749FF703... (mirror §3.9) - KHÔNG BE change, KHÔNG Mig, KHÔNG test (UAT mode) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| c5429c0d10 |
[CLAUDE] FE-User+FE-Admin: Plan AG2 — Simplify PE List tree 1-level + Panel 1 widen 400px
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m29s
Anh feedback Plan AG (2-level Project > Gói thầu > PE) cầu kỳ quá. Simplify xuống 1-level + widen panel cho dễ đọc. 3 changes: 1. Panel 1 widen 340px → 400px (lg:grid-cols-[400px_1fr_360px]) 2. Drop GoiThauGroup nested type + inner <details> tree, useMemo group 1-level Project > PE[]; PE sort by createdAt DESC trong group (mirror BE sort) 3. Smart render: single-PE project → flat card (no <details> wrapper, project name UPPERCASE label inline) / multi-PE project → <details> tree expand 4. localStorage key rename 'pe_list_expanded_projects' (drop ::gtKey composite suffix) UAT visual: dự án solo PE hiện flat (không cần click expand), dự án có nhiều phiếu render tree compact. Drop redundant projectName ở PE card (đã có ở group header / UPPERCASE label). Verify: - npm build fe-user PASS 0 TS err 1291.76 KB (gzip 336.90 KB) 1907 modules - npm build fe-admin PASS 0 TS err 1403.10 KB (gzip 357.41 KB) 1926 modules - 2 file SHA256 IDENTICAL 37520D01... (mirror §3.9) - KHÔNG BE change, KHÔNG Mig, KHÔNG test (UAT mode per feedback_uat_skip_verify) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 0bf6c7ec63 |
[CLAUDE] FE-User+FE-Admin: Plan AG Chunk A+B+C — PE List tree view 2-level Project > Gói thầu
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m39s
UAT feedback bro Tra Sol 2026-05-21: UI Duyệt NCC flat list "đám rừng" → tree view giống Outlook folder. Phase 1 FE-only mirror 2 app §3.9 — KHÔNG schema mới (Phase 2 ProjectPackage defer sau UAT confirm). Chunk A — Data transform useMemo group: - Map<projectId, Map<normalizedGoiThau, PeListItem[]>> - Normalize TenGoiThau: trim + toLowerCase, display raw đầu tiên trong group - Sort: Project A-Z + gói thầu A-Z (vi locale) - Fallback: "(Dự án đã xoá)" empty projectName + "(Chưa phân loại)" empty TenGoiThau - Filter (pendingMe → DaGuiDuyet) áp dụng TRƯỚC group Chunk B — UI render <details>/<summary> 2-level: - Replace flat <ul><li> bằng nested <details> HTML native (no shadcn Accordion — gap component lib) - 📁 Project + 📄 Gói thầu icon + count badge inline - Chevron rotation via Tailwind group-open/proj + group-open/gt named groups - PE card content preserve nguyên (line 209-248 unchanged) Chunk C — Expand state localStorage persist: - Key 'pe_list_expanded_groups' Set<string> - Project level key: projectId; Gói thầu level key: ${projectId}::${normalizedGoiThau} - Default empty Set (all collapse) — bro Tra Sol expect Outlook-style closed default Verify: - npm build fe-user PASS 0 TS err 1291.33 KB (gzip 337.00 KB) 1907 modules 16.05s - npm build fe-admin PASS 0 TS err 1402.68 KB (gzip 357.51 KB) 1926 modules 6.86s - KHÔNG BE change, KHÔNG Mig, KHÔNG test (UAT mode per feedback_uat_skip_verify) Pending: Reviewer pre-commit + CICD Run #222 verify Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 0c6efdaf4f |
[CLAUDE] Docs: Session 25 chốt cuối — Plan AB→AF cumulative 7 commits + 4 agent MEMORY flush
S25 wrap final: - STATUS.md + HANDOFF.md prepend Plan AB→AF cumulative narrative (7 commits cdfd542..506cada + 7 CICD Runs #215-#221) - gotchas.md +2 NEW entries: - #48 Multi-Changelog.Add() SQLite frozen-clock tie-break (Run #215 catch, fix Plan AB Chunk A2) - #49 UI dual-phase badge confusion khi state machine self-loop (Plan AD drop + extractNextTargetHint helper) - Checklist debug bug mới +2 entries (24-25) - Session log NEW docs/changelog/sessions/2026-05-19-s25-pe-history-visibility.md (~360 LOC) - 4 agent MEMORY drift sync: - investigator/MEMORY.md (30→32KB) FIFO entry S25 wrap + count metadata - implementer/MEMORY.md (34→36KB) FIFO entry + patterns 16-18 saved - reviewer/MEMORY.md (31→32KB) FIFO entry + lesson SQLite tie-break + UAT skip risk reinforced - cicd-monitor/MEMORY.md (~72KB CRITICAL OVER) — 7 Run entries #215-#221 + curate flag MAX Memory user-level +2 NEW entries (separate commit memory dir, KHÔNG trong this commit): - feedback_fe_merge_synthetic_audit.md (Plan AC2 pattern) - feedback_fe_usermap_fallback.md (Plan AF pattern) Stats final S25: - 31 mig (no schema) · 59 tables · ~146 endpoints · 35 FE pages - 111 test unchanged (UAT defer test-after per §7) - 49 gotcha (+2: #48 + #49) - 23 memory user-level (+2 NEW S25 patterns) - 6 skills · 4 sub-agents active - 7 commits cumulative S25 · 7 CICD Runs (1 FAIL caught + 6 PASS) - 6× bundle rotate × 2 app (Run #220 BE-only unchanged) Critical pending S26+: - Memory curate cicd-monitor PRIORITY MAX (~72KB strongly over hard threshold) - Plan B Contract V2 wire HIGH priority (5-6 chunk pre-allocated S23 HANDOFF) Per §6.5 KEEP narrative — KHÔNG cut rationale/gotcha context, chỉ phân tầng prepend latest. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 506cada86b |
[CLAUDE] FE-User FE-Admin: Plan AF — userMap fallback resolve historical entries pre-Plan AE
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m23s
Bro UAT 2026-05-19 post-Plan AE: phiếu cũ entries vẫn show "Hệ thống" thay
vì user name. Plan AE chỉ forward fix — entries CŨ pre-deploy có
userName="" empty, FE fallback "Hệ thống".
Fix Plan AF — Option A bro chốt (FE fallback lookup, no DB write):
ApprovalsTab + HistoryTab build userMap useMemo từ PeDetailBundle data
có sẵn (KHÔNG cần extra fetch /api/users admin permission):
- ev.drafterUserId + ev.drafterName
- ev.approvals[].approverUserId + approverName
- ev.approvalFlow.steps[].levels[].approvers[].userId + fullName
- ev.levelOpinions[].signedByUserId + signedByFullName
- ev.departmentOpinions[].userId + userName
resolveUserName / resolveActorName helper:
1. Trust entry.userName nếu non-empty
2. Lookup userMap qua entry.userId
3. Fallback 'Hệ thống' nếu không match
Cover gần hết users tham gia phiếu (drafter + approver + signer). Edge
case: user edit phiếu nhưng KHÔNG xuất hiện trong workflow → vẫn fallback.
Pattern reusable: synthetic data recovery cho audit trail từ embedded
domain data sources, no extra API contract change.
Mirror 2 app §3.9 identical logic.
Verify:
- npm build × fe-user PASS 0 TS err (9.12s)
- npm build × fe-admin PASS 0 TS err (8.91s)
- BE unchanged from
|
|||
| 9ea62be6a7 |
[CLAUDE] PurchaseEvaluation: Plan AE — fix Changelog UserName 9 sites (Budget Adjust + 8 preventive)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m25s
Bro UAT 2026-05-19 post-S25 Plan AD: "Điều chỉnh ngân sách" entry trong Lịch sử thay đổi show "Hệ thống" thay vì tên user thật (Phan Văn Chương / NV CCM). Audit phát hiện systemic bug — 9 Changelog.Add sites trong PE features MISSING UserName field, FE fallback "Hệ thống" toàn bộ. Fix Plan AE — preventive batch (8 sites khác chắc chắn bro sẽ phát hiện sau): PurchaseEvaluationFeatures.cs (4 sites): - line 120 Tạo phiếu - line 149 Hạng mục mặc định - line 228 Cập nhật thông tin phiếu (UpdateDraft) - line 379 Điều chỉnh ngân sách (Budget Adjust) — bro feedback chính PurchaseEvaluationDetailFeatures.cs (5 sites): - line 167 Thêm hạng mục (Detail Insert) - line 225 Cập nhật hạng mục (Detail Update) - line 257 Xóa hạng mục (Detail Delete) - line 317 Cập nhật báo giá (Quote Update — inside if block, 16-space indent) - line 342 Thêm báo giá (Quote Insert) - line 377 Xóa báo giá (Quote Delete) - line 416 Chọn NCC trúng thầu (Select Winner) Pattern: `UserName = currentUser.FullName ?? currentUser.Email` — ICurrentUser đã có FullName + Email từ JWT claims, KHÔNG cần inject userManager mới. Verify: - dotnet build clean 0 err 2 warn (pre-existing DocxRenderer) - dotnet test 111/111 PASS Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 0aaf2df04a |
[CLAUDE] FE-User FE-Admin: Plan AD — Lịch sử duyệt redesign drop phase badges + next-target hint
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m24s
Bro UAT 2026-05-19 post-Plan AC2 deploy: phase badges "Đã gửi duyệt →
Đã gửi duyệt" gây nhầm (Reject event nhìn giống Approve, không rõ gửi
duyệt cho ai).
Fix Plan AD — Option A bro chốt:
1. DROP fromPhase→toPhase badges entirely khỏi ApprovalsTab — redundant
visual noise khi 3/4 mode return giữ Phase=ChoDuyet, và misleading cho
user thấy "Đã gửi duyệt → Đã gửi duyệt" lặp lại.
2. ADD next-target hint parse từ comment via helper extractNextTargetHint():
Approve patterns:
- Comment "sang Cấp X" → "→ Cấp X"
- Comment "sang Bước X" → "→ Bước X (Cấp 1)"
- Comment "[Duyệt vượt cấp tới Cấp cuối]" → "→ Vượt cấp tới Cấp cuối"
- toPhase=DaDuyet(20) → "→ Đã duyệt hoàn tất"
Reject patterns:
- Comment "không lùi được" → "→ Không lùi được"
- Comment "Người chỉ định" + Bước/Cấp → "→ Trả về Người chỉ định (Bước X Cấp Y)"
- Comment "Người soạn thảo"/"Drafter" → "→ Trả về Người soạn thảo"
- Comment "Trả về 1 Cấp"/"Trả về Cấp X" → "→ Lùi về Cấp X" / "→ Lùi 1 Cấp"
- Comment "Trả về 1 Bước"/"Trả về Bước X" → "→ Lùi về Bước X" / "→ Lùi 1 Bước"
- toPhase=TuChoi(99) → "→ Từ chối hoàn toàn"
3. Layout cleaner: [Decision badge] [Next-target hint] flex-wrap min-w-0 +
timestamp shrink-0 right. Comment + actor stays below.
4. Cleanup import: drop unused PurchaseEvaluationPhaseColor (no longer
needed after dropping phase badges). Keep PurchaseEvaluationPhaseLabel
(still used at line 157+ for InfoTab phase label).
Mirror 2 app §3.9 identical logic.
Verify:
- npm build × fe-user + fe-admin PASS 0 TS err
- BE/test unchanged from
|
|||
| 25837b6220 |
[CLAUDE] FE-User FE-Admin: Plan AC2 — FE merge view recover historical Reject events PE cũ
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m22s
Bro UAT 2026-05-19 phản hồi sau Plan AC deploy: phiếu cũ PE/2026/A/032 vẫn KHÔNG show events Trả lại pre-deploy (Bro test trả lại Phan Văn Chương → Trà từ TRƯỚC |
|||
| a734bf2b8b |
[CLAUDE] PurchaseEvaluation: Plan AC — fix Lịch sử duyệt panel show Trả lại + Duyệt vượt cấp
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m27s
Bro UAT 2026-05-19 screenshot: panel "Lịch sử duyệt" KHÔNG show Return mode events (Bro Trả lại từ Phan Văn Chương → Trà missing) + KHÔNG distinct event Duyệt vượt cấp (skipToFinal F2). Root cause: - PurchaseEvaluationApprovals.Add() chỉ ở Approve branch (line 472 V2 + 660 V1) - Reject branch line 75-103 NEVER adds Approval row — chỉ log Changelog - skipToFinal advance branch line 532-572 dùng existing line 472 row nhưng comment KHÔNG distinct "vượt cấp" semantic vs approve thường Fix Plan AC: 1. BE Service.cs Reject branch (line 75-103): capture pre-call Step/Level trước ApplyReturnModeAsync mutate pointer, add Approval row sau khi mutate: Decision=Reject + FromPhase + ToPhase=evaluation.Phase + Comment carry from-position + mode summary. Cover cả Trả lại (TraLai+pointer-mode) + Từ chối (TuChoi terminal). 2. BE Service.cs line 472 Approve branch: enrich Comment với prefix "[Duyệt vượt cấp tới Cấp cuối]" khi skipToFinal=true để Lịch sử duyệt distinguish vượt cấp với approve thường. 3. FE PeDetailTabs.tsx × 2 app ApprovalsTab: add Decision badge phân biệt Approve (emerald) / Trả lại (amber) / Từ chối (rose). Vì 3/4 mode Trả lại (OneLevel/OneStep/Assignee) giữ Phase=ChoDuyet → fromPhase→toPhase badge giống Approve. Decision badge bù visual phân biệt. Verify: - dotnet build clean 0 err 2 warn (pre-existing DocxRenderer) - dotnet test 111/111 PASS - npm build × fe-user + fe-admin PASS 0 TS err Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 8c05947176 |
[CLAUDE] Tests: Plan AB Chunk A2 — fix Plan M tests filter LogTransition entry post Plan AB
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m16s
Plan AB Chunk A thêm Changelog entry mới (EntityType=Workflow + Summary
"Trả lại (...)" + ContextNote=null) trong ApplyReturnModeAsync end-of-function.
Plan M edge case tests (OneLevel_AtStep1Level1 + OneStep_AtStep1) assert
ContextNote.Contains("không lùi được") qua OrderByDescending(CreatedAt) — SQLite
frozen test clock cùng CreatedAt 2 entry → tie-break non-deterministic → pick
Plan AB entry (ContextNote=null) → FAIL.
Fix: Test query filter by Summary.Contains("Chuyển phase") để pick đúng
LogTransitionAsync entry (chứa "không lùi được" trong ContextNote).
Verify:
- dotnet test SolutionErp.slnx — 111/111 PASS (58 Domain + 53 Infra)
- KHÔNG đụng code Plan AB Chunk A — code stays clean, tests get more specific
- Pattern saved: multi-Changelog.Add() per transaction → tests filter by EntityType/Summary discriminator
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|||
| cdfd54212c |
[CLAUDE] PurchaseEvaluation: Plan AB Chunk A — fix Changelog visibility Bug 1 Budget Adjust + Bug 2 Return Mode
Some checks failed
Deploy SOLUTION_ERP / build-deploy (push) Failing after 1m6s
- BE ApplyReturnModeAsync 4 mode add Changelog.Add() common path (refactor Drafter early return) - FE PeDetailTabs.tsx HistoryTab filter extend cover Header+ngân sách (B1) + Workflow+Trả lại (B2) - FE empty placeholder + comment update reflect new filter scope - Mirror 2 app §3.9 Bug 1: Budget Adjust handler đã log (Header+Update) nhưng FE filter strict TraLai-only Bug 2: Return mode Service không log Changelog — chỉ approval phase transition Verify: - Build clean 0 err - npm build × 2 app pass 0 TS err - 111 test baseline preserve (UAT skip test-after defer) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| e23f51c42e |
[CLAUDE] Docs: Session 24 chốt cuối - Plan AA cumulative 7 commits + 4 agent MEMORY drift wrap
S24 wrap deliverables:
Docs:
- docs/STATUS.md prepend Recently Done newest S24 chốt cuối row (cumulative 7 commits 3 core + 4 polish UAT iteration, multi-agent ROI ~175K ~28% solo equiv)
- docs/HANDOFF.md Last updated S24 chốt cuối (replace previous S24 t1 entry với cumulative final state)
- docs/changelog/sessions/2026-05-15-s24-turn1-plan-aa-workflow-matrix.md EXTEND
- Phase 2 Polish iteration UAT feedback section (4 commit detail):
- Polish 1
|
|||
| ee0902ac13 |
[CLAUDE] FE-User FE-Admin: Plan AA wrap fix - sidebar label dài wrap về đầu hàng + text smaller
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m25s
UAT feedback 2026-05-15 sau Run #213 deploy: bro screenshot sidebar label custom Mig 27 dài "1. Duyệt Nhà Cung Cấp - Thầu phụ (NCC -TP)" wrap 2 dòng, dòng 2 "(NCC -TP)" indent SAU icon thay vì về đầu hàng. Root cause: flex container [items-center, gap-2] + inner span chứa Icon + label text → text wraps within INNER span (đã indent past icon area). Pattern phù hợp cho 1-dòng label, KHÔNG phù hợp khi multi-line. Fix pattern (3 sites fe-user + 2 sites fe-admin mirror rule §3.9): - MenuGroup button: flex → relative block + inline-block icon + inline text + absolute ChevronDown right. Text wrap về left edge button (under icon). - MenuLeaf NavLink: flex → block + inline-block icon + inline text. - StaticLeaf NavLink (fe-user only): mirror MenuLeaf pattern. Smaller text: - text-[13px] → text-[12px] (medium label group + leaf) - text-sm (14px) → text-[12px] (MenuLeaf top level) - text-[12px] → text-[11px] (MenuLeaf deep level) - leading-snug (1.375) compact 2-line height Icon adjust: -mt-0.5 align with inline text baseline. Button px-3 pr-7: pad right 28px reserve cho absolute ChevronDown (KHÔNG bị đẩy xuống khi label wrap). Verify: - npm run build fe-user PASS clean 432ms - npm run build fe-admin PASS clean 494ms Em main solo CSS polish < 30 min (criteria #6 REFUSE Implementer). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| fbbd361929 |
[CLAUDE] FE-User: Plan AA redesign v2 - Table layout rowSpan tận dụng full width + 7 label tiếng Việt + color coding 2 layer
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m14s
UAT feedback 2026-05-15 sau Run #212 deploy: bro request layout DẠNG TABLE tận dụng hết width thay vì stack vertical panel-per-NV (visual rộng theo chiều ngang). Refactor WorkflowCard structure → 4-col HTML table với rowSpan: Table cols: | Bước (Phòng) | Cấp | NV duyệt | Quyền duyệt | | rowSpan=N | rowSpan=M | per-NV | grid 2-col 7 checkbox | - Bước column: rowSpan = total NV trong Step. Header tone đậm Step palette. - Cấp column: rowSpan = N NV cùng Order (OR-of-N). Badge ring Cấp palette. Nếu N > 1: hint "N NV OR (chỉ cần 1 NV duyệt)". - NV duyệt column: 1 row per NV slot. Tên + email gray. - Quyền duyệt column: grid grid-cols-1 md:grid-cols-2 với 7 checkbox label: - 4 return mode (col-span-1): "Trả về 1 Cấp trước" / "Trả về 1 Bước trước" / "Trả về Người chỉ định" / "Trả về Drafter (mặc định)" - 3 long label (col-span-2): "Cho phép chỉnh sửa Section 2 (Hạng mục/NCC/Báo giá) lúc đang duyệt" / "Cho phép chỉnh sửa Section ngân sách lúc đang duyệt" / "Cho phép duyệt thẳng Cấp cuối khi đang duyệt" Color coding 2 layer preserved: - Step (Bước) bg + headerBg: blue/purple/emerald/amber/pink cycle (5 màu) - Cấp badge: violet/sky/teal/orange/rose cycle (5 màu) - NV + Quyền duyệt cell: bg-white/80 (lighten Step tone, vẫn show through) Helper extracted `buildStepRows(step)` build flat Row[] với rowSpan metadata (isFirstInStep + isFirstInCap + rowSpanStep + rowSpanCap). Drop StepBlock + NvPermissionPanel components (chuyển inline table cells). colgroup width hint: Bước=160px / Cấp=100px / NV=240px / Quyền duyệt=1fr (rest). Tại 1280-1366px viewport (laptop nhỏ Plan AA sidebar widen) Quyền duyệt cell ~400-500px → grid 2-col fit 7 label OK. Verify: - npm run build fe-user PASS clean 0 TS err, 522ms, 1907 modules - Bundle 1284.22 KB (+1.31 KB from baseline) Em main solo CSS/UX redesign (criteria #2 + #4 Implementer REFUSE — UX layout decision rowSpan grouping + cell distribution decision). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 4d60598369 |
[CLAUDE] FE-User: Plan AA redesign - WorkflowMatrixViewPage panel-per-NV layout + color coding 2 layer (Step/Cấp)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m20s
UAT feedback 2026-05-15 sau Run #211 deploy: bro request hiển thị rõ ràng giống admin Designer (panel per NV + 7 label tiếng Việt) + màu sắc khác nhau giữa Cấp duyệt + giữa Phòng ban để phân biệt. Redesign WorkflowMatrixViewPage.tsx ~250 LOC (drop table 11 cột symbol khó hiểu): NEW layout per Step (Phòng): - Step container có unique color (cycle 5 màu: blue/purple/emerald/amber/pink) - Step header bar với tone đậm: "Bước N — Phòng X" - Group levels theo level.order → 1 Cấp group = N NV panel song song (OR-of-N) - Cấp badge có unique color (cycle 5 màu: violet/sky/teal/orange/rose) - "1 NV duyệt" hoặc "N NV (OR-of-N — chỉ cần 1 NV duyệt là qua Cấp)" hint - NV permission panel mirror admin Designer line 853-949: - Header "QUYỀN DUYỆT {NV name} {email}" amber-700 uppercase - 7 checkbox label tiếng Việt rõ (read-only disabled accent-emerald): 1. Trả về 1 Cấp trước 2. Trả về 1 Bước trước 3. Trả về Người chỉ định 4. Trả về Drafter (mặc định) 5. Cho phép chỉnh sửa Section 2 (Hạng mục/NCC/Báo giá) lúc đang duyệt 6. Cho phép chỉnh sửa Section ngân sách lúc đang duyệt 7. Cho phép duyệt thẳng Cấp cuối khi đang duyệt - Grid 2-col cho 4 return mode + col-span-2 cho 3 Allow* label dài - Inactive label slate-400, active slate-800 font-medium Color palette (Tailwind JIT — full class strings array): - STEP_PALETTE: 5 màu cycle theo sIdx % 5 - LEVEL_PALETTE: 5 màu cycle theo (level.order - 1) % 5 Drop FlagCell table cell helper. Replace với StepBlock + NvPermissionPanel + FlagRow components. Verify: - npm run build fe-user PASS clean 0 TS err, 423ms, 1907 modules - Bundle 1282.91 KB (+0.32 KB from baseline — minor add new components) Em main solo CSS/UX redesign decision (criteria #2 Implementer REFUSE — UX flow decision needed cho color palette + layout structure). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| da218f1dd4 |
[CLAUDE] FE-User: Plan AA hotfix - WorkflowMatrixViewPage container px-6 → px-2 (dịch content sang trái)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m18s
UAT request 2026-05-15 sau deploy Run #210: bro muốn matrix view content sát sidebar trái thay vì gap 24px (px-6) — tận dụng width gain từ Plan AA sidebar widen + remove truncate. Fix 1 line `WorkflowMatrixViewPage.tsx:43` container: - px-6 (24px) → px-2 (8px) - py-5 (20px) giữ nguyên - PageHeader title + WorkflowCard + Table cùng shift left -16px Verify: - npm run build fe-user PASS clean 0 TS err, 486ms, bundle 1282.59 KB unchanged Em main solo CSS polish trivial < 30 min (per criteria #6 Implementer REFUSE). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| ac2c85901a |
[CLAUDE] Docs: Plan AA Chunk C - S24 t1 wrap session log + STATUS+HANDOFF + 3 agent MEMORY drift
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m25s
Documentation deliverables:
- docs/STATUS.md Recently Done newest entry S24 t1 (gop 3 commit + multi-agent ROI table + pattern reinforced 4 lessons)
- docs/HANDOFF.md "Last updated S24 t1" prepend on top (cumulative carry S23 chốt cuối)
- docs/changelog/sessions/2026-05-15-s24-turn1-plan-aa-workflow-matrix.md NEW ~9KB
- Q&A 2 lượt chốt spec (Permission strategy + Matrix layout)
- Pre-A Investigator findings 5Q + 3 surprises critical
- Chunk A BE+Layout breakdown (MenuKeys + DbInitializer INSERT-OR-UPDATE-Order
+ Handler filter + Controller pass-through + sidebar widen + revert Plan U truncate)
- Chunk B FE matrix page + types + App.tsx route
- Chunk C Reviewer cumulative verdict (PASS 0 blocker)
- Stats trước-sau + Multi-agent ROI table (~150K total ~25% solo equiv)
- 4 pattern reinforced cross-project reusable
- Pending S24+ checklist (7 items)
Agent MEMORY drift (auto-updated by agents + Investigator manual touch):
- .claude/agent-memory/investigator/MEMORY.md +1 FIFO entry S24 Pre-A audit
- .claude/agent-memory/implementer/MEMORY.md +1 FIFO entry S24 Chunk B PASS
- .claude/agent-memory/reviewer/MEMORY.md +1 FIFO entry S24 cumulative verify PASS
Stats S24 t1 chốt:
- 31 mig (no Mig mới)
- 59 tables
- ~146 endpoints (+1 GET filter param)
- 35 FE pages (+1 WorkflowMatrixViewPage)
- 111 test (unchanged UAT mode)
- 47 gotcha
- 21 memory user-level
- 6 skills
- 4 sub-agents (3 spawn S24 t1)
- 3 commits Plan AA push remote:
|
|||
| c6678022f7 |
[CLAUDE] FE-User: Plan AA Chunk B - WorkflowMatrixViewPage read-only matrix view + types extend
NEW files:
- pages/pe/WorkflowMatrixViewPage.tsx ~215 LOC
- useQuery GET /approval-workflows-v2?applicableType=N&isUserSelectable=true
- PageHeader "Luồng duyệt — {label}" + Network icon
- Loading/Error/Empty state 3 variant rõ
- WorkflowCard per ghim version: header (code/version + badge "Đang dùng" emerald + "Được ghim" amber Pin icon)
- Table 10 cột read-only: Bước rowSpan | Cấp | NV duyệt + 7 Allow* flag (✓/—)
- FlagCell helper component TS indexed-access type union 7 keys
- Mirror admin Designer ApprovalWorkflowsV2Page layout (drop edit mutations)
- types/approvalWorkflowV2.ts ~55 LOC
- 5 type subset: AwLevelDto + AwStepDto + AwDefinitionDto + AwTypeSummaryDto + AwAdminOverviewDto
- Field name khớp BE record positional param (history not versions)
MODIFIED:
- App.tsx +import + Route /purchase-evaluations/workflow-matrix trước /workspace
Why:
- Chunk A BE đã wire endpoint với filter param + menu seed Pe_DuyetNcc_WfView
cho user xem matrix workflow admin Designer ghim trước khi tạo phiếu.
Verify:
- npm run build fe-user PASS clean 0 TS err, 1907 modules, 2.61s
- Reviewer cumulative A+B PASS 0 critical/major/minor
Pending Chunk C: Docs session log + STATUS + HANDOFF + 4 agent MEMORY drift.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|||
| ee776d5745 |
[CLAUDE] Domain+App+Api+FE-User+FE-Admin: Plan AA Chunk A - BE IsUserSelectable filter + menu seed Pe_DuyetNcc_WfView + sidebar widen w-72 xl:w-80 + revert Plan U truncate
BE changes:
- MenuKeys.cs +helper PurchaseEvaluationWorkflowView(typeCode) => "Pe_{typeCode}_WfView"
- DbInitializer.cs SeedMenuTreeAsync:
- tree.Add LuongDuyet (Order=2 first child) cho 2 type PE
- INSERT-only loop -> INSERT-OR-UPDATE-Order (shift existing prod rows Order+1)
- Idempotent: skip nếu Order match, UPDATE nếu mismatch
- DbInitializer.cs SeedPurchaseEvaluationPermissionDefaultsAsync +WfView leaf cho 7 role Read
- ApprovalWorkflowV2AdminFeatures.cs GetAwAdminOverviewQuery +IsUserSelectable bool? = null
+ handler conditional Where(d => d.IsUserSelectable == ius)
- ApprovalWorkflowsV2Controller.cs Overview signature +[FromQuery] bool? isUserSelectable
pass-through to mediator (gotcha #44 fix preserved class-level [Authorize] bare)
FE Layout changes (mirror 2 app rule §3.9):
- fe-user resolvePath regex (List|Create|Pending|WfView) + route
/purchase-evaluations/workflow-matrix?type=N
- fe-user + fe-admin sidebar w-60 xl:w-72 -> w-72 xl:w-80 (+48/+32px gain)
- Revert Plan U S23 t11 truncate × 5 sites (3 fe-user MenuGroup+MenuLeaf+StaticLeaf
+ 2 fe-admin MenuGroup+MenuLeaf). Keep min-w-0 flex-1 + shrink-0 + title
tooltip (no harm). Bro request hiển thị đầy đủ label custom Mig 27 dài.
Why:
- User UAT request 2026-05-15: thêm menu "Luồng duyệt" trên Danh sách hiển thị
ma trận phân quyền workflow V2 admin Designer ghim ra cho user xem trước khi
tạo phiếu. Filter IsUserSelectable=true (Mig 25).
- Sidebar Plan U S23 t11 truncate hiển thị "..." → bro muốn full label.
Widen sidebar +32-48px + bỏ truncate cho phép wrap natural khi cực dài.
Verify:
- dotnet build SolutionErp.slnx PASS clean 0 err 2 warn pre-existing DocxRenderer
- Investigator Pre-A confirm gotcha #44 đã fix permanent từ 2026-05-08
- Reviewer cumulative PASS 0 critical / 0 major / 0 minor blocker
Pending Chunk B: FE WorkflowMatrixViewPage.tsx ~215 LOC + types + App.tsx route.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|||
| a1a910f576 |
[CLAUDE] Docs: Chunk S23-Wrap — Session 23 chốt cuối cumulative (11 plan + 32 commits)
Bro chốt session S23 — 9 yêu cầu wrap:
1. **Flush 4 agent MEMORY.md cumulative S23 t4-t11:**
- Investigator (+2 entries Plan R audit + Plan P FE wire audit)
- Implementer (+1 entry cumulative REFUSE Plan N-U em main solo)
- Reviewer (+1 entry cumulative em main self-review Plan N-U + Smart
Friend pattern reusable)
- CICD Monitor (+4 entries Run #204 Q + #207 T + #208 T5+T6 + #209 U
PASS verify)
2. **Update MD docs:**
- STATUS.md: Last updated S23 t12 chốt cuối + stats final cumulative
- HANDOFF.md: TL;DR S23 t12 đầy đủ + Plan tree summary
- Session log new: 2026-05-15-s23-turn11-plan-u-sidebar-truncate.md
3. **Skill list:** 6 project-specific skills unchanged
(contract-workflow + permission-matrix + form-engine + ef-core-migration
+ dependency-audit-erp + iis-deploy-runbook) — agent allocation
preserved (no new skill, no audit due — next 2026-06-01)
4. **Unit test verify:** 111/111 PASS unchanged
(58 Domain + 53 Infra = +7 cumulative S23 từ 104 baseline pre-Plan M)
5. **Memory user-level update:**
- feedback_per_nv_permission_scope.md +1 section S23 t6 CRITICAL HOTFIX
Plan P (wire 10 surface points — point 10 Controller body record
mirror count check)
- NEW feedback_demo_seed_flag_disable.md (Plan T pattern reusable
cross-project)
- MEMORY.md index +1 entry NEW + update existing entry narrative
- 21 memory entries total (+1 từ 20)
6. **§6.5 KEEP narrative discipline:** preserved — không cắt narrative
any MD, chỉ phân tầng cumulative qua sections riêng (Reinforcement
S22+5 → S23 t1 → t3 → t4 → t5 → t6 each separate section trong
per_nv_permission_scope).
7. **Plan tree chốt cuối S23 11 plan:**
K (Mig 31 F2 refactor 9c) → L (UAT bug 5c) → M (F1 edge case 4c) →
N (per-NV lookup 2c) → O (4 sites cascade 2c) → P (Controller body
record 1c) → Q (FE banner CSS 1c) → R (cleanup test data 1c) →
S (wipe ALL workflows 1c) → T (DemoSeed flag 2c) → U (sidebar
truncate 1c) = 32 commits total cumulative S23
8. **Release verify ALL PASS:**
- CI runs: #195 K10 + #199 L + #200 M + #201 N + #202 O + #203 P +
#204 Q + #207 T + #208 T5+T6 + #209 U — 10 verify runs ALL PASS
- HEAD synced với origin/main:
|
|||
| 86d8806afc |
[CLAUDE] FE-Admin FE-User: Chunk U — Sidebar truncate long label + tooltip (Mig 27 DisplayLabel dài wrap fix)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m30s
Bro UAT screenshot 2026-05-15: Submenu "1. Duyệt Nhà Cung Cấp - Thầu phụ
(NCC -TP)" trong sidebar fe-user wrap 2 dòng (label dài ~50 chars vs
sidebar w-60 = 240px chỉ fit ~25 chars).
Root: Admin đã set DisplayLabel custom qua Mig 27 (S20 t7 Menu eOffice
admin page) — `MenuItems.Pe_DuyetNcc` DisplayLabel = "1. Duyệt Nhà Cung
Cấp - Thầu phụ (NCC -TP)" (Label gốc = "Duyệt NCC" ngắn). FE render
{effectiveLabel(node)} thẳng vào span flex KHÔNG có truncate.
Fix Plan U mirror 2 app (rule §3.9):
3 nơi render label trong fe-user/Layout.tsx + 2 nơi mirror fe-admin:
1. MenuNodeRenderer button (accordion toggle):
```diff
- <span className="flex items-center gap-2">
+ <span className="flex min-w-0 flex-1 items-center gap-2">
- <Icon className="h-4 w-4" />
- {effectiveLabel(node)}
+ <Icon className="h-4 w-4 shrink-0" />
+ <span className="truncate" title={effectiveLabel(node)}>{effectiveLabel(node)}</span>
</span>
- <ChevronDown ... transition />
+ <ChevronDown ... shrink-0 ... transition />
```
2. MenuLeaf NavLink:
```diff
- <NavLink to={path} className={cn('flex items-center gap-2.5...')}>
+ <NavLink to={path} title={effectiveLabel(node)} className={cn('flex min-w-0 items-center gap-2.5...')}>
- <Icon className={cn(isDeep ? 'h-3.5 w-3.5' : 'h-4 w-4')} />
- {effectiveLabel(node)}
+ <Icon className={cn('shrink-0', isDeep ? 'h-3.5 w-3.5' : 'h-4 w-4')} />
+ <span className="truncate">{effectiveLabel(node)}</span>
</NavLink>
```
3. StaticLeaf NavLink (fe-user only — Hộp thư static entry):
Pattern tương tự MenuLeaf
fe-admin dùng `node.label` thay vì `effectiveLabel(node)` (admin sidebar
luôn show Label gốc, KHÔNG đụng DisplayLabel per S20 t7 Q2=b).
Pattern key:
- `min-w-0 flex-1` trên flex parent — cần thiết để truncate child shrink
- `shrink-0` trên Icon + ChevronDown — giữ size không co
- `truncate` (Tailwind = overflow-hidden text-ellipsis whitespace-nowrap) trên span text
- `title={label}` tooltip hover show full label nếu user cần đọc đầy đủ
Verify:
- npm run build fe-user PASS 16.79s clean
- npm run build fe-admin PASS 8.16s clean
- 0 TS error
KHÔNG đụng BE. Admin tự control DisplayLabel qua Mig 27 Menu eOffice page
— Plan U chỉ ensure FE render gracefully với label dài (truncate +
tooltip hover) thay vì wrap broken visual.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|||
| 7b7b28f2cd |
[CLAUDE] Scripts Docs: Chunk T5+T6 — Final DELETE + verify NO re-seed loop (Plan T proven active)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m15s
Post-Plan T deploy Run #207 sha=0b97840 PASS — DemoSeed:Disabled flag applied prod via appsettings.json (commit qua git, override appsettings.Production.json gitignored). T5 — Final DELETE sau flag deploy: - scripts/plan-t5-final-cleanup.sql upload qua scp + sqlcmd -i - 3 TRANSACTION DELETE: 4 PE + 1 V2 + 2 V1 = 7 rows direct + cascade child - Post-state: PE=0 + V2=0 + V1=0 + Steps cascade=0 + Levels cascade=0 T6 — Verify NO re-seed loop (FORCE IIS recycle test): - Restart-WebAppPool SolutionErp-Api → app pool Started - Wait BE healthy (curl auth login 200) - sqlcmd verify post-recycle DB state: * PE=0 ✅ NO re-seed * V2 workflows=0 ✅ NO re-seed * V1 workflows=0 ✅ NO re-seed * Users=33 ✅ preserved (SeedDemoUsers KEEP) * Suppliers=19 ✅ preserved (SeedDemoMasterData KEEP) * Projects=9 ✅ preserved (SeedDemoMasterData KEEP) * Contracts=7 ✅ preserved (bro chưa request xóa) → DemoSeed:Disabled flag PROVEN active end-to-end. DbInitializer skip 5 method seed, KHÔNG còn re-seed contaminate sau mỗi deploy. Cumulative Plan R + S + T cleanup: - R: 35 PE + 17 V2 + 4 V1 + ~600 cascade (52 + 600 = 652 rows) - S: 4 workflow + cascade (4 + ~20 = 24 rows) - T5: 7 rows direct + cascade child (~7 + ~30 = 37 rows) - T flag: DbInitializer permanent disable demo seed - TOTAL: ~713 rows wiped + flag persist active Stats final S23 t10: - 31 mig · 59 tables · ~145 endpoints · 34 FE pages - 111 test unchanged · 47 gotcha · 20 memory · 6 skills - 4 sub-agents · backup rollback ready - **0 PE + 0 workflow + flag disable seed** UAT permanent clean slate Bro Designer setup workflow mới from scratch khi UAT continue — KHÔNG còn auto re-seed contaminate. Plan B Contract V2 wire next HIGH priority. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
|||
| 0b97840674 |
[CLAUDE] Infra Api: Chunk T — Disable auto re-seed demo data qua DemoSeed:Disabled flag (appsettings)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m22s
Bro UAT post-Plan R+S phát hiện: 4 phiếu [DEMO]-A/B + 2 V1 workflows + 1
V2 sample TỰ ĐỘNG RE-SEED sau BE deploy commits Plan P+Q+R+S → IIS recycle
→ DbInitializer.InitializeAsync auto-seed lại 5 demo seed methods.
Plan T fix root cause: Config flag `DemoSeed:Disabled` trong
appsettings.json (production default true) → DbInitializer check flag →
skip 5 demo seed methods.
Note: appsettings.Production.json bị .gitignore (chứa secrets prod), nên
em set flag mặc định trong appsettings.json (commit qua git) — production
inherit true. Dev override false trong appsettings.Development.json để
test fresh demo seed local.
Methods SKIP khi DemoSeed:Disabled=true:
1. SeedWorkflowDefinitionsAsync (V1 PE workflow QT-DN-A v1 + QT-DN-B v1)
2. SeedPurchaseEvaluationWorkflowsAsync (V1 PE workflow extended)
3. SeedDemoContractsAsync ([DEMO] HĐ 7-type sample)
4. SeedDemoPurchaseEvaluationsAsync ([DEMO] PE 4 sample with V1 pin)
5. SeedSampleApprovalWorkflowsV2Async (V2 sample mẫu UAT type B)
Methods KEEP (luôn chạy):
- SeedRoles + SeedAdmin + SeedDepartments + SeedDemoUsers (30 UAT users)
- SeedMenuTree + SeedAdminPermissions + SeedDemoMasterData (Supplier/Project)
- SeedContractTemplates + SeedCatalogs + BackfillContractCodes
- BackfillUserEmailDomain (Phase 6 rebrand migration helper)
Files changed:
- src/Backend/SolutionErp.Infrastructure/Persistence/DbInitializer.cs:
+ using Microsoft.Extensions.Configuration
+ Read DemoSeed:Disabled flag từ IConfiguration
+ Log "DemoSeed:Disabled=true — skip ..." khi flag true
+ Wrap 5 method seed conditional `if (!demoSeedDisabled) { ... }`
- src/Backend/SolutionErp.Api/appsettings.json:
+ "DemoSeed": { "Disabled": true } + comment narrative
- src/Backend/SolutionErp.Api/appsettings.Development.json:
+ "DemoSeed": { "Disabled": false } override cho dev
Workflow expected sau deploy:
1. CI deploy commit T → IIS recycle app pool
2. BE startup → DbInitializer reads DemoSeed:Disabled=true
3. Skip 5 demo seed methods → DB state preserved
4. Bro UAT clean slate hoàn toàn — Designer setup workflow mới from scratch
Pending T5: Final DELETE current state (4 PE + 2 V1 + 1 V2 mẫu UAT) sau
deploy applied flag. T6 verify no re-seed loop sau re-deploy.
Verify:
- dotnet build SolutionErp.slnx clean (0 err, 2 warn pre-existing)
- dotnet test SolutionErp.slnx **111/111 PASS** unchanged
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|