Skip to content

refactor(ui): migrate Markdown core to Astryx - #1668

Merged
Astro-Han merged 10 commits into
mainfrom
refactor/1565-pr7-markdown-core
Jul 30, 2026
Merged

refactor(ui): migrate Markdown core to Astryx#1668
Astro-Han merged 10 commits into
mainfrom
refactor/1565-pr7-markdown-core

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Refs #1565.

  • Replace Streamdown plus Maka's parallel prose/link/code CSS with Astryx Markdown as the single parser, typography, table, task-list, and syntax-highlighting authority.
  • Preserve Maka's product trust boundaries: redact before the Suspense fallback, keep the typed maka: navigation allowlist separate from the http/https image policy, and prevent non-allowlisted Markdown images from loading.
  • Keep stream pacing and scroll anchoring on the existing conversation path for PR 8 while applying Astryx's pure incomplete-syntax repair before parsing.
  • Retain localized success/failure feedback around Astryx 0.1.9's code-copy button because that release discards clipboard rejections.
  • Remove the retired Streamdown dependency closure and generated license inventory, and add one composed-shell Storybook state for Markdown review.

Verification

  • npm --workspace @maka/ui test — 280 passed.
  • npm --workspace @maka/desktop test — 2966 passed.
  • npx playwright test --config e2e/playwright.config.ts e2e/send-message.spec.ts — 2 passed, including exact copied code and clipboard rejection feedback.
  • npm run rebuild, npm run typecheck, npm run lint, npm run format:check, and npm run check:release — passed.
  • npx knip --workspace packages/ui and npx knip --workspace apps/desktop — passed (desktop reports only the existing electron-builder configuration hints).
  • npm --workspace @maka/desktop run build-storybook — passed.
  • npm run check:visual-contract -- --against main --scopes scripts/visual-contract-scopes/pr7-markdown-core.json — 20/20 route, theme, and platform comparisons clean; 48 Markdown/turn-flow changes declared where the chat fixture is present and zero changes outside the declared subtree.
  • npm run check:hit-test — 5/5 routes clean.

Review focus

  • Astryx 0.1.9 bypasses components.image for standalone image blocks. The pre-parse guard closes that upstream gap while leaving fenced and inline code untouched; tests cover direct, inline, and reference images.
  • Astryx 0.1.9 catches clipboard write failures without exposing an error callback. A capture-boundary adapter delegates the write to Maka's existing clipboard-feedback owner and can be removed once Astryx exposes that callback.
  • scripts/visual-contract-scopes/pr7-markdown-core.json is the issue-required declaration for this migration slice; the final migration cleanup PR removes the harness.
  • package-lock.json and apps/desktop/resources/licenses/npm/THIRD_PARTY_NOTICES.txt are generated reductions from removing Streamdown's production dependency closure.

Visual evidence

Live Electron shell, light theme (deterministic E2E fixture):

maka-pr1668-markdown-core

@Astro-Han
Astro-Han deleted the branch main July 30, 2026 17:16
@Astro-Han Astro-Han closed this Jul 30, 2026
@Astro-Han Astro-Han reopened this Jul 30, 2026
@Astro-Han
Astro-Han changed the base branch from refactor/1565-markdown-contract-hook to main July 30, 2026 17:18
@Astro-Han
Astro-Han force-pushed the refactor/1565-pr7-markdown-core branch from 476b850 to 010c765 Compare July 30, 2026 17:18
@Astro-Han
Astro-Han merged commit dc74fdb into main Jul 30, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the refactor/1565-pr7-markdown-core branch July 30, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant