Conversations from POST /conversations stay untitled and keep their creation time

Open
#655 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@NopeCharon is already working on this.

Since Dec 5, 2026.

  • #657 by @NopeCharon — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
fastapi, python, sqlalchemy, sqlite
Domain
backend, database

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_at on 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from The-OpenROAD-Project/ORAssistant

All issues in The-OpenROAD-Project/ORAssistant

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.