Skip to content

Conversation

@kimgho
Copy link
Contributor

@kimgho kimgho commented Aug 31, 2025

✅ Linked Issue

🔍 What I did

  • FAQ 아코디언 너비 수정

Summary by CodeRabbit

  • Style
    • Markdown content now renders full-width, removing prior max-width constraints for improved readability on wide and narrow screens.
    • FAQ accordion content expands to full width, providing a consistent, edge-to-edge layout.
    • Visual adjustments only; no changes to data, navigation, or interactions.
    • Enhances content legibility and alignment across pages without altering functionality.

@vercel
Copy link

vercel bot commented Aug 31, 2025

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

Project Deployment Preview Comments Updated (UTC)
mosu-client Ready Ready Preview Comment Aug 31, 2025 4:30pm

@coderabbitai
Copy link

coderabbitai bot commented Aug 31, 2025

Walkthrough

Two UI/layout updates: MarkDownRenderer now supports an optional className and sets article to max-w-none; FAQ page passes className="w-full" to MarkDownRenderer and sets AccordionContent to w-full. No data or control-flow changes.

Changes

Cohort / File(s) Summary
Markdown renderer layout update
mosu-app/src/entities/posts/ui/MarkDown.tsx
Added optional className prop; article className updated from "prose [&>h1]:my-1" to "prose max-w-none [&>h1]:my-1".
FAQ page full-width usage
mosu-app/src/pages/notice/faq.tsx
AccordionContent now w-full; MarkDownRenderer invoked with className="w-full".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
FAQ spacing appears unnatural; fix spacing (#381) Only width/layout classes changed; no text/content spacing logic or content edits.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Global removal of max-width on Markdown article (mosu-app/src/entities/posts/ui/MarkDown.tsx) Affects all Markdown-rendered content globally; objective targets FAQ spacing only, not global Markdown layout.
Adding className prop to MarkDownRenderer (mosu-app/src/entities/posts/ui/MarkDown.tsx) API surface change beyond fixing FAQ spacing; while used by FAQ, broadens component contract unrelated to spacing correction itself.

Suggested reviewers

  • toothlessdev

Poem

In fields of prose I hop with glee,
Widened pages set content free—
FAQ now stretches, edge to edge,
A rabbit’s tweak, a tidy pledge.
Tap-tap keys and carrots bright,
Layout neat, a cleaner sight.
Hop, ship, delight! 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix#381

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

Warnings
⚠️ PR 제목에 #이슈넘버가 포함되어 있지 않습니다. 이슈 번호를 포함해주세요.
Messages
📖 ✅ PR에 Reviewers가 지정되어 있습니다.
📖 ✅ PR에 라벨이 지정되어 있습니다.
📖 ✅ PR에 Assignees가 지정되어 있습니다.
📖 ✅ package.json에 변경사항이 없습니다.
📖 ✅ 브랜치 이름 'fix#381'이 컨벤션을 따릅니다.
📖 ✅ TypeScript 컴파일이 성공적으로 완료되었습니다.
📖 ✅ ESLint 검사 결과 문제가 없습니다.

📝 추가 및 변경된 파일

총 2개 파일 변경

└── 📂 mosu-app/
    └── 📂 src/
        ├── 📂 entities/
        │   └── 📂 posts/
        │       └── 📂 ui/
        │           └── ⚛️ MarkDown.tsx
        └── 📂 pages/
            └── 📂 notice/
                └── ⚛️ faq.tsx

Generated by 🚫 dangerJS against 58e5ec2

@github-actions
Copy link

📚 Storybook이 Chromatic에 배포되었습니다!

@kimgho kimgho merged commit d5eac4c into main Aug 31, 2025
9 of 10 checks passed
@kimgho kimgho deleted the fix#381 branch August 31, 2025 16:32
@github-project-automation github-project-automation bot moved this to 완료 in mosu-client Aug 31, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
mosu-app/src/pages/notice/faq.tsx (1)

21-22: Sanitize Markdown→HTML during build to prevent XSS

remark-html does not sanitize. Switch to a sanitized pipeline.

-import { remark } from "remark";
-import html from "remark-html";
+import { unified } from "unified";
+import remarkParse from "remark-parse";
+import remarkGfm from "remark-gfm";
+import remarkRehype from "remark-rehype";
+import rehypeSanitize from "rehype-sanitize";
+import rehypeStringify from "rehype-stringify";
@@
-                answer: remark().use(html).processSync(faq.answer).toString(),
+                answer: unified()
+                    .use(remarkParse)
+                    .use(remarkGfm)
+                    .use(remarkRehype)
+                    .use(rehypeSanitize) // sanitize HTML
+                    .use(rehypeStringify)
+                    .processSync(faq.answer)
+                    .toString(),
🧹 Nitpick comments (2)
mosu-app/src/entities/posts/ui/MarkDown.tsx (1)

11-11: Flip merge order, keep max-w-none default in MarkDownRenderer
Allow consumer width classes to override without breaking existing full-width layouts. In mosu-app/src/entities/posts/ui/MarkDown.tsx update:

- className={cn(props.className, "prose max-w-none [&>h1]:my-1")}
+ className={cn("prose max-w-none [&>h1]:my-1", props.className)}

Consumers needing a different max-width can now pass their own width utilities. Verify usages in signup, service, FAQ, announcement, and privacy pages and add explicit width overrides only where needed.

mosu-app/src/pages/notice/faq.tsx (1)

57-59: Scope the full-width change to FAQ only

Apply max-w-none at the call site so other MarkDownRenderer consumers keep their current layout. w-full on the container is fine.

-                            <AccordionContent className="mt-4 text-lg w-full">
-                                <MarkDownRenderer content={faq.answer} className="w-full" />
+                            <AccordionContent className="mt-4 text-lg w-full">
+                                <MarkDownRenderer content={faq.answer} className="w-full max-w-none" />
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 235cafe and 58e5ec2.

📒 Files selected for processing (2)
  • mosu-app/src/entities/posts/ui/MarkDown.tsx (1 hunks)
  • mosu-app/src/pages/notice/faq.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
mosu-app/src/pages/notice/faq.tsx (1)
mosu-app/src/entities/posts/ui/MarkDown.tsx (1)
  • MarkDownRenderer (7-15)
🪛 ast-grep (0.38.6)
mosu-app/src/entities/posts/ui/MarkDown.tsx

[warning] 11-11: Usage of dangerouslySetInnerHTML detected. This bypasses React's built-in XSS protection. Always sanitize HTML content using libraries like DOMPurify before injecting it into the DOM to prevent XSS attacks.
Context: dangerouslySetInnerHTML
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
- https://cwe.mitre.org/data/definitions/79.html

(react-unsafe-html-injection)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run DangerJS

{...props}
className={cn(props.className, "prose [&>h1]:my-1")}
className={cn(props.className, "prose max-w-none [&>h1]:my-1")}
dangerouslySetInnerHTML={{ __html: content }}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Sanitize HTML before injecting (XSS risk)

dangerouslySetInnerHTML requires trusted content. Sanitize on render or ensure upstream sanitization.

Option A (render-time sanitization):

-            dangerouslySetInnerHTML={{ __html: content }}
+            dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(content) }}

Add once at the top of this file:

import DOMPurify from "isomorphic-dompurify";

Option B (preferred): sanitize in the Markdown→HTML pipeline (see comment in faq.tsx Lines 21-22).

🧰 Tools
🪛 Biome (2.1.2)

[error] 12-12: Avoid passing content using the dangerouslySetInnerHTML prop.

Setting content using code can expose users to cross-site scripting (XSS) attacks

(lint/security/noDangerouslySetInnerHtml)

🤖 Prompt for AI Agents
mosu-app/src/entities/posts/ui/MarkDown.tsx around line 12, the component
injects raw HTML via dangerouslySetInnerHTML which is an XSS risk; either (A)
import isomorphic-dompurify at the top of this file and sanitize content before
passing it to dangerouslySetInnerHTML (use DOMPurify.sanitize with an HTML
profile/options), or (B, preferred) ensure the Markdown→HTML pipeline sanitizes
the output upstream and pass only already-sanitized HTML here; implement one of
these fixes and remove any remaining direct injections of unsanitized content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 완료

Development

Successfully merging this pull request may close these issues.

[✍️ 기능 변경 요청] FAQ 부자연스러운 띄어쓰기 수정

2 participants