Skip to content

Read-only relationship viewer + LIST command (first slice of #1918) - #1992

Merged
mstomar125 merged 1 commit into
mainfrom
issue-1918-relationship-viewer
Aug 6, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
issue-1918-relationship-viewer

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

First slice of #1918 — surfaces schema-declared typed relationships between nodes (which were not shown in the UI at all), read-only. #1918 stays OPEN for the deferred follow-ups.

Changes

  • LIST command surface: store get_related_nodes_with_edges (node + edge properties) → NodeService wrapper → rel_ops::get_node_relationships (aggregates outbound from the node's schema relationships + inbound via get_inbound_relationships, carrying edge properties; built-ins excluded) → proto GetNodeRelationships RPC → daemon handler → get_node_relationships Tauri command (registered).
  • Frontend: relationship-grouping.ts (pure grouping/normalization, 13 tests) + a thin invoke wrapper + a read-only modal (grouped by relationship name, both directions as separate groups, edge properties as table columns, bare edges as chips, empty state) + a "Relationships" trigger in the schema form.

Review

Adversarial pragmatic-code-review: REQUEST CHANGES → resolved. The one blocker (F1: inbound groups keyed only on relationship_type, so two schemas declaring the same relationship name targeting one type would cross-attribute + double-count) is fixed — inbound now restricts related nodes to the declaring source_type, with a regression test (test_get_node_relationships_inbound_multiple_sources_not_duplicated) that fails without the filter. The rest was clean (direction/edge-props/reverse-labeling verified; NodeService over RelationshipCache is the correct call for edge_fields). Non-blocking 🟢 nits (column alias, th scope, humanization dedup) left for a follow-up.

Deferred to follow-ups (#1918 stays open)

Editing (create/update/delete edges), cardinality enforcement + required last-edge protection, target-node selection, view-settings (column selection/sort/filter + persistence — the issue's open question), exposing the trigger from task/date/plugin schema forms.

Testing

Grouping 13/13 + Rust integration tests (outbound+inbound+edge-props, and the F1 two-source regression) green; full desktop-app suite 187 files / 4392; quality:fix 0/0; cargo build (daemon + app) clean; full pre-push gate green.

🤖 Generated with Claude Code

Surfaces schema-declared TYPED relationships between nodes, which were not shown
in the UI at all. First slice — read-only view + its command surface; editing,
cardinality enforcement, target selection, and view-settings are deferred
follow-ups (#1918 stays open).

- LIST command: store get_related_nodes_with_edges (node + edge properties) →
  NodeService wrapper → rel_ops::get_node_relationships (aggregates OUTBOUND from
  the node's schema relationships + INBOUND via get_inbound_relationships, with
  edge properties; built-ins excluded) → proto GetNodeRelationships RPC → daemon
  handler → get_node_relationships Tauri command (registered in lib.rs).
- Frontend: relationship-grouping.ts (pure grouping/normalization, 13 tests) +
  relationship-viewer-service.ts (invoke wrapper) + relationship-viewer-modal
  (read-only, grouped by name, both directions, edge props as table columns,
  bare edges as chips, empty state); "Relationships" trigger in the schema form.
- Review fix (F1): inbound groups now restrict related nodes to the declaring
  source type — two schemas declaring the same relationship name targeting one
  type no longer cross-attribute or double-count (regression test added).

Pragmatic-code-review: REQUEST CHANGES → F1 fixed + tested → the rest was clean
(direction/edge-props/labeling verified; NodeService over RelationshipCache is
the correct call for edge_fields).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.

1 participant