chore(comments): tighten v1.4.10 inline commentary after self-review
Five trim spots from the cycle's earlier commits — none change behaviour, just drop redundant phrasing and stale references per the HellionChat comment-style convention (1-3 lines default, link "same as X" instead of repeating, file:line refs only where they aid navigation). SymbolPicker: - BmpWhitelist header consolidated to source + filter ranges - ImRaii.Popup pattern links the established ChatLogWindow popup idiom instead of citing three call-sites - ToIconString comment drops the "discoverability" footnote that the code already telegraphs - Manually-wrapping comment drops the "same modern idiom" tail that duplicated the preceding sentence MessageStore: - Merge the stale pre-v1.4.10 sqlScanLimit comment with the new v1.4.10 commentary; the cap mention now describes the historical reason rather than a parameter that no longer exists
This commit is contained in:
@@ -997,17 +997,12 @@ internal class MessageStore : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
// Returns up to limit tells exchanged with the named player, oldest-first.
|
||||
// SQL narrows by Receiver + ChatType (indexed); client does the final
|
||||
// PlayerPayload comparison. sqlScanLimit caps the scan to stay within
|
||||
// the message-processing worker thread budget.
|
||||
// Walks the full receiver-filtered tell history newest-first and stops
|
||||
// as soon as the per-partner match count reaches `limit`. The previous
|
||||
// hardcoded 500-row scan window cut active users' less-frequent pinned
|
||||
// partners out of the result whenever other partners' chatter pushed
|
||||
// them off the back of the window. Index on (Receiver, Date) keeps the
|
||||
// SQL side cheap; the client-side break bounds the actual decode cost
|
||||
// to roughly the depth at which `limit` partner matches accumulate.
|
||||
// Returns up to `limit` tells exchanged with the named player, oldest-first.
|
||||
// SQL narrows by Receiver + ChatType via the (Receiver, Date) index, then
|
||||
// the client-side loop runs PlayerPayload comparison and breaks once
|
||||
// `limit` partner matches accumulate. Earlier versions had a hardcoded
|
||||
// 500-row scan cap that cut less-frequent pinned partners off the back of
|
||||
// the window in chatty sessions; removed in v1.4.10.
|
||||
internal IReadOnlyList<Message> GetTellHistoryWithSender(
|
||||
ulong receiver,
|
||||
string senderName,
|
||||
|
||||
@@ -19,13 +19,10 @@ internal sealed class SymbolPicker
|
||||
private string _search = string.Empty;
|
||||
private readonly List<uint> _recentUsed = new(capacity: RecentCapacity);
|
||||
|
||||
// FFXIV server-safe BMP symbols, verified 2026-05-16 via /echo + /say
|
||||
// round-trip across four probe rounds (140 candidates tested, 43 filtered).
|
||||
// Range U+2694-26C4 (Misc Symbols Extended), U+2700+ (Dingbats Extended),
|
||||
// diagonal arrows, vulgar fractions U+2153+, and chess pieces all get
|
||||
// dropped by the server, so they're not exposed here.
|
||||
// Source-of-truth for this list lives in
|
||||
// Projekte/FFXIV/Hellion Chat/Cycles/v1.4.10 BMP-Whitelist Notes.md.
|
||||
// FFXIV server-safe BMP symbols, verified 2026-05-16 via /echo + /say.
|
||||
// Filtered ranges: U+2694-26C4 (Misc Symbols Extended), U+2700+ (Dingbats
|
||||
// Extended), diagonal arrows, U+2153+ fractions, chess pieces.
|
||||
// Full probe log: Cycles/v1.4.10 BMP-Whitelist Notes.md.
|
||||
private static readonly (uint Codepoint, string Name)[] BmpWhitelist = new[]
|
||||
{
|
||||
(0x00A1u, "Inverted Exclamation"),
|
||||
@@ -134,8 +131,8 @@ internal sealed class SymbolPicker
|
||||
// chat-input buffer at the current cursor position.
|
||||
public string? DrawAndConsume()
|
||||
{
|
||||
// ImRaii.Popup mirrors ChatLogWindow.cs:823 / :2380, PayloadHandler.cs:68
|
||||
// — auto-EndPopup via using-Dispose.
|
||||
// ImRaii.Popup auto-disposes EndPopup, same idiom as other popups in
|
||||
// ChatLogWindow.
|
||||
using var popup = ImRaii.Popup(PopupId);
|
||||
if (!popup)
|
||||
return null;
|
||||
@@ -202,10 +199,8 @@ internal sealed class SymbolPicker
|
||||
continue;
|
||||
}
|
||||
|
||||
// ToIconString() returns the single-codepoint string ready for
|
||||
// ImGui rendering (Dalamud SeIconCharExtensions.cs:25). Tooltip
|
||||
// carries the enum name so users can discover what each glyph
|
||||
// means.
|
||||
// ToIconString gives the single-codepoint glyph; tooltip
|
||||
// carries the enum name for discoverability.
|
||||
if (ImGui.Selectable(
|
||||
icon.ToIconString(),
|
||||
false,
|
||||
@@ -217,10 +212,9 @@ internal sealed class SymbolPicker
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGui.SetTooltip(label);
|
||||
|
||||
// Manually-wrapping pattern from imgui_demo.cpp on modern API.
|
||||
// GetWindowContentRegionMax is obsolete since ImGui 1.92
|
||||
// (imgui.h:565); HellionChat uses GetContentRegionAvail
|
||||
// throughout (e.g. ChatLogWindow.cs:840). Same modern idiom.
|
||||
// Manually-wrapping pattern from imgui_demo.cpp;
|
||||
// GetWindowContentRegionMax obsolete since ImGui 1.92, use
|
||||
// GetContentRegionAvail (see ChatLogWindow.cs:840).
|
||||
var style = ImGui.GetStyle();
|
||||
var lastItemX2 = ImGui.GetItemRectMax().X;
|
||||
var availableRightX =
|
||||
|
||||
Reference in New Issue
Block a user