Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

trunk-merge/pr-3582/ad50500f-4c88-44eb-9e53-18747ee0a936 - #3586

Closed
trunk-io[bot] wants to merge 7 commits into
mainfrom
trunk-merge/pr-3582/ad50500f-4c88-44eb-9e53-18747ee0a936
Closed

trunk-merge/pr-3582/ad50500f-4c88-44eb-9e53-18747ee0a936#3586
trunk-io[bot] wants to merge 7 commits into
mainfrom
trunk-merge/pr-3582/ad50500f-4c88-44eb-9e53-18747ee0a936

Conversation

@trunk-io

@trunk-io trunk-io Bot commented Jul 20, 2026

Copy link
Copy Markdown
Trunk Merge Pull Request Banner

This pull request was created and is being managed by Trunk Merge.

This pull request is based on the main branch at SHA 4f0acfbd255288ee0ef06dd82ae7298d4f04b8d7.

See more details here.

When CI completes, this pull request will be closed automatically.

Pull Requests Being Tested

This pull request is testing the changes from pull request 3582.

adboio and others added 7 commits July 20, 2026 09:29
Clicking a canvas/channel share link in a channel thread bounced out to the
browser (PostHog Cloud interstitial) which then deep-linked back into the app.
The thread feed renders server-emitted announcement messages whose content
embeds a portable https share link; those links were rendered as plain
external anchors with no in-app interception.

Add a client-side parser that recognizes our own share-link URLs
(/code/canvas/... and /code/channel/...) and navigates via the in-app router,
short-circuiting the browser round-trip. Wired into MentionText (thread +
channel surfaces) and MarkdownRenderer (agent chat). External links are
untouched.

Generated-By: PostHog Code
Task-Id: a3001315-524a-4902-b23c-5c6f5b010827
Move parseShareLink next to canvasShareUrl/channelShareUrl in posthogLinks.ts
so the /code/canvas and /code/channel path shapes live in one place (the
parser is the inverse of the builders). Derive the recognized-host set from
REGION_LABELS instead of a hardcoded region list. shareLinks.ts is now just
the navigation glue (navigateToShareTarget/handleShareLinkClick).

Generated-By: PostHog Code
Task-Id: a3001315-524a-4902-b23c-5c6f5b010827
Generated-By: PostHog Code
Task-Id: a3001315-524a-4902-b23c-5c6f5b010827
Generated-By: PostHog Code
Task-Id: a3001315-524a-4902-b23c-5c6f5b010827
Generated-By: PostHog Code
Task-Id: a3001315-524a-4902-b23c-5c6f5b010827
A Cmd/Ctrl/Shift/middle click on a share link is explicit intent to open it
elsewhere; don't hijack it for in-app navigation. handleShareLinkClick now
bails on modified clicks so the anchor's target="_blank" default runs.

Generated-By: PostHog Code
Task-Id: a3001315-524a-4902-b23c-5c6f5b010827
@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit a70204b.

@trunk-io trunk-io Bot closed this Jul 20, 2026
@trunk-io
trunk-io Bot deleted the trunk-merge/pr-3582/ad50500f-4c88-44eb-9e53-18747ee0a936 branch July 20, 2026 14:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant