Skip to content

Update share clip format - #2478

Open
shomix wants to merge 1 commit into
mainfrom
shomix-p-view-clip-v2
Open

Update share clip format#2478
shomix wants to merge 1 commit into
mainfrom
shomix-p-view-clip-v2

Conversation

@shomix

@shomix shomix commented Jul 28, 2026

Copy link
Copy Markdown
Contributor
  • Shows who shared the recording and the recording title.
  • Keeps the existing recording thumbnail.
  • Uses one clear Open Recording button.
  • Adds a short description of Clips and explains that recipients can reply directly to the sender.
image

@github-actions

Copy link
Copy Markdown
Contributor

Visual recap — screenshot failed

A recap was published, but the PR-comment screenshot could not be captured or uploaded. Open the interactive recap directly:

Open the full interactive recap

Diagnostic:

dark: screenshot captured but image upload failed

@builder-io-integration builder-io-integration Bot 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.

Builder reviewed your changes and found 1 potential issue 🟡

Review Details

Code Review Summary

PR #2478 adds an optional notification-content hook to the shared-resource registry and uses it for Clips recording shares. The Clips email now keeps the existing thumbnail hero, presents a single Open Recording CTA, identifies the sender and recording, and adds reply guidance; the core renderer also supports trusted post-CTA HTML with a plain-text equivalent. The approach is appropriately scoped, reuses the existing sender profile lookup, escapes dynamic markup, and adds focused renderer and security regression tests.

Risk assessment: Standard. The main concern is email-delivery robustness: the newly generated subject includes profile/title values, so header-safe normalization should be guaranteed before provider submission. The rest of the change has good fallback behavior for optional resolvers and preserves existing registrations.

Key Findings

Medium: The Clips notification subject can contain CR/LF from the sender display name, which may cause providers to reject the message.

🧪 Browser testing: Attempted after review, but browser automation was unavailable; all planned flows were reported as environment-unverified. The dev server was healthy and server-side verification confirmed the new email content.

Comment on lines +68 to +73
const senderName = ctx.sender.name.trim();
const title = recording.title?.trim() || "Untitled recording";
const heading = `${senderName} shared "${title}" with you`;

return {
subject: heading,

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.

🟡 Strip line breaks before using the profile name in the subject

senderName is only trimmed, so an embedded \r or \n in the display name is copied into subject and passed to the email provider. That can make the notification fail to send; strip CR/LF from the sender/title before constructing the subject (and add a regression test).

Additional Info
Found by 1 of 2 parallel code-review agents; verified against the changed subject construction and provider send path.

Fix in Builder

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

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