From d27fdb5af7fb349d51b69b884ac20a7ba46914c9 Mon Sep 17 00:00:00 2001 From: Hesara2003 Date: Sat, 18 Jul 2026 12:39:22 +0530 Subject: [PATCH] [CSM Portal Microapp] Fit inline comment images to the screen width --- .../microapp/src/components/case-detail/CommentBody.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/csm-portal/microapp/src/components/case-detail/CommentBody.tsx b/apps/csm-portal/microapp/src/components/case-detail/CommentBody.tsx index f07a9ad329..3e8bf7d8d5 100644 --- a/apps/csm-portal/microapp/src/components/case-detail/CommentBody.tsx +++ b/apps/csm-portal/microapp/src/components/case-detail/CommentBody.tsx @@ -29,6 +29,10 @@ const HTML_CONTENT_SX = { "& p:last-child": { marginBottom: 0 }, "& a": { color: "primary.main", textDecoration: "underline" }, "& ul, & ol": { mt: 0, mb: 0.5, pl: 2.5 }, + // Comment HTML can embed images at their original (often desktop-sized) + // dimensions — without a width cap they overflow the microapp's narrow + // viewport instead of scaling down to fit it. + "& img": { maxWidth: "100%", height: "auto", display: "block" }, } as const; // System-generated entries (escalation-flow summaries, etc.) can carry a raw JSON dump thousands