Skip to content

T-HY7N-agentpants-drop-mdc

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

The standalone Agent Pants app renders skill previews and help pages with @nuxtjs/mdc and a hand-written regex frontmatter parser. D-A27T-suspenders-skill-experience-module marks the app reference-only, so this task is a capped, viewer-only deletion: MdViewer plus markdown-util replace the MDC stack, and the task stops if file: wiring blows the budget.

LocationRole today
apps/agentpants/src-nuxt/app/components/preview/RenderedMarkdown.vueRegex frontmatter table plus <MDC :value="body">
apps/agentpants/src-nuxt/app/components/preview/RenderedMarkdown.stories.tsStory noting MDC is unavailable in Storybook
apps/agentpants/src-nuxt/app/components/preview/Pane.vueMounts PreviewRenderedMarkdown and PreviewCodeMirrorViewer
apps/agentpants/src-nuxt/app/pages/help/[entity].vue<MDC :value="markdown">; scrolls to the hash anchor after MDC renders
apps/agentpants/src-nuxt/scripts/check-help-links.tsSlugs help headings with github-slugger to verify anchors
apps/agentpants/src-nuxt/nuxt.config.tsExtends @determined/ui; modules includes @nuxtjs/mdc
apps/agentpants/src-nuxt/package.json@nuxtjs/mdc, @tailwindcss/typography; check:help-links script
apps/agentpants/src-nuxt/app/assets/css/main.cssprose rules
apps/agentpants/src-nuxt/app/utils/browser-mock.tsContains prose markup
apps/agentpants/bun.lockIsolated lockfile, checked by .github/workflows/lockfile-drift.yml
.github/workflows/agentpants-ci.ymlApp CI

RenderedMarkdown.vue splits frontmatter with split() from @sksizer/markdown-util, renders the YAML rows from that string, and renders the body with MdViewer. help/[entity].vue renders with MdViewer; obsidian-md’s remarkHeadingIds uses github-slugger, so the anchors check-help-links.ts computes keep matching. @nuxtjs/mdc leaves modules and package.json. @sksizer/markdown-ui and its transitives are wired by file: with overrides. @tailwindcss/typography is removed only if no prose class survives outside the two replaced files.

  1. Budget check first: wire @sksizer/markdown-ui, @sksizer/obsidian-md, @sksizer/obsidian-editor, @sksizer/markdown-util by file: with overrides in src-nuxt/package.json; add the layer to extends; add vite.resolve.dedupe for vue, @codemirror/state, @codemirror/view, @lezer/common and optimizeDeps.include: ['unified', 'extend', 'debug']; run nuxt dev and nuxt build. If either fails on duplicate @codemirror/state or CJS pre-bundling after those two settings, fall back to wiring only @sksizer/obsidian-md and @sksizer/markdown-util and render with ObsidianMarkdown from @sksizer/obsidian-md/vue. If that also fails to build, close the task closed/wontfix citing D-A27T-suspenders-skill-experience-module.
  2. RenderedMarkdown.vue: replace the regex parser with split(); render the body via MdViewer (or ObsidianMarkdown on the fallback path). Update the story comment.
  3. help/[entity].vue: render via the same component; scroll to the hash after the rendered event.
  4. Remove @nuxtjs/mdc from modules and package.json. Grep prose under src-nuxt/app; if the only hits were the two replaced files, delete the prose rules in main.css, the markup in browser-mock.ts and @tailwindcss/typography.
  5. cd apps/agentpants && bun install; commit bun.lock; bun install --frozen-lockfile.
  6. Verify: bun run typecheck, bun run test, bun run check:help-links in src-nuxt; nuxi analyze shows no mdc chunk; moon run :check :test --affected. Flip the agentpants row of the duplicates ledger in docs/LIBRARIES.md.
LocationKindChange
apps/agentpants/src-nuxt/package.jsonmodifyAdd file: packages and overrides; delete @nuxtjs/mdc (and @tailwindcss/typography per step 4)
apps/agentpants/src-nuxt/nuxt.config.tsmodifyExtend the layer; drop the @nuxtjs/mdc module; dedupe, optimizeDeps
apps/agentpants/src-nuxt/app/components/preview/RenderedMarkdown.vuemodifysplit() frontmatter; MdViewer body
apps/agentpants/src-nuxt/app/components/preview/RenderedMarkdown.stories.tsmodifyStory comment no longer cites MDC
apps/agentpants/src-nuxt/app/pages/help/[entity].vuemodifyMdViewer; hash scroll on rendered
apps/agentpants/src-nuxt/app/assets/css/main.cssmodifyDelete prose rules if step 4 allows
apps/agentpants/src-nuxt/app/utils/browser-mock.tsmodifyDelete prose markup if step 4 allows
apps/agentpants/bun.lockmodifyRegenerated
docs/LIBRARIES.mdmodifyAgentpants render-site row flips to resolved
  • AC-1: grep -rn "@nuxtjs/mdc\|<MDC" apps/agentpants/src-nuxt --include=*.vue --include=*.ts --include=*.json returns nothing and apps/agentpants/bun.lock has no @nuxtjs/mdc entry.
  • AC-2: RenderedMarkdown.vue contains no indexOf('---' and imports split from @sksizer/markdown-util.
  • AC-3: bun run check:help-links passes and clicking a help anchor scrolls to its heading.
  • AC-4: bun run typecheck and bun run test pass in apps/agentpants/src-nuxt; bun install --frozen-lockfile passes in apps/agentpants; agentpants-ci.yml is green.
  • AC-5: If the fallback in Approach step 1 closes the task, the closing note records which build error stopped it.
  • CodeMirrorViewer.vue and DiffViewer.vue; the read-only code viewer stays.
  • Any editor in apps/agentpants; the app is reference-only.
  • The determined agent-pants experience (T-FQ5M-agent-pants-adopts-markdown-ui).

Member of milestone M-931L; wave 4b of D-K3EM-markdown-editor-chrome-and-plugin-environment.

T-A0HT-md-ui-layer-skeleton


← Back to Tasks