Repository navigation
fix(chat): fix to show thread after creation - #7058
Merged
Merged
Conversation
Contributor
📱 QA build
The QA build installs alongside a released Nextcloud app, so you can keep Downloading the file requires a GitHub account, so open this link on the |
The server relays a new message before it creates the thread for it, so the relayed copy of a thread's root message carries no thread data. The response to the send request is not stored, and nothing marked the root afterwards, so a thread created on the phone showed up as a normal message. The relayed parent of an edit or delete of a thread message carries no thread data either, and storing it removed the thread data of the stored message. When a thread message is stored while the stored root of its thread has no thread data, fetch the thread and mark the root with its title and reply count, the way the iOS and web clients repair it. When a copy of a message without thread data is stored, keep the thread data of the stored message, as a message never stops belonging to a thread. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Fetching the thread to mark its root made storing messages wait for a network request, also in the non-cancellable pull, and a failed request was repeated for every later message of the thread. Every thread message, e.g. the THREAD_CREATED system message, carries the title and reply count of its thread, so mark the root from them in the transaction that stores the messages. The root is marked only while it has no thread data, so older data never replaces newer data, and it gets its own id as thread id, as a root stored without thread id would otherwise be shown as a reply of another thread. The parent messages fetched for replies keep the stored thread data as well. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
mahibi
force-pushed
the
fix/new-thread-root-shown-as-thread
branch
from
November 18, 2026 12:17
37d1e9f to
549347c
Compare
mahibi
marked this pull request as ready for review
November 18, 2026 12:28
Contributor
rapterjet2004
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The server relays a new message before it creates its thread, so the relayed copy of a thread's root
has no thread data. The app never marked the root afterwards, so a thread created on the phone showed
up as a normal message. The relayed parent of an edit or delete of a thread message has no thread data
either, and storing it removed the thread data of the stored message.
thread is marked as a thread root with the thread's title and reply count. This happens in the same
transaction that stores the messages, without a request to the server. A root that is already marked
is not changed. The reply count keeps following new messages through the existing update from fix(chat): keep the reply count of a thread up to date #7034.
reaction or poll vote, or a parent message fetched for a reply), the stored thread data is kept.
How to test
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)