From 9d081927bae35baf40a313d7fc0d85e8de8e34ed Mon Sep 17 00:00:00 2001 From: "dobby-yivi-agent[bot]" <275734547+dobby-yivi-agent[bot]@users.noreply.github.com> Date: Sun, 12 Jul 2026 17:08:58 +0000 Subject: [PATCH 1/2] fix(email): make recipient download link a prominent selectable code block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The notification email's download-link block ({{link_str}}) rendered at 13px — smaller than the 16px primary button above it — and used a low weight/contrast style that was hard to read and select. July 2026 user test (postguard-website#296) flagged it as small and hard to copy. Restyle the {{link_str}} URL as a full-width monospace code block: - font-size 16px (no smaller than the primary button) - monospace family, higher contrast (dark #030E17 text) - more padding, subtle background + border so it reads as a code block - display:block + word-break for easy full selection No inline copy buttons (unreliable across email clients). Plain-text template already renders the label + URL on their own lines and stays consistent. Adds a render assertion guarding the >=16px monospace style. Closes #186 Co-Authored-By: Claude Opus 4.8 --- src/email.rs | 9 +++++++++ templates/email/email.html | 6 ++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/email.rs b/src/email.rs index 6de04c7..dc02061 100644 --- a/src/email.rs +++ b/src/email.rs @@ -936,6 +936,15 @@ mod tests { "subject: {}", rendered.subject ); + // The download-link block must render as a prominent, selectable + // monospace code block that is not smaller than the 16px primary + // button (see issue #186). Guards against regressing the font-size. + assert!( + rendered.html.contains("font-size:16px") + && rendered.html.contains("font-family:'Courier New'"), + "download-link block should be >=16px monospace: {}", + rendered.html + ); } #[test] diff --git a/templates/email/email.html b/templates/email/email.html index 0a0c87a..41f60ef 100644 --- a/templates/email/email.html +++ b/templates/email/email.html @@ -27,10 +27,8 @@ {{download_str}}
-

{{link_str}}

- - {{url}} - +

{{link_str}}

+ {{url}}
{% if confirm != "" %}
From 7c131f9af81f2aff85b80befd574290718a3dd05 Mon Sep 17 00:00:00 2001 From: "dobby-yivi-agent[bot]" <275734547+dobby-yivi-agent[bot]@users.noreply.github.com> Date: Sun, 12 Jul 2026 17:20:09 +0000 Subject: [PATCH 2/2] test(email): pin download-link assertion to restyled The prior font-size:16px substring check was satisfied by the primary download button regardless, so it failed to guard the link block. Assert a contiguous substring unique to the restyled (display:block + monospace + font-size:16px) so a font-size regression genuinely fails. Co-Authored-By: Claude Opus 4.8 --- src/email.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/email.rs b/src/email.rs index dc02061..4ce3e7a 100644 --- a/src/email.rs +++ b/src/email.rs @@ -938,11 +938,15 @@ mod tests { ); // The download-link block must render as a prominent, selectable // monospace code block that is not smaller than the 16px primary - // button (see issue #186). Guards against regressing the font-size. + // button (see issue #186). Pin a contiguous substring unique to the + // restyled `` (the primary button is `display:inline-block` and not + // monospace), so a font-size regression here genuinely fails — a bare + // `font-size:16px` check would pass on the button alone. assert!( - rendered.html.contains("font-size:16px") - && rendered.html.contains("font-family:'Courier New'"), - "download-link block should be >=16px monospace: {}", + rendered.html.contains( + "display:block;font-family:'Courier New',Consolas,Monaco,monospace;font-size:16px;" + ), + "download-link block should be a >=16px monospace code block: {}", rendered.html ); }