feat(admin): add a combined admin/pending-admin read view - #317
Merged
mikewheeleer merged 1 commit intoJul 28, 2026
Conversation
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.
Contributor
|
looks good @thlpkee20-wq — well scoped and easy to review. merging 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #303
`get_admin` and `get_pending_admin` already exist as individual
`, `None` beforeread-only views (`get_admin` returns `Option
`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
pre-existing, unrelated test covered by fix(test): correct cross-call event-count assumption in ownership-transfer test #315.