fix(auth,webmail): list a pre-accounts session in the switcher; preview as plain text

A browser signed in before account cookies existed has only lm_user_session,
so the switcher showed it as loading forever. The active session now always
counts and is filed on first listing. Message previews drop the HTML and
entities the server stored.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Sonnet 5.5 committed 2026-10-22 15:23:40 -03:00
1 parent 026f24a64a
commit cc0adcd94d
5 files changed
+84 -2

No files matched your search

@@ -28,6 +28,7 @@ import {
type ListFilter,
} from "../../../../../lib/mailCounts";
import { sanitizeEmailHtml, blockRemoteImages, unblockRemoteImages } from "../../../../../lib/sanitizer";
import { plainSnippet } from "../../../../../lib/snippet";
import { isSenderTrusted, trustSender, revokeSender } from "../../../../../lib/remoteImages";
import { resolveInlineImages, buildReaderDocument, type InlineImages } from "../../../../../lib/emailBody";
import { Button } from "../../../../../components/ui/Button";
@@ -545,7 +546,7 @@ export default function MailFolderPage({ params }: { params: Promise<{ folder: s
{msg.subject || t("mail.noSubject")}
</span>
<span className="line-clamp-2 text-xs leading-relaxed text-slate-400 [overflow-wrap:anywhere]">
{msg.snippet}
{plainSnippet(msg.snippet)}
</span>
{msg.has_attachments && (
<span className="mt-px flex items-center gap-1.5">