Skip to content

fix(chat): render URLs in messages as clickable links#60

Merged
irumvanselme merged 1 commit into
mainfrom
fix/chat-clickable-links
Jun 16, 2026
Merged

fix(chat): render URLs in messages as clickable links#60
irumvanselme merged 1 commit into
mainfrom
fix/chat-clickable-links

Conversation

@wilfredeveloper

Copy link
Copy Markdown
Collaborator

Problem

In the recommendation phase, the backend (backend/app/agent/recommender_advisor_agent/agent.py:524) embeds raw application URLs in the message (Apply here: https://…). The frontend rendered all message text as plain text via MUI Typography in ChatBubble.tsx, so users could not click job links and struggled to navigate to applications.

Fix

  • ChatBubble.tsx: auto-linkify http(s) and www. URLs in string messages, rendering them as <Link target="_blank" rel="noopener noreferrer">. Line-break behavior (whiteSpace: pre-line) is preserved; ReactNode messages pass through unchanged.
  • ChatBubble.stories.tsx: added a WithClickableLinks story showing a recommendation-style message.

Applies to all Compass messages, not just recommendations.

Verification

  • yarn compile (tsc) passes.

Backend recommendation messages embed raw application URLs, but the
frontend rendered all message text as plain text, so job links were
not clickable. Auto-linkify http(s)/www URLs in string messages in
ChatBubble, opening in a new tab. Add a Storybook story.
@irumvanselme
irumvanselme merged commit 2e1a626 into main Jun 16, 2026
6 checks passed
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.

2 participants