Skip to content

T-FUVB-augmented-web-renderer-markdown-ui

State: closed/done · Impact: medium · Complexity: medium

The augmented_web file renderer for markdown uses @nuxt/content’s MDC component with a regex-based simpleMarkdownToHtml fallback and debug logging; sibling app vimit_prototype loads @nuxtjs/mdc for one prototype page. This task renders through MdViewer, deletes the fallback, and deletes vimit_prototype’s MDC prototype page and dep.

LocationRole today
solutions/augmented/apps/augmented_web/layers/files/renderers/markdown/Renderer.vue<MDC :value="file.content"> with simpleMarkdownToHtml fallback and console.log tracing
solutions/augmented/apps/augmented_web/layers/files/composables/useRendererRegistry.tsLazily imports the markdown renderer
solutions/augmented/apps/augmented_web/nuxt.config.tsmodules: ['@nuxt/content', '@nuxt/eslint']; extends layers/files, layers/dashboard, @determined/ui
solutions/augmented/apps/augmented_web/package.json@determined/ui (workspace:*); remark-frontmatter, remark-parse
solutions/augmented/apps/augmented_web/layers/dashboard/widgets/file-viewer/Renderer.vueAnother <MDC> site
solutions/augmented/apps/augmented_web/layers/files/renderers/canvas/Renderer.vue<MDC> for canvas node text
solutions/augmented/apps/augmented_web/layers/files/pages/editor.vue<MDC> preview in the editor page
solutions/augmented/apps/vimit_prototype/app/pages/prototypes/mdc.vueMDC prototype page, the app’s only @nuxtjs/mdc use
solutions/augmented/apps/vimit_prototype/nuxt.config.tsLoads the @nuxtjs/mdc module
solutions/augmented/apps/vimit_prototype/app/pages/prototypes/index.vueLinks to the MDC prototype page

renderers/markdown/Renderer.vue mounts <MdViewer :source="file.content" /> and forwards clicks through the existing content-click emit; simpleMarkdownToHtml, the MDC readiness state and the console.log calls are deleted. The app declares and extends @sksizer/markdown-ui. @nuxt/content stays for the other three MDC sites and content collections. In vimit_prototype, the mdc.vue prototype page and the @nuxtjs/mdc dep are deleted and the prototypes index drops its link; the app gains no markdown-ui dependency.

  1. package.json: add @sksizer/markdown-ui (workspace:*); nuxt.config.ts: add the layer to extends before @determined/ui.
  2. Rewrite renderers/markdown/Renderer.vue: MdViewer, resolveLink that maps a wikilink to the file-click emit, no fallback, no logging. MdViewer never touches window, so the SSR render path is safe.
  3. vimit_prototype: delete the mdc.vue prototype page; remove the link card from app/pages/prototypes/index.vue; drop @nuxtjs/mdc from package.json and the module from nuxt.config.ts.
  4. Root bun install; bun install --frozen-lockfile.
  5. Verify: bun run typecheck, bun run test and bun run build in the app; open a markdown file with a fence, a table and a link in light and dark; moon run :check :test --affected. Flip the augmented_web row of the duplicates ledger in docs/LIBRARIES.md.
LocationKindChange
solutions/augmented/apps/augmented_web/package.jsonmodifyAdd @sksizer/markdown-ui
solutions/augmented/apps/augmented_web/nuxt.config.tsmodifyExtend the layer
solutions/augmented/apps/augmented_web/layers/files/renderers/markdown/Renderer.vuemodifyMdViewer; delete simpleMarkdownToHtml, MDC state, logging
solutions/augmented/apps/vimit_prototype/app/pages/prototypes/mdc.vuedeleteMDC prototype page; referenced only by app/pages/prototypes/index.vue (link card) and the Nuxt route table
solutions/augmented/apps/vimit_prototype/app/pages/prototypes/index.vuemodifyDrop the MDC link card
solutions/augmented/apps/vimit_prototype/package.jsonmodifyDrop @nuxtjs/mdc
solutions/augmented/apps/vimit_prototype/nuxt.config.tsmodifyDrop the @nuxtjs/mdc module entry
docs/LIBRARIES.mdmodifyaugmented_web render-site row flips to resolved
bun.lockmodifyRoot lockfile regen
  • AC-1: grep -rn "simpleMarkdownToHtml\|console.log" solutions/augmented/apps/augmented_web/layers/files/renderers/markdown returns nothing.
  • AC-2: renderers/markdown/Renderer.vue contains no <MDC and mounts MdViewer.
  • AC-3: bun run typecheck, bun run test and bun run build pass in solutions/augmented/apps/augmented_web.
  • AC-4: Light and dark screenshots of a rendered markdown file are attached to the PR.
  • AC-5: bun install --frozen-lockfile passes at the root.
  • AC-6: vimit_prototype’s mdc.vue prototype page no longer exists; no @nuxtjs/mdc entry remains in solutions/augmented/apps/vimit_prototype/package.json or its nuxt.config.ts, and bun run build passes in vimit_prototype.
  • The MDC sites in layers/dashboard/widgets/file-viewer/Renderer.vue, layers/files/renderers/canvas/Renderer.vue and layers/files/pages/editor.vue.
  • Removing @nuxt/content, remark-frontmatter or remark-parse.
  • learn_web (T-BLHH-learn-web-editor-markdown-ui).
  • vimit_prototype’s other prototype pages (CodeMirror, vim); they hold no markdown renderer.

Member of milestone M-931L; wave 6b (augmented_web) of D-K3EM-markdown-editor-chrome-and-plugin-environment.

T-A0HT-md-ui-layer-skeleton


← Back to Tasks