Double-clicking a file in the Files tab previously only opened the source
viewer; the graph stayed wherever it was. Now also calls navigateToNode
first (drills into the layer + selects the node), then re-opens the code
viewer so the source panel stays visible.
Order matters: navigateToNodeInLayer resets codeViewerOpen, so the
openCodeViewer call has to come after.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two issues from review of #108:
1. Sidebar exclusivity regression — replacing the entire sidebar with the
CodeViewer when codeViewerOpen hid NodeInfo / LearnPanel / ProjectOverview
while reading source. Same pattern that was rejected in #50. Restore the
slide-up bottom overlay (per CLAUDE.md), keep sidebar tabs always visible,
and revert the <aside> overflow-hidden change so long content can scroll.
2. Cross-graph mismatch (Codex P1) — FileExplorer always builds its tree from
the structural graph and emits structural node IDs, but CodeViewer resolved
IDs against the domain graph in domain mode, yielding "No file selected".
Fall back to the structural graph when the active graph misses, so the
Files tab works regardless of viewMode.
Also update CLAUDE.md to describe the Files tab + modal expand behavior so
future Claude sessions don't re-introduce the slide-up regression.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Split the single 770 kB dashboard bundle into named vendor chunks and
lazy-load optional views so the initial JS payload is smaller and stays
under Vite's 500 kB warning threshold.
- vite manualChunks: react-vendor, xyflow, graph-layout, markdown
- React.lazy for CodeViewer, LearnPanel, PathFinderModal, KeyboardShortcutsHelp
- PathFinderModal now only mounts while open (was always mounted)
Before: index 769.80 kB (gzip 235.12 kB), chunks-too-large warning.
After: index 205 kB + split vendor/lazy chunks, warning gone.
Fixes#86
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops the /Understand-Anything subpath and retargets the site at the
apex custom domain served through GitHub Pages.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Handle block-scoped PHP namespaces (`namespace Foo { class Bar {} }`)
by recursing into compound_statement bodies in PhpExtractor
- Separate C (.c/.h) from C++ (.cpp/.cc/.hpp) into distinct language
configs so .c/.h files resolve to language "c" instead of "cpp"
- Add Lua language config so .lua files resolve to "lua" instead of
"unknown" after the EXTENSION_LANGUAGE map was replaced by LanguageRegistry
- Update TreeSitterPlugin JSDoc to reflect all 10 supported languages
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Completes the language extractor architecture — 10 languages with
tree-sitter support (TS, JS, Python, Go, Rust, Java, Ruby, PHP, C/C++, C#).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Handles methods, classes, modules, attr_* properties, require imports,
and call graph including bare identifier calls (no-arg method invocations).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements the LanguageExtractor interface for Go, handling functions,
methods with receivers, structs, interfaces, imports, exports (via
capitalization convention), and call graph extraction. Includes 25 tests.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements the LanguageExtractor interface for Python, extracting functions
(with type annotations, defaults, *args/**kwargs), classes (methods +
annotated properties), imports (plain, from, aliased, wildcard), exports
(top-level defs), and caller-callee call graphs. Includes 31 tests using
the real tree-sitter parser.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract all TypeScript/JavaScript-specific AST extraction functions
(extractParams, extractReturnType, extractImportSpecifiers, processTopLevelNode,
extractFunction, extractClass, extractVariableDeclarations, extractImport,
processExportStatement, and call graph walking) from TreeSitterPlugin into the
new TypeScriptExtractor class. TreeSitterPlugin now dispatches to registered
LanguageExtractor instances, defaulting to TypeScriptExtractor for backward
compatibility. All 426 existing tests pass unchanged.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GraphBuilder maintained its own ~60-line extension-to-language mapping that
duplicated and could diverge from the canonical LanguageRegistry. Now delegates
language detection to LanguageRegistry.getForFile(), eliminating the duplication
and ensuring new language configs are automatically picked up everywhere.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CLI --open overrides server.open config, stripping the token. Remove
--open from CLI and set server.open to /?token= so the browser opens
with the access token already included.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All five child-node loops in addNonCodeFileWithAnalysis shared the same four-line pattern: dedup check, nodeIds.add, nodes.push, and a contains edge push. A private addChildNode helper centralises this so each loop only constructs the node object specific to its type.
Default sort() uses Unicode code point ordering which can produce unexpected results for non-ASCII strings. localeCompare guarantees correct alphabetical ordering regardless of character set.
build() was returning direct references to the builder's internal arrays, allowing callers to mutate graph.nodes or graph.edges and corrupt the builder's state. Spreading into new arrays at build time prevents this at negligible cost.
addImportEdge and addCallEdge previously pushed edges unconditionally, allowing duplicate relationships if multiple agents reported the same import or call. A shared edgeKeys set keyed on type|source|target silently skips any edge that has already been recorded.
The endpoint name template was evaluated twice — once for name and once for summary. A single const removes the duplication and resolves the nested template literal lint warning.
addNonCodeFileWithAnalysis was reconstructing the fileId string independently of addNonCodeFile, creating a silent correctness risk if the ID construction logic ever changed. addNonCodeFile now returns the ID it used so the caller cannot go out of sync.
The same filePath.split("/").pop() ?? filePath expression appeared three times across addFile, addFileWithAnalysis, and addNonCodeFile. A private static helper centralises the logic and makes call sites easier to read.
Previously addNonCodeFileWithAnalysis rebuilt a full Set from this.nodes on every call, making duplicate checks O(n) per file and O(n²) overall. Moving nodeIds to a class field and updating it incrementally at each insertion reduces duplicate detection to O(1) per check.
Previously the mapping object was recreated on every mapKindToNodeType call. Moving it to module level means it is allocated once at load time instead of once per definition node processed.
Read the project's .gitignore at starter-file generation time and include
non-default patterns as commented suggestions in .understandignore. Patterns
already covered by hardcoded defaults are deduplicated (with trailing-slash
normalization). This is a one-time inclusion — users can later remove patterns
for files they want analyzed without the filter re-reading .gitignore.
Also fixes the starter header listing bin/ as a built-in default when it is
intentionally excluded from DEFAULT_IGNORE_PATTERNS (bin/ is used by Node/Ruby
CLI launchers).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Connected edges now highlight (thicker, full opacity) when a node is
selected/focused. Unconnected edges dim to near-invisible. Edge labels
only show on connected edges to reduce visual noise.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
P1: Separate force layout computation from visual state updates so
clicking/searching/touring doesn't re-randomize node positions. Layout
only recomputes when the graph data or filters change.
P1: Restrict infrastructure-file skipping (index.md, log.md, etc.) to
the wiki root level only. Nested files like concepts/index.md are now
correctly treated as content articles.
P2: Track ambiguous bare basenames in the wikilink resolution map.
Duplicate basenames (e.g., a/foo.md and b/foo.md) are removed from
the flat lookup so [[foo]] doesn't silently resolve to the wrong page.
Also fixed: edge IDs now use stable source-target-type keys instead of
array indices for proper React reconciliation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove bin/ from DEFAULT_IGNORE_PATTERNS (Node/Ruby CLI launchers use bin/)
- .NET users can add bin/ to .understandignore manually
- Fix project-scanner Step 2.5 to re-filter from original file list when
.understandignore exists, ensuring ! negation correctly overrides defaults
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a demo mode to the dashboard that fetches graph data from Supabase
Storage instead of the local Vite dev server, bypasses the token gate,
and deploys alongside the homepage at /Understand-Anything/demo/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of truncating cross_domain edge labels, compute ranksep from
the longest label length (~6px/char) so dagre spaces nodes further
apart. Also add label background for readability, and support
spacingOverrides parameter in applyDagreLayout.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Add infrastructure edge category to EDGE_CATEGORY_MAP for 8 missing
edge types (deploys, serves, provisions, triggers, migrates, documents,
routes, defines_schema) — previously unfiltered regardless of toggles
2. navigateToDomain now switches viewMode to "domain" — previously
clicking flow buttons from structural mode was a silent no-op
3. ExportMenu JSON export for non-technical persona now keeps all
file-level types — previously dropped config/document/service/etc.
4. ProjectOverview category breakdown now includes module/concept in
Code and domain/flow/step in new Domain category
5. SearchBar type badge colors now cover all 16 node types — previously
only 5 had colors, rest fell back to file color
6. PathFinder BFS now traverses edges bidirectionally — previously
only followed forward direction, missing valid reverse paths
7. GraphView node filtering consolidated into single authoritative
type set — previously fileLevelTypes and persona conditions were
separate lists that could drift
8. SelectedNodeFitView delayed 100ms to run after layer-level fitView
on search-click navigation — previously layer fit clobbered node fit
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Function and class nodes were invisible in the graph because they
are not directly assigned to layers (only file-level nodes are).
Expand layer membership by following `contains` edges from file nodes
in the active layer to include their child function/class nodes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove direction-inverting `implemented_by` alias (same pattern as fd0df15)
- Replace ambiguous `process` alias with `business_process`
- Fix duplicate React Flow edge IDs in DomainGraphView
- Fix navigateToDomain clearing selectedNodeId and losing history
- Preserve domain viewMode when structural graph loads after domain graph
- Add domain/flow/step to fileLevelTypes in GraphView
- Add domain edge category to EDGE_CATEGORY_MAP
- Extend COMPLEXITY_STRING_MAP with trivial/basic/mid/average/advanced
- Normalize string complexity values in normalizeBatchOutput (not just numeric)
- Infer node type from ID prefix in edge fallback normalization
- Include flow discriminator in bare-path step ID normalization
- Clean up domain-context.json intermediate file in SKILL.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix race condition: setGraph no longer wipes domainGraph on parallel fetch
- Remove workflow/action aliases that conflicted with pipeline type
- Remove duplicate onNodeDoubleClick handler in DomainGraphView
- Add clearActiveDomain store action (replaces direct setState call)
- Remove auto-switch to domain viewMode in setDomainGraph
- Add DomainMetaSchema Zod validation for domainMeta fields
- Add Array.isArray guards for domainMeta collections in NodeInfo
- Remove as-any cast in getDomainMeta (use typed domainMeta directly)
- Add "domain" filter category for domain/flow/step nodes
- Keep flow discriminator in step ID normalization to prevent collisions
- Update SKILL.md Phase 2 to use tool-based scanning (no missing script)
- Update EDGE_LABELS comment to reflect 29 edge types
- Bump version to 2.1.0 in all 4 required files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove unnecessary `as any` and `as string[]` casts by using the properly
typed DomainMeta interface. Fix historyNodes and childNodes to resolve from
activeGraph instead of graph so domain view mode works correctly. Use
type-narrowing filters to eliminate non-null assertions. Add early return
guard for step nodes with no filePath.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>