Conversations from POST /conversations stay untitled and keep their creation time
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Read backend/'s conversation CRUD code, especially crud.create_message and crud.get_or_create_conversation, then inspect the conversation model and the tests described in CONTRIBUTING.md. Check that creating a message updates the conversation timestamp and sets an untitled conversation's title from the first user message, capped at 100 characters. Verify the JSON, streaming, and TUI paths; pull request #657 is already open for this issue.
Written by the indexing model from the issue text.
Description
The Next.js app creates a conversation with POST /conversations, then sends each question to POST /conversations/agent-retriever with that conversation_uuid. After that, two fields in the conversation list never change.
Title. POST /conversations stores title = None. The chat endpoints pass the first question as the title to crud.get_or_create_conversation, but it uses the title only when it creates the conversation. Here the conversation already exists, so the title stays None, and the sidebar shows "Untitled conversation" for every thread. The chatbot.py TUI also creates its conversations with title=None.
updated_at. Conversation.updated_at has an onupdate, but crud.create_message only inserts a messages row and never updates the conversation row. GET /conversations sorts by updated_at desc, so the list stays in creation order, and the sidebar shows the creation time as the last update. The mock API in frontend/mock-flask-api sets updated_at after each answer, so the UI behaves correctly against the mock but not against the backend.
Reproduce
From backend/, with the test setup in CONTRIBUTING.md: an app with the conversations router, an in-memory SQLite database, and a mocked graph:
a = POST /conversations -> title None, updated_at 02:15:19.510079
b = POST /conversations -> title None, updated_at 02:15:19.613398
POST /conversations/agent-retriever {"query": "How do I install OpenROAD?", "conversation_uuid": a}
GET /conversations/{a} -> title None, updated_at 02:15:19.510079, 2 messages
GET /conversations -> [b, a]
Expected: a is titled "How do I install OpenROAD?", its updated_at is the time of the answer, and it is listed first.
Proposed fix
Update the conversation in crud.create_message, in the same commit as the message:
- set
updated_aton every message; - give an untitled conversation the first 100 characters of a user message as its title, the rule the chat endpoints apply today when they create a conversation.
This covers the JSON and streaming endpoints and the TUI. The 100-character rule then lives in one place.
- Dominant language
- Python
- Stars
- 52
- Forks
- 29
- Avg merge
- 11h 59m
- Merged PRs (30d)
- 33
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from The-OpenROAD-Project/ORAssistant
-
A JSON chat answer blocks the backend event loop for the whole RAG runPossibly taken @NopeCharon claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
The-OpenROAD-Project/ORAssistant#656 ·
Maintainers usually reply within 1 day
-
Rename a conversation from the sidebarPossibly taken @NopeCharon claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 62/100
The-OpenROAD-Project/ORAssistant#659 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
The-OpenROAD-Project/ORAssistant#186 · 1 comment ·
Maintainers usually reply within 1 day
-
Deprecate GOOGLE_APPLICATION_CREDENTIALSMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
The-OpenROAD-Project/ORAssistant#155 · 2 comments ·
Maintainers usually reply within 1 day
-
Add button to OR GUI for easy accessMay be free again @sparsh-karna claimed this 165 days ago, and no pull request is open. Open
The-OpenROAD-Project/ORAssistant#152 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in The-OpenROAD-Project/ORAssistant
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day