Skip to content

MLAPR: Frontend #43890

@JordanMontgomery

Description

@JordanMontgomery

Related user story

#37142

Task

Add "Rotate password" to the managed account modal, the auto-rotation info banner, and activity-feed rendering for rotated_managed_local_account_password. Design: https://www.figma.com/design/bO9FnU7ixMrPjFd9hIRbl4/-37142-macOS-local-admin-account--Rotate-password?node-id=5336-267. Depends on Subtask B.

Managed account modal

  • Add "Rotate password" as a secondary button alongside the existing primary "Close" action.
  • Info banner shown when auto_rotate_at is set. Copy: Password rotates automatically after {auto_rotate_at}. Use the app's existing date/time formatting. The same copy covers happy-path (UUID known) and deferred (UUID missing) cases — "after" is deliberately chosen to accommodate both.
  • Click handler: POST /api/v1/fleet/hosts/:id/managed_local_account/rotate.
    • On 204 (happy or deferred): refetch host details, refetch the password (which re-marks viewed and updates auto_rotate_at), refresh modal state.
    • On error: error toast. See Figma for toast messages
  • No special UI for the deferred case — backend returns 204 either way.

Activity feed

Register a renderer for rotated_managed_local_account_password. Mirror the renderer pattern used for rotated_host_recovery_lock_password. Make sure it can properly display fleet or user-initiated rotation and on host page and global activity feed

Type definitions

Extend the managed-account interface (in frontend/interfaces/host.ts or equivalent) with auto_rotate_at?: string and pending_rotation?: boolean. Update the activity-type union with rotated_managed_local_account_password and its payload.

Condition of satisfaction

  • Matches wireframes in the Figma
  • Manual QA from the parent issue's test plan passes (Host details > Show managed account > modal + Host details > Activity + Global activity).
  • Unit tests updated for new functionality

Metadata

Metadata

Labels

#g-mdmMDM product group~frontendFrontend-related issue.~sub-taskA technical sub-task that is part of a story. (Not QA'd. Not estimated.)

Type

No type

Projects

Status

✅ Ready for release

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions