Skip to content

Render links and live mention chips in Bluebird threads#3349

Merged
adamleithp merged 2 commits into
mainfrom
posthog-code/bluebird-thread-links-mention-chips
Jul 10, 2026
Merged

Render links and live mention chips in Bluebird threads#3349
adamleithp merged 2 commits into
mainfrom
posthog-code/bluebird-thread-links-mention-chips

Conversation

@k11kirky

Copy link
Copy Markdown
Contributor

Problem

In project-bluebird channel threads, URLs in messages render as plain text, and @-tagging a teammate in the composer shows the raw @[Name](email) markdown token instead of the chip UI that sent messages use.

Why

Threads are the main human-to-human surface in Channels; unclickable links and visible markdown tokens make them feel broken compared to the rest of the app.

Changes

  • Thread messages (MentionText, used by the thread panel and Activity view) now render bare http(s) URLs as links that open externally, with trailing punctuation kept as prose.
  • Rebuilt MentionComposer on Tiptap: selecting a teammate from the @-typeahead inserts an inline chip styled exactly like mentions on sent messages. The editor serializes back to the shared @[Name](email) token format on every edit, so storage, notifications, and older clients are unchanged. The typeahead popup, keyboard handling (arrows/Enter/Tab/Escape, Enter-to-send, Shift+Enter for a newline), and analytics hooks carry over.

How did you test this?

  • New unit tests: URL segmentation (linkify.test.ts) and mention-token ⇄ editor-doc round-trip serialization (MentionComposer.test.ts).
  • pnpm --filter @posthog/ui typecheck, Biome check, and the full canvas test suite (92 tests) pass.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Thread messages now render bare URLs as clickable links, and the thread composer shows @-mentions as styled chips while typing (via a Tiptap editor that serializes back to the shared mention token format) instead of the raw markdown token.

Generated-By: PostHog Code
Task-Id: 0c3b84d6-4b62-449f-9154-917103a1109a
@trunk-io

trunk-io Bot commented Jul 10, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

React Doctor found 1 issue in 1 file · 1 warning.

1 warning

src/features/canvas/components/MentionComposer.tsx

Reviewed by React Doctor for commit e837528.

The quality check failed on formatting in the new test file. Also moves docToContent/contentToDoc out of the component file into the mentionComposer utils (with their tests) to address React Doctor's only-export-components warnings.

Generated-By: PostHog Code
Task-Id: 0c3b84d6-4b62-449f-9154-917103a1109a
@k11kirky k11kirky marked this pull request as ready for review July 10, 2026 19:38
@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Fix Biome formatting; move composer seri..." | Re-trigger Greptile

@adamleithp adamleithp merged commit b46943c into main Jul 10, 2026
30 checks passed
@adamleithp adamleithp deleted the posthog-code/bluebird-thread-links-mention-chips branch July 10, 2026 20:08
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