Skip to content

Document editor: Milkdown (Crepe) + agent-aware features (retrieval preview, [[memory-link]]) #295

Description

@ajianaz

Requires uteke: v0.16.0+ · Epic: #289

What

  • Replace docs textarea with Milkdown Crepe (markdown-native; BlockNote is React-only — corrected decision) wrapped for Svelte 5 (action + teardown; no per-keystroke framework churn).
  • Write flow: slash menu, block drag handle, markdown shortcuts, paste-markdown → blocks, code blocks with language picker + copy button, ⌘S + 2.5s debounced autosave + Saved indicator, unsaved guard.
  • Conflict detection: compare updatedAt before POST /doc/update; if changed externally → dialog (compare / overwrite). Local snapshots (IndexedDB, last 20) for emergency restore.
  • Retrieval Preview panel: test query → /doc/search shows rank + snippet for this doc ("will the agent find this?").
  • [[memory-link]]: [[ triggers /recall suggestions; inserts markdown link [title](uteke://memory/<id>) (plain markdown — agents read it via /doc/get without adapters).
  • v1 cuts (explicit): image upload (external URLs only — uteke has no blob storage), comments, collaboration, advanced table editing.

Why

Human-writes→agent-reads is the product bridge; markdown-native state = zero serialization drift between what the human sees and what the agent reads (P37). Retrieval preview answers the #1 writing anxiety at the moment of hesitation (P14).

Testing

  • Unit: markdown round-trip (parse→serialize == source on fixtures), conflict path, snapshot restore.
  • E2E: type/paste/save/reopen fidelity; [[link]] insert; retrieval preview returns result.
  • Visual QA: editor in both themes; statusbar states (dirty/saved/conflict).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions