Skip to content

Chat: remove the in-app admin tools panel #1381

Description

@feruzm

Once chat commands land (#1380), the in-app admin panel is redundant. It is desktop-only in practice, duplicates the command surface, and every button in it is a destructive action sitting behind a single confirm().

Scope

Remove:

  • features/chat/components/admin-panel.tsx
  • features/chat/hooks/use-channel-admin.ts
  • features/chat/chat-admin-store.ts
  • the admin mutation helpers in features/chat/mattermost-api.ts (useMattermostAdminBanUser, ...DeleteUserPosts, ...DeleteUserDmPosts, ...DeleteUserAccount, ...NukeUser, ...DeactivateUser)
  • the showAdminTools toggle in app/chats/_components/chats-client.tsx and its render site in features/chat/mattermost-channel-view.tsx

Out of scope

api/mattermost/channels/[channelId]/posts/[postId] DELETE stays. It is not part of this panel: it serves post authors deleting their own messages and community moderators acting in their own channel, via getMattermostCommunityModerationContext. Removing it would break both.

API routes are removed separately in a follow-up, once the command path has been exercised in production.

Depends on #1380.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions