feat(quote): optimistic recent-quote mutations with rollback - #733
Merged
mikewheeleer merged 2 commits intoAug 30, 2026
Merged
Conversation
12 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.
Summary
Closes #723
Implements optimistic UI for the Recent Quotes list on
/quote, per the issue's requirements:source_asset/dest_asset/amount) — e.g. typedEURCreconciles to the server's canonical casing — and only then is localStorage persisted.The recent quotes update failed and was rolled back.).Implementation notes
src/app/quote/historyModel.ts(readHistory,pushHistoryPure,writeHistory,canonicalEntryFromQuote,mergePendingEntry) so it is unit-testable in isolation.QuoteHistoryrenders the merged view (pending first) with adata-pendingrow, reduced opacity, and an sr-only "(saving…)" hint for assistive tech; memo behavior preserved viauseMemo.Tests
New tests only where possible; one existing test updated:
historyModel.test.ts: unit coverage of read/push/dedupe/cap/reconcile/merge.optimistic-history.test.tsx: integration through<QuotePage />covering all five edge cases from the issue:page.test.tsx: one test renamed/assertion updated from "clears the announcement on failure" to asserting the rollback message, per the issue's explicit requirement that failures be announced to assistive tech.Gates
npm run lint✔npm test✔ 77 suites / 1285 testsnpm run build✔Out of scope per the issue: server-side conflict merging, offline queueing.