(null);
const modify = createMutation(() => ({
mutationFn: (input: { addLabels?: string[]; removeLabels?: string[] }) =>
api.modify({ ids: id ? [id] : [], ...input }),
onSuccess: (outcome) => {
- lastOutcome = outcome;
const failed = outcome.results.filter((r) => r.error).length;
const ok = outcome.results.length - failed;
if (outcome.aborted) {
@@ -92,13 +90,6 @@
if (present) run(`Removed ${name}`, { removeLabels: [labelId] });
else run(`Added ${name}`, { addLabels: [labelId] });
}
-
- // Reset the inline outcome strip when a different message opens.
- $effect(() => {
- id;
- lastOutcome = null;
- lastVerb = null;
- });
{#snippet actionButton(
@@ -235,19 +226,19 @@
- {#if lastOutcome}
- {@const result = lastOutcome.results[0]}
+ {#if modify.data}
+ {@const result = modify.data.results[0]}
- {#if lastOutcome.aborted}
+ {#if modify.data.aborted}
- Aborted: {lastOutcome.aborted.message}
+ Aborted: {modify.data.aborted.message}
{:else if result?.error}
{lastVerb} failed: {result.error.message}
From 0c830d216b999da0635146d3999ab5a1418e843f Mon Sep 17 00:00:00 2001
From: Braden Wong <13159333+braden-w@users.noreply.github.com>
Date: Fri, 3 Jul 2026 10:54:08 -0700
Subject: [PATCH 4/4] refactor(local-mail): cut the MessageDetail outcome
strip, keep the toast
The strip was a persistent second surface for the same per-action feedback the
toast already carries, and because a fold usually succeeds its common state was
a redundant "Mirror updated" echoing the visibly-changed label chips. This is
the append-log surface ADR-0029 (Whispering's dictation-feedback projection)
declined to build: let the effect be the receipt (the row leaves the list, the
chips update) and keep a transient toast only for what the effect does not show
(the folded:false sync-lag note and errors). Also drops the now-unused CheckIcon
and a pre-existing dead Separator import.
---
.../src/lib/components/MessageDetail.svelte | 29 -------------------
1 file changed, 29 deletions(-)
diff --git a/apps/local-mail/ui/src/lib/components/MessageDetail.svelte b/apps/local-mail/ui/src/lib/components/MessageDetail.svelte
index 7a7b9ee005..8496911bca 100644
--- a/apps/local-mail/ui/src/lib/components/MessageDetail.svelte
+++ b/apps/local-mail/ui/src/lib/components/MessageDetail.svelte
@@ -4,10 +4,8 @@
import * as DropdownMenu from '@epicenter/ui/dropdown-menu';
import * as Empty from '@epicenter/ui/empty';
import { Loading } from '@epicenter/ui/loading';
- import { Separator } from '@epicenter/ui/separator';
import ArchiveIcon from '@lucide/svelte/icons/archive';
import ArchiveRestoreIcon from '@lucide/svelte/icons/archive-restore';
- import CheckIcon from '@lucide/svelte/icons/check';
import MailOpenIcon from '@lucide/svelte/icons/mail-open';
import MailIcon from '@lucide/svelte/icons/mail';
import MousePointerClickIcon from '@lucide/svelte/icons/mouse-pointer-click';
@@ -225,33 +223,6 @@
-
- {#if modify.data}
- {@const result = modify.data.results[0]}
-
- {#if modify.data.aborted}
-
- Aborted: {modify.data.aborted.message}
- {:else if result?.error}
-
- {lastVerb} failed: {result.error.message}
- {:else if result && !result.folded}
-
- {lastVerb}. Gmail accepted it; the mirror catches up on the next sync (folded: false).
- {:else}
-
- {lastVerb}. Mirror updated from Gmail's response.
- {/if}
-
- {/if}
-
{#if detail.bodyText}