Skip to content

feat: copy custom domain share links from the desktop apps - #3524

Merged
richiemcilroy merged 5 commits into
mainfrom
feat/desktop-custom-domain-links
Oct 28, 2026
Merged

richiemcilroy merged 5 commits into
mainfrom
feat/desktop-custom-domain-links

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Problem

When a team has a verified custom domain, the dashboard's Copy link button uses it, and so does the Share button in the Tauri editor. The links the desktop apps copy right after an Instant recording, a Studio upload or a screenshot share do not. Both apps build those links from their server URL, so they always come out as cap.so/s/<id>.

Fix

The server already knows which organization a video belongs to when the desktop creates it, so it now returns the right link with it.

Web

  • GET /api/desktop/video/create returns a new optional share_url for both new and existing videos.
  • getDesktopShareUrl (apps/web/lib/desktop-share-url.ts) returns https://<customDomain>/s/<id> only when the video's organization has a verified custom domain, the server is Cap's hosted service (NEXT_PUBLIC_IS_CAP) and it is running in production. These are the same conditions the dashboard's Copy link uses, and proxy.ts only serves custom domains on the hosted service.
  • In every other case, including a failed lookup, the field is left out. The lookup is one primary key read on organizations.

Desktop (Tauri and GPUI)

  • create_or_get_video now returns a CreatedVideo with the parsed share_url.
  • The link sites use it when present and otherwise build today's link:
    • Instant start: Tauri recording.rs, GPUI prepare_instant_upload.
    • Studio upload: an existing sharing link still wins, then the server link, then today's link.
    • Screenshot uploads.
  • A server link is only used if it is an https URL whose path is exactly /s/<that video id>, with no port, credentials, query or fragment. Anything else falls back.

Compatibility

  • Older desktop builds ignore the new field.
  • New builds talking to an older or self-hosted server get no field and keep today's links.
  • S3UploadMeta and the persisted recording meta are unchanged.
  • Links already saved in existing recordings are not rewritten.

Testing

  • Web: new desktop-share-url.test.ts covers verified, unverified, missing domain, missing org, self-hosted, non-production and a failed lookup. Two new route tests check that share_url comes from the video's organization for both the new-video and existing-video paths; they fail without the route change. 35 tests pass across the two files.
  • Desktop: cargo check -p cap-desktop --tests passes. The new parsing tests (three per app, including malformed and hostile links) were also run against the exact functions taken from both apps.
  • GPUI is a separate Cargo workspace and was not compiled locally for lack of disk space, so the GPUI CI build is the compile check for that commit.
  • The end to end path, a real Instant recording on a team with a verified domain, can only be checked once the web change is deployed.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no outstanding findings remain.

Summary

The desktop apps now use verified custom-domain share links returned by the server.

  • Desktop shares use verified custom domains when the server provides them.

Reviews (3) · Last reviewed commit: "chore(desktop): drop doc comments that r..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cap-status Ready Ready Preview Oct 28, 2026 6:37pm UTC

@richiemcilroy

Copy link
Copy Markdown
Member Author

@greptileai review

Comment thread apps/desktop/src-tauri/src/upload.rs Outdated
@richiemcilroy

Copy link
Copy Markdown
Member Author

@greptileai review

@richiemcilroy
richiemcilroy marked this pull request as ready for review October 28, 2026 19:05
@richiemcilroy
richiemcilroy merged commit 1199ed5 into main Oct 28, 2026
83 checks passed

@capy-ai capy-ai Bot 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.

Capy found no issues.

View 1 other finding in Capy.

Open in Capy

This branch was successfully deployed

2 active deployments
Preview – cap-web — 88eb4840 Deployed Oct 28, 2026 by vercel[bot]
Preview – cap-status — 88eb4840 Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant