Self-hosted AI workspace.
Python
Email reader: all actions on the From row, wrap when narrow
pewdiepie-archdaemonc2e0e5f02ae9
diff --git a/static/js/emailLibrary.js b/static/js/emailLibrary.jsindex 8d9758f5d..2c1f8d743 100644--- a/static/js/emailLibrary.js+++ b/static/js/emailLibrary.js@@ -4911,17 +4911,15 @@ async function _openEmailWindow(em, folder) {<div class="email-reader-meta-row email-reader-meta-from"><strong>From:</strong><span class="recipient-chips">${fromChip}${(data.to || data.cc) ? `<button class="email-reader-meta-toggle" type="button" aria-expanded="false" title="Show recipients"><svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg></button>` : ''}</span>- <div class="email-reader-actions-row email-reader-actions-row-primary">+ <div class="email-reader-actions-inline"><button class="memory-toolbar-btn reader-icon-btn" data-act="reply" title="Reply"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 17 4 12 9 7"/><path d="M20 18v-2a4 4 0 0 0-4-4H4"/></svg><span class="reader-btn-label">Reply</span></button>${_hasMultipleRecipients(data) ? `<button class="memory-toolbar-btn reader-icon-btn" data-act="reply-all" title="Reply All"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="7 17 2 12 7 7"/><polyline points="12 17 7 12 12 7"/><path d="M22 18v-2a4 4 0 0 0-4-4H7"/></svg><span class="reader-btn-label">Reply all</span></button>` : ''}<button class="memory-toolbar-btn reader-icon-btn" data-act="forward" title="Forward"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 17 20 12 15 7"/><path d="M4 18v-2a4 4 0 0 1 4-4h12"/></svg><span class="reader-btn-label">Forward</span></button>- </div>- </div>- <div class="email-reader-actions-row email-reader-actions-row-secondary">- <button class="memory-toolbar-btn reader-icon-btn" data-act="summarize" title="Summarize">${_summaryIcon(data)}<span class="reader-btn-label">Summary</span></button>- <button class="memory-toolbar-btn reader-icon-btn" data-act="ai-reply" title="${data.cached_ai_reply ? 'AI Reply (cached draft ready)' : 'AI Reply (suggest a draft)'}">${_aiReplyIcon(data)}<span class="reader-btn-label">AI reply</span></button>- <div class="email-reader-more-wrap" style="position:relative">- <button class="memory-toolbar-btn reader-icon-btn" data-act="more" title="More actions"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="5" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="12" cy="19" r="2"/></svg><span class="reader-btn-label">More</span></button>+ <button class="memory-toolbar-btn reader-icon-btn" data-act="ai-reply" title="${data.cached_ai_reply ? 'AI Reply (cached draft ready)' : 'AI Reply (suggest a draft)'}">${_aiReplyIcon(data)}<span class="reader-btn-label">AI reply</span></button>+ <button class="memory-toolbar-btn reader-icon-btn" data-act="summarize" title="Summarize">${_summaryIcon(data)}<span class="reader-btn-label">Summary</span></button>+ <div class="email-reader-more-wrap" style="position:relative">+ <button class="memory-toolbar-btn reader-icon-btn" data-act="more" title="More actions"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="5" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="12" cy="19" r="2"/></svg><span class="reader-btn-label">More</span></button>+ </div></div></div>${(data.to || data.cc) ? `<div class="email-reader-meta-details" hidden>diff --git a/static/style.css b/static/style.cssindex cb2e6259b..b14c84ae6 100644--- a/static/style.css+++ b/static/style.css@@ -15225,8 +15225,11 @@ body.right-dock-active:not(.email-doc-split-active) .doc-editor-pane {background: none;padding-left: 0;}-.modal.modal-right-docked .email-reader-meta-row,-.modal.modal-left-docked .email-reader-meta-row {+/* Docked modal: From row stays a flex row so the action cluster+ sits next to From (or wraps below it when truly cramped). Only+ the To/Cc detail rows get the grid stack. */+.modal.modal-right-docked .email-reader-meta-row:not(.email-reader-meta-from),+.modal.modal-left-docked .email-reader-meta-row:not(.email-reader-meta-from) {display: grid;grid-template-columns: 1fr;gap: 2px;@@ -28044,17 +28047,23 @@ button .spinner-whirlpool {gap: 6px;min-width: 0;}-/* Primary action row (Reply / Reply-all / Forward) lives INSIDE- the From row and gets pushed to the right edge. */-.email-reader-meta-row.email-reader-meta-from > .email-reader-actions-row-primary {+/* All action buttons live INSIDE the From row, right-aligned. When+ there's room (undocked) they sit on the same row as From; when+ docked or narrow they wrap below it. */+.email-reader-meta-row.email-reader-meta-from > .email-reader-actions-inline {margin-left: auto;+ display: flex;+ flex-direction: row;+ flex-wrap: wrap;+ align-items: center;+ justify-content: flex-end;+ gap: 4px;flex-shrink: 0;}-/* Secondary action row (Summary / AI / More) sits below the From- row as a sibling, right-aligned. */-.email-reader-meta > .email-reader-actions-row-secondary {- justify-content: flex-end;- margin-top: 2px;+/* From row allows the action cluster to wrap below when narrow. */+.email-reader-meta-row.email-reader-meta-from {+ flex-wrap: wrap;+ row-gap: 2px;}/* Gmail-style chevron — collapsed view shows only From; the chevronreveals the To/Cc details inline below. */@@ -28165,7 +28174,7 @@ button .spinner-whirlpool {background: none;padding-left: 0;}- .email-reader-meta-row {+ .email-reader-meta-row:not(.email-reader-meta-from) {display: grid;grid-template-columns: 1fr;gap: 2px;