Rename a conversation from the sidebar

未关闭
#659 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@NopeCharon 已经在做这个了。

开始于 2026年12月5日。

  • #660 来自 @NopeCharon —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
62/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
next.js, python
领域
api, backend, frontend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
Python
星标
51
派生
27
平均合并
11 小时 59 分钟
30 天内合并 PR
33

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

The-OpenROAD-Project/ORAssistant 的其他 Issue

查看 The-OpenROAD-Project/ORAssistant 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。