Skip to content

feat(admin): add admin panel for group management#160

Open
aunysillyme wants to merge 1 commit into
sorosave-protocol:mainfrom
aunysillyme:feat/admin-panel-issue-11
Open

feat(admin): add admin panel for group management#160
aunysillyme wants to merge 1 commit into
sorosave-protocol:mainfrom
aunysillyme:feat/admin-panel-issue-11

Conversation

@aunysillyme
Copy link
Copy Markdown

/claim #11

Summary

  • Adds AdminPanel.tsx with admin-only controls: Start Group (Forming → Active), Pause/Resume, Remove Member, Transfer Admin Role, and Emergency Withdraw with an inline confirmation step.
  • Mounts the panel on groups/[id]/page.tsx next to the existing actions card. The panel only renders when the connected wallet matches the group admin.
  • Each action follows the existing pattern (build tx via sorosaveClient, sign with Freighter, log the signed XDR pending tx-submission TODO that already exists elsewhere in the codebase).

Notes

  • This PR is AI-assisted (Claude).
  • The removeMember, transferAdmin, startGroup, pauseGroup, resumeGroup, and emergencyWithdraw calls on sorosaveClient follow the naming/signature conventions used by contribute and createGroup. If the SDK method names differ, they're a one-line rename per action.
  • No new dependencies. Stays consistent with existing Tailwind styles and the wallet/signing flow.

Test plan

  • Connect as the group admin → admin panel renders.
  • Connect as a non-admin → panel is hidden.
  • Status Forming: Start Group button appears and triggers a sign request.
  • Status Active: Pause button appears.
  • Status Paused: Resume button appears.
  • Remove Member: dropdown excludes the admin; submit triggers sign request with selected member.
  • Transfer Admin: address field validates non-empty; submit triggers sign request.
  • Emergency Withdraw: first click reveals confirmation; Confirm triggers sign request, Cancel dismisses.

Closes #11

Adds AdminPanel component with admin-only controls: start group
(Forming → Active), pause/resume toggle, remove member, transfer
admin role, and emergency withdraw with inline confirmation. Mounts
on the group detail page beside existing member actions; renders only
for the connected admin wallet.

Closes sorosave-protocol#11

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Implement admin panel for group management

1 participant