Skip to content

fix(threads): show new thread immediately instead of only after reopening chat - #6645

Draft
mahibi wants to merge 1 commit into
masterfrom
bugfix/noid/fixThreadsMessageDisplayAfterCreation
Draft

fix(threads): show new thread immediately instead of only after reopening chat#6645
mahibi wants to merge 1 commit into
masterfrom
bugfix/noid/fixThreadsMessageDisplayAfterCreation

Conversation

@mahibi

@mahibi mahibi commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Starting a new thread showed the message as a normal chat message until the chat was reopened. Two gaps caused this:

  • OfflineFirstChatRepository.sendChatMessage() discarded the server's response after a successful send and only updated the temp message's sendStatus, so the correct isThread/threadId/threadTitle from the server was never persisted until a later resync (e.g. on reopening the chat). Now the authoritative response is persisted right away, replacing the temp row.
  • The optimistic temp message itself did not carry isThread/ threadTitle at all, and ChatViewModel.handleThreadMessages() misclassified that temp message (isThread=true, threadId=null, not yet confirmed by the server) as a thread reply and filtered it out of the normal chat view.

Assisted-by: Claude Code:claude-sonnet-5

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🚧 TODO

  • ...

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…ning chat

Starting a new thread showed the message as a normal chat message
until the chat was reopened. Two gaps caused this:

- OfflineFirstChatRepository.sendChatMessage() discarded the server's
  response after a successful send and only updated the temp
  message's sendStatus, so the correct isThread/threadId/threadTitle
  from the server was never persisted until a later resync (e.g. on
  reopening the chat). Now the authoritative response is persisted
  right away, replacing the temp row.
- The optimistic temp message itself did not carry isThread/
  threadTitle at all, and ChatViewModel.handleThreadMessages()
  misclassified that temp message (isThread=true, threadId=null, not
  yet confirmed by the server) as a thread reply and filtered it out
  of the normal chat view.

Assisted-by: Claude Code:claude-sonnet-5

Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi mahibi self-assigned this Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/33855916262/artifacts/9930387841
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant