Report the outcome of reminders and shares to notes instead of guessing it - #6717
Draft
AndyScherzinger wants to merge 2 commits into
Draft
AndyScherzinger wants to merge 2 commits into
AndyScherzinger wants to merge 2 commits into
Conversation
Both used an Observable with a disposable that the chat throws away when it is paused, so backgrounding the app while the request was in flight dropped it silently. They now run in the view model scope like every other request that has to finish. Assisted-by: Claude Code:claude-opus-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AndyScherzinger
force-pushed
the
feat/noid/optimisticReminders
branch
from
September 18, 2026 07:22
925a2a7 to
1cff49c
Compare
A reminder the server refused was only logged, and the chat says "Message sent" the moment a share to notes starts, before the answer arrives - so a share that failed was reported as a success. Both now show what happened. Assisted-by: Claude Code:claude-opus-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AndyScherzinger
force-pushed
the
feat/noid/optimisticReminders
branch
from
September 18, 2026 07:38
1cff49c to
93bea38
Compare
6 tasks
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.
Stacked on #6715, which is stacked on #6694 — review those first. This branch targets
feat/noid/optimisticConversationActionsand will be retargeted as the stack merges.Two things in the chat reported the wrong outcome, and both sat behind the last RxJava subscriptions in
ChatViewModelthat still used thedisposableSetthe chat throws away on pause.refactor(chat): move reminders and sharing to notes off RxJava—setReminder,getReminder,deleteReminder,shareToNotesandshareLocationToNotesmove down throughChatNetworkDataSourceandRetrofitChatNetworkonto four newNcApiCoroutinesendpoints. This is not the pure refactor it looks like:disposableSetis disposed inonPause, not inonCleared, so backgrounding the chat while one of these requests was in flight cancelled it silently. OnviewModelScopethey finish.getCapabilities,joinRoomandcreateRoomstay on RxJava on purpose. They sit in that samedisposableSet, so moving them is the same behaviour change — and for a join or a capability fetch, what should happen when the chat is backgrounded mid-request is a decision, not a refactor. Neither blocks anything.fix(chat): tell the user when a reminder or a share to notes failed— a reminder the server refused was written to the log and nowhere else. AndshowSnackBarfires "Message sent" the moment a share to notes is started, before the answer arrives, so a share that failed was reported to the user as a success. Both now report the failure, through theSharedFlowand snackbar shape #6694 established for reaction failures.A share that failed for a transient reason is retried, but never blindly. Talk stores a message's
referenceIdand never looks at it again — verified against a Nextcloud 36 dev instance with Talkmain: posting twice with the same reference id returns201twice and leaves two messages in the room. So before a second attempt the client asks the note to self whether the message arrived anyway, and only sends it again when it did not. A lookup that cannot be answered counts as "it may be there", because a duplicate note is worse than a missing retry. The location share now carries a reference id too, which theshareendpoint has always accepted.Deliberately without an optimistic reminder state, although the implementation plan asked for one:
getReminderExistStatehas exactly one consumer, the reminder dialog header, andDateTimeComposerefetches the reminder in its constructor every time that dialog opens, while Set and Delete dismiss it immediately. An optimistic value would never be rendered.🖼️ Screenshots
No UI was added or changed. One new string,
nc_message_not_added_to_notes, shown in the existing chat snackbar.🏁 Checklist
holdsShare, the rule that decides whether a failed share is sent again.ChatViewModeltakes 14 constructor dependencies plussharedApplication, so there is no view-model-level test for the snackbar itself; the helper contract these paths rely on is covered in Put every optimistic action on one helper and fix the ones that failed silently #6715🤖 AI (if applicable)