Skip to content

fix: fall back to shared post title in ShareBar#6093

Merged
idoshamun merged 2 commits into
mainfrom
eng-1532-feedback-bug-report-description-is-null-when-sharing-on
May 24, 2026
Merged

fix: fall back to shared post title in ShareBar#6093
idoshamun merged 2 commits into
mainfrom
eng-1532-feedback-bug-report-description-is-null-when-sharing-on

Conversation

@idoshamun
Copy link
Copy Markdown
Member

@idoshamun idoshamun commented May 24, 2026

Summary

For shared posts with no title (commentary), the post sidebar's share buttons were passing an undefined description to the Twitter/X share link (and other social providers). Now we fall back to the referenced post's title, matching the existing post.title || post.sharedPost?.title pattern used in PostItemCard, the squad moderation components, and PostSEOSchema.

Changes

  • ShareBar.tsx: text: post?.titletext: post?.title || post?.sharedPost?.title
  • ShareBar.spec.tsx: added a regression test that mounts a shared post with title: undefined and asserts the Twitter share link is built with sharedPost.title

Test plan

  • pnpm --filter @dailydotdev/shared exec eslint on changed files
  • node scripts/typecheck-strict-changed.js
  • pnpm --filter @dailydotdev/shared exec jest src/components/ShareBar.spec.tsx (7/7 pass)

Closes ENG-1532


Created by Huginn 🐦‍⬛

Preview domain

https://eng-1532-feedback-bug-report-des.preview.app.daily.dev

idoshamun and others added 2 commits May 24, 2026 11:41
For shared posts with no title, the post sidebar share buttons were
passing an undefined description to Twitter/social share links. Fall
back to the referenced post's title so the share text is populated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reference the test-local post in both setup and assertion so the test
reads top-to-bottom without jumping back to the fixture.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

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

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview May 24, 2026 11:52am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored May 24, 2026 11:52am

Request Review

@idoshamun idoshamun merged commit 0e7ace1 into main May 24, 2026
12 checks passed
@idoshamun idoshamun deleted the eng-1532-feedback-bug-report-description-is-null-when-sharing-on branch May 24, 2026 11:53
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.

1 participant