From e4a521ae206fefd5b0df0d5dd0a29c2117e6daef Mon Sep 17 00:00:00 2001 From: Lukas Remis Date: Mon, 21 Sep 2026 21:32:22 +0200 Subject: [PATCH] Labels: show the new label after creating it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Creating a label while the section was collapsed hid the thing you had just made — the row was added, behind a closed chevron. Open the section on a successful create, and persist that the same way the chevron does, so it does not snap shut on the next mount. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_018SqJYt7jD7oUEkoY68sBZo --- .../webmail_plugin_labels/webmail_plugin_labels/ui/sidebar.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/webmail_plugin_labels/webmail_plugin_labels/ui/sidebar.js b/plugins/webmail_plugin_labels/webmail_plugin_labels/ui/sidebar.js index 2ada133..81e534b 100644 --- a/plugins/webmail_plugin_labels/webmail_plugin_labels/ui/sidebar.js +++ b/plugins/webmail_plugin_labels/webmail_plugin_labels/ui/sidebar.js @@ -110,6 +110,10 @@ export default function mount(el, ctx) { if (!name) { adding = null; render(); return; } await ctx.api.pluginFetch("/labels", { method: "POST", body: JSON.stringify({ name }) }); adding = null; + // Creating a label while the section is collapsed would hide the thing you + // just made, so open it — and remember that, the way the chevron does. + collapsed = false; + try { localStorage.setItem("labels.collapsed", "0"); } catch { /* ignore */ } window.dispatchEvent(new Event("webmail:labels-changed")); }