[Bug]: Contextual bar actions do not work and duplicate reply names are allowed during edits

Đang mở
#70 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

  • #71 của @sezallagwal — đã đóng, không merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
full-stack

Hướng nghiên cứu

Bắt đầu trong ExecuteBlockActionHandler.ts để theo dõi các tương tác với thanh ngữ cảnh và trong ReplyStorage.ts để kiểm tra isUniqueReplyName trong quá trình chỉnh sửa. Tái hiện các hành động Send, Edit và Delete từ /quick list, sau đó thử đổi tên một câu trả lời thành tên đã tồn tại. Hoàn tất khi tất cả các hành động đều được thực thi và các tên trùng lặp bị từ chối trong quá trình chỉnh sửa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
What happened?

Overview

This issue covers two distinct bugs within the quick replies list (/quick list) and the editing flow.

Bug 1: Send, Edit, and Delete actions in quick replies list do nothing

When opening the quick replies list and clicking Send, Edit, or Delete from the overflow menu (⋮) on any reply, nothing happens — no modal opens, no error is shown.

Root Cause:
In ExecuteBlockActionHandler.ts, the room fallback uses strict equality:
if (room === undefined) {
For contextual bar block interactions, getInteractionData().room returns null (not undefined). The strict check misses null, forcing room to stay null. Following this, the if (room) guard around the Send/Edit/Delete switch evaluates to false, silently skipping the execution of all three actions.


Bug 2: Duplicate reply names allowed when editing

When editing a reply and changing its name to perfectly match another existing reply, the app accepts it and saves it instead of showing a validation error.

Root Cause:
In ReplyStorage.ts, the isUniqueReplyName method has a no-op comparison:

if (replyFound && replyId) {
    replyFound.id === replyId;  // comparison result is discarded!
    return true;                // always returns true
}
Steps to reproduce
  1. Open any channel and run /quick list.
  2. Click the overflow menu (⋮) on any reply.
  3. Click Send, Edit, or Delete.
  4. Expected: A modal opens for the selected action.
  5. Actual: Nothing happens.
Relevant ScreenShots

No response

Version

8.1.1

What browsers are you seeing the problem on?

Chrome

Ngôn ngữ chính
TypeScript
Star
7
Fork
21
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RocketChat/Apps.QuickReplies

Tất cả issue của RocketChat/Apps.QuickReplies

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.