Repository navigation
feat(memory): Obsidian-style live Markdown notes in Memory & Collaboration #511
Description
Product intent
Turn Memory & Collaboration → Position Documents / Shared Knowledge from a read-only document browser plus modal/manual editing into an Obsidian-style, filesystem-first note workspace.
This is a focused follow-up to #347 / #505. #505 supplies the safe document lifecycle and write seam; this issue owns the live note-editing interaction and should land after that prerequisite rather than expanding #505 during review.
User experience
- Selecting a Markdown note opens it directly in an editable note surface; reading and editing are one continuous experience, not separate viewer and textarea pages.
- Support source/edit, reading, and live-preview modes. Markdown structure should stay legible while typing.
- Autosave local edits after a short idle debounce and show truthful states:
已保存,正在保存…,未保存,保存失败,外部修改冲突. - Preserve cursor, selection, active note, scroll position, and draft when switching the source sidebar, employee, focus mode, or returning to the module.
Cmd/Ctrl+Sforces save; save failures never discard the draft.- Detect filesystem changes made outside RoleWeave and refresh clean documents. If the local editor is dirty, do not overwrite it: surface a compare/reload/keep-mine conflict choice.
- Support Obsidian-style
[[wikilinks]]and normal Markdown links. Clicking an internal note link opens the target in this workspace; missing targets offer safe note creation. - File and link affordances use meaningful icons by target type (Markdown note, folder, web link, attachment, missing note) and remain keyboard accessible.
- Keep the existing file list/search and allow create/rename/archive/delete from feat(knowledge): document lifecycle ops for Knowledge Base #505 without losing an active draft.
Authority and storage boundaries
- Markdown files remain the source of truth on disk; do not create a second hidden note database.
- Use the existing validated position-document APIs from feat(knowledge): document lifecycle ops for Knowledge Base #505. Preserve path traversal, symlink, byte-limit, workspace/position ownership, and atomic-write protections.
- Bound package files such as
SKILL.mdand non-knowledge/*files remain read-only unless the existing authority contract explicitly permits writes. - A write must carry the version read by the editor (or equivalent compare token). The server rejects stale writes instead of silently overwriting external changes.
- Autosave is per file and serialized; late responses from a previous employee/file must not mutate the current editor.
Acceptance criteria
- Markdown note opens in an inline editable surface with source/live-preview/reading modes.
- Editing triggers debounced autosave and visible truthful save state.
-
Cmd/Ctrl+Sperforms an immediate save. - Switching views and returning preserves unsaved text and cursor/scroll state.
- External clean-file changes refresh; dirty-file changes produce an explicit conflict flow.
- Stale-version writes are rejected and covered by server tests.
-
[[wikilinks]]and relative Markdown links navigate between notes; missing-note creation is explicit. - Links include correct target icons and accessible names/focus behavior.
- Agent and external filesystem edits converge through the same file/version contract.
- Full renderer, server, IPC, i18n/CJK, packaging, and macOS/Windows verification remain green.
Dependency and delivery sequence
- Review and merge feat(knowledge): document lifecycle ops for Knowledge Base #505 (document write/lifecycle contract).
- Rebase this implementation on the resulting
main. - Deliver this issue as a separate focused PR with exact-head review.
Maintenance acceptance record
requirement-decision:v1
DEC-ROLEWEAVE-511-001 — 2026-10-18T09:16:37.1306868Z
Revision: R1 maintenance formalization; status: accepted.
Decision: close the implemented outcome as completed after the ACCEPT evidence above. Preserve the original requirement text and record the absorbed implementation; no scope is added or silently removed. Related maintenance anchor: #607.
The existing DocsPanel and LiveMarkdownEditor implement source/live/reading modes, debounced serialized saves, Cmd/Ctrl+S, per-note retained drafts/cursor/scroll, external-change conflict handling and explicit missing-note creation. Named regressions in docs-lifecycle.test.tsx cover these behaviors, including cross-remount state and Chinese composition. Versioned writes use the existing document API; the workspace vault and Mem synchronization landed through #575. No second note database is introduced.
Validation: https://github.com/bytefolk/roleweave/actions/runs/38987591415 plus fresh local regression results in #607. This closes implementation scope; real customer trials remain separate.
Activity
PeterGuy326 commentedon Oct 18, 2026
ACCEPT — owner-authorized maintenance review under #607.
The existing DocsPanel and LiveMarkdownEditor implement source/live/reading modes, debounced serialized saves, Cmd/Ctrl+S, per-note retained drafts/cursor/scroll, external-change conflict handling and explicit missing-note creation. Named regressions in docs-lifecycle.test.tsx cover these behaviors, including cross-remount state and Chinese composition. Versioned writes use the existing document API; the workspace vault and Mem synchronization landed through #575. No second note database is introduced.
Evidence baseline: main 471beb3; hosted verify https://github.com/bytefolk/roleweave/actions/runs/38987591415 passed both Node platforms, native staging/installers and layout parity. Fresh local check passed scripts 233/233, UI 53/53, server 950/950, renderer 1225/1225 and desktop 558/558; dependency audit 0. The acceptance here is the requested repository implementation scope, not a claim of real-customer, live-model or production-identity acceptance. Follow-up behavior receives a new child issue rather than reopening this implementation record.
PeterGuy326 commentedon Oct 18, 2026
requirement-decision:v1
DEC-ROLEWEAVE-511-001 — 2026-10-18T09:16:37.1306868Z
Revision: R1 maintenance formalization; status: accepted.
Decision: close the implemented outcome as completed after the ACCEPT evidence above. Preserve the original requirement text and record the absorbed implementation; no scope is added or silently removed. Related maintenance anchor: #607.