Skip to content

feat(graph): edit and merge entities and topics from the graph explorer - #386

Merged
adeelahmad merged 2 commits into
mainfrom
claude/project-thread-ecob6g
Oct 15, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/project-thread-ecob6g

Conversation

@adeelahmad

Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: the graph explorer showed entities and topics, but changing one meant leaving the canvas for its own page, and there was no way to merge two nodes from the graph.

After: an entity's or topic's panel has Edit, which opens the same editor as its own page right over the graph. An entity's panel also has Merge (a find box: type, Enter) and Maybe the same. The node menu (right-click, long-press, or M) has Edit… and Merge into another…: a chip says "now pick the one to keep", and the next node clicked keeps. Entities of one namespace are merged, entities of two namespaces are linked as the same thing, and speakers of one namespace are merged. Each happens at once with Undo on its notice. A node joining several namespaces' entities offers Edit in each namespace. Looking at an earlier version keeps the graph read-only.

How: components/graph/join.ts decides how one node joins another (joinKind, joinPlan) and runs it (useGraphJoin, reusing the entity merge hook from #384, a new useLinkEntities, and the speaker merge API). panel.tsx gains editTarget and the Edit/Merge buttons; graph-page.tsx renders EntityDrawer/TopicDrawer and the pick mode. TopicDrawer now looks up its vocabulary when not given. A new clicks journey (graph-merge) counts finding a node, merging another into it and undoing.

Motivation and Context

Adeel: "No easy way to merge and edit entities, topics etc. Should be as easy as from the graph explorer and canvas." Second of a few small PRs: entities page (#384), the graph (this), topic undo, a recording's Entities tab, and agent tools.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests. (__tests__/graph-curate.test.ts, clicks journey graph-merge)
  • My change requires documentation updates, and I have updated docs/ accordingly. (docs/graph.md)
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Done questions (AGENTS.md)

  • Goal: delivers what the user wanted, merged on green CI. (second part; topics with undo, the recording tab and agent tools follow)
  • Agents: usable through the API, MCP or an assistant tool. (the same merge, link and speaker endpoints; MCP edit tools come in their own PR)
  • Zero setup: no new prerequisite, .env edit or manual step.
  • Fewest clicks and keystrokes. (menu, Merge into another, click the keeper; or Merge, type, Enter; undo instead of confirm)
  • Configurable: n/a, no new setting.
  • Light: n/a, web UI only, no new dependency.
  • Private and secure: n/a, no new surface; the same editor (curate) checks, and buttons show only to editors of that namespace.
  • Cost: no model calls.
  • User decides: nothing changes until an editor picks it; defaults unchanged.
  • Upgrades: n/a, no change to stored data.
  • Honest: docs describe only what is merged here.
  • Tests, docs and generated files updated. (no API change, so no make openapi)
  • Open standards; dependencies keep Lens MIT. (no new dependency)
  • Result reported with evidence; "refine later" items written down. (refine later: shift-click multi-select and drag-to-merge on the canvas; a merged node lingering until the next explore)

🤖 Generated with Claude Code

https://claude.ai/code/session_01EzVhJCpwskyo5NhHEtS822


Generated by Claude Code

An entity's or topic's panel opens the same editor as its own page, and an
entity's panel has Merge (a find box) and Maybe the same. The node menu has
Edit and Merge into another, which merges the node into the one clicked
next: entities and speakers of one namespace, entities of two namespaces
linked as the same thing. Each happens at once with Undo on its notice.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EzVhJCpwskyo5NhHEtS822
@adeelahmad adeelahmad self-assigned this Oct 15, 2026
…at was typed

Typing and pressing Enter before the debounced search came back merged the
first entity of the list still showing. Enter now waits for that search.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EzVhJCpwskyo5NhHEtS822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants