feat(node-ui): S4 assertion detail view + S5 breadcrumb nav + M2(b) cross-subgraph follow#909
Open
Jurij89 wants to merge 4 commits into
Open
feat(node-ui): S4 assertion detail view + S5 breadcrumb nav + M2(b) cross-subgraph follow#909Jurij89 wants to merge 4 commits into
Jurij89 wants to merge 4 commits into
Conversation
b433866 to
2d78973
Compare
2d78973 to
076df56
Compare
076df56 to
0818d95
Compare
0818d95 to
a226d38
Compare
Add a clickable assertion detail view (the twin of KADetailView):
Entities / Triples / Graph tabs + an ASSERTION INFO + LIFECYCLE
metadata rail, scoped to the assertion's own data graph.
- AssertionsList rows are now click-through (onSelectAssertion threaded
through LayerContent + LayerDetailView); the promote button stops
propagation. Rows are keyboard-focusable.
- New useAssertionState hook (a verdict lock-b, lazy): on mount it reads
dkg:state + dkg:memoryLayer + dkg:assertionGraph + prov:wasAttributedTo
for the lifecycle URN from <cg>/_meta. fetchAssertionTriples reads the
assertion's own data graph for the Entities/Triples/Graph panes.
- Lifecycle trail reuses .v10-ka-timeline / .v10-ka-event* with a new
is-current halo (rgba mirrors the existing dot fills) + a discarded
tone; layer tone wiring by trust layer; discarded renders a single
muted event.
- Header: 3-line structure (line 3 subgraph only when truthy); right-rail
badge {glyph} {layer} · {state}. Promote CTA only when
state==='created' && layer==='wm', reusing a shared useAssertionPromote
hook (AssertionsList adopts it too — no duplicated daemon call).
- Triples tab is a plain s/p/o table, no filter pills.
- Graph tab uses the current viewport treatment with the required S7
follow-up comment at the mount site.
- Edge cases: hydrating (CTA hidden, all-neutral trail, no state suffix)
and state-fetch error (panel "state unavailable", quiet danger hint).
- ProjectView: selectedAssertion state + openAssertionDetail (captures M2
origin), mutually exclusive with the entity detail; handleDetailClose,
layer-switch and subgraph-select all clear it.
Tests: T01-T03 (helpers), T06/T07/T20 (ProjectView navigation),
T08/T09/T10/T17 (detail-view DOM), T19 (state/triples reads).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the in-detail "← Back to Context Graph" button with a persistent
breadcrumb in ProjectHeaderStrip, the sole back-affordance for both the
entity and assertion detail views.
- buildBreadcrumbHops: Context Graph › {Layer full-name | Subgraph
displayName} › {entity | assertion name}. Middle hop is EITHER the
layer OR the subgraph, never both (§4.7.1). First hop → overview;
middle hop (when a detail is open) → restore the M2 origin; trailing
hop is a non-interactive span ("you are here").
- ProjectHeaderStrip renders the hops inline in the existing
.v10-project-strip flex row (does NOT stack), reusing
.v10-project-strip-sep (now 6px each-side padding) for the › glyph.
Clickable hops: --text-link + underline-on-hover + focus-visible ring;
per-hop max-width 200px + ellipsis (first hop stays intact);
unconditional title= tooltip on every hop. Removes the now-orphaned
.v10-project-strip-name / -sg / -sg-icon rules.
- KADetailView drops its .v10-ka-back button + onClose prop; the
breadcrumb drives close via ProjectView.handleDetailClose.
AssertionDetailView never had a back button (S4 lock).
- ProjectView: ProjectHeaderStrip wired with activeLayer + detailLabel
(entity label / assertion name) + onOverview (→ overview) +
onRestoreOrigin (= handleDetailClose); KADetailView onClose removed.
Note: the .v10-ka-back CSS class is retained — AgentProfileView's
unrelated "← Back" still uses it (a shell-level back, sibling of the
protected PanelCenter "Back to Project"). The "Back to Context Graph"
label and the detail-view button are gone (T13 guards both).
Tests: T04/T05 (breadcrumb hop construction + cross-subgraph update,
helpers); T11/T12 (ellipsis tooltip + clickable/trailing affordance,
DOM); T13 (back-affordance-removed source guard); existing M2 close
tests rewired to the breadcrumb restore path; ka-detail-label updated to
assert the back button is gone.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ollow 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>
a226d38 to
9f3025c
Compare
70cb9be to
e66f8f3
Compare
e66f8f3 to
44fd407
Compare
44fd407 to
6aa06e2
Compare
6aa06e2 to
e10ed15
Compare
e10ed15 to
9579e1b
Compare
9579e1b to
efb3b19
Compare
efb3b19 to
917a3a7
Compare
… empty-state copy
Round-3 review fixes on the S4 assertion detail view (kept as a focused
4th commit rather than folded into C1 — the fixup's helpers.ts hunk
overlaps C2's breadcrumb helpers + C3's primarySubGraphOf, so an
autosquash into C1 conflicts mechanically; a standalone commit is the
clean, conflict-free shape team-lead OK'd).
- Finding 2 (api.ts fetchAssertionState): the assertionGraph fallback
was URI-shape-unsafe. For an SWM input (a `urn:dkg:assertion:…`
lifecycle URN) whose `dkg:assertionGraph` did NOT resolve
(legacy/partial `_meta` row), echoing the URN made fetchAssertionTriples
query `GRAPH <urn:…>` (a graph that never holds triples) → bogus render.
Now: urn-input + unresolved → assertionGraph: undefined (Triples/Entities
fall to their empty-state). WM data-graph-URI input still echoes itself.
- Finding 3 (assertionEmptyStateCopy, ux §4.7.1 locked): the empty-state
copy now keys off `dkg:state` (4 branches) instead of special-casing
promoted only — published/finalized show the VM / Knowledge-Assets line
("entities → Knowledge Assets" at the VM boundary, §4.8), discarded is
terminal, created/promoted unchanged. Plain text, no links.
- Finding 1 (remote SWM state) reply-not-valid (no replicated state
source); finding-1 round-2 discarded-neutral badge + finding-2 round-2
literal-display decode already shipped earlier in C1.
Tests: SWM-legacy-no-assertionGraph guard + WM-echo counterpart
(use-assertion-state); assertionEmptyStateCopy 4-branch truth table
(assertion-detail-helpers); published empty-state DOM render
(assertion-detail-view). Finding-2 guard negative-proofed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
917a3a7 to
b742f6f
Compare
This was referenced Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three Track-A context-graph navigation features as a 3-commit bundle:
01e802426): newAssertionDetailView(entity-detail twin — Entities/Triples/Graph tabs + right-rail metadata); lifecycle trailcreated ▸ promoted ▸ published ▸ finalizedwithis-currenthalo;useAssertionStatehook (lazy per-mount state fetch); AssertionsList row click-through; Promote CTA (visible only whenstate==='created' && layer==='wm', reuses sharedhandlePromote); hydrating / state-error / promoted / created-empty edge-states.3c1ecf4a3): inline breadcrumb in ProjectHeaderStrip (Context Graph › layer|subgraph › entity|assertion); drops the in-detail "Back to Context Graph" button (breadcrumb is the sole back-affordance); hop navigation reuses the M2 origin-snapshot.b433866ee): link-follow now switchesactiveSubGraphviasetActiveSubGraphSync; the breadcrumb makes the move visible.Related work
main @ fd99cc64a(includes node-ui: post-#847 follow-ups — GH #881 fused counts helper + #882 hydrating tooltip #890 + fix(core): augment NodeJS.ProcessEnv with DKG_HOME to unblock main build (#891) #892).setActiveSubGraphSync), feat(node-ui): GH #819 — unified render-correct triple derivation via useCanonicalTriples #847/node-ui: post-#847 follow-ups — GH #881 fused counts helper + #882 hydrating tooltip #890 (lifecycle events + canonical triples). (Adjust refs if history differs.)Files changed
api.ts(fetchAssertionState/fetchAssertionTriples/rawBindingValue),hooks/useAssertionState.ts(new),styles.css(is-current halo + discarded dot + breadcrumb),views/ProjectView.tsx(selectedAssertion state + cross-subgraph follow),views/project/components.tsx(AssertionDetailView + breadcrumb + drop back button),views/project/helpers.ts(trail/CTA/subgraph-line/breadcrumb helpers).Test plan
tsc --noEmit(package) clean.Notes for reviewers
entityMeta(e, profile)ProjectProfile | undefinedpattern (byte-identical to the KADetailView twin + 3 other sites). NOT a regression — the package tsconfig (the CI gate) excludes src/ui and is clean. A proper fix is shared-type surgery across all call sites (out of scope)..v10-ka-backretained: class stays because AgentProfileView uses it for an unrelated shell-level back (sibling of the protected PanelCenter "Back to Project"); only the CG-detail back button was removed.🤖 Generated with Claude Code