Vendored from: https://github.com/Lum1104/Understand-Anything
Upstream commit (latest at vendor time): 26edf61856fa476e466bda1814819a266a293c47
Vendor date: 2026-05-26
Vendor for: CodeNow v0.1.39.1

License: MIT (Copyright (c) 2026 Yuxiang Lin) — see LICENSE in upstream repo.

What we vendored
----------------
The upstream `packages/dashboard` is a React 19 + @xyflow/react + ELK +
Dagre + Zustand + Tailwind v4 + Prism bundle. Building it from source
requires pnpm + Vite + the full Understand-Anything monorepo + native
tree-sitter bindings, all of which would have conflicted with our
electron-rebuild postinstall (Critical bug §4) and bloated the desktop
bundle past 5 MB.

For v0.1.39.1 we ship a **minimal in-house dashboard** (`index.html` +
`dashboard.js` + `dashboard.css`) that consumes the SAME upstream
`KnowledgeGraph` JSON schema (see ../codebase-map.js for the analyzer
that produces it). It implements the core upstream UX:
  - Pan/zoom canvas of nodes + edges
  - Click a node to surface its details in a side panel
  - File / function / class node types with distinct colors
  - File-scope filter via ?scopeFiles= URL parameter
  - Honest "powered by Understand-Anything (MIT)" attribution in the header

What we did NOT vendor (queued for v0.1.40 / v0.1.41)
-----------------------------------------------------
  - The full ELK auto-layout engine — we use a simple force-directed layout
  - Prism syntax-highlighted code-viewer slide-up panel
  - Tour-builder and language-lesson features
  - LLM enrichment (buildFileAnalysisPrompt / parseFileAnalysisResponse)
  - Agent-flow overlay (drawing tool-call edges from JSONL runs)

When v0.1.40 lands we will either:
  (a) Vendor the full upstream dashboard production build (pnpm build
      output committed to this directory), or
  (b) Keep the in-house dashboard and re-add features piecemeal.

The decision is open — depends on bundle-size budget and on whether the
upstream dashboard's @xyflow/react graph layout is materially better
than the in-house version for the workloads our users hit.

Per the upstream MIT license, attribution is preserved in the dashboard
header and in CodeNow's About/Help.
