feat: Markdown-vault + OPML import/export#26
Merged
Conversation
Adds portable import/export so a notebook is never trapped in Nexia's JSON, and existing PKM users (Obsidian) can try it with zero cost. Core (Rust): - wikilink.rs: total, fuzz-safe [[Title]] / [[Title|alias]] parser (byte offsets are always valid char boundaries) — reused later by the editor autocomplete. - exchange.rs: to_markdown (one file per note, front-matter + body + a ## Links section of [[Title]]), to_opml (OPML 2.0, XML-escaped), and from_markdown_vault (title from # H1 or filename; [[Title]] resolved case-insensitively; unresolved targets become placeholder notes, per Obsidian). Round-trip preserves titles + link topology. - wasm.rs: export_markdown / export_opml / import_markdown_vault. - tests/exchange.rs: proptest — parser + import are total; round-trip preserves topology. UI (ReScript), no npm zip lib (Deno-only): - store/vault.js: File System Access showDirectoryPicker() to write one .md per note, else a single concatenated-bundle download; OPML download; webkitdirectory vault picker for import. - store/WasmStore.res + store/Exchange.res: bind the three ops; effects resolve through Dispatcher (NotebookLoaded / SetError). - Msg/Update/View: ExportMarkdown / ExportOpml / ImportVault + toolbar buttons. - tests/exchange.test.js: contract test across the wasm boundary (export shape, round-trip, placeholder creation). Verified: cargo test (28 incl. new property tests), deno test:ui (6), E2E — toolbar renders Import/Export MD/Export OPML and Export OPML downloads a .opml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PAEqVP7Y3bZDhtAaPUTbps
🔍 Hypatia Security ScanFindings: 56 issues detected
View findings[
{
"reason": "Issue in boj-build.yml",
"type": "missing_timeout_minutes",
"file": "boj-build.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "missing_timeout_minutes",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "missing_timeout_minutes",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in codeql.yml",
"type": "missing_timeout_minutes",
"file": "codeql.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in hypatia-scan.yml",
"type": "missing_timeout_minutes",
"file": "hypatia-scan.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
Deno 2 removed the `window` global; `deno lint` rejects it. In browsers globalThis === window, so showDirectoryPicker resolves identically. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PAEqVP7Y3bZDhtAaPUTbps
|
🔍 Hypatia Security ScanFindings: 56 issues detected
View findings[
{
"reason": "Issue in boj-build.yml",
"type": "missing_timeout_minutes",
"file": "boj-build.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "missing_timeout_minutes",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "missing_timeout_minutes",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in codeql.yml",
"type": "missing_timeout_minutes",
"file": "codeql.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in hypatia-scan.yml",
"type": "missing_timeout_minutes",
"file": "hypatia-scan.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
hyperpolymath
marked this pull request as ready for review
July 3, 2026 01:08
This was referenced Jul 3, 2026
hyperpolymath
added a commit
that referenced
this pull request
Jul 3, 2026
* feat: agents (saved queries) + graph view The two self-contained namesake differentiators. (Wiki-link *editing* moves to the next PR alongside the manual link-creation picker, where the link-reconciliation logic belongs; the [[…]] parser landed in #26.) Agents — the feature Nexia is named for: - core/src/agent.rs: an Agent { id, name, query } plus a total, whitespace-separated query DSL (bare text over title+content, title:word, attr:key=value, linksto:<uuid>), ANDed; an empty query matches nothing. Notebook gains a persisted (serde-default) agents list with add/remove/run_agent/run_query. - wasm bindings: agents / add_agent / remove_agent / run_agent / run_query. - UI: an Agents panel in the sidebar (add form + list); clicking an agent shows only its collected notes, and the collection stays live — every update() re-runs the active agent so adding a matching note grows it immediately. Graph view (replaces the "coming soon" placeholder): - GraphLayout.res: a pure, deterministic circular layout (static — no animation, friendly to prefers-reduced-motion; coordinates always finite and in-box). SVG render with clickable, keyboard-focusable nodes (role=button) and link edges; a new Graph toolbar button. Verified: cargo test (28 unit incl. agent DSL + persistence; property + golden suites); deno test:ui (9, incl. new agents contract across the wasm boundary and graph-layout geometry); deno lint + cargo fmt/clippy (-D warnings, wasm feature) clean. E2E (headless Chromium): an agent collects its 2 matching notes and grows to 3 live when a match is added; the graph renders nodes + edges; axe-core still reports 0 serious/ critical WCAG 2.2 AA violations with the agents panel present. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PAEqVP7Y3bZDhtAaPUTbps * fix(ui): use RescriptCore Dict, not deprecated Js.Dict, in GraphLayout Clears the Hypatia code-scanning deprecated_api alert on the new file. Dict.t and Js.Dict.t are the same underlying dict<'a>, so consumers are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PAEqVP7Y3bZDhtAaPUTbps --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



First of four follow-up PRs completing the roadmap (order: Import/export → Accessibility+PWA → Differentiators → Usable canvas). This one makes a Nexia notebook portable — data is never trapped in the app's JSON, and existing Obsidian users can trial it at zero cost.
What's added
Core (Rust)
core/src/wikilink.rs— a total, fuzz-safe[[Title]]/[[Title|alias]]parser. Byte offsets are always valid char boundaries (property-tested on arbitrary input). Reused later by the editor autocomplete in the Differentiators PR.core/src/exchange.rs—to_markdown: one file per note (YAML-ish front-matter, body, a## Linkssection of[[Title]]).to_opml: OPML 2.0, XML-escaped.from_markdown_vault: title from# H1or filename;[[Title]]resolved case-insensitively against titles; unresolved targets become placeholder notes (Obsidian semantics); backlinks rebuilt.core/src/wasm.rs—export_markdown/export_opml/import_markdown_vaultbindings.UI (ReScript) — no npm zip library, honouring the Deno-only policy
ui/src/store/vault.js— File System AccessshowDirectoryPicker()writes one.mdper note where available (Chromium), else a single concatenated-bundle download; OPML download;webkitdirectoryfolder picker for import.ui/src/store/{WasmStore,Exchange}.res— bind the three ops; async effects resolve throughDispatcher(NotebookLoaded/SetError).Msg/Update/View—ExportMarkdown/ExportOpml/ImportVaultmessages + toolbar buttons.Verified
cargo test— 28 tests incl. new property tests (parser + import are total; round-trip preserves topology).deno task test:ui— 6 tests incl. the new cross-boundary exchange contract (export shape, round-trip, placeholder creation).Import/Export MD/Export OPML, and Export OPML triggers a real.opmldownload.Known-red estate governance checks (ReScript-language ban, scorecard staleness) are pre-existing policy on
mainand out of scope, as in #24.🤖 Generated with Claude Code
https://claude.ai/code/session_01PAEqVP7Y3bZDhtAaPUTbps
Generated by Claude Code