--- type: User Story title: "US-015: Manage a reign through the Tyrant control panel" description: Give the active Tyrant a graphical control panel for inspecting and managing the current reign. status: done --- # US-015: Manage a reign through the Tyrant control panel As the **Tyrant**, I want a control panel for my reign so that I can inspect progress, purchase unlocks, assign classes, and use abilities without memorizing commands. ## Acceptance criteria - [x] The active Tyrant can open the control panel with `/tyrant menu`, and `/tyrant` with no arguments opens the same panel. - [x] A player who is not the active Tyrant cannot open or operate the control panel. - [x] When the active Tyrant joins while the event is running, the control panel opens automatically five seconds after login. - [x] Automatic opening is cancelled if the Tyrant disconnects, loses the Tyrant role, or the event pauses or stops during the five-second delay. - [x] Other players and pending Tyrant candidates do not receive the automatically opened control panel. - [x] Closing an automatically opened control panel does not cause it to reopen during the same login session. - [x] The Tyrant may open the control panel manually during the five-second delay without causing a second panel to open automatically. - [x] The main screen shows the Tyrant's level, unspent choices, purchased unlocks, class assignments, and roster-intelligence cooldown. - [x] Purchased, available, unavailable, and cooldown-gated actions are visually distinguishable and explain why they cannot currently be used. - [x] The Tyrant can navigate between overview, unlock, class-assignment, and ability screens and can close the panel without changing gameplay state. - [x] The Tyrant can review and purchase an available unlock after confirming the selected unlock and its choice cost. - [x] The Tyrant can select a purchased class and assign or reassign it to an eligible online player. - [x] The class player selector excludes the Tyrant and clearly identifies players who are opted out or otherwise ineligible. - [x] Class reassignment identifies the current holder and requires confirmation before replacing that holder. - [x] The Tyrant can activate roster intelligence from the panel when the ability is purchased and ready. - [x] A successful or rejected action refreshes the panel from authoritative current state and communicates the result clearly. - [x] Panel actions use the same domain rules and persistence behavior as their command equivalents. - [x] Stale, repeated, or concurrent panel interactions cannot duplicate purchases, bypass cooldowns, or create conflicting assignments. - [x] Panel actions become unavailable immediately if the game pauses, the reign ends, or the player is no longer the Tyrant. - [x] Existing `/tyrant choices`, `/tyrant buy`, `/tyrant assign`, and `/tyrant intelligence` commands remain available as alternatives. - [x] The active Tyrant can open the control panel by using the bound Tyrant control item. ## Validation Automated tests verify command entry points, active-Tyrant authorization, authoritative overview state, the exact 100-tick login delay, lifecycle cancellation, and duplicate-opening prevention. The complete `./gradlew clean check jar` lifecycle passes. ## Related - [Progress and purchase Tyrant unlocks](us-003-progress-and-purchase-unlocks.md) - [Assign unlocked classes](us-004-assign-unlocked-classes.md) - [Purchase and use Tyrant abilities](us-009-use-tyrant-abilities.md) - [Inform players and manage participation](us-011-inform-and-manage-participation.md) - [Use bound role control items](us-017-use-bound-role-control-items.md)