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.
| Location | Role 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.ts | Lazily imports the markdown renderer |
solutions/augmented/apps/augmented_web/nuxt.config.ts | modules: ['@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.vue | Another <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.vue | MDC prototype page, the app’s only @nuxtjs/mdc use |
solutions/augmented/apps/vimit_prototype/nuxt.config.ts | Loads the @nuxtjs/mdc module |
solutions/augmented/apps/vimit_prototype/app/pages/prototypes/index.vue | Links to the MDC prototype page |
Proposed
Section titled “Proposed”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.
Approach
Section titled “Approach”package.json: add@sksizer/markdown-ui(workspace:*);nuxt.config.ts: add the layer toextendsbefore@determined/ui.- Rewrite
renderers/markdown/Renderer.vue:MdViewer,resolveLinkthat maps a wikilink to thefile-clickemit, no fallback, no logging.MdViewernever toucheswindow, so the SSR render path is safe. vimit_prototype: delete themdc.vueprototype page; remove the link card fromapp/pages/prototypes/index.vue; drop@nuxtjs/mdcfrompackage.jsonand the module fromnuxt.config.ts.- Root
bun install;bun install --frozen-lockfile. - Verify:
bun run typecheck,bun run testandbun run buildin 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 indocs/LIBRARIES.md.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
solutions/augmented/apps/augmented_web/package.json | modify | Add @sksizer/markdown-ui |
solutions/augmented/apps/augmented_web/nuxt.config.ts | modify | Extend the layer |
solutions/augmented/apps/augmented_web/layers/files/renderers/markdown/Renderer.vue | modify | MdViewer; delete simpleMarkdownToHtml, MDC state, logging |
solutions/augmented/apps/vimit_prototype/app/pages/prototypes/mdc.vue | delete | MDC 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.vue | modify | Drop the MDC link card |
solutions/augmented/apps/vimit_prototype/package.json | modify | Drop @nuxtjs/mdc |
solutions/augmented/apps/vimit_prototype/nuxt.config.ts | modify | Drop the @nuxtjs/mdc module entry |
docs/LIBRARIES.md | modify | augmented_web render-site row flips to resolved |
bun.lock | modify | Root lockfile regen |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
grep -rn "simpleMarkdownToHtml\|console.log" solutions/augmented/apps/augmented_web/layers/files/renderers/markdownreturns nothing. - AC-2:
renderers/markdown/Renderer.vuecontains no<MDCand mountsMdViewer. - AC-3:
bun run typecheck,bun run testandbun run buildpass insolutions/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-lockfilepasses at the root. - AC-6: vimit_prototype’s
mdc.vueprototype page no longer exists; no@nuxtjs/mdcentry remains insolutions/augmented/apps/vimit_prototype/package.jsonor itsnuxt.config.ts, andbun run buildpasses invimit_prototype.
Out of scope
Section titled “Out of scope”- The
MDCsites inlayers/dashboard/widgets/file-viewer/Renderer.vue,layers/files/renderers/canvas/Renderer.vueandlayers/files/pages/editor.vue. - Removing
@nuxt/content,remark-frontmatterorremark-parse. learn_web(T-BLHH-learn-web-editor-markdown-ui).- vimit_prototype’s other prototype pages (CodeMirror, vim); they hold no markdown renderer.
Dependencies
Section titled “Dependencies”- T-A0HT-md-ui-layer-skeleton supplies
MdViewer. - D-DLNG-design-language ring order places augmented last; this task runs after the determined and ontological waves.
D-7VMX-markdown-ecosystem-strategyd.10: the regex renderer is deleted.
Discovery context
Section titled “Discovery context”Member of milestone M-931L; wave 6b (augmented_web) of D-K3EM-markdown-editor-chrome-and-plugin-environment.