From 2b4e1bb2d62c464d9eb949dc7c60cac8dd57f638 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 12 Sep 2026 10:16:27 +0200 Subject: fix(mail-overview): parse account sections by walking lines Two bugs, both found by actually running the shell rather than reading the code. shell.qml used Connections without importing QtQuick, so the config failed to load outright: "Connections is not a type". That one was loud, and it only affected the temporary verification probe. The parser was the real bug and it was quiet. Section bodies were matched as "everything up to the next [", which is wrong for this file: accounts whose folders are named like [Gmail]/Bozze end their body at that bracket, before the label line is reached. Three of the five accounts therefore fell back to displaying their raw key, and nothing reported a problem because falling back is a legitimate path for an account that genuinely has no label. Replaced with a line walk. It says what it means, its only state is which section is open, and it was checked against the real config before being trusted: all five accounts now resolve both label and colour. An attempted fix with a lazy quantifier and a lookahead made things worse, dropping every label, which is the argument for the boring version. Verified in a running shell: five accounts in config order with their labels, counts summing exactly to the global notmuch count, no unknowns, and the config stays loaded for the full timeout rather than exiting silently. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01WWL8JYHu7yhAdtx5pU9PMU --- mail-overview/shell.qml | 1 + 1 file changed, 1 insertion(+) (limited to 'mail-overview/shell.qml') diff --git a/mail-overview/shell.qml b/mail-overview/shell.qml index 1925f44..7842bc6 100644 --- a/mail-overview/shell.qml +++ b/mail-overview/shell.qml @@ -11,6 +11,7 @@ import Quickshell import Quickshell.Io +import QtQuick ShellRoot { MailPanel { id: panel } -- cgit v1.2.3