T-3DFJ-notes-adopts-markdown-ui
State: closed/done · Impact: high · Complexity: large
Notes is the reference integration for @sksizer/markdown-ui. This task replaces the
hand-assembled editor, reader, find bar and hover preview in NotesNoteView.vue with one
MdSurface, deletes the notes-local chrome the layer now owns, and moves the --obsmd-* bridge,
editor, autocomplete and find CSS out of notes.css. Every later rollout wave copies this shape.
| Location | Role today |
|---|---|
solutions/determined/experiences/notes/package.json | Depends on @sksizer/obsidian-editor and @sksizer/obsidian-md directly |
solutions/determined/experiences/notes/nuxt.config.ts | Resolves obsidian-md/theme.css and katex.min.css via createRequire; transpiles both engines |
solutions/determined/experiences/notes/app/assets/notes.css | 801 lines: --obsmd-* to --d-* bridge, reading view, embeds, Bases, canvas, .notes-editor editor and autocomplete blocks, find highlights |
solutions/determined/experiences/notes/app/components/NotesNoteView.vue | Mounts NotesEditor, ObsidianMarkdown, NotesFindBar, NotesHoverPreview; owns the mode switch (notes-mode-switch), useNoteFind, useNoteComponents |
solutions/determined/experiences/notes/app/components/NotesEditor.vue | useObsidianEditor wrapper; the surface MdSurface replaces |
solutions/determined/experiences/notes/app/components/NotesFindBar.vue | Find bar; generalised as MdFindBar by T-RJVA-md-ui-find-outline-hover-lifts |
solutions/determined/experiences/notes/app/components/NotesHoverPreview.vue | Wikilink hover preview; generalised as MdHoverPreview |
solutions/determined/experiences/notes/app/components/NotesOutline.vue | Outline rail content, mounted by NotesAuxPane.vue; generalised as MdOutline |
solutions/determined/experiences/notes/app/composables/useNoteFind.ts | Find state over body, scroller and editor view; generalised as useMarkdownFind |
solutions/determined/experiences/notes/app/utils/noteFind.ts | Pure find helpers, tested by noteFind.test.ts; lifted into the layer |
solutions/determined/experiences/notes/app/composables/useNoteComponents.ts | ThemedMermaidBlock plus the lang:base and obsidian-embed component map |
solutions/determined/experiences/notes/app/composables/useEditorProvider.ts | EditorIndexProvider over the vault stores |
solutions/determined/experiences/notes/app/plugins/register.ts | Experience registration; comments cite NotesEditor |
solutions/determined/experiences/notes/app/composables/useNotesUi.ts | useNotesOutline, requestNotesFind; comments cite the deleted components |
solutions/determined/experiences/notes/app/composables/useNoteScrollMemory.ts | Consumes useNotesOutline; exports NoteEditorView |
solutions/determined/experiences/notes/app/components/NotesAuxPane.vue | Mounts NotesOutline in the aux rail |
solutions/determined/tests/ui/notes/ | Playwright notes project; 13 specs use the notes-find-* and notes-mode-switch test ids |
scripts/guard-raw-palette.ts | The determined/experiences (rest) ring holds undeclared-token at baseline 2 for notes.css (--d-shadow-md, --d-bg-input) |
Proposed
Section titled “Proposed”Notes extends @sksizer/markdown-ui. NotesNoteView.vue mounts one MdSurface keyed by the note
URL: v-model is the body (a writable computed over docs.doc and docs.edit), v-model:mode
binds workspace.mode, frontmatter-panel="hidden" keeps NotesPropertiesPanel in place, and the
provider is useNotesMarkdownProvider. register.ts registers:
MarkdownPlugin { id: 'notes', components: { 'lang:base': NotesEmbeddedBase, 'obsidian-embed': NotesEmbed } }The seven notes-local chrome files are deleted. notes.css keeps only the reading view, embed,
Bases, canvas and pane-rail rules. The e2e ids move to md-find-* and md-mode-toggle. The palette
guard’s undeclared-token rule for the experiences ring becomes enforce().
Approach
Section titled “Approach”package.json: add@sksizer/markdown-ui(workspace:*); remove@sksizer/obsidian-editoroncegrep -rn obsidian-editor app/in the experience is empty. Keep@sksizer/obsidian-md(NotesEmbed.tsandNotesCanvasView.vueimportObsidianMarkdowndirectly).nuxt.config.ts:extends: ['@sksizer/markdown-ui']; delete theobsidianThemeandkatexThemecss entries and the two enginebuild.transpileentries.notes.css: delete the--obsmd-*-overridebridge block, the.notes-editorblock, the autocomplete rules and the find-highlight rules. Replace--d-shadow-mdand--d-bg-inputwith declared tokens on the way out. Inscripts/guard-raw-palette.ts, set thedetermined/experiences (rest)ring’sundeclared-tokentoenforce().- Rename
useEditorProvider.tstouseNotesMarkdownProvider.tsreturning the layer’sMarkdownProvider:searchNotes,searchTags,resolveLink,assetUrl,saveAttachment,loadNote(fromnote-source.client.ts),onInvalidate=onAssetLoadedandonResolutionChangedcombined. register.ts: register the notesMarkdownPluginthrough the layer’suseMarkdownPlugins; deleteuseNoteComponents.ts(itsThemedMermaidBlockis nowMdMermaidBlock).NotesNoteView.vue: replaceNotesEditor,ObsidianMarkdown,NotesFindBarandNotesHoverPreviewwithMdSurface. Wire@save,@open-link,@tag-click,@task-toggle,@fold-toggle(touseNoteFoldMemory),@outline(touseNotesOutline) and@find-scroll. FeeduseNoteScrollMemoryfrom the exposedscrollerandview; maprequestNotesFindtov-model:findOpen.NotesAuxPane.vue: mountMdOutlinebound touseNotesOutline()instead ofNotesOutline.- Delete
NotesEditor.vue,NotesFindBar.vue,NotesHoverPreview.vue,NotesOutline.vue,useNoteFind.ts,noteFind.ts,noteFind.test.ts,useNoteComponents.ts. Fix the citing comments inuseNotesUi.ts,useNoteScrollMemory.tsandregister.ts. - Rename test ids in the 13 specs under
solutions/determined/tests/ui/notes/(advanced,capture-code-fence,capture-find,capture-fold-sections,capture-related,capture-table,editor,find,fold-sections,reading,refactor,scroll-memory,search-graph):notes-find-*tomd-find-*,notes-mode-switchtomd-mode-toggle. Keepnotes-editorandnotes-properties. - Root
bun install;bun install --frozen-lockfilepasses. - Verify:
moon run product-workbench:check(confirms@determined/uiis registered once through shell and layer; fall back to shell-levelextendsif not),bun test appin the experience,bunx playwright test --project notesfromsolutions/determined,just ci-guards,moon run :check :test --affected. Manual: open a note, cycle read/live/source, toolbar bold,/menu,[[picker, table Tab,mod+s; byte-diff an unedited save.nuxi analyzeonsolutions/determined/products/workbench.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
solutions/determined/experiences/notes/package.json | modify | Add @sksizer/markdown-ui; drop @sksizer/obsidian-editor |
solutions/determined/experiences/notes/nuxt.config.ts | modify | Extend the layer; drop theme/katex css and engine transpile entries |
solutions/determined/experiences/notes/app/assets/notes.css | modify | Remove bridge, editor, autocomplete and find blocks; fix two undeclared tokens |
scripts/guard-raw-palette.ts | modify | Experiences ring undeclared-token to enforce() |
solutions/determined/experiences/notes/app/composables/useEditorProvider.ts | delete | Renamed to useNotesMarkdownProvider.ts |
solutions/determined/experiences/notes/app/composables/useNotesMarkdownProvider.ts | new | MarkdownProvider with loadNote and onInvalidate |
solutions/determined/experiences/notes/app/plugins/register.ts | modify | Register the notes MarkdownPlugin; fix NotesEditor comment |
solutions/determined/experiences/notes/app/components/NotesNoteView.vue | modify | Mount MdSurface; drop the four replaced components and useNoteFind |
solutions/determined/experiences/notes/app/components/NotesAuxPane.vue | modify | NotesOutline to MdOutline |
solutions/determined/experiences/notes/app/components/NotesEditor.vue | delete | Replaced by MdSurface |
solutions/determined/experiences/notes/app/components/NotesFindBar.vue | delete | Replaced by MdFindBar |
solutions/determined/experiences/notes/app/components/NotesHoverPreview.vue | delete | Replaced by MdHoverPreview |
solutions/determined/experiences/notes/app/components/NotesOutline.vue | delete | Replaced by MdOutline |
solutions/determined/experiences/notes/app/composables/useNoteFind.ts | delete | Replaced by useMarkdownFind |
solutions/determined/experiences/notes/app/utils/noteFind.ts | delete | Lifted into the layer |
solutions/determined/experiences/notes/app/utils/noteFind.test.ts | delete | Moves with noteFind.ts |
solutions/determined/experiences/notes/app/composables/useNoteComponents.ts | delete | Component map moves to the plugin; ThemedMermaidBlock is MdMermaidBlock |
solutions/determined/experiences/notes/app/composables/useNotesUi.ts | modify | Comments cite NotesFindBar, NotesEditor, useNoteFind, NotesOutline |
solutions/determined/experiences/notes/app/composables/useNoteScrollMemory.ts | modify | Comments cite useNoteFind; NoteEditorView sourced from the exposed view |
solutions/determined/tests/ui/notes/*.e2e.ts | modify | Test id renames in the 13 specs listed in Approach step 9 |
bun.lock | modify | Root lockfile regen |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
NotesEditor.vue,NotesFindBar.vue,NotesHoverPreview.vue,NotesOutline.vue,useNoteFind.ts,noteFind.ts,noteFind.test.tsanduseNoteComponents.tsno longer exist undersolutions/determined/experiences/notes/app/, and a recursive grep for those six names oversolutions/determined/experiences/notesreturns nothing. - AC-2:
NotesNoteView.vuemounts exactly oneMdSurfaceand noObsidianMarkdown. - AC-3:
notes.csshas no--obsmd-*-overridedeclaration and no.notes-editoror.cm-selector;just ci-guardspasses with the experiences ring atundeclared-token: enforce(). - AC-4: notes
nuxt.config.tshas nokatexortheme.cssentry and no enginetranspileentry;moon run product-workbench:checkpasses. - AC-5:
bunx playwright test --project notespasses, andgrep -rn "notes-find-\|notes-mode-switch" solutions/determinedreturns nothing. - AC-6: Saving an unedited note leaves the file’s sha unchanged; editing one line yields a
one-line
git diff(recorded in the PR). - AC-7:
nuxi analyzeonsolutions/determined/products/workbenchshows the layer plus engines add under 150 KB gzip to the main chunk, with mermaid, KaTeX and Shiki as lazy chunks. - AC-8: Switching live, source and read on a 2 000-line note preserves cursor and scroll and
completes in under 100 ms (Playwright trace from the playground harness or a
performance.markpair recorded in the PR). - AC-9:
bun install --frozen-lockfilepasses at the root.
Out of scope
Section titled “Out of scope”- The agent-pants experience migration (T-FQ5M-agent-pants-adopts-markdown-ui).
- The chrome Playwright spec (T-M8PU-notes-chrome-e2e).
- Building
MdFindBar,MdOutline,MdHoverPreview(T-RJVA-md-ui-find-outline-hover-lifts); this task consumes them. - Replacing
NotesPropertiesPanelwithMdFrontmatterPanel; the store-bound panel stays. NotesCanvasView.vuetext-node rendering (T-TUIL-json-canvas-vue-async-renderer-seam).
Dependencies
Section titled “Dependencies”- Engine features the notes surface exposes: T-EXQ7-md-engine-command-catalogue, T-MNRO-md-engine-anchors, T-N58P-md-engine-slash-and-heading-completion, T-UYTR-md-engine-tables, T-JPB0-md-engine-math, T-VCFL-md-engine-mermaid, T-DSVW-md-engine-html-details, T-LNJA-md-engine-large-file-guard, T-0BFS-md-engine-attachments, T-E99V-md-engine-transclusion-expansion.
- Chrome the surface composes: T-98EU-md-ui-toolbar-insert-frontmatter, T-8ZHI-md-ui-overlays-bubble-link-table, T-RJVA-md-ui-find-outline-hover-lifts, T-I630-md-ui-playground-e2e-perf.
- D-4QGN-markdown-dialect-and-compatibility-profile: the engine stays body-only; frontmatter is split by the caller.
D-7VMX-markdown-ecosystem-strategyd.10: every migration deletes an implementation.- S-0010-design-language-consumption: no direct
@nuxt/uior Tailwind imports;--d-*tokens only.
Discovery context
Section titled “Discovery context”Member of milestone M-931L; implements the wave-1 notes migration of D-K3EM-markdown-editor-chrome-and-plugin-environment.
Depends on
Section titled “Depends on”T-EXQ7-md-engine-command-catalogue, T-MNRO-md-engine-anchors, T-N58P-md-engine-slash-and-heading-completion, T-UYTR-md-engine-tables, T-JPB0-md-engine-math, T-VCFL-md-engine-mermaid, T-DSVW-md-engine-html-details, T-LNJA-md-engine-large-file-guard, T-0BFS-md-engine-attachments, T-E99V-md-engine-transclusion-expansion, T-98EU-md-ui-toolbar-insert-frontmatter, T-8ZHI-md-ui-overlays-bubble-link-table, T-RJVA-md-ui-find-outline-hover-lifts, T-I630-md-ui-playground-e2e-perf