Skip to content

fix(dashboard): stop doubling https:// on deployment URLs - #1944

Open
FrancocDev wants to merge 1 commit into
oblien:mainfrom
FrancocDev:fix/deployments-copy-url-double-scheme
Open

FrancocDev wants to merge 1 commit into
oblien:mainfrom
FrancocDev:fix/deployments-copy-url-double-scheme

Conversation

@FrancocDev

Copy link
Copy Markdown

Requested by Franco · project thread

Summary

Copy URL in the Deployments tab now copies https://beszel.example.com instead of https://https://beszel.example.com. The same fix applies to Open deployment and the commit details Visit site button, which opened the same broken link.

Motivation

mapRowToDeployment sets deployment.domain from the API row's url, and that column already includes the scheme (the deploy services store https://<hostname>; projects/components/DeploymentCard.tsx uses deployment.url as an href directly). DeploymentMenu and CommitDetailsModal then built `https://${deployment.domain}`, so the scheme was added twice.

Related issue

None

Changes

apps/dashboard

  • deployments/utils.ts: add deploymentUrl(domain), which returns the value unchanged when it already has a scheme and prefixes https:// only for a bare hostname.
  • deployments/components/DeploymentMenu.tsx: Open deployment and Copy URL use deploymentUrl.
  • deployments/components/CommitDetailsModal.tsx: Visit site uses deploymentUrl.
  • deployments/utils.test.ts: maps an API row with url: "https://app.example.com" and checks the resulting URL, plus the bare-hostname case.

Verification

cd apps/dashboard
bunx vitest run "src/app/(dashboard)/deployments"   # 5 files, 30 tests passed
bun run lint                                          # tsc --noEmit, clean

With the old `https://${domain}` body restored, the new test fails:

Expected: "https://app.example.com"
Received: "https://https://app.example.com"

Checklist

  • One change per PR — one bug, or one agreed feature, with nothing unrelated bundled in
  • The diff is scoped — no reformatting or lint fixes on lines I wasn't otherwise changing
  • A test fails without this change and passes with it (or I explained above why there isn't one)
  • bun run test, bun run --cwd <workspace> lint, and bun format all pass locally (ran the deployments tests and the dashboard typecheck; the full suite was not run, and Prettier was checked on the new lines only since utils.ts has existing drift)
  • I understand every line of this diff and can explain it in review

The deployment history maps the API's url column, which already carries
the scheme, into deployment.domain. The deployments menu and commit
details modal then prefixed https:// again, so Copy URL produced
https://https://host and Open/Visit opened a broken link.

Add deploymentUrl(), which only prefixes https:// when no scheme is
present, and use it for Open, Copy URL and Visit site.
Copilot AI balanced review requested due to automatic review settings December 1, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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