[codex] Preserve explicit SenderName in request email headers#2169
Open
shuaick wants to merge 1 commit intoOpenSignLabs:stagingfrom
Open
[codex] Preserve explicit SenderName in request email headers#2169shuaick wants to merge 1 commit intoOpenSignLabs:stagingfrom
shuaick wants to merge 1 commit intoOpenSignLabs:stagingfrom
Conversation
Request-signature emails could display the owner profile name in the from field even when a document already carried an explicit SenderName. The ternary condition in sendEmailToSigners was relying on operator precedence, so any truthy SenderName still routed to ExtUserPtr.Name. This extracts the sender selection into a tiny helper, uses it in the request-email flow, and adds regression coverage for the intended precedence. Constraint: Keep the change narrowly scoped to request-email sender selection so the existing mail flow stays stable Rejected: Parenthesize the existing inline expression only | harder to test in isolation and easier to regress later Confidence: high Scope-risk: narrow Reversibility: clean Directive: When sender identity precedence changes, keep the pure helper and its tests aligned with the document fields that drive email customization Tested: Direct Node assertions for explicit SenderName, UseNameAsSender fallback, and senderEmail fallback Not-tested: Vitest runner in this environment (blocked by local Windows EPERM when Vite/esbuild spawns)
|
Someone is attempting to deploy a commit to the prafull 's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2168.
Summary
SenderNamewhen building the outgoing request emailfromfieldRoot cause
sendEmailToSignersmixed||with a ternary expression without grouping. In JavaScript that evaluates as(SenderName || useNameAsSender) ? ... : ..., so any truthySenderNamestill routed toExtUserPtr.Nameinstead of preserving the explicit sender name stored on the document.Validation
Notes
I could not run the Vitest runner end-to-end in this local Windows environment because Vite/esbuild process spawn hit
EPERM, but the helper behavior was exercised directly with Node assertions.