In-client /admin command panel for admins #117
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!117
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/admin-command-panel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A discoverable admin/dev tooling panel, opened with the
/adminchat command, shown only to accounts with theadminclaim. It lists the GM commands and prefills them into the chat so a non-technical operator can use them.How it works
AdminCommandCatalogon connect only to admins (isAdminfrom the signed JWT claim). The client shows the panel only if it received one. No client-side JWT decoding; every command is still authorized per call by itsCanExecute— a forged/force-opened panel cannot escalate.BaseCommandgains abstractUsage/Description, so a new command cannot ship without them and appears in the panel automatically.CommandRegistry.AdminCatalogprojects the auto-discovered GM commands./admintoggles the panel; clicking a command prefills/nameinto the chat, ready for its arguments. A/adminhint shows in the HUD for admins.Reworked onto current
main(this replaces the original branch)The original branch predated #104 and #119; it has been rebuilt on top of them:
AdminPanelis now aGumpcomposed from elements, not hand-drawn — plus a new reusableGumpCardelement (a clickable, hover-aware list row) for future vendor/quest/command lists.ServerMessageDispatcherapplies the catalog,GameInputControllerroutes/admin+ panel clicks,WorldRendererdraws the panel + HUD hint. Nothing was added toGameScreen.ProtocolVersion→ 4 (newAdminCommandCatalogwire message).main:/clearbag(from #104) now implements the new abstractUsage/Description, so the whole solution builds.Verification
dotnet build: 0 warnings;csharpier checkclean;dotnet test: 326 passing (added: catalog is complete/sorted with metadata;AdminCommandCatalogprotocol round-trip).Definition of Done
/adminopens a panel listing every GM command; clicking one prefills/<name>into the chat.AdminCommandCatalog; the panel stays empty and/adminis a no-op for them.GmCommandhas aUsage/Description(compiler-enforced via the abstract members).dotnet testgreen.just devas an admin):/adminopens the panel; clicking/giveprefills/give; a non-admin sees no/adminhint and the panel never appears.73acf85d78f9ba26c4dcf9ba26c4dcc0dfb14facc0dfb14fac55a4004f3255a4004f32505db09a41505db09a4133deacffa733deacffa7b2c7dc5c90