--- id: NL-SPEC-C24FF4FA type: spec title: Power popup --- # Power popup ## Power state - A main battery hero appears only for a real laptop or display battery. - The hero shows circular percentage, lowercase state, time estimate, health when available, and the existing charge role. - Desktops never show a fake battery. - External battery devices appear as compact chips below the hero. - Without battery data, session actions become the first content. - Global low-power mode continues to reflect discharge state for animation throttling. ## Session actions - `lock` is the primary safe action. - `suspend`, `monitor-off`, and `monitor-on` are secondary one-click actions. - `log out`, `reboot`, and `power off` use the same tiles as the safe actions; danger shows through the destructive role colour and the armed confirmation (owner decision 2026-11-14). - Destructive actions require two steps. - While confirmation is pending, an inline card below the actions shows the lowercase action name, `confirm`, and `cancel`. - Enter confirms and Escape cancels without on-screen keyboard instructions. - Existing real session effects remain unchanged. - No fake power-profile selector appears without a working profile service. ## Safety and interface constraints - Session commands use fixed discrete argument vectors without shell interpolation or sudo. - Verification never executes logout, reboot, or poweroff; it covers their confirmation gate and route only. - Public IPC follows `NL-SPEC-86A037A0`; power panel intents stay on the typed service. - State retains battery status, external devices, actions, compact state, pending confirmation, and last action. - State excludes backend narration and fake profile state. ## Acceptance - Pure tests cover time labels, roles, battery detection, low-power detection, confirmation, and every route; the isolated native UPower production proof covers charge and health scales plus native state mapping. - Pure power tests and the isolated power interaction suite pass without executing destructive actions. - A live visual check confirms battery-present and battery-absent layouts, external chips, equal action tiles with destructive colour, and in-place confirmation. - All UI labels are lowercase.