Skip to content

fix(report): expand partial station email template placeholders - #534

Merged
hoangsvit merged 3 commits into
stagingfrom
fix/mailto-partial-template-placeholders-20261119
Nov 20, 2026
Merged

hoangsvit merged 3 commits into
stagingfrom
fix/mailto-partial-template-placeholders-20261119

Conversation

@hoangsvit

Copy link
Copy Markdown
Member

Reproduction

Call stationReportEmailUrl('/vn/ho-chi-minh/test-radio', 'Test Radio', 'Playback problem', 'Station: {station}'). Before this fix, the body retains literal {station} because expansion requires both {station} and {url}. The same happens to a URL-only localized template.

Expected / actual

Expected: replace any provided placeholder, include missing public station details once, never show raw placeholder markers. Actual: partial templates remain unexpanded and append duplicate details.

Fix

Recognize either placeholder, replace present tokens, append only missing public station fields. Preserve existing no-placeholder and full-template behavior, mailto encoding, and CRLF normalization.

Regression

Added partial-template cases to tests/station-sharing-mailto-line-endings.test.mjs for station-only and URL-only inputs. Local execution was not possible because repository clone was unavailable in this runtime; CI Node 24 npm test is required before review.

Acceptance

  • Both single-placeholder variants render correctly without literal tokens.
  • Existing full-placeholder and plain-text templates retain behavior.
  • npm test passes on CI.

Risk

Low: only changes fallback report-email body formatting; no playback, SEO, catalog, or deployment changes. No secrets or user data included.

Base: staging 01e9c1fe5cee7a00903fee179211bb6dfdca9ed8. Independent from #533.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

ePlus OnAir — PR Preview

🗃️ Preview expired. This PR is closed; the Preview link is hidden.

View build status

Preview is noindex; the full catalog is available on Staging after merge.

@hoangsvit
hoangsvit marked this pull request as ready for review November 20, 2026 01:44
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@hoangsvit
hoangsvit merged commit cb2e34e into staging Nov 20, 2026
10 checks passed
@hoangsvit
hoangsvit deleted the fix/mailto-partial-template-placeholders-20261119 branch November 20, 2026 01:44

This branch was successfully deployed

1 active deployment
preview — ca818dc1 Deployed Nov 20, 2026 by hoangsvit via Remove closed PR Preview #543
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