From 4ecbaf2a4b1df872a88f4fa2524d80064181ee39 Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Tue, 12 May 2026 13:22:24 +0200 Subject: [PATCH] feat(ux): show notification on chat log draw failure (F7.1) Surfaces a per-session warning notification when DrawChatLog throws so the user knows something went wrong instead of staring at an empty window. Stack trace stays in /xllog as before. The one-shot guard prevents the notification stack from flooding frame-by-frame; it resets only on the next plugin reload. --- HellionChat/Ui/ChatLogWindow.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/HellionChat/Ui/ChatLogWindow.cs b/HellionChat/Ui/ChatLogWindow.cs index e2b1e6e..3fc7a00 100644 --- a/HellionChat/Ui/ChatLogWindow.cs +++ b/HellionChat/Ui/ChatLogWindow.cs @@ -90,6 +90,10 @@ public sealed class ChatLogWindow : Window private bool PlayedClosingSound = true; private bool DrewThisFrame; + // F7.1: one-shot guard so a recurring draw failure doesn't spam the + // notification stack frame-by-frame. Resets only on next plugin reload. + private bool _notifiedDrawFailure; + private long FrameTime; // set every frame internal long LastActivityTime = Environment.TickCount64; @@ -627,6 +631,19 @@ public sealed class ChatLogWindow : Window catch (Exception ex) { Plugin.Log.Error(ex, "Error drawing Chat Log window"); + if (!_notifiedDrawFailure) + { + Plugin.Notification.AddNotification( + new Dalamud.Interface.ImGuiNotification.Notification + { + Title = "Hellion Chat", + Content = "A drawing error occurred. Check /xllog for details.", + Type = Dalamud.Interface.ImGuiNotification.NotificationType.Warning, + InitialDuration = TimeSpan.FromSeconds(20), + } + ); + _notifiedDrawFailure = true; + } // Prevent recurring draw failures from constantly trying to grab // input focus, which breaks every other ImGui window. Activate = false;