fix(guild): populate leader_name in search results (matches prod capture)
Add IViewerRepository.LoadDisplayNamesAsync (batch AsNoTracking select), extend GuildSearchEntry with LeaderName, enrich GuildService.SearchAsync with a leader-id batch lookup, and thread the name through the controller's ToDetailDto call. Adds a leader_name assertion to GuildSearchFlowTests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,4 +33,10 @@ public interface IViewerRepository
|
||||
|
||||
/// <summary>Clears Viewer.GuildId to null. No-op if the viewer does not exist.</summary>
|
||||
Task ClearGuildIdAsync(long viewerId, CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Batch-loads <c>DisplayName</c> for a set of viewer ids. Returns a dictionary keyed by viewer id;
|
||||
/// ids with no matching row are absent from the result. Read-only (AsNoTracking).
|
||||
/// </summary>
|
||||
Task<Dictionary<long, string>> LoadDisplayNamesAsync(IReadOnlyCollection<long> viewerIds, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user