Repository navigation
feat: add admin panel Kick button with confirm dialog - #726
Conversation
Add a per-participant Kick button in the admin/control panel that force-disconnects a participant via the backend disconnect endpoint. - Add API.forceDisconnectParticipant calling POST /production/:productionId/line/:lineId/participants/:sessionId/disconnect through the shared handleFetchRequest wrapper - Add a Kick button in user-list.tsx mirroring the mute button, wired to a confirmation dialog in production-line.tsx with error handling - Add component and api tests covering render, confirm wiring and the POST call Closes #673 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
code-reviewer verdict: LGTM (automated review by a separate invocation from the implementer; recorded as a marker because GitHub blocks state-bearing self-review when author and reviewer are the same account). Summary: Clean, well-scoped implementation mirroring the existing Warnings (non-blocking)
Suggestions
Domain NoteAffects WHIP/WHEP / SMB session lifecycle (backend force-disconnect expires the participant's SMB endpoint and removes the session). Frontend side is a straightforward authenticated POST and looks correct. Consider |
Summary
API.forceDisconnectParticipantthat calls the backend force-disconnect endpoint (POST /production/:productionId/line/:lineId/participants/:sessionId/disconnect) through the sharedhandleFetchRequestwrapper (no inline fetch, errors routed consistently).user-list.tsx, mirroring the existingMuteParticipantButtonpattern and guarded identically (not shown for yourself, program output lines, WHIP or inactive participants).ConfirmationModalinproduction-line.tsxwith a confirm dialog and error handling (reuses the existing mute-confirm layout and error-reset effect).user-list.test.tsx) for render/confirm wiring and api tests for the POST call and 404 error propagation.Test plan
npm test)npm run typecheck)npm run lint)npm run build)Closes #673
🤖 Generated with Claude Code