From 2d69e93f87e79fbb0ff2a90ffb5896df65fe4e0b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 10 Nov 2026 02:43:30 +0000 Subject: [PATCH 1/2] feat!: annotationsFrom takes structured-context's issue list structured-context 0.23 reports validation as one `issues` list, each issue with its kind and severity, and drops nodeIssues. annotationsFrom now takes { issues } as a ValidationResult or `sctx validate --json` gives it, so either can be passed as it is. UnattachedAnnotation's line/column become `location` (a SourceLocation), so a parse issue keeps its file. 'parse' joins the validationSources enum, which follows core's VALIDATION_ISSUE_KINDS. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019Xphpde5yiQF1dWi3KfETS --- apps/navigator/package.json | 2 +- .../src/UnattachedAnnotationPanel.tsx | 14 ++-- apps/navigator/src/server/validate-space.ts | 6 +- bun.lock | 10 +-- docs/api.md | 8 +-- docs/architecture.md | 2 +- docs/definitions.md | 2 +- packages/map-views/package.json | 4 +- packages/map-views/src/core/annotations.ts | 64 ++++++++----------- packages/map-views/src/node/snapshot.ts | 5 +- packages/map-views/tests/annotations.test.ts | 42 +++++------- packages/map-views/tests/definition.test.ts | 11 +++- packages/map-views/tests/snapshot.test.ts | 5 +- schemas/generated/latest/definition.json | 1 + schemas/generated/latest/settings.json | 1 + 15 files changed, 85 insertions(+), 92 deletions(-) diff --git a/apps/navigator/package.json b/apps/navigator/package.json index 30bf3bf..0d3d6e6 100644 --- a/apps/navigator/package.json +++ b/apps/navigator/package.json @@ -12,7 +12,7 @@ "dependencies": { "react": "^19.3.0", "react-dom": "^19.3.0", - "structured-context": "^0.22.1", + "structured-context": "^0.23.0", "structured-context-map-views": "workspace:*" }, "devDependencies": { diff --git a/apps/navigator/src/UnattachedAnnotationPanel.tsx b/apps/navigator/src/UnattachedAnnotationPanel.tsx index 847817e..4527675 100644 --- a/apps/navigator/src/UnattachedAnnotationPanel.tsx +++ b/apps/navigator/src/UnattachedAnnotationPanel.tsx @@ -2,8 +2,8 @@ import type { UnattachedAnnotation } from 'structured-context-map-views'; import { AnnotationList } from './NodeDetails'; /** - * Validation results with no node on the map: global rules, and nodes that failed their schema - * (those aren't in the graph). Grouped by node id, or under "Space" when the result has none. + * Validation results with no node on the map: parse issues, global rules, and nodes that aren't in the + * graph. Grouped by node id, else by file, or under "Space" when the result has neither. */ export function UnattachedAnnotationPanel({ unattached, @@ -12,7 +12,7 @@ export function UnattachedAnnotationPanel({ unattached: readonly UnattachedAnnotation[]; onClose: () => void; }) { - const groups = Map.groupBy(unattached, (u) => u.nodeId ?? ''); + const groups = Map.groupBy(unattached, (u) => u.nodeId ?? u.location?.file ?? ''); return (