Skip to content

fix(public-links): copy and show an absolute public link URL when FRONTEND_URL is unset (#3170) - #3171

Merged
vybe merged 1 commit into
devfrom
fix/3170-public-link-absolute-url
Oct 2, 2026
Merged

vybe merged 1 commit into
devfrom
fix/3170-public-link-absolute-url

Conversation

@obasilakis

Copy link
Copy Markdown
Contributor

Summary

With FRONTEND_URL unset (the .env.example default) the backend returns a public link's url as /chat/<token>, and the Sharing → Public links panel showed and copied that bare path.

  • New utils/publicLinkUrl.js: external_url || url, resolved against window.location.origin with new URL(). Absolute URLs pass through unchanged.
  • PublicLinksPanel.vue uses it for both the displayed link and the Copy button.

Test plan

  • tests/unit/publicLinkUrl.spec.js: relative path resolved, absolute url kept, external_url preferred, empty link → ''. Failed before the helper existed, passes now.
  • CI frontend unit suite.

Closes #3170

🤖 Generated with Claude Code

…NTEND_URL is unset (#3170)

The backend builds a public link's `url` as `${FRONTEND_URL}/chat/<token>`,
and FRONTEND_URL defaults to empty, so the Sharing panel showed and copied a
bare `/chat/<token>` path. Resolve it against the page origin in the panel.
An absolute `url` or `external_url` passes through unchanged.

Closes #3170

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge-train: batch validated on train PR #3179 (all checks green).

@vybe
vybe merged commit dee9994 into dev Oct 2, 2026
23 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