Codex Report - 2025-09-21T21:17:30Z
Summary
Expanded the RDF export plugin’s “Preamble” section to expose both CSV path and Base URI fields with native Format panel styling.
Added a dedicated “Edit Preamble” dialog that mirrors the standard Edit Data workflow while persisting prefix/IRI pairs as
userObjectPreambleElementnodes.Strengthened the Bun test harness with DOM-aware graph stubs, dialog interaction coverage, and assertions over serialized preamble entries.
Implementation Notes
Generalized the patched
DiagramFormatPanel.prototype.addOptionshook to generate multiple text options, reusecreateTitle/createOption, and attach a localized action button produced viamxUtils.button.Implemented
createPreambleDialogto render prefix/IRI rows, enforce trimmed input, and rebuild the root cell’s XML value viabuildValueWithPreamble, emitting change events throughmxGraphModelsemantics.Registered resource fallbacks for Base URI labels, dialog prompts, and add-button text while ensuring single attachment with
__rdfexportPreambleAttachedguards.Upgraded the test
GraphModelStubto manage real@xmldom/xmldomelements, providegetValue/setValue, and normalize attribute lookups so removals surface asnull.Enriched panel tests to locate controls via
data-rdfexport-*markers, simulate dialog usage (add/remove entries, apply), and verify the resulting XML contains expectedrdfPrefix/rdfIRIpairs alongside untouched attributes.
Testing
bun installbun test src/main/webapp/plugins/rdfexport/tests/rdfexport.test.ts
Follow-ups
Consider surfacing existing preamble entries in the exported RDF payload if downstream consumers expect prefix declarations in the RDF output.
Evaluate whether additional validation (eg. URI format checks) should run before persisting prefixes to prevent malformed RDF namespaces.