Skip to content

fix: truncate X notification attachment titles to 140 characters#3799

Merged
AmarTrebinjac merged 1 commit intomainfrom
eng-1256-truncate-x-notifications
Apr 15, 2026
Merged

fix: truncate X notification attachment titles to 140 characters#3799
AmarTrebinjac merged 1 commit intomainfrom
eng-1256-truncate-x-notifications

Conversation

@AmarTrebinjac
Copy link
Copy Markdown
Contributor

Summary

  • Truncate SocialTwitter post attachment titles to 140 characters (137 + ...) in NotificationBuilder.attachmentPost()
  • Only applies to SocialTwitter post type — article and other post titles are unaffected
  • Follows existing truncation patterns (simplifyComment, truncateToTweet)

Test plan

  • Added test: SocialTwitter titles >140 chars are truncated to exactly 140
  • Added test: SocialTwitter titles ≤140 chars are preserved as-is
  • Added test: Non-SocialTwitter (Article) titles are never truncated
  • All 65 notification tests pass
  • Lint and build clean

Closes ENG-1256


Created by Huginn 🐦‍⬛

SocialTwitter post titles in notification attachments were displayed
in full, causing oversized notifications. Truncate to 140 characters
with ellipsis for SocialTwitter posts only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pulumi
Copy link
Copy Markdown

pulumi bot commented Apr 15, 2026

🍹 The Update (preview) for dailydotdev/api/prod (at 7090931) was successful.

✨ Neo Explanation

Routine deployment of commit `3461ba40` across all API deployments and cron jobs, with accompanying DB and ClickHouse migration jobs replacing those from the previous release. ✅ Low Risk

This is a standard application deployment rolling out a new build (7fa256493461ba40) across all services. Every change is purely an image tag and version label update — no configuration, resource limits, environment variables (beyond the version string), or structural changes are involved.

🔵 Info — Migration Jobs are being cycled as part of the release pattern: the old DB and ClickHouse migration Jobs (suffixed with the previous commit hash) are deleted and new ones for the incoming commit are created. This is expected behavior. The migrations run against production databases — confirm the new migration jobs complete successfully before considering the deployment done. The restartPolicy: Never means a failed migration will not retry automatically.

The GCP credentials warning on the default_9_12_0 provider is a diagnostic noise from the preview environment and does not affect the Kubernetes resources being deployed.

Resource Changes

    Name                                                       Type                           Operation
~   vpc-native-calculate-top-readers-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-sync-subscription-with-cio-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-gifted-plus-cron                          kubernetes:batch/v1:CronJob    update
~   vpc-native-update-views-cron                               kubernetes:batch/v1:CronJob    update
-   vpc-native-api-db-migration-7fa25649                       kubernetes:batch/v1:Job        delete
~   vpc-native-generic-referral-reminder-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-squad-posts-analytics-refresh-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-hourly-notification-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-daily-quests-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tag-materialized-views-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-channel-highlights-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-materialize-monthly-best-post-archives-cron     kubernetes:batch/v1:CronJob    update
~   vpc-native-update-achievement-rarity-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-generate-search-invites-cron                    kubernetes:batch/v1:CronJob    update
-   vpc-native-api-clickhouse-migration-7fa25649               kubernetes:batch/v1:Job        delete
~   vpc-native-expire-super-agent-trial-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-materialize-yearly-best-post-archives-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-update-current-streak-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-check-analytics-report-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-deployment                                      kubernetes:apps/v1:Deployment  update
~   vpc-native-worker-job-deployment                           kubernetes:apps/v1:Deployment  update
~   vpc-native-channel-highlights-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-update-source-public-threshold-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-deployment                  kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-expired-better-auth-sessions-cron         kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-users-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-update-highlighted-views-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-stale-user-transactions-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-history-clickhouse-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-temporal-deployment                             kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-zombie-user-companies-cron                kubernetes:batch/v1:CronJob    update
~   vpc-native-daily-digest-cron                               kubernetes:batch/v1:CronJob    update
~   vpc-native-user-posts-analytics-refresh-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-clickhouse-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-digests-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-validate-active-users-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-updated-sync-cron                  kubernetes:batch/v1:CronJob    update
+   vpc-native-api-clickhouse-migration-3461ba40               kubernetes:batch/v1:Job        create
~   vpc-native-ws-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-rotate-weekly-quests-cron                       kubernetes:batch/v1:CronJob    update
... and 11 other changes

@AmarTrebinjac AmarTrebinjac merged commit 4763491 into main Apr 15, 2026
10 checks passed
@AmarTrebinjac AmarTrebinjac deleted the eng-1256-truncate-x-notifications branch April 15, 2026 11:09
AmarTrebinjac added a commit that referenced this pull request Apr 15, 2026
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