Self-hosted AI workspace.
Python
Email card: drop redundant header kebab; keep bottom '...' menu in expanded state
pewdiepie-archdaemonc97759f4e0db
diff --git a/static/js/emailLibrary.js b/static/js/emailLibrary.jsindex 2e337d1f8..2e3f844f7 100644--- a/static/js/emailLibrary.js+++ b/static/js/emailLibrary.js@@ -235,9 +235,9 @@ function _syncEmailReadState(uid, isRead = true) {dot.className = 'email-card-unread-dot';dot.style.cssText = `width:6px;height:6px;border-radius:50%;background:${_senderColor(senderName)};flex-shrink:0;margin-left:2px;`;const done = titleRow.querySelector('.email-card-done');- const rightCluster = titleRow.querySelector('.email-card-header-menu')?.parentElement;+ const navArrows = titleRow.querySelector('.email-card-nav-arrows');if (done) done.insertAdjacentElement('afterend', dot);- else if (rightCluster) titleRow.insertBefore(dot, rightCluster);+ else if (navArrows) titleRow.insertBefore(dot, navArrows);else titleRow.appendChild(dot);});}@@ -2083,27 +2083,10 @@ function _createCard(em) {await _toggleCardPreview(sibling, nextEm);sibling.scrollIntoView({ behavior: 'smooth', block: 'nearest' });});- // Right cluster: expanded-only actions menu + nav arrows. The normal- // `.memory-item-actions` menu is hidden while expanded, so this keeps- // the same email actions available beside the previous/next controls.- const rightCluster = document.createElement('span');- rightCluster.style.cssText = 'margin-left:auto;display:inline-flex;align-items:center;gap:6px;';- const headerMenuBtn = document.createElement('button');- headerMenuBtn.type = 'button';- headerMenuBtn.className = 'email-card-header-menu';- headerMenuBtn.title = 'Actions';- headerMenuBtn.innerHTML = '<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>';- headerMenuBtn.addEventListener('click', (e) => {- e.stopPropagation();- _showCardMenu(em, headerMenuBtn);- });- // The CSS rule on .email-card-nav-arrows still sets margin-left:auto- // (needed when the arrows live alone in the title row). Inside this- // wrapper, we want the cluster's gap to apply, so cancel that auto.- navArrows.style.marginLeft = '0';- rightCluster.appendChild(headerMenuBtn);- rightCluster.appendChild(navArrows);- titleRow.appendChild(rightCluster);+ // Just the nav arrows here — the per-card `.memory-item-actions` menu+ // at the bottom of the card stays visible while expanded (see the CSS+ // override below), so duplicating it in the header was redundant.+ titleRow.appendChild(navArrows);content.appendChild(titleRow);diff --git a/static/style.css b/static/style.cssindex f5c079192..3a9af7f64 100644--- a/static/style.css+++ b/static/style.css@@ -27759,9 +27759,10 @@ button .spinner-whirlpool {flex: 0 0 auto !important;width: 100%;}-.doclib-card.email-card-expanded .memory-item-actions {- display: none !important;-}+/* Keep the per-card '...' actions menu visible while the email card is+ expanded — we used to hide it and surface a duplicate menu button in+ the expanded header, but that was redundant. The bottom menu now+ carries the actions in both states. *//* When expanded inline, show the subject a touch larger than the 12px cardtitle (close to the new-tab window header) without being oversized. */.doclib-card.email-card-expanded .memory-item-title {