Skip to content

Conversation

@PRAteek-singHWY
Copy link
Contributor

@PRAteek-singHWY PRAteek-singHWY commented Jan 20, 2026

PR Description

Overview

This PR fixes an issue in the OpenCRE Chat UI where long URLs inside assistant responses cause horizontal scrolling on smaller screen widths (≤ 992px).

The problem becomes visible when the chatbot response contains long links (e.g. CWE, OWASP, or standards URLs), which overflow their container and force the page to scroll horizontally.


Dependency Note:

This PR is stacked on top of PR #698 and PR #699, which introduced the initial chatbot UI improvements. This specific fix addresses an overflow regression in that new design.


What’s changing

  • Ensures long links and unbroken text wrap correctly inside chat messages
  • Prevents horizontal overflow in:
    • .message-body
    • Markdown-rendered <p> content
  • Keeps all existing chatbot logic unchanged (purely a UI fix)

This applies to both:

  • Local development (localhost)
  • Production (opencre.org/chatbot)

Why this is needed

Before this change:

  • Long URLs extended beyond the message card
  • A horizontal scrollbar appeared on mobile/tablet
  • Chat experience felt broken on smaller screens

After this change:

  • Links wrap naturally across lines
  • No horizontal scrolling
  • Chat layout remains stable across breakpoints

Screenshots

Before

Horizontal scrollbar appears when response contains long links

image image

After

image

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