Skip to content

feat: type validation issue kinds as ValidationIssueKind - #214

Merged
mindsocket merged 1 commit into
mainfrom
claude/project-thread-r53ph8
Nov 9, 2026
Merged

mindsocket merged 1 commit into
mainfrom
claude/project-thread-r53ph8

Conversation

@mindsocket

Copy link
Copy Markdown
Owner

Requested by Rog · project thread

What

FileValidationIssue.kind was string. It is now ValidationIssueKind, derived from a runtime as const array:

export const VALIDATION_ISSUE_KINDS = ['schema', 'duplicate', 'broken-link', 'hierarchy', 'rule', 'gated', 'content-link'] as const;
export type ValidationIssueKind = (typeof VALIDATION_ISSUE_KINDS)[number];

Why

map-views (PR mindsocket/structured-context-map-views#30) needs the kinds at runtime for the JSON Schema enum on nodes.validationSources. Exporting the array lets it import the list instead of restating it as ANNOTATION_SOURCES.

Public surface (agreed in the project thread)

  • structured-context/types: VALIDATION_ISSUE_KINDS, ValidationIssueKind (via src/types.ts, which imports no runtime code, so it is browser-safe).
  • structured-context/api: re-exports both.

The plugin's state.ts keeps kind: string, since it adds its own parse kind.

Checks

bun run typecheck, bun run lint, bun run test (901 pass, 0 fail).


Generated by Claude Code

FileValidationIssue.kind was a string. VALIDATION_ISSUE_KINDS lists the
kinds at runtime and ValidationIssueKind derives from it, so consumers
such as map-views can build enums from it instead of restating the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XphpfuisYsa8kb3fSwLCX
@mindsocket mindsocket self-assigned this Nov 9, 2026
@claude

claude Bot commented Nov 9, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@mindsocket
mindsocket merged commit 77794a7 into main Nov 9, 2026
2 checks passed
@mindsocket
mindsocket deleted the claude/project-thread-r53ph8 branch November 9, 2026 11:27
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