From bf7b4fa3c0ee23b27dfdb4ffd74f43d940860a36 Mon Sep 17 00:00:00 2001 From: benya Date: Sun, 8 Mar 2026 22:56:07 +0300 Subject: [PATCH] web: allow editing group and channel descriptions in chat info --- docs/core-checklist-status.md | 4 ++-- web/src/components/ChatInfoPanel.tsx | 23 ++++++++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/docs/core-checklist-status.md b/docs/core-checklist-status.md index f326b2f..fb5d6a3 100644 --- a/docs/core-checklist-status.md +++ b/docs/core-checklist-status.md @@ -29,10 +29,10 @@ Legend: 20. GIF - `DONE` (web GIF picker with provider search, preset fallback, and favorites) 21. Message History/Search - `DONE` (history/pagination/chat+global search) 22. Text Formatting - `DONE` (bold/italic/underline/spoiler/mono/links + strikethrough + quote/code block; web composer supports keyboard shortcuts `Ctrl/Cmd+B/I/U/K`, `Ctrl/Cmd+Shift+X`, `Ctrl/Cmd+Shift+\``) -23. Groups - `DONE` (create/add/remove/invite link with role-aware moderation flows in web Chat Info and covered invite/join behavior) +23. Groups - `DONE` (create/add/remove/invite link with role-aware moderation flows in web Chat Info, including owner/admin editing of title and description) 24. Roles - `DONE` (owner/admin/member) 25. Admin Rights - `DONE` (delete/pin/edit info + ban/unban/member role management with role-gated UI and APIs for groups/channels; member role no longer sees participants lists in group/channel chat info) -26. Channels - `DONE` (create/post/edit/delete/subscribe/unsubscribe with role-aware channel behavior and invite-link flows) +26. Channels - `DONE` (create/post/edit/delete/subscribe/unsubscribe with role-aware channel behavior and invite-link flows; owner/admin can edit channel title and description in web Chat Info) 27. Channel Types - `DONE` (public/private) 28. Notifications - `DONE` (browser notifications + mute/settings/sound; mention override for muted chats, realtime sync for mute state, notification click deep-link (`/?chat=..&message=..`) restores chat/message focus after auth) 29. Archive - `DONE` diff --git a/web/src/components/ChatInfoPanel.tsx b/web/src/components/ChatInfoPanel.tsx index fa5dfee..a59d853 100644 --- a/web/src/components/ChatInfoPanel.tsx +++ b/web/src/components/ChatInfoPanel.tsx @@ -48,6 +48,7 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) { const [loading, setLoading] = useState(false); const [error, setError] = useState(null); const [titleDraft, setTitleDraft] = useState(""); + const [descriptionDraft, setDescriptionDraft] = useState(""); const [savingTitle, setSavingTitle] = useState(false); const [chatAvatarUploading, setChatAvatarUploading] = useState(false); const [searchQuery, setSearchQuery] = useState(""); @@ -210,6 +211,7 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) { const detail = await getChatDetail(targetChatId); setChat(detail); setTitleDraft(detail.title ?? ""); + setDescriptionDraft(detail.description ?? ""); const notificationSettings = await getChatNotificationSettings(targetChatId); setMuted(notificationSettings.muted); if (detail.type === "private" && !detail.is_saved && detail.counterpart_user_id) { @@ -487,23 +489,38 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) { value={titleDraft} onChange={(e) => setTitleDraft(e.target.value)} /> +

Description

+