Skip to content

Web: tell the owner when an administrator acts on their account - #378

Merged
SiteRelEnby merged 2 commits into
mainfrom
feat/admin-action-notice
Nov 4, 2026
Merged

SiteRelEnby merged 2 commits into
mainfrom
feat/admin-action-notice

Conversation

@SiteRelEnby

Copy link
Copy Markdown
Contributor

Closes #339. Web only; no backend change.

  • A banner for admin actions on your account. Reads the existing self-only GET /v1/auth/admin-activity feed (first page) and shows any entry newer than the owner has acknowledged: what was done, in plain words, when, the reason the admin entered, "plus N more" when several are unseen, and a link to the Account page's full record. Actions that undo a protection the owner set or change how they sign in (System Safety reset, bypassing queued deletions, cancelling staged exposures, session or API-key revocation, password reset, email change, 2FA disable, share-grant revocation, publishing block) get the critical colour; everything else is a warning.
  • Dismissal follows the account. The X writes the newest entry's created_at to admin_activity_seen_at in the web client-settings blob, the same mechanism announcement dismissals use, and falls back to a session-only dismissal if that write fails. Because it is a timestamp rather than a flag, a dismissal can never hide an action that happens after it.
  • The Account card describes each action. The admin activity card now shows the same plain-words description beside the raw action name and the admin's email, from one label table in lib/admin.ts. Unknown action names fall back to the raw name so a new server-side action is never silently hidden.
  • useClientSettings moved out of the announcement banner file into a hook module, so both banners share it without tripping the fast-refresh lint rule.
  • Client docs note the feed and the admin_activity_seen_at convention for a native client that wants the same banner; changelog entry.

Verification

  • tsc and eslint clean.

An admin reset of System Safety, an early finalise of queued deletions,
cancelled visibility changes, a revoked session or API key, a tier
change: all of these were recorded on the Account page's admin activity
card and nowhere the owner would see without going looking.

A banner now sits at the top of the app for any admin action newer than
the owner has acknowledged, naming the action in plain words, when, and
the reason the admin gave, with a link to the full record. Actions that
undo a protection the owner set or change how they sign in get the
critical colour; the rest are warnings. Dismissing stores the newest
action's timestamp in the web client settings, the way announcement
dismissals do, so it follows the account across browsers and can never
cover an action that happens later.

Driven by the existing self-only admin-activity feed, so nothing an admin
can do reaches the card without also reaching the banner. The card now
describes each action in words beside its raw name, from the same table.
@SiteRelEnby
SiteRelEnby enabled auto-merge November 4, 2026 01:31
@SiteRelEnby
SiteRelEnby merged commit 04b73d0 into main Nov 4, 2026
8 checks passed
@SiteRelEnby
SiteRelEnby deleted the feat/admin-action-notice branch November 4, 2026 01:32
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.

add banner notification after system safety reset applies

1 participant