Skip to content

fix(admin): no wordmark on mail a person wrote - #365

Merged
pratyush618 merged 1 commit into
mainfrom
fix/operator-mail-chrome
Sep 22, 2026
Merged

pratyush618 merged 1 commit into
mainfrom
fix/operator-mail-chrome

Conversation

@kartikeya-27

Copy link
Copy Markdown
Contributor

A sheet went out from the composer and arrived looking like this:

byteveda.

Dear Customer,

Thanks you for trusting ByteVeda Academy.

Please find your requested worksheet in the attachments.

With regards, ByteVeda Academy

Sent from the ByteVeda console.

Two things wrong, and they are the same thing twice.

layout() stamps a byteveda. wordmark at the top of every message the console sends. On a signup confirmation that is right — nobody signs those, so the mark is the only thing saying who wrote. On a message an operator typed and signed "ByteVeda Academy", it is a second, quieter, lowercase, differently branded signature sitting two lines above the real one.

The footer is worse. "Sent from the ByteVeda console." tells a parent waiting on a worksheet the name of our internal tooling. That sentence was written for us and ended up addressed to them.

The rule

Mail the console sends on its own account — signup confirmations, announcements, broadcasts — keeps the wordmark and the footer. Mail a person wrote — replies and composed messages — gets neither, because the person signs it themselves.

shell() now holds the card markup, layout() adds the masthead and footer rows to it, and plainLayout() does not. replyEmail and composedEmail use the plain one. The paragraph-splitting both of them duplicated moved into a shared paragraphs() helper on the way past.

Nothing else changes: same card, same width, same type.

Tests

templates.ts had none, which is how a user-visible regression got out. There are now ten, covering the rule in both directions — operator mail carries no wordmark and no console footer, a confirmation still does — plus the subject handling, the Re: prefix not doubling, quoting, paragraph breaks, and that a body is escaped before it reaches a mail client.

248 admin tests pass. Typecheck and Biome clean repo-wide.

Rendered the composed HTML to check it against the intended layout rather than assuming: card, four paragraphs, no masthead row, no footer row.

An operator signs off "ByteVeda Academy" and the layout stamped
"byteveda." two lines above it, contradicting the signature. The
footer named our internal tooling to the customer. Both go; mail the
console sends on its own account keeps them, because nobody signs one.

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

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
byteveda-site Ready Ready Preview Sep 22, 2026 6:56am UTC
byteveda-site-admin Ready Ready Preview Sep 22, 2026 6:56am UTC
2 Skipped Deployments
Project Deployment Actions Updated
byteveda-site-academy Skipped Skipped Sep 22, 2026 6:56am UTC
byteveda-site-flexiq Skipped Skipped Sep 22, 2026 6:56am UTC

@pratyush618
pratyush618 merged commit 917a99d into main Sep 22, 2026
16 checks passed
@pratyush618
pratyush618 deleted the fix/operator-mail-chrome branch September 22, 2026 07:23

This branch was successfully deployed

2 active and 2 inactive deployments
Preview – byteveda-site-admin 2c98e34c Deployed Sep 22, 2026 by vercel[bot]
Preview – byteveda-site 2c98e34c Deployed Sep 22, 2026 by vercel[bot]
Preview – byteveda-site-flexiq 2c98e34c Deployed Sep 22, 2026 by vercel[bot]
Preview – byteveda-site-academy 2c98e34c Deployed Sep 22, 2026 by vercel[bot]
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