You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(node-ui): M2 option (b) — silent cross-subgraph switch on link follow
Enable the cross-subgraph auto-switch alongside S5. When following a
link to an entity that lives in a DIFFERENT sub-graph than the one in
scope, handleNavigate switches activeSubGraph to the target's sub-graph
via setActiveSubGraphSync (PR #793 Bug N) so the breadcrumb's React tree
sees it synchronously. The breadcrumb now makes the move visible
(Context Graph › <new subgraph> › Entity), which is what made option (b)
acceptable (the plan tied (b) to the breadcrumb existing).
Ground-truth note: there was no option-(a) "suppression branch" to
reverse — the prior handleNavigate did NO subgraph switching at all
(option (a) was the ABSENCE of a switch). So this ADDS the follow logic.
- primarySubGraphOf(entity): first non-meta subgraph slug (mirrors the
SubGraphBadge rule); the follow decision input.
- entitiesRef mirrors rawMemory.entities so handleNavigate resolves the
target's subgraph synchronously without churning its (deliberately
stable) callback identity.
- The follow fires ONLY when already on a sub-graph page — opening an
entity from a plain layer list does NOT spuriously jump into a
sub-graph just because the entity belongs to one.
- The M2 origin snapshot is still captured at first open, so closing
returns to the ORIGINATING page, not the followed-into one (the
origin-restore overwrites any mid-open switch).
Tests: T14 (cross-subgraph follow switches activeSubGraph + breadcrumb
reflects + close returns to origin), T15 (plain-layer open does not jump
into a subgraph; M2 origin model intact), T16 (handleDetailClose serves
both detail kinds — covered by the entity + assertion close tests),
primarySubGraphOf unit truth table.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments