Skip to content

Add guild, alliance and guild list pages to the admin panel - #953

Merged
sven-n merged 11 commits into
MUnique:masterfrom
eduardosmaniotto:feature/admin-guild-pages
Sep 29, 2026
Merged

sven-n merged 11 commits into
MUnique:masterfrom
eduardosmaniotto:feature/admin-guild-pages

Conversation

@eduardosmaniotto

@eduardosmaniotto eduardosmaniotto commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Adds guild management visibility to the admin panel: a searchable guild list, a guild detail page with member roster, and an alliance page.

What's Included

  • /guilds — Paginated, searchable table of all guilds (name + logo, member count, score, alliance).
  • /guild/{id} — Guild details: score, notice, alliance link, and the full member roster (character, account, class, level, master level, position).
  • /alliance/{id} — All guilds belonging to an alliance, reachable from any member guild or from the alliance master itself.
  • GuildLogo component — Renders the game's native 8×8, 16-color guild logo bitmap as an inline SVG.
  • GuildService / IGuildService — Backed by new query methods on IGuildServerContext (GetGuildsOrderedByNameAsync, SearchGuildsAsync, GetAllianceMasterIdsAsync) so listing and search run as database queries rather than loading every guild into memory.
  • IGuildMemberEnricher — Character/account enrichment of guild members is isolated behind this interface, since it depends on the player context rather than the guild context.
  • Moved the Castle Siege menu item next to Guild for better contextual grouping.
  • Localization — Added the missing AssistantMaster guild position caption to ModelResources.
  • Tests — Unit tests for GuildService (in MUnique.OpenMU.Web.Tests) using the in-memory persistence provider, plus a caption test for AssistantMaster.
guild-list guild-page alliance-page

Adds three new admin panel pages backed by a new GuildService:

- /guilds: paginated, searchable list of all guilds, including logo,
  member count, score and alliance.
- /guild/{id}: guild detail page with its members (name, account,
  class, level, master level, position), ordered by rank.
- /alliance/{id}: lists all guilds belonging to an alliance, reachable
  from either a member guild or the alliance master.

Guild data is read from the guild context; member enrichment with
character/account data (which lives in a separate player context) is
handled by a dedicated IGuildMemberEnricher so the two concerns don't
mix. Listing and search are pushed down to the persistence layer via
new IGuildServerContext methods (GetGuildsOrderedByNameAsync,
SearchGuildsAsync, GetAllianceMasterIdsAsync) instead of loading the
whole guild table into memory.

Also adds an 8x8 16-color GuildLogo component to render the game's
native guild logo bitmap format, and an AssistantMaster guild position
caption/resource that was missing from ModelResources.

Includes unit tests for GuildService (listing, search, pagination
fallback, member ordering, alliance resolution, enrichment) using the
in-memory persistence provider.
Deterministic per-party badge colors (FNV-1a), short-lived IMemoryCache
entries for the player-list copies, and a shared PartyDisplay helper
with PartySize on the account interface. Add the guild column to all
tabs (bulk-resolved, one lookup per distinct guild; failed lookups
render as guild-less), localized badge titles and empty values, tab
a11y attributes, and plugin-gated feature tabs so disabled stays
distinguishable from enabled-but-idle.
@eduardosmaniotto
eduardosmaniotto marked this pull request as ready for review September 28, 2026 19:23

sven-n commented Sep 29, 2026

Copy link
Copy Markdown
Member

Review

Thanks, this is a nice addition. I found nothing that blocks merging.

Verification

  • Full solution builds on the PR head and on the PR head merged with current master. The merge has no conflicts.
  • All test projects pass on the merged result, including the new GuildServiceTests, GuildLinkTests, GuildNamesTests, PartyDisplayTests and the AssistantMaster caption test.
    • NetworkAnalyzerPageTests.PacketsAreShownInChronologicalOrder failed once, then passed on 3 reruns. That file isn't touched here, so it's a pre-existing timing flake.
  • The red MUnique.OpenMU Azure check isn't caused by this PR. It is red on the base commit too: the Dapr GuildServer client didn't match the new IGuildServer signature. Fix the Dapr guild server build, which breaks the whole solution build #1004 on master already carries the same fix that this PR includes for src/Dapr/..., so the two agree.

What looks good

  • Listing and searching are paged database queries (GetGuildsOrderedByNameAsync / SearchGuildsAsync), not full table loads. The alliance-master lookup is limited to the current page.
  • Enriching members with character data sits behind IGuildMemberEnricher. It goes through the account load path (the comment explains why GetByIdAsync<Character> can't be used), caches accounts per call, and a failure only drops the details, not the member row.
  • Alliance handling covers the master guild itself, which has no AllianceGuild of its own.
  • The new pages are covered by the global [Authorize], and Castle Siege is still admin-only after moving in the nav menu.

Non-blocking notes (can be follow-ups)

  1. Scope: the PR also adds a guild column, a 5s IMemoryCache and PartyDisplay to the online/offline/bot account tabs. The description doesn't mention this. It looks fine, but the description could say so.
  2. StyleCop SA1203 (probably some of the 4 Codacy findings): in BotAccountService and LoggedInAccountService, the const cache key is declared after the static readonly lifetime field.
  3. GetAllianceMasterIdsAsync has no CancellationToken, while the two other new query methods do.
  4. The UTF-8 BOM was removed from GuildServerContext.cs, IGuildServerContext.cs, GuildServerInMemoryContext.cs and ModelResources.resx. It's harmless, just unrelated churn.
  5. GuildNames.ResolveAsync makes two sequential guild-server calls per distinct guild. This is fine at current sizes, and the 5s cache limits it on the logged-in and bot tabs, but not on the offline tab.
  6. GetAllianceAsync for a guild that belongs to no alliance returns an "alliance" containing only that guild. The UI only links to it for alliance guilds, so users won't see it today.

Merging.


Generated by Claude Code

@sven-n
sven-n merged commit a0cfc01 into MUnique:master Sep 29, 2026
0 of 2 checks passed
@eduardosmaniotto
eduardosmaniotto deleted the feature/admin-guild-pages branch September 29, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants