chore(comments): drop the spec task codes the last pass missed

Codes like POP-1c or B4b-2 name a task in a planning document, not
anything in the code. A reader has no way to resolve them and they age
into noise the moment the document is closed. Where a code was used as a
reference, the sentence now names the function it meant.
This commit is contained in:
2026-08-20 07:54:45 +02:00
parent 0f9858a3d3
commit b9feb8650f
8 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ public sealed class FontManager : IDisposable
// widget gallery exposes it. // widget gallery exposes it.
internal static float SenderWeight = 1.3f; internal static float SenderWeight = 1.3f;
// Wired post-build (B4b-3); a Func keeps FontManager off the theme layer. // Wired post-build; a Func keeps FontManager off the theme layer.
private Func<ThemeTypography?>? _typographySource; private Func<ThemeTypography?>? _typographySource;
// Lets RebuildDelegateFontsIfChanged skip rebuilds when the size is unchanged. // Lets RebuildDelegateFontsIfChanged skip rebuilds when the size is unchanged.
@@ -29,7 +29,7 @@ internal sealed class ThemeRegistryInitHostedService(
foreach (var _ in registry.AllCustom()) { } foreach (var _ in registry.AllCustom()) { }
registry.SwitchSilent(Plugin.Config.Theme); registry.SwitchSilent(Plugin.Config.Theme);
// B4b-3: point font sizes at the active theme's typography, wire future // Point font sizes at the active theme's typography, wire future
// theme switches to the atlas rebuild, and apply the boot theme's override. // theme switches to the atlas rebuild, and apply the boot theme's override.
fontManager.SetTypographySource(() => registry.Active.Typography); fontManager.SetTypographySource(() => registry.Active.Typography);
registry.SetActiveChangedCallback(() => fontManager.RebuildDelegateFontsIfChanged()); registry.SetActiveChangedCallback(() => fontManager.RebuildDelegateFontsIfChanged());
@@ -4,7 +4,7 @@ using Dalamud.Plugin.SelfTest;
namespace HellionChat.SelfTests; namespace HellionChat.SelfTests;
// Optional metric capture. Accumulates 1000 steady-state frames of ImGui IO // Optional metric capture. Accumulates 1000 steady-state frames of ImGui IO
// counters plus the plugin's full-Draw wall-time (Plugin.LastDrawMs, B5-1), // counters plus the plugin's full-Draw wall-time (Plugin.LastDrawMs),
// then writes a single perf-baseline.json into the plugin ConfigDirectory so // then writes a single perf-baseline.json into the plugin ConfigDirectory so
// the cycle-notes author can copy the baseline figures without a separate // the cycle-notes author can copy the baseline figures without a separate
// profiling harness. The step only records — it never fails on a threshold // profiling harness. The step only records — it never fails on a threshold
+1 -1
View File
@@ -13,7 +13,7 @@ internal static class ThemeJsonLoader
// policy from the v2.x style refactor: v1 user themes are not migrated, // policy from the v2.x style refactor: v1 user themes are not migrated,
// they're silently ignored so the loader stays free of legacy mapping // they're silently ignored so the loader stays free of legacy mapping
// code. Any other malformed input still throws FormatException. // code. Any other malformed input still throws FormatException.
// B4b-2: callers must pass the logger or the default-fill warnings go silent. // Callers must pass the logger or the default-fill warnings go silent.
public static Theme? LoadFromString(string json, ILogger? logger = null) public static Theme? LoadFromString(string json, ILogger? logger = null)
{ {
if (string.IsNullOrWhiteSpace(json)) if (string.IsNullOrWhiteSpace(json))
+1 -1
View File
@@ -52,7 +52,7 @@ internal sealed class TopTabBar
for (var i = 0; i < tabs.Count; i++) for (var i = 0; i < tabs.Count; i++)
{ {
var tab = tabs[i]; var tab = tabs[i];
// POP-1b: a popped-out tab is owned by its pop-out window, not the main // A popped-out tab is owned by its pop-out window, not the main
// strip (1.5.6 exclusivity). Gate on the pool, not Tab.PopOut (stale flag). // strip (1.5.6 exclusivity). Gate on the pool, not Tab.PopOut (stale flag).
if (_pool.IsOpen(tab.Identifier)) if (_pool.IsOpen(tab.Identifier))
continue; continue;
@@ -155,7 +155,7 @@ internal sealed class ChannelPopoutWindow : Window, IFocusableChatWindow
if (Bound is null) if (Bound is null)
return; return;
// POP-1f: the bound tab is live-visible in this pop-out, so it carries no // The bound tab is live-visible in this pop-out, so it carries no
// unread badge — mirror MainWindow's per-frame zero for the active tab. // unread badge — mirror MainWindow's per-frame zero for the active tab.
// View-state reset only (tab.Messages store is untouched). // View-state reset only (tab.Messages store is untouched).
Bound.Unread = 0; Bound.Unread = 0;
+2 -2
View File
@@ -310,9 +310,9 @@ internal sealed class MainWindow : Window, IFocusableChatWindow
TabLifecycleHelpers.OnTabActivated(reseed, active); TabLifecycleHelpers.OnTabActivated(reseed, active);
} }
// POP-1c: a popped-out tab must not stay the main window's active surface // A popped-out tab must not stay the main window's active surface
// (1.5.6 exclusivity). Re-anchor to the first non-popped tab the moment the // (1.5.6 exclusivity). Re-anchor to the first non-popped tab the moment the
// active one is popped; null when every tab is popped (POP-1d guards Draw). // active one is popped; null when every tab is popped, which Draw guards for.
// Runs post-seed, before the sidebar/top-tab draw, so the popped tab never // Runs post-seed, before the sidebar/top-tab draw, so the popped tab never
// renders. Idempotent: PickMainActiveTab returns the same reference once // renders. Idempotent: PickMainActiveTab returns the same reference once
// settled, so OnTabActivated fires only on the pop frame. // settled, so OnTabActivated fires only on the pop frame.
+6 -6
View File
@@ -165,7 +165,7 @@ internal static class TabLifecycleHelpers
// Sectioned sidebar render order (1.5.6 parity): persistent → pinned TempTabs → // Sectioned sidebar render order (1.5.6 parity): persistent → pinned TempTabs →
// unpinned TempTabs. Returns indices into the live tab list so the list order is // unpinned TempTabs. Returns indices into the live tab list so the list order is
// never mutated and DrawRow keeps each tab's ORIGINAL index for PushID. POP-1a: // never mutated and DrawRow keeps each tab's ORIGINAL index for PushID.
// isPoppedOut excludes tabs bound to a pop-out window — an excluded tab draws no // isPoppedOut excludes tabs bound to a pop-out window — an excluded tab draws no
// row and its pool's section header gates on the first tab actually reached. Pure // row and its pool's section header gates on the first tab actually reached. Pure
// + Dalamud-free so the Build-Suite can pin it. // + Dalamud-free so the Build-Suite can pin it.
@@ -215,7 +215,7 @@ internal static class TabLifecycleHelpers
return persistent; return persistent;
} }
// POP-1c: returns the tab the main window should display — the current tab if it // Returns the tab the main window should display — the current tab if it
// is not popped out, else the FIRST non-popped tab in list order, else null when // is not popped out, else the FIRST non-popped tab in list order, else null when
// every tab is popped. NOTE: deliberately NOT ResetActiveTabIfRemoved's // every tab is popped. NOTE: deliberately NOT ResetActiveTabIfRemoved's
// unconditional Tabs[0] — Tabs[0] may itself be popped and would re-trigger the // unconditional Tabs[0] — Tabs[0] may itself be popped and would re-trigger the
@@ -243,7 +243,7 @@ internal static class TabLifecycleHelpers
Popout, Popout,
} }
// POP-1f: the alreadyPopped case is the whole reason this is a function. // The alreadyPopped case is the whole reason this is a function.
// //
// Revealing a popped-out tab in the main window looks like it does nothing, // Revealing a popped-out tab in the main window looks like it does nothing,
// and then does something worse: PickMainActiveTab re-anchors on the next // and then does something worse: PickMainActiveTab re-anchors on the next
@@ -268,12 +268,12 @@ internal static class TabLifecycleHelpers
_ => switchAlways && !alreadyPopped ? TellReveal.MainWindow : TellReveal.None, _ => switchAlways && !alreadyPopped ? TellReveal.MainWindow : TellReveal.None,
}; };
// POP-1e: popout-aware sibling of WrapTabIndex for the ChatTabForward/Backward // Popout-aware sibling of WrapTabIndex for the ChatTabForward/Backward
// keybind. Steps from current by delta's sign (±1), wrapping, and returns the // keybind. Steps from current by delta's sign (±1), wrapping, and returns the
// first index whose tab is NOT popped out within tabs.Count steps; returns current // first index whose tab is NOT popped out within tabs.Count steps; returns current
// when every other tab is popped (no-op), the list is empty, or a single tab. // when every other tab is popped (no-op), the list is empty, or a single tab.
// Skipping popped tabs here is what stops the POP-1c re-anchor from making the // Skipping popped tabs here is what stops the PickMainActiveTab re-anchor
// cycle stick (CYCLE-1). Pure + Dalamud-free. // from making the cycle stick. Pure + Dalamud-free.
// TEST-MIRROR: ../../../Hellion Build test/_Helpers/NextMainTabIndexTests.cs // TEST-MIRROR: ../../../Hellion Build test/_Helpers/NextMainTabIndexTests.cs
internal static int NextMainTabIndex( internal static int NextMainTabIndex(
int current, int current,