P10D-2B Parallel TAC Official Laws Screen Report
P10D-2B — Parallel TAC Official Laws Screen — Report
Date: 2026-04-30
Commit: 5ce3437 (branch main, /opt/incomex/docker/nuxt-repo)
Effort: Low–Medium (2 files, +251 lines)
1. Dirty files trước khi làm
(clean — git status --short returned no output)
2. Files đã đổi
web/pages/knowledge/laws/index.vue— patched (added Section 0: Official Publications card-grid linking to/knowledge/laws/{id})web/pages/knowledge/laws/[pubId].vue— NEW reader page (assembly-only:readItems→buildDocsTree→DocsTreeView+markdownToHtml)
3. git diff --stat
web/pages/knowledge/laws/[pubId].vue | 213 +++++++++++++++++++++++++++++++++++
web/pages/knowledge/laws/index.vue | 38 ++++++
2 files changed, 251 insertions(+)
4. Verify results
| # | Check | Result | Notes |
|---|---|---|---|
| 4A | /knowledge/laws HTTP |
200 | via incomex-nginx → incomex-nuxt:3000 |
| 4B | Directus API: 3 publications | PASS | DIEU-28 v2.0, DIEU-32 v1.1, DIEU-35 v5.2 |
| 4C | /knowledge/laws/<D35-id> HTTP |
200 | UUID 27e48995-d6a1-4a44-8559-cab6a07fdbe0 |
| 4D | HTML grep `DIEU | publications | ...` |
| 5A | /knowledge HTTP |
200 | KB hub intact |
| 5C | /knowledge/dev/blueprints/architecture-decisions |
200 | Real KB doc (file_path from Directus) |
| 6 | No hardcode DIEU-28/32/35 in [pubId].vue |
0 matches | |
| 6 | No if/switch doc_code branching |
0 matches | |
| 7 | typecheck/build availability | Available (nuxt typecheck, nuxt build) but not run on VPS — host has no node/pnpm; production build is CI-driven (deploy-vps.yml rsyncs .output/ to /opt/incomex/deploys/nuxt-output). Container incomex-nuxt serves prebuilt .output via node .output/server/index.mjs. Therefore the curl 200s above test the EXISTING build, not the new files. New page will materialize on next CI deploy. |
|
| 8 | git commit | 5ce3437 clean |
5. Important caveat (Step 7 elaboration)
The Nuxt container does NOT run a dev server — it serves a CI-built .output/ bundle bind-mounted from host. Source changes under /opt/incomex/docker/nuxt-repo/web/pages/... only take effect after:
- GitHub Actions
deploy-vps.ymlrebuilds and rsyncsnuxt-output/, OR - Manual
pnpm buildin a Docker builder (not attempted here per "không tự bịa lệnh").
The HTTP 200 for /knowledge/laws/<pubId> in the current build is coming from the catch-all /knowledge/[...slug].vue (which renders a "Document not found" panel for unknown slugs at HTTP 200). After deploy, the explicit /knowledge/laws/[pubId].vue route will take over and render the tree+reader.
Code is committed; runtime exercise must wait for the next deploy.
6. Architecture summary
Listing (index.vue) — additive only:
- Added
tacPubs = useAsyncData('tac-publications', readItems('tac_publication', {fields: id/doc_code/version/name/lifecycle_status, sort: ['doc_code']})) - Section 0 grid renders cards
<NuxtLink to="/knowledge/laws/${pub.id}"> - Existing governance_docs constitutions/laws/ssot sections unchanged
Reader ([pubId].vue) — assembly only:
- Fetch publication header via
readItem('tac_publication', pubId) - Fetch members via
readItems('tac_publication_member', filter:{publication_id:_eq pubId}, fields with deep.id/.canonical_address/.parent_id/.sort_order/...+unit_version_id.title/.body, sort: render_order, limit: -1)— single round-trip - Build
lu_id → membermap (O(n)) - For each member: walk
parent_idchain, build path${pad(sort_order,3)}-${title}segments joined by/— deterministic, no per-node API calls - Map →
AgentView-shaped list →buildDocsTree()→<DocsTreeView>(left) - Right pane:
markdownToHtml(selectedDoc.body)rendered withproseclass - 100% existing components, zero new imports
7. Rollback
ssh contabo 'cd /opt/incomex/docker/nuxt-repo && git revert 5ce3437'
# or hard reset (only if untouched downstream):
ssh contabo 'cd /opt/incomex/docker/nuxt-repo && git reset --hard 5ce3437^'
8. Hard-boundary compliance
| Boundary | Status |
|---|---|
| Không xoá/ẩn/phá KB routes | ✅ KB /knowledge + /knowledge/[...slug] untouched; 5A/5C 200 |
| Không direct PG | ✅ all reads via Directus SDK |
| Không server route mới | ✅ |
| Không component/renderer mới | ✅ reuses DocsTreeView + buildDocsTree + markdownToHtml |
| Không hardcode DIEU-28/32/35 | ✅ Step 6 grep = 0 |
| Không Directus mutation | ✅ readItems/readItem only |
| Không cleanup ngoài phạm vi | ✅ 2-file diff |
P10D-2B: code-complete + committed. Runtime PASS pending CI deploy of 5ce3437.