Summary
Currently, lint issue markers (red/yellow squiggly lines) in the source view are placed on the class IRI (the subject). When a lint issue is about a specific predicate (e.g., duplicate skos:prefLabel values), the marker should highlight the predicate within the class block, not just the class IRI.
Current Behavior
- Web worker (
lib/editor/indexWorker.ts) finds the subject IRI position in the source
- Marker is placed on the IRI token (e.g.,
<R02854b77E5b33FBfafC6fad>)
- User must read the issue message to understand which predicate is problematic
Desired Behavior
- For issues that include
details.predicate (e.g., "skos:prefLabel", "rdfs:label"), place the marker on the predicate line(s) within the class block
- Optionally also mark the specific value(s) mentioned in
details.labels
- Fall back to class IRI position when no predicate info is available
Implementation Approach
- Pass issue
details to the web worker alongside subject_iri, rule_id, message, issue_type
- After finding the subject IRI position, scan forward in the source text to find the predicate token within the same Turtle block (delimited by
. terminator)
- If multiple values are problematic, mark each value's line
- Consider using
MarkerSeverity + relatedInformation for secondary locations
Files Involved
lib/editor/indexWorker.ts — position computation logic
components/editor/OntologySourceEditor.tsx — passes issues to worker
components/editor/TurtleEditor.tsx — renders markers from diagnostics
Considerations
- Turtle syntax allows predicates on same or different lines
- Abbreviated notation (
, for same predicate, ; for same subject) complicates parsing
- Performance: scanning within a class block is bounded and fast
- Some rules (e.g.,
orphan-class) have no predicate — keep fallback to IRI position
🤖 Generated with Claude Code
Summary
Currently, lint issue markers (red/yellow squiggly lines) in the source view are placed on the class IRI (the subject). When a lint issue is about a specific predicate (e.g., duplicate
skos:prefLabelvalues), the marker should highlight the predicate within the class block, not just the class IRI.Current Behavior
lib/editor/indexWorker.ts) finds the subject IRI position in the source<R02854b77E5b33FBfafC6fad>)Desired Behavior
details.predicate(e.g.,"skos:prefLabel","rdfs:label"), place the marker on the predicate line(s) within the class blockdetails.labelsImplementation Approach
detailsto the web worker alongsidesubject_iri,rule_id,message,issue_type.terminator)MarkerSeverity+relatedInformationfor secondary locationsFiles Involved
lib/editor/indexWorker.ts— position computation logiccomponents/editor/OntologySourceEditor.tsx— passes issues to workercomponents/editor/TurtleEditor.tsx— renders markers from diagnosticsConsiderations
,for same predicate,;for same subject) complicates parsingorphan-class) have no predicate — keep fallback to IRI position🤖 Generated with Claude Code