- 12 ảnh prod khoanh-đỏ 1→2→3 vào docs/Huong-dan-Duyet-NCC.docx pipeline tự-chế: PowerShell CopyFromScreen + Win32 lọc-process-chrome.exe + DOM overlay element-based + python-docx (MCP save_to_disk KHÔNG ra file env này) - gotcha #74 (chụp-prod-vào-docx) + STATUS/HANDOFF S90 + session log - 0 production code, 0 prod mutation (xem-only), em-main solo Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
8.1 KiB
S90 (2026-06-25) — Chèn 12 ảnh khoanh-đỏ vào guide Word Duyệt NCC (em tự chụp prod) + chẩn UltraViewer
em-main solo · 0 production code · HMW-mode ON. Browser-driving (Chrome-in-Chrome MCP) + scripting (PowerShell/Python) + docx manipulation. KHÔNG sub-agent, KHÔNG Workflow fan-out (task = vòng-lặp thị-giác tuần-tự, không fan-out được).
Anh giao
/session-start → carry S89 "chèn 12 ảnh guide" → "mở chrome vào chụp ảnh dán vào luôn đi nhé". File docs/Huong-dan-Duyet-NCC.docx (tạo S89, 12 ô ảnh trống — mỗi ô = bảng 1×1 có caption mô-tả màn cần chụp + "khoanh đỏ 1→2→3"). Cuối phiên anh hỏi "sao tao thấy có ultraview bật trên máy tao?" → /session-end.
Việc làm
1. Pipeline chụp-prod-vào-docx tự-chế (gotcha #74 NEW)
Vấn đề lõi: mcp__Claude_in_Chrome__computer{screenshot,save_to_disk} + mcp__computer-use__screenshot{save_to_disk} đều "Successfully captured" + trả ID nhưng KHÔNG ra file truy-cập được (search TEMP/LOCALAPPDATA/APPDATA/Downloads/session-dir = rỗng). gif_creator cũng vô-dụng (ảnh tĩnh = 0 frame). → PIL/python-docx không có file để chèn.
Giải (ra PNG thật):
- Chụp — PowerShell
.NET [System.Drawing.Graphics]::CopyFromScreen(sauSetProcessDPIAware) → PNG full-res 2560×1600. Win32 đưa đúng cửa-sổ Chrome lên trước:EnumWindows+GetWindowThreadProcessIdlọc processchrome.exe(⚠️ app Claude-Code Electron cùng classChrome_WidgetWin_1+ title chứa "Solutions ERP" → lọc-theo-title khớp NHẦM) +SetForegroundWindow+ ALT-tap unlock-foreground. - Khoanh đỏ — inject DOM overlay
window.__ccA([{text|q,n,minLeft/maxLeft/minTop/maxTop,exact,up,nth}])element-based (getBoundingClientRect, miễn-nhiễm viewport đổi). Toạ-độ-cứng (rect px) VỠ vì Chrome-screenshot render kích-thước thay-đổi (1456↔1494, 812↔822↔833). Match case-INSENSITIVE (label CSStext-transform:uppercase→textContentmixed-case → exact-uppercase MISS, vd "Dự án" hiển-thị "DỰ ÁN"). LọcminLeft>250để bỏ sidebar (text "Dự án" trùng menu/header bảng). - Crop — bỏ chrome top + taskbar bottom (top=92/bottom=72). ⚠️ Banner CDP "Claude started debugging this browser" hiện sau mỗi
navigate(re-attach), tự ẩn → ảnh ngay-sau-navigate (s08, s12) cần crop top≈146; verify nhanh = montage dải-trên 90px của cả 12 ảnh đọc 1 lần (detector heuristic-color all-True nhầm header trắng = không tin được, montage tin được). - Chèn —
python-docx cell...add_picture(width=Inches(6.0))(A4 content=6.27" → 6.3" TRÀN) + caption "Hình N. " italic gray.
2. 12 màn đã chụp+khoanh+chèn (route map prod)
| # | Màn | Nguồn |
|---|---|---|
| 1 | Đăng nhập | /login (logged-out, email ví-dụ + ô mật khẩu trống) |
| 2 | Menu Duyệt NCC + nút "+ Thêm mới" | /purchase-evaluations/workspace |
| 3 | Form tạo phiếu (Hạng mục/Dự án/Địa điểm) | /workspace?mode=new |
| 4 | Thêm NCC + báo giá | phiếu nháp (Vingroup 5tr) |
| 5 | Quy trình duyệt + Ngân sách kỳ này | ?mode=new |
| 6 | Bảng kiểm + nút "Lưu & Gửi Duyệt" | đáy form |
| 7 | Hộp thư — 9 phiếu chờ duyệt | /inbox |
| 8 | Nội dung phiếu + bảng so sánh giá (2 NCC) | phiếu "18 Sub Chống mối" |
| 9 | Khu Quyết định: Duyệt / Trả lại | phiếu chờ admin duyệt |
| 10 | Luồng duyệt + cờ "Duyệt là KẾT THÚC" | /workflow-matrix |
| 11 | Nút "+ Tạo HĐ từ phiếu" | phiếu Đã duyệt PE/2026/A/017 |
| 12 | Cây Năm>Dự án>Phiếu + Hộp thư + Tổng quan | /purchase-evaluations |
Verify: IMAGE_RELS=13 (1 logo + 12) · mỗi slot 1 ảnh + caption · width 6.0" ≤ A4-content 6.27" · montage 12 dải-trên SẠCH banner. 0 prod mutation (chỉ xem/scroll/screenshot, KHÔNG bấm Gửi/Duyệt/Trả-lại/Tạo-HĐ; ?mode=new không tạo draft tới khi sửa field — auto-save on-edit). anh tự login Admin.
3. Caveats guide (báo anh — carry)
- #9 "Từ chối": app thực-tế chỉ Duyệt + Trả lại (gỡ "Từ chối" từ S60) nhưng text guide (Mục 5 Bước 4 + caption Hình 9) còn ghi "Từ chối" → cần sửa text (chờ anh OK).
- #10 "Duyệt thay CEO": workflow đang dùng (QT-DN-V2-001) chưa bật cờ finalize → không phiếu nào hiện badge "⚑ Duyệt thay CEO" + CEO mờ trên sơ-đồ → em chụp trang Luồng duyệt khoanh cờ "Duyệt là KẾT THÚC quy trình (không trình tiếp CEO)" (nơi bật tính-năng). Muốn ảnh badge thật → bật cờ 1 cấp (Admin) rồi chụp lại.
- #11 Tạo HĐ: khoanh nút "+ Tạo HĐ từ phiếu" nhưng KHÔNG bấm (tránh tạo HĐ thật) → caption "hợp đồng nháp được tạo" chưa có ảnh.
- account=admin: sidebar nhiều menu admin nhân-viên không thấy.
4. UltraViewer (anh hỏi "sao bật")
Chẩn (read-only): UltraViewService (PID 22368) State=Running StartMode=Auto StartName=LocalSystem path C:\Program Files (x86)\UltraViewer\UltraViewer_Service.exe · 0 kết-nối Established (không ai đang điều-khiển) · 0 Run-key (auto qua service). Em KHÔNG mở nó — chỉ grant Google Chrome; computer-use screenshot detect + mask (ẩn) nó vì không trong allowlist. Hướng-dẫn anh tắt self-serve (Stop-Service UltraViewService / Set-Service -StartupType Manual / services.msc) — KHÔNG tự đổi (prohibited-rule "modifying system/security settings" → direct user). Cân-nhắc: nếu IT dùng remote-support thì tắt = mất remote.
Cách chạy / bài học
- Browser-driving = solo, KHÔNG fan-out: task vòng-lặp thị-giác tuần-tự (chụp→kiểm→điều-chỉnh→chụp) — Workflow fan-out không hợp; em-main solo đúng decision-tree (cross-stack tight / interactive).
- MCP save_to_disk KHÔNG đáng-tin để lấy bytes (env này) → native PowerShell
CopyFromScreenlà đường chắc-chắn ra file (gotcha #74). - Annotation element-based >> rect-cứng khi viewport không ổn-định; case-insensitive + min/maxLeft chống collision label-trùng/sidebar.
- Banner CDP inconsistent → montage-verify thay heuristic-color (color-detect nhầm header trắng).
- An-toàn prod:
?mode=newkhông persist tới khi edit; tuyệt-đối không bấm nút mutate.
§L closeout
§L.a: 0 RCA (0 production code/bug; UltraViewer = direct-user KHÔNG vi-phạm system-setting). §L.b(c): test-specialist L1 34.8KB OVER carry · sleep <7d skip · 0-spawn → archive-gate state=start. §L.b(d)(f): 0 sub + 0 runs/ → harvest n-a. §L.b(g): tooling KHÔNG đổi → self-check no-spawn-H1. §L.b(h): 4 Active-High không đổi, 0 governance-mới → n-a chỉ hiển-thị.
📊 Hot-feed %-print cuối phiên (Tầng-1 lead cap 220K)
Ước-lượng: WIP guide-task ~40% · bootstrap-context (STATUS/HANDOFF/README/budget/marks) ~25% · closeout-write ~25% · UltraViewer-diagnostic ~5% · lỗi-lặp/gotcha ~5%. Headroom: vừa — phiên đốt nhiều tool-result browser (ages out), nội-dung-công-việc nạp đủ, KHÔNG nhồi-rác. (Ước-lượng-tỉ-lệ; con-số = quyền anh.)
State
GIỮ NGUYÊN: Mig 59 · 88 bảng · 422 test (45D+377I) · gotcha 74 (+#74) · menu 54 · bundle admin DalcOhvb/user CdS4tX_2 · prod 17 user thật. Chỉ docs/ đổi (docx + STATUS/HANDOFF/gotchas/log) → CI skip.
NEXT
- Anh: review
docs/Huong-dan-Duyet-NCC.docxtrong Word · ⚠️ restart CLI (carry budget v3 +/user-mark-*+ cadence) · (tùy) bật finalize → ảnh #10 badge / bấm tạo HĐ thử → ảnh #11. - Em: sửa text guide "Từ chối"→"Duyệt/Trả lại" nếu anh OK · curate test-specialist L1 34.8KB OVER (carry S88).
- monthly 2026-07-01: tách STATUS/HANDOFF mega-line (≤S87 → session logs, GẤP — không Read được) · ef-core SKILL Mig→59 · 3 vocab-fork alias-map.