Commit Graph
242 Commits
Author SHA1 Message Date
Lum1104 8d20efec94 feat(dashboard): DomainGraphView uses ELK 2026-05-03 16:17:26 +08:00
Lum1104andClaude Opus 4.7 47a80912c9 chore(dashboard): address Task 6 + 8 review minors
ContainerNode (Task 8 quality review):
- Add accessibility: role="button", tabIndex, aria-expanded,
  aria-label with item count + state, focus-ring on focus, Enter/Space
  keyboard activation. Containers are the primary lazy-load
  interaction so keyboard support shouldn't be a regression.
- Use var(--color-diff-changed) and the font-serif Tailwind class
  instead of literals so theme switching still works.
- Replace the 🔍 emoji with a typographic "N hits" pill matching the
  badge pattern used by LayerClusterNode.
- Add a displayName so React DevTools shows "ContainerNode" rather
  than "Memo(Anonymous)".

elk-layout.test.ts (Task 6 quality review):
- Drop the (c as { x?: number }).x casts now that ElkChild declares
  x?/y? directly. Tests now exercise the typed contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 16:14:10 +08:00
Lum1104 0b18a84014 feat(dashboard): overview view uses ELK 2026-05-03 16:12:17 +08:00
Lum1104andClaude Opus 4.7 a9b614ae2d fix(dashboard): complete the GraphEdge test fixture
Earlier review fix-up dropped the `as GraphEdge` cast but didn't add
the `direction` and `weight` fields, breaking `tsc -b`. Tests still
passed because vitest doesn't typecheck. Add the missing fields so
the dashboard build is green again.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 16:08:52 +08:00
Lum1104andClaude Opus 4.7 00a75c27db chore(dashboard): address Task 5 review minors
- Re-export NODE_WIDTH/NODE_HEIGHT from utils/layout.ts as the
  fallback dimensions in elk-layout.ts. Coupling them with the dagre/
  force defaults prevents silent drift during the migration.
- Declare optional x/y on ElkChild so downstream consumers (Tasks 9-12)
  see the position contract in the type. Comment notes ELK sets them
  on output but they're absent on input.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 16:07:57 +08:00
Lum1104 e459e924ff feat(dashboard): ContainerNode component (visual + click toggle) 2026-05-03 16:07:26 +08:00
Lum1104 43fd232df7 test(dashboard): applyElkLayout integration cases 2026-05-03 16:06:49 +08:00
Lum1104andClaude Opus 4.7 9da085018e chore(dashboard): address Task 4 review minors
- Length-prefix the inter-container bucket key to eliminate collision
  risk when container ids contain the separator (e.g. folder names with
  spaces). Adds a regression test.
- Rename AggregatedContainerEdge.types -> edgeTypes for symmetry with
  the existing LayerEdgeAggregation.edgeTypes field.
- Drop the as-cast in the test helper by giving it the real EdgeType
  literal type and a complete object shape.
- Reword the JSDoc to match what the function actually does (silently
  drop unmapped endpoints; callers needing strict can pre-filter).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 16:04:57 +08:00
Lum1104 3ba65e67a0 feat(dashboard): store fields for expanded containers + layout cache 2026-05-03 16:04:34 +08:00
Lum1104andClaude Opus 4.7 a2b8f27810 chore(dashboard): address Task 2 + 3 review minors
- louvain.ts: rewrite the misleading "disconnected nodes get -1" comment
  (the library actually assigns unique ids; the reassignment loop is a
  defensive net for future API drift).
- containers.test.ts: add tags:[] to the test node helper for shape
  fidelity; replace the vacuously-true "every is community" assertion
  with one that actually fails if the community fallback regresses.
- containers.ts: collapse the two-pass groupByFolder into a single
  branching loop; guard Cluster A-Z naming so it doesn't wrap into
  punctuation past 26 communities.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 16:02:20 +08:00
Lum1104 8f3a6bf2c4 feat(dashboard): elk-layout repair pipeline + applyElkLayout 2026-05-03 16:00:49 +08:00
Lum1104 46dc0485b9 feat(dashboard): aggregateContainerEdges (directional, types-set) 2026-05-03 15:57:28 +08:00
Lum1104 74342da070 feat(dashboard): deriveContainers community fallback via Louvain 2026-05-03 15:54:24 +08:00
Lum1104 30cd640b1e feat(dashboard): deriveContainers folder strategy 2026-05-03 10:53:46 +08:00
Lum1104andClaude Opus 4.7 a11c692c99 chore(dashboard): add graphology-types as direct dep
Code review flagged that without it as a direct dep, TypeScript would
fail to resolve types like Attributes/NodeKey from transitive
graphology-types when later tasks import them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 10:46:53 +08:00
Lum1104 28362dbfe0 chore(dashboard): add elkjs, graphology, vitest 2026-05-03 10:42:34 +08:00
OpenClaw Ad Radar d0f77aa736 fix: change file permissions for extract-domain-context.py 2026-05-01 12:24:43 +02:00
Lum1104andClaude Opus 4.7 87e3150c4b chore: bump version to 2.4.0
PR #108 ships a new user-visible feature (in-dashboard source code viewer
with Files tab + double-click navigation), so it warrants a minor bump
across all 5 version-tracked files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 17:57:43 +08:00
Lum1104andClaude Opus 4.7 7e58e97b5a feat(dashboard): file double-click also navigates the graph
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>
2026-05-01 17:55:56 +08:00
Lum1104andClaude Opus 4.7 c6f5409111 fix(dashboard): preserve sidebar composition + restore slide-up code viewer
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>
2026-05-01 17:28:08 +08:00
arkaigrowth 13327b7945 feat(dashboard): add source code viewer 2026-04-27 17:02:34 -05:00
1e07cbac94 fix(hooks): use \${CLAUDE_PLUGIN_ROOT} so plugin path expands at runtime
Hook echo commands referenced \${PLUGIN_DIR}, which Claude Code does not
inject into hook commands. The documented variable is \${CLAUDE_PLUGIN_ROOT}
(used elsewhere in skills/understand/SKILL.md and friends). Also switched
the surrounding single quotes to double quotes so the variable actually
expands at runtime instead of being passed literally.

Without this fix, the auto-update hook silently sent Claude a non-existent
file path, so the knowledge graph never incrementally updated even when
autoUpdate: true was configured.

Builds on the direction identified in #96; closes #96.

Co-Authored-By: xiaolai <lixiaolai@gmail.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 21:00:55 +08:00
Yuxiang LinandGitHub 6afa1bdfc5 Merge pull request #97 from xiaolai/fix/nlpm-echo-tool-input-printf
fix: use printf instead of echo to pipe TOOL_INPUT into grep
2026-04-25 20:58:20 +08:00
Yuxiang LinandGitHub 1f61d9d03b Merge pull request #98 from xiaolai/fix/nlpm-gitignore-stderr-warnings
fix: log skipped invalid gitignore patterns to stderr
2026-04-25 20:55:47 +08:00
Lum1104andClaude Opus 4.7 bdba4795e2 chore: bump to 2.3.2 and sync version manifest list
Bumps all five version-carrying manifests to 2.3.2, bringing
.copilot-plugin/plugin.json back in sync (was stuck at 2.2.0), and
updates CLAUDE.md to reflect the true set of files that must move
together: the nested understand-anything-plugin/.claude-plugin/plugin.json
and .copilot-plugin/plugin.json were missing, and marketplace.json was
incorrectly listed (its plugins[] entry does not support a version field).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 12:13:58 +08:00
0xnayuta d9250d76a9 fix(skills): harden plugin root resolution across install modes 2026-04-22 11:19:07 +08:00
claude[bot]andClaude Code d919a0cf00 fix: log skipped invalid gitignore patterns to stderr
Silent pass on re.error hid invalid .gitignore patterns from users,
making it impossible to diagnose unexpected file-exclusion behavior.
Now logs a warning to stderr so users can see which patterns were
skipped and why.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-04-21 12:28:26 +00:00
claude[bot]andClaude Code a2a0a0c171 fix: use printf instead of echo to pipe TOOL_INPUT into grep
echo interprets escape sequences and flags (e.g. -e, -n) in some
shells, which can corrupt or truncate the hook event JSON before it
reaches grep. printf '%s' passes the value as a plain string with
no interpretation, eliminating any risk of mishandled special chars.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-04-21 12:27:54 +00:00
0xnayuta 6a071b5abd chore(pi): improve plugin root error message 2026-04-20 20:20:54 +08:00
0xnayuta a2071fbf3c fix(pi): resolve understand plugin root via symlink-safe logic 2026-04-20 20:08:20 +08:00
Lum1104andClaude Opus 4.7 4233e8668d perf(dashboard): code-split bundle to drop initial chunk under warning threshold
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>
2026-04-19 23:40:15 +08:00
Lum1104andClaude Opus 4.7 dbb4e94808 chore: migrate homepage and demo to understand-anything.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>
2026-04-19 12:23:41 +08:00
0xnayuta aef6f88e90 fix(skill): quote understand argument-hint yaml 2026-04-18 22:21:09 +08:00
Lum1104 aebd6dcb3c fix(understand): preflight build of core package on first run 2026-04-17 14:33:23 +08:00
Lum1104andClaude Opus 4.7 f9b027245e chore: sync pnpm-lock.yaml with package.json
Lockfile was missing entries for tree-sitter language parsers
(c-sharp, cpp, go, java, php, python, ruby, rust) that were already
declared in packages/core/package.json.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 10:38:26 +08:00
Lum1104andClaude Opus 4.6 45e56a4624 fix: allow /understand to target an arbitrary directory path
Previously, PROJECT_ROOT was always set to CWD, which broke on
alternative CLIs (e.g. OpenClaw) that set CWD to their own workspace
directory. Now Phase 0 parses $ARGUMENTS for a non-flag directory path
and uses it as PROJECT_ROOT, falling back to CWD when omitted.

Closes #90

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 18:56:53 +08:00
Lum1104andClaude Opus 4.6 a2907ec76f fix: PHP namespace block extraction, C/C++ language split, and Lua config
- 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>
2026-04-16 14:40:24 +08:00
Lum1104andClaude Opus 4.6 11d2e95720 feat: export LanguageExtractor type and builtinExtractors from core package
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>
2026-04-15 19:27:33 +08:00
Lum1104andClaude Opus 4.6 20c1567143 feat: file-analyzer uses bundled tree-sitter script instead of LLM-generated regex
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:26:39 +08:00
Lum1104andClaude Opus 4.6 f4b79e1d92 feat: add bundled tree-sitter extraction script for file-analyzer agent
Replaces the LLM-generated throwaway regex scripts in Phase 1 of the
file-analyzer with a deterministic script that uses PluginRegistry
(TreeSitterPlugin + all non-code parsers) from @understand-anything/core.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:23:49 +08:00
Lum1104andClaude Opus 4.6 4ff04b251e feat: create extractor index with builtinExtractors, wire all 9 extractors into TreeSitterPlugin
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:20:42 +08:00
Lum1104andClaude Opus 4.6 3e4f7b6c02 feat: add CSharpExtractor for tree-sitter C# structural analysis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:19:24 +08:00
Lum1104andClaude Opus 4.6 48e1daa838 feat: add CppExtractor for tree-sitter C/C++ structural analysis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:13:59 +08:00
Lum1104andClaude Opus 4.6 4eb35b0437 feat: add PhpExtractor for tree-sitter PHP structural analysis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:08:51 +08:00
Lum1104andClaude Opus 4.6 dc8dd7dd77 feat: add RubyExtractor for tree-sitter Ruby structural analysis
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>
2026-04-15 19:02:52 +08:00
Lum1104andClaude Opus 4.6 6e500cbfdf feat: add JavaExtractor for tree-sitter Java structural analysis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:42:55 +08:00
Lum1104andClaude Opus 4.6 a1fb9585d3 feat: add RustExtractor for tree-sitter Rust structural analysis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:38:26 +08:00
Lum1104andClaude Opus 4.6 f18cad61d5 feat: add GoExtractor for tree-sitter Go structural analysis
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>
2026-04-15 18:33:18 +08:00
Lum1104andClaude Opus 4.6 398f5b15b0 feat: add PythonExtractor for tree-sitter Python structural analysis
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>
2026-04-15 18:28:38 +08:00
Lum1104andClaude Opus 4.6 2ad0563878 feat: add tree-sitter grammar deps and treeSitter configs for 10 languages
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:22:51 +08:00