Skip to content

feat(APP-572): Add address impersonation to debug panel#1044

Merged
milosh86 merged 8 commits into
mainfrom
app-572-add-address-impersonation-to-debug-panel-via-wagmi-mock
Mar 24, 2026
Merged

feat(APP-572): Add address impersonation to debug panel#1044
milosh86 merged 8 commits into
mainfrom
app-572-add-address-impersonation-to-debug-panel-via-wagmi-mock

Conversation

@thekidnamedkd
Copy link
Copy Markdown
Contributor

@thekidnamedkd thekidnamedkd commented Mar 19, 2026

Closes APP-572

Adds address impersonation to the debug panel using wagmi's mock connector. Developers can enter any valid Ethereum address (or ENS name) in the debug panel to impersonate that wallet — all wagmi hooks (useAccount, useConnection) and downstream consumers (including gov-ui-kit's "You" tag and member pinning) reflect the impersonated address.

Changes

  • New address control type for the debug panel (debugProvider.api.ts, debugPanelControl.tsx) — renders
    gov-ui-kit's AddressInput with ENS resolution and validation built in
  • New useAddressImpersonation hook — registers the "Impersonate address" control under the "Wallet" group;
    on valid address: disconnects current wallet → connects wagmi mock connector; on clear: disconnects
  • useMember params fix — threads tokenAddress and network through daoMemberDetailsPage server/client
    components so the member API returns voting power for token-based DAOs
  • Test hygiene — renames stale useAccountSpyuseConnectionSpy in 3 test files to match the actual
    useConnection hook being spied on

Dependencies

gov-ui-kit update pending: The AddressInput component currently renders copy, block explorer, and ENS/raw
toggle controls that aren't needed in the debug panel context. A gov-ui-kit release with hideControls (or
similar) support is planned — once published, the debug panel's address control should be updated to opt out of
those actions.

Environment guarding

Inherits from the existing debugPanel feature flag — only enabled in local, development, and preview
environments. Not available in production.

Type of Change

  • Minor: Feature (non-breaking change which adds new functionality)

Developer Checklist:

  • Manually smoke tested the functionality in a preview or locally
  • Confirmed there are no new warnings or errors in the browser console
  • (For User Stories only) Double-checked that all Acceptance Criteria are satisfied
  • Confirmed there are no new warnings on automated tests
  • Merged and published any dependent changes in downstream modules
  • Selected the correct base branch
  • Commented the code in hard-to-understand areas
  • Followed the code style guidelines of this project
  • Reviewed that the Files Changed in Github's UI reflect my intended changes
  • Confirmed the pipeline checks are not failing

Review Checklist:

  • (For User Stories only) Tested in a preview or locally that all Acceptance Criteria are satisfied
  • Confirmed that changes follow the code style guidelines of this project

@linear
Copy link
Copy Markdown

linear Bot commented Mar 19, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 19, 2026

🚀 Preview Deployment: View Here

@thekidnamedkd thekidnamedkd force-pushed the app-572-add-address-impersonation-to-debug-panel-via-wagmi-mock branch from 12b1303 to 6cc2611 Compare March 19, 2026 16:44
@thekidnamedkd thekidnamedkd marked this pull request as ready for review March 19, 2026 16:44
@thekidnamedkd thekidnamedkd requested a review from a team as a code owner March 19, 2026 16:44
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 19, 2026

E2E Smoke Results

Base URL https://app-next-bm2rllxq7-aragon-app.vercel.app
Suite smoke
Result ✅ passed
Run #3910

Copy link
Copy Markdown
Contributor

@milosh86 milosh86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful 🤩
I've been using https://impersonator.xyz/, but this is so much more convenient 🙌

Can we just improve it further to persist the session on page reload? ... it would be perfect then, but let's keep it simple, if it adds too much complexity we can live without it :D

Copy link
Copy Markdown
Contributor

@milosh86 milosh86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good ... please resolve conflicts with main so that new preview is generated, just to check how it looks.

…dress-impersonation-to-debug-panel-via-wagmi-mock
…dress-impersonation-to-debug-panel-via-wagmi-mock
Copy link
Copy Markdown
Contributor

@milosh86 milosh86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey hey, looks great, just one issue left: if I paste the address, it works good, but if I start to type (my ens name), input field gets reset after a couple of characters.

@thekidnamedkd
Copy link
Copy Markdown
Contributor Author

hey hey, looks great, just one issue left: if I paste the address, it works good, but if I start to type (my ens name), input field gets reset after a couple of characters.

should be fixed 👁️

@thekidnamedkd thekidnamedkd requested a review from milosh86 March 24, 2026 14:03
Copy link
Copy Markdown
Contributor

@milosh86 milosh86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@milosh86 milosh86 merged commit 0fbb973 into main Mar 24, 2026
18 checks passed
@milosh86 milosh86 deleted the app-572-add-address-impersonation-to-debug-panel-via-wagmi-mock branch March 24, 2026 14:58
@arabot-1 arabot-1 mentioned this pull request Mar 24, 2026
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.

2 participants