# 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 `userObjectPreambleElement` nodes. - 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.addOptions` hook to generate multiple text options, reuse `createTitle`/`createOption`, and attach a localized action button produced via `mxUtils.button`. - Implemented `createPreambleDialog` to render prefix/IRI rows, enforce trimmed input, and rebuild the root cell's XML value via `buildValueWithPreamble`, emitting change events through `mxGraphModel` semantics. - Registered resource fallbacks for Base URI labels, dialog prompts, and add-button text while ensuring single attachment with `__rdfexportPreambleAttached` guards. - Upgraded the test `GraphModelStub` to manage real `@xmldom/xmldom` elements, provide `getValue`/`setValue`, and normalize attribute lookups so removals surface as `null`. - Enriched panel tests to locate controls via `data-rdfexport-*` markers, simulate dialog usage (add/remove entries, apply), and verify the resulting XML contains expected `rdfPrefix`/`rdfIRI` pairs alongside untouched attributes. ## Testing - `bun install` - `bun 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.