Rename a conversation from the sidebar

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

Maintainer thường phản hồi trong vòng 1 ngày

@NopeCharon đang làm issue này rồi.

Từ ngày 5/12/2026.

  • #660 của @NopeCharon — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
62/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
next.js, python
Lĩnh vực
api, backend, frontend

Hướng nghiên cứu

Start by reading the existing crud.update_conversation_title implementation and tests, then inspect the conversation routes and CORS configuration. Add the PATCH /conversations/{id} behavior described in the issue, implement the matching route in frontend/mock-flask-api, and wire the sidebar rename prompt to update its title and the open conversation header. Done means the API responses and validation match the proposal and renaming works in both the mock and Next.js UI.

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

Mô tả

The Next.js sidebar lists conversations by title, but a title can't be changed. A conversation keeps the title it got when it was created (its first question, cut to 100 characters) or stays "Untitled conversation". A long thread can end up with a name that no longer describes it, and the sidebar only offers delete.

The backend already has crud.update_conversation_title, with tests, but no route calls it. /conversations/{id} has GET and DELETE, but no update.

Proposal
  • Backend: PATCH /conversations/{id} with a {"title": "..."} body. It strips surrounding whitespace and accepts 1 to 500 characters (the column is String(500)), so a blank title gets a 422. It returns the conversation without its messages, the same shape as an item of GET /conversations. Like the other conversation routes, it returns 404 for an unknown id and 503 when the database is disabled. Because the Next.js app calls the API from another origin, PATCH must be added to the CORS allow_methods.
  • Next.js: a rename button next to the delete button in the sidebar. It asks for the new title with window.prompt, as delete asks with window.confirm, then updates the sidebar entry and, for the open conversation, the header.
  • Mock API: the same route in frontend/mock-flask-api, so the UI can be developed against the mock.
Ngôn ngữ chính
Python
Star
51
Fork
27
Merge trung bình
11 giờ 59 phút
Pull request đã merge (30 ngày)
33

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

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 The-OpenROAD-Project/ORAssistant

Tất cả issue của The-OpenROAD-Project/ORAssistant

Issue tương tự

Thêm issue về Python

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.