From c652a1c450df9f4147a555943883b563ba6460aa Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Wed, 27 May 2026 22:54:33 +0200 Subject: [PATCH] feat(debugger): reactivate PayloadHandler counters (R3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit K reactivates the debugger's PayloadHandler counter readout (HandleTooltips / HoveredItem / HoverCounter / LastHoverCounter — populated in E1's PayloadHandler skeleton). PayloadHandler injected via DI-extended ctor; class flipped to internal sealed to match PayloadHandler's internal visibility and avoid CS0051. Plugin.cs property updated public → internal accordingly (same pattern as I/J). Last Phase-3 window sub-task before A2 (Lender + handler.Draw fix), J2 (InputBar slash-callback), Polish-Sweep, and Smoke-Gate. --- HellionChat/Plugin.cs | 2 +- HellionChat/PluginHostFactory.cs | 5 ++++- HellionChat/Ui/Debugger.cs | 13 ++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/HellionChat/Plugin.cs b/HellionChat/Plugin.cs index c9e0ef3..8186012 100755 --- a/HellionChat/Plugin.cs +++ b/HellionChat/Plugin.cs @@ -102,7 +102,7 @@ public sealed class Plugin : IAsyncDalamudPlugin internal CommandHelpWindow CommandHelpWindow { get; private set; } = null!; public SeStringDebugger SeStringDebugger { get; private set; } = null!; public FirstRunWizard FirstRunWizard { get; private set; } = null!; - public DebuggerWindow DebuggerWindow { get; private set; } = null!; + internal DebuggerWindow DebuggerWindow { get; private set; } = null!; internal Commands Commands { get; private set; } = null!; internal GameFunctions.GameFunctions Functions { get; private set; } = null!; diff --git a/HellionChat/PluginHostFactory.cs b/HellionChat/PluginHostFactory.cs index 34fae6e..4c99d0c 100644 --- a/HellionChat/PluginHostFactory.cs +++ b/HellionChat/PluginHostFactory.cs @@ -292,7 +292,10 @@ internal static class PluginHostFactory sp.GetRequiredService>() )); services.AddSingleton(sp => new SeStringDebugger(sp.GetRequiredService())); - services.AddSingleton(sp => new DebuggerWindow(sp.GetRequiredService())); + services.AddSingleton(sp => new DebuggerWindow( + sp.GetRequiredService(), + sp.GetRequiredService() + )); services.AddSingleton(sp => new FirstRunWizard(sp.GetRequiredService())); // Hosted-service adapters: thin wrappers around the existing init diff --git a/HellionChat/Ui/Debugger.cs b/HellionChat/Ui/Debugger.cs index cd9e5fe..6930d1a 100644 --- a/HellionChat/Ui/Debugger.cs +++ b/HellionChat/Ui/Debugger.cs @@ -11,16 +11,16 @@ namespace HellionChat.Ui; // Dev tool. Reduced to the parts that survive without the legacy chat // window: current-tab channel state and the vanilla chat channel label. -// The chat-window cursor and payload-handler counters come back once the -// new chat layer surfaces equivalent state. -public class DebuggerWindow : Window, IDisposable +internal sealed class DebuggerWindow : Window, IDisposable { private readonly Plugin Plugin; + private readonly PayloadHandler _payloadHandler; - public DebuggerWindow(Plugin plugin) + public DebuggerWindow(Plugin plugin, PayloadHandler payloadHandler) : base("Debugger###chat2-debugger") { Plugin = plugin; + _payloadHandler = payloadHandler; SizeConstraints = new WindowSizeConstraints { @@ -41,7 +41,10 @@ public class DebuggerWindow : Window, IDisposable ImGui.SetClipboardText(agent.ToString("X")); ImGuiHelpers.ScaledDummy(5.0f); - ImGui.TextDisabled("Payload handler counters: offline during the chat rebuild."); + ImGui.TextUnformatted($"Handle Tooltips: {_payloadHandler.HandleTooltips}"); + ImGui.TextUnformatted($"Hovered Item: {_payloadHandler.HoveredItem}"); + ImGui.TextUnformatted($"Hover Counter: {_payloadHandler.HoverCounter}"); + ImGui.TextUnformatted($"Last Hover Counter: {_payloadHandler.LastHoverCounter}"); ImGuiHelpers.ScaledDummy(5.0f); ImGui.TextColored(ImGuiColors.DalamudOrange, "Current Tab");