Repository navigation
feat: HTML-Text in mail_create_draft #63 - #65
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
encode_quoted_printable writes RFC 2045 bodies with soft breaks at 76 columns; html_to_plain_text derives the plain-text alternative and names link targets. The reading view (html_to_text) is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With html_body the draft becomes multipart/alternative; TorroMail derives the plain-text part (with link targets) and stores it as the approved text. A separate body, blank HTML or HTML without readable text is refused. body is no longer required. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An <a> without </a>, or one ended by the next <a>, now still names its target; a > inside a quoted attribute no longer leaks markup into the derived plain text. The reading view is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quotes open a value only after =, a < that cannot start a tag is text, only whole script/style/title elements are dropped, and <base>, <area> and xlink:href links name their targets. Stray quotes or a bare < could otherwise hide text the recipient sees from the approval. The reading view is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#63 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 tasks
Owner
Author
Code-ReviewFazit: Überarbeitung empfohlenDie abgeleitete Textfassung lässt sich mit gültigen HTML-Kommentarformen umgehen: Der Empfänger sieht dann Text, der in der Freigabe fehlt. Genau das soll Entscheidung 1 des Plans verhindern. Kritische Probleme
Anmerkungen
Kein PrüfbedarfKein Handlungsbedarf, diese Teile kannst du überfliegen:
|
Comments end at <!-->, <!---> and --!> as in the HTML tokenizer, so a comment can no longer hide visible text from the approval. Relative link and image targets are resolved against <base href>. Images appear as [image: alt <src>]. Raw-text elements are found on one lowercased copy, which removes the quadratic cost on large documents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drops <base> resolution and browser-style comment ending again; both were chasing browser fidelity the issue rules out (no sanitizing, the person approves the send) and added a quadratic comment scan and an output blow-up under <base>. Link targets and image markers stay; the derivation is linear in the input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
Code-ReviewFazit: Keine BlockerDer PR erfüllt Plan und Erledigt-Abgleich, die offenen Punkte des letzten Reviews sind behoben oder laut Nutzerentscheidung bewusst offen, und die abgeleitete Textfassung läuft jetzt linear in der Eingabe. Kritische ProblemeKeine. Erledigt seit dem letzten Review
Hinweise
Kein PrüfbedarfKein Handlungsbedarf, diese Teile kannst du überfliegen:
|
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.
Summary
mail_create_draftnimmt ein optionaleshtml_bodyan. Damit wird die Mailmultipart/alternativemit Text- und HTML-Teil, bei Anhängen eingebettet inmultipart/mixed. Beide Teile sind quoted-printable, lange HTML-Zeilen bleiben also unter dem Zeilenlimit von RFC 5322.<url>, Bilder als[image: alt <src>]. Genau dieser Text steht im Entwurf und in der Freigabe. Abgelehnt werden ein zusätzlicherbody, leeres HTML, HTML ohne sichtbare Wörter undhtml_bodyüber 20 MiB.html_to_text) und Mails ohnehtml_bodybleiben Byte für Byte gleich, ein Test hält das fest.Erledigt-Abgleich
mail_create_draftnimmthtml_bodyan, das Schema beschreibt das Feld. — automatisch:cargo test -p torromail-mcp --test tool_contract(the_draft_schema_offers_html_body_and_no_longer_requires_body,an_html_draft_is_created)multipart/alternativemit Text- und HTML-Teil, auch zusammen mit Anhängen. — automatisch:cargo test -p torromail-core(compose_with_html_builds_a_quoted_printable_alternative,compose_with_html_and_attachment_nests_the_alternative_in_mixed),send_journal::an_html_local_draft_keeps_its_html_and_sends_it_unchangedcompose_with_a_long_html_line_keeps_every_line_short,quoted_printable_wraps_long_lines_without_splitting_escapes,send_journal::an_html_local_draft_…(1500-Zeichen-Zeile)html_bodybleibt die Nachricht Byte für Byte wie heute, ebenso Idempotenz und Fingerprint bestehender Entwürfe. — automatisch:core_contract::compose_without_html_is_byte_identical(Literal vom unveränderten Code), dazu alle bisherigen Draft- und Journal-Tests grünsend_journal::an_html_local_draft_keeps_its_html_and_sends_it_unchanged(gespeichertesraw= übergebenes MIME = SMTP-DATA)--send-actionlist):send_journal::an_html_local_draft_…; App: von Hand (Test plan)cargo testundscripts/test-drafts-dovecot.sh(alle drei Namespaces grün, inkl.real_dovecot_html_draft_with_attachment_is_verified_read_and_sent)AGENTS.mdund die Tool-Doku nennenhtml_body. — automatisch: im Diff nachgesehen (AGENTS.md,docs/architecture.md, Schema-Beschreibung)Test plan
swift build --package-path apps/TorroMailApp --scratch-path apps/TorroMailApp/.buildmit Xcode-Toolchain: Lief hier nicht, weil die Command Line Tools keine SwiftUI-Makros haben und die Xcode-Lizenz nicht akzeptiert ist. Swift-Code ist nicht geändert.Bewusst offen
<!-->, relative Ziele unter<base>,<image>, CDATA), CSS-Text, Formularwerte, Bildinhalt und Outlook-Bedingungskommentare können beim Empfänger mehr zeigen als die Freigabe. Laut Abgrenzung wird das HTML nicht bereinigt, und der Nutzer hat nach drei Review-Runden entschieden, diese Fälle nicht weiter nachzubauen;docs/architecture.mdnennt die Grenze.<a>beendeter Link nennt sein Ziel (Plan: „ungeschlossenes verfällt“).swift buildlief in dieser Umgebung nicht (Command Line Tools ohne SwiftUI-Makros, Xcode-Lizenz nicht akzeptiert); Swift-Code ist nicht geändert.Umgesetzt mit: claude-opus-5-5 (stark), Effort high
Closes #63
🤖 Generated with Claude Code