Skip to content

feat(admin): add a combined admin/pending-admin read view - #317

Merged
mikewheeleer merged 1 commit into
Agentpay-Org:mainfrom
thlpkee20-wq:feature/admin-01-view
Jul 28, 2026
Merged

feat(admin): add a combined admin/pending-admin read view#317
mikewheeleer merged 1 commit into
Agentpay-Org:mainfrom
thlpkee20-wq:feature/admin-01-view

Conversation

@thlpkee20-wq

Copy link
Copy Markdown
Contributor

Closes #303

`get_admin` and `get_pending_admin` already exist as individual
read-only views (`get_admin` returns `Option

`, `None` before
`init`, never panics). This adds `AdminSummary { admin, pending_admin }`
and `get_admin_summary()`, combining both into a single read — for
dashboards and migration tooling that want the full handover state
without two round trips, matching the same convenience-snapshot pattern
already used by `get_contract_config`.

Pure read (no auth, no pause gate); both fields default to `None`
rather than panicking. The individual getters remain available and
always agree with the corresponding fields.

Adds 6 tests covering: pre-init (both `None`), post-init (admin set, no
pending), a pending proposal reflected, pending cleared after accept,
pending cleared after cancel, and agreement with the individual getters.

Test plan

Adds AdminSummary { admin, pending_admin } and get_admin_summary(),
combining get_admin and get_pending_admin into a single read for
dashboards and migration tooling that want both without two round
trips. Pure read (no auth, no pause gate); both fields default to None
rather than panicking. The individual getters remain available and
always agree with the corresponding fields.

Adds 6 tests covering: pre-init (both None), post-init (admin set, no
pending), a pending proposal reflected, pending cleared after accept,
pending cleared after cancel, and agreement with the individual
getters.
@mikewheeleer

Copy link
Copy Markdown
Contributor

looks good @thlpkee20-wq — well scoped and easy to review. merging 👍

@mikewheeleer
mikewheeleer merged commit 9bd789b into Agentpay-Org:main Jul 28, 2026
1 check failed
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 a read-only view exposing the current admin state

2 participants