Fix dark-mode email readability, silent reply failures, and add an IMAP connection watchdog
Dark theme: inbound email HTML intentionally keeps its own inline colors for fidelity (sanitize-html.ts), but a sender's hardcoded dark text (the common case) was unreadable once the surrounding chrome went dark. Now forced to the theme's own text color in dark mode only; light mode keeps full fidelity as before. Send button: deliverAgentMessage awaited the outbound email/Telegram send *before* recording the reply, so a broken mail/bot account (e.g. bad SMTP creds) made the reply vanish entirely — not sent, not saved, no error shown — with the API's catch-all masking the real cause as a generic "Ticket not found". Channel delivery is now best-effort: the reply is always recorded even if outbound delivery fails, and real errors surface to the compose box instead of failing silently. IMAP watchdog: a live IDLE connection has gone quietly unresponsive in production more than once, with mail landing server-side but never noticed here and no error ever firing. Added a periodic forced NOOP round-trip with its own deadline, independent of ImapFlow's internal socket timeout, that tears down and reconnects a connection that stops answering. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gh2UXUQUVBWroWEnn1FLFG
This commit is contained in:
1 parent
93e17c37c7
commit
8d1f91187a
7 files changed
+109
-31
No files matched your search
@@ -5,7 +5,7 @@
|
||||
export function MessageBodyHtml({ html, className = "" }: { html: string; className?: string }) {
|
||||
return (
|
||||
<div
|
||||
className={`max-w-full overflow-x-auto text-sm break-words [&_img]:max-w-full [&_img]:cursor-zoom-in [&_table]:max-w-full [&_td]:break-words [&_th]:break-words ${className}`}
|
||||
className={`message-html max-w-full overflow-x-auto text-sm break-words [&_img]:max-w-full [&_img]:cursor-zoom-in [&_table]:max-w-full [&_td]:break-words [&_th]:break-words ${className}`}
|
||||
dangerouslySetInnerHTML={{ __html: html }}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user