Skip to content

improvement(mothership): align markdown blockquote, img, em, del with design tokens#4566

Merged
waleedlatif1 merged 4 commits into
stagingfrom
waleedlatif1/mothership-blockquote
May 12, 2026
Merged

improvement(mothership): align markdown blockquote, img, em, del with design tokens#4566
waleedlatif1 merged 4 commits into
stagingfrom
waleedlatif1/mothership-blockquote

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Add explicit blockquote, img, em, and del overrides to the Mothership markdown renderer so they use design tokens instead of prose defaults
  • Align blockquote styling across note-block, file viewer (callout fallback + main), and chat route to border-[var(--divider)] border-l-2 pl-4 text-[var(--text-primary)] (no italic, no hardcoded grays)

Type of Change

  • Improvement

Testing

Tested manually in Mothership chat.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped May 12, 2026 5:14pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 12, 2026

PR Summary

Low Risk
Low risk visual-only changes to markdown rendering classes (blockquote, emphasis, strikethrough, images) across chat, file preview, and note blocks; no logic or data-flow changes.

Overview
Aligns markdown rendering with design tokens by standardizing blockquote styling across chat (markdown-renderer.tsx and workspace chat), file preview (preview-panel.tsx callout fallbacks), and workflow note blocks (switches to --divider/border-l-2, removes hardcoded grays/italic, and normalizes paragraph spacing).

Adds explicit workspace chat markdown overrides for blockquote, em, del, and img so these elements render with tokenized colors and consistent image framing/loading behavior.

Reviewed by Cursor Bugbot for commit 01ca881. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR replaces hardcoded Tailwind gray/border values in markdown blockquote renderers across four files with design tokens (--divider, --text-primary) and aligns border width, removes legacy italic/py-1 overrides, and adds img, em, and del overrides to the Mothership chat renderer. The previously flagged first:[&>p] / last:[&>p] Tailwind variant scoping bug is correctly addressed in the head commit ([&>p:first-child] / [&>p:last-child]).

  • Blockquote alignment — all four renderers now use border-[var(--divider)] border-l-2 pl-4 text-[var(--text-primary)] with proper paragraph-margin arbitraries.
  • New chat-content overridesem, del, and img components added to the Mothership chat renderer using design tokens; img includes a null-guard for missing src and loading="lazy".
  • note-block em — left unchanged (text-tertiary) since the note canvas uses a distinct visual context from the chat surface.

Confidence Score: 5/5

Safe to merge — changes are purely presentational class replacements with no logic modifications.

All four files receive straightforward string substitutions swapping hardcoded gray palette values for design tokens. The Tailwind variant scoping bug flagged in earlier review rounds is correctly fixed in this head commit. No data flows, API calls, or component props are altered, so the risk surface is limited to visual regressions only.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/app/chat/components/message/components/markdown-renderer.tsx Blockquote override updated from hardcoded Tailwind gray palette values to design tokens (--divider, --text-primary); border width narrowed from border-l-4 to border-l-2, italic and py-1 removed, paragraph-margin arbitraries added with correct [&>p:first-child]/[&>p:last-child] scoping.
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx Both blockquote sites (CalloutBlock fallback and the main STATIC_MARKDOWN_COMPONENTS renderer) are aligned to the same token-based class string as the other files; --border-1 / text-tertiary / italic / py-1 removed.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx Adds four new MARKDOWN_COMPONENTS overrides — blockquote, em, del, and img — using design tokens; img uses a plain <img> with loading="lazy" and a null-guard for missing src.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx Blockquote class updated consistently with other renderers; em override (text-tertiary) left intentionally unchanged as it serves the note-block's distinct visual context.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Markdown Input] --> B{Renderer Context}
    B -->|Public Chat Route| C[markdown-renderer.tsx]
    B -->|File Viewer| D[preview-panel.tsx]
    B -->|Mothership Home Chat| E[chat-content.tsx]
    B -->|Note Block Canvas| F[note-block.tsx]

    C --> G[blockquote: --divider / --text-primary]
    D --> H[CalloutBlock fallback: --divider / --text-primary]
    D --> I[STATIC_MARKDOWN_COMPONENTS: --divider / --text-primary]
    E --> J[blockquote: --divider / --text-primary]
    E --> K[em: --text-primary italic]
    E --> L[del: --text-tertiary line-through]
    E --> M[img: lazy-loaded, border --divider]
    F --> N[blockquote: --divider / --text-primary]
    F --> O[em: --text-tertiary unchanged]
Loading

Reviews (2): Last reviewed commit: "fix(mothership): correctly scope blockqu..." | Re-trigger Greptile

Comment thread apps/sim/app/chat/components/message/components/markdown-renderer.tsx Outdated
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 01ca881. Configure here.

@waleedlatif1 waleedlatif1 merged commit 1b94424 into staging May 12, 2026
13 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/mothership-blockquote branch May 12, 2026 17:24
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