Repository navigation
fix(firstmate): Persist chat drafts across app restarts - #113
Merged
gpambrozio merged 1 commit intoNov 12, 2026
Merged
Conversation
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.
Unsent FirstMate chat text now returns after an app reload or relaunch. The composer retains its synchronous memory store and saves through supported plugin RPCs to an atomic host-side file, with guarded hydration, serialized writes and lifecycle flushes. Settings were considered; a separate RPC avoids contending with display-setting revisions and keeps each mate's draft independent.
Nonempty edits debounce for 300 ms; clears flush immediately. Backgrounding, navigation and plugin disposal also flush, but termination before transport completes can still lose the latest edit. Drafts are shared across clients of the same host/mate (last arriving write wins). Text stays visible until sending succeeds, preserving it on failure or app termination during delivery; follow-up edits survive success. Attachments, card answers and panel notes keep their existing persistence behavior.
Validation on Pluto: typecheck and 95 focused tests passed, including fresh-runtime recovery, hydration/clear races, in-flight write ordering, offline retry, reconnect subscriptions and send success/failure. No live plugin install/reload was performed. Physical-device background termination and human UI checks remain unverified.
CRQ request bdd2990d-c338-49f8-bc1f-5f8f7be745cb for ff76fc1 returned unsupported-repo; no CRQ verdict is claimed.