Forms: a submit by email opens a draft in the email app #7835
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.52) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #7835"
general
weight: 0.35
mansur-akhmadi
What this changes
Fixes #7693.
A form whose Submit action is a
mailto:address no longer ends at "PdfCraft doesn't send form data". Clicking the button (or a script callingthis.submitForm("mailto:…")) now opens the existing "open this address?" prompt in an Email this form? form:�, except line breaks in the body), and the whole address as before;document_urlchecks every document link gets, soattach=/insert=and encoded words are still refused. PdfCraft adds nothing to it;Web (
http/https) submissions are unchanged: explained, not sent.Headless: a new read-only tool
form_submit {doc, field}presses a submit button the same way and returns the draft (email.url/to/cc/bcc/subject/body),unsavedandattach; a web submission returnsemail: nullwith the reason, and a refused address is an error. The engine gainslinks::is_mail_addressandlinks::mail_draft.parity/acrobat-features.toml:form.submit-formgoes from planned to partial, with notes on what is still missing (attaching the form data or PDF to the message, and any web submission).docs/pdf-spec-parity.mdanddocs/gaps.mdsay the same.How you verified it
cargo fmt --check-D warningson the crates I changedcargo xtask layersandcargo xtask assets(not run: no crate boundaries or assets touched)Ran locally (macOS, Rust 1.99.1):
cargo test -p pdfcraft-engine --lib links::— 24 passed, including the two newmail_drafttestscargo test -p pdfcraft-automation—form_submit_reads_an_email_submission_and_sends_nothingandtool_table_is_well_formedpass; the only failures are the OCR tests, which need the recognition models I don't have installed here (the text recognition models are not installed), unrelated to this changecargo test -p pdfcraft-ui-egui --test it -- form_email document_links javascript ui:: buttons— 175 passed (8 new inform_email.rs)cargo clippy --no-deps -p pdfcraft-engine -p pdfcraft-automation -p pdfcraft-ui-egui --all-targets -- -D warnings,cargo fmt --all --check,cargo xtask parity,cargo xtask wasm— cleanTests. With the two call sites (
canvas/area.rs,workflows/js_ui.rs) reverted tomain, 6 of the 7 originalform_emailtests fail (no prompt, no email);a_web_submission_is_only_explainedpasses both ways, as it pins the unchanged web notice.Never-crash
unwrap/expect/panic!/unreachable!/todo!outside testsmail_draftreads withgetand splits on ASCII, and its output is never longer than the address (at most 2048 characters afterdocument_url)unsafeProvenance
external-linkicon)Security
--rootconfinement still holds;form_submitreads the open document only and reports the file name, not its pathParity and reach
parity/acrobat-features.tomlupdated, withnotessaying what is still missingform_submitdocs/pdf-spec-parity.md,docs/gaps.md)Anything a reviewer should look at first
mailto:link can't carry an attachment portably, anddocument_urlrefuses addresses that try. Once File ▸ Attach to email (#6552) lands, this prompt could hand the saved file to that path instead; I kept the two separate so neither blocks the other.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Email form submissions now show a confirmation prompt with parsed recipient, subject, and message details. If the PDF needs saving, you can save it before opening your email app.
Email submissions include instructions for attaching the PDF manually; it is not attached or sent automatically.
Web form submissions display an explanation and are not sent. Requests requiring local-file attachments are refused.
Automation can inspect supported form-submit actions and email draft details without sending them.
Documentation
* Updated feature references to describe form-submission behavior and PDF/A and PDF/X support.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->