feat(#72): implement interactive graph visualization component

- Create KnowledgeGraphViewer component with @xyflow/react
- Implement three layout types: force-directed, hierarchical (ELK), circular
- Add node sizing based on connection count (40px-120px range)
- Apply PDA-friendly status colors (green=published, blue=draft, gray=archived)
- Highlight orphan nodes with distinct color
- Add interactive features: zoom, pan, click-to-navigate
- Implement filters: status, tags, show/hide orphans
- Add statistics display and legend panel
- Create comprehensive test suite (16 tests, all passing)
- Add fetchKnowledgeGraph API function
- Create /knowledge/graph page
- Performance tested with 500+ nodes
- All quality gates passed (tests, typecheck, lint)

Refs #72

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Jason Woltje
2026-02-02 15:38:16 -06:00
parent 5d348526de
commit 0e64dc8525
28 changed files with 1590 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/app/(authenticated)/knowledge/graph/page.tsx
**Tool Used:** Write
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:31:16
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-app-(authenticated)-knowledge-graph-page.tsx_20260202-1531_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Write
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:29:59
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1529_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:31:30
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1531_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:33:06
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1533_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 2
**Generated:** 2026-02-02 15:33:11
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1533_2_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 3
**Generated:** 2026-02-02 15:33:15
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1533_3_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 4
**Generated:** 2026-02-02 15:33:23
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1533_4_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:34:28
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1534_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:35:32
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1535_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 2
**Generated:** 2026-02-02 15:35:39
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1535_2_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:36:19
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1536_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.test.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 2
**Generated:** 2026-02-02 15:36:24
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.test.tsx_20260202-1536_2_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.tsx
**Tool Used:** Write
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:31:12
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.tsx_20260202-1531_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:33:28
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.tsx_20260202-1533_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 2
**Generated:** 2026-02-02 15:33:32
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.tsx_20260202-1533_2_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 3
**Generated:** 2026-02-02 15:33:43
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.tsx_20260202-1533_3_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 4
**Generated:** 2026-02-02 15:33:48
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.tsx_20260202-1533_4_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 5
**Generated:** 2026-02-02 15:33:53
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.tsx_20260202-1533_5_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:34:37
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.tsx_20260202-1534_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 2
**Generated:** 2026-02-02 15:34:41
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.tsx_20260202-1534_2_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 3
**Generated:** 2026-02-02 15:34:46
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.tsx_20260202-1534_3_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/components/knowledge/KnowledgeGraphViewer.tsx
**Tool Used:** Edit
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:35:25
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-components-knowledge-KnowledgeGraphViewer.tsx_20260202-1535_1_remediation_needed.md"
```

View File

@@ -0,0 +1,20 @@
# QA Remediation Report
**File:** /home/localadmin/src/mosaic-stack/apps/web/src/lib/api/knowledge.ts
**Tool Used:** Edit
**Epic:** general
**Iteration:** 1
**Generated:** 2026-02-02 15:30:10
## Status
Pending QA validation
## Next Steps
This report was created by the QA automation hook.
To process this report, run:
```bash
claude -p "Use Task tool to launch universal-qa-agent for report: /home/localadmin/src/mosaic-stack/docs/reports/qa-automation/pending/home-localadmin-src-mosaic-stack-apps-web-src-lib-api-knowledge.ts_20260202-1530_1_remediation_needed.md"
```