feat: dashboard config validation guardrails (#8) - #191
Merged
El-swaggerito merged 1 commit intoJul 29, 2026
Merged
Conversation
6 tasks
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.
Description
Implements the admin compliance management dashboard for issue #4: a section on the existing
/adminpage (admin-role-only route) where an admin can search, add, remove, and audit KYC-whitelisted investor addresses, with a review-before-signing step and Freighter integration.Related Issue: Closes #4
Type of Change:
Evidence Checklist
1. Issue Reference
Closes #123)2. Implementation Summary
src/lib/whitelist.ts— new: address validation, search, and no-op-action guard logicsrc/lib/__fixtures__/whitelist.ts— new: sample whitelist data for mock modesrc/lib/sdk/IAegisProvider.ts— addedlistWhitelist,addToWhitelist,removeFromWhitelistto the provider contractsrc/lib/sdk/MockAegisProvider.ts— implements the three methods against in-memory fixture statesrc/lib/aegis/client.ts/src/lib/sdk/LiveAegisProvider.ts— stub implementations for the live path, markedTODO(@aegis/sdk)src/hooks/useAegis.ts— wraps the three calls with loading state and records each add/remove to transaction history as acompliance_updatesrc/features/compliance/components/WhitelistManager.tsx— new: the dashboard (search, add form, table, loading/empty/error states)src/features/compliance/components/WhitelistActionModal.tsx— new: review → sign → receipt flow, reusing the existingTransactionReview/TransactionProgress/TransactionReceiptcomponentssrc/pages/admin.tsx— wiresWhitelistManagerinto the existing admin-only routedocs/admin-whitelist-management.md— new: workflow documentationsrc/lib/whitelist.test.ts— new: 17 tests for the pure logic modulesrc/__tests__/sdk/provider.test.ts— 9 new tests for the mock provider's whitelist methods3. Testing
Test Commands Run:
npm run lint npm run typecheck npm test npm run buildTest Output (summary):
npm run lint— no errors (2 pre-existing warnings in unrelated files, not introduced by this PR)npm run typecheck— clean, no errorsnpm test— 449/449 tests passing across 32 test files, including the 26 new tests added in this PRnpm run build— production build succeeds;/adminroute compiles at 5.73 kB4. Commands Run
npm install npm run dev npm run lint npm run typecheck npm test npm run build5. CI Status
6. Acceptance Criteria Coverage
WhitelistManageradded to the existing/adminpage (admin-role-restricted viaRouteGuard)searchWhitelistEntries+TableSearchfilter the table by address or note; status shown as a badge (Whitelisted / Revoked)WhitelistActionModalshows full details viaTransactionReviewbefore any signature is requesteduseAegis→getAegisProvider()path already used by mint/transfer — no new wallet-interaction code was addedEmptyState(no-data vs unavailable variants) for empty/error,TransactionReceiptfor success/failure/pending/unknowndocs/admin-whitelist-management.md7. Self-Assessment
Screenshots / Recordings
Reviewer Notes
The whitelist admin section was added to the existing
/adminpage rather than a new route, since/adminis already restricted to theadminrole and the priorAdminPanelhad a stubbed "Whitelist User" button (// TODO: replace with a real contract.whitelist(address) call) that this PR effectively completes. Happy to move it to its own route if maintainers prefer that separation.LiveAegisProvider's whitelist methods currently delegate to mock-latency stubs inclient.ts, consistent with every other SDK method in this repo pending the real@aegis/sdkpackage.