feat: append default signature for mail send#1320
Conversation
Resolve mail +send signatures from the actual sender address by default while keeping --signature-id explicit and adding --no-signature as the local opt-out. Plain-text send now appends a visible text rendering of the selected signature without downloading signature images. sprint: S1
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughAdds a ChangesMail Signature Feature
🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
shortcuts/mail/signature_compose.go (1)
338-347: ⚡ Quick winRemove unused validation function.
validateSignatureWithPlainTextis no longer called aftermail_send.goline 107 switched tovalidateSignatureFlags. The new code allows--plain-text+--signature-idby converting signatures to plain text (as documented in the updated--plain-textflag description), making this old mutual-exclusivity check obsolete.🧹 Proposed removal
-// validateSignatureWithPlainText returns an error if both --plain-text and --signature-id are set. -func validateSignatureWithPlainText(plainText bool, signatureID string) error { - if plainText && signatureID != "" { - return mailValidationError("--plain-text and --signature-id are mutually exclusive: signatures require HTML mode"). - WithParams( - mailInvalidParam("--plain-text", "mutually exclusive with --signature-id"), - mailInvalidParam("--signature-id", "requires HTML mode"), - ) - } - return nil -}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@shortcuts/mail/signature_compose.go` around lines 338 - 347, The function validateSignatureWithPlainText is now obsolete and unused after mail_send.go switched to validateSignatureFlags (which permits --plain-text with --signature-id by converting signatures to plain text); remove the entire validateSignatureWithPlainText function declaration from shortcuts/mail/signature_compose.go and any related dead references so the codebase does not contain this unused mutual-exclusion validator (search for validateSignatureWithPlainText to ensure no callers remain).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@shortcuts/mail/signature_compose.go`:
- Around line 338-347: The function validateSignatureWithPlainText is now
obsolete and unused after mail_send.go switched to validateSignatureFlags (which
permits --plain-text with --signature-id by converting signatures to plain
text); remove the entire validateSignatureWithPlainText function declaration
from shortcuts/mail/signature_compose.go and any related dead references so the
codebase does not contain this unused mutual-exclusion validator (search for
validateSignatureWithPlainText to ensure no callers remain).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 31d660b3-0341-44d5-aea1-96e59cc0905a
📒 Files selected for processing (15)
shortcuts/mail/mail_lint_writepath_test.goshortcuts/mail/mail_request_receipt_integration_test.goshortcuts/mail/mail_send.goshortcuts/mail/mail_send_confirm_output_test.goshortcuts/mail/mail_send_signature_test.goshortcuts/mail/mail_template_shortcut_test.goshortcuts/mail/signature/plaintext.goshortcuts/mail/signature/plaintext_test.goshortcuts/mail/signature/provider.goshortcuts/mail/signature/provider_test.goshortcuts/mail/signature_compose.goshortcuts/mail/signature_compose_test.goskill-template/domains/mail.mdskills/lark-mail/SKILL.mdskills/lark-mail/references/lark-mail-send.md
Generated by the harness-coding skill.
Sprints
Source specs
This MR was created autonomously. Quality gates were enforced by the repo's own pre-commit hooks.
Summary by CodeRabbit
New Features
Tests
Documentation