Skip to content

Feat/optimistic UI cache - #1585

Merged
K1NGD4VID merged 4 commits into
LabsCrypt:mainfrom
bright5455:feat/optimistic-ui-cache
Oct 10, 2026
Merged

K1NGD4VID merged 4 commits into
LabsCrypt:mainfrom
bright5455:feat/optimistic-ui-cache

Conversation

@bright5455

Copy link
Copy Markdown
Contributor

closes #1473

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test addition or update

Related Issues

Closes #

Changes Made

Testing

Test Coverage

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Test Steps

Breaking Changes

Breaking Changes:

Migration Guide:

Screenshots/Demo

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Updated Postman/Hoppscotch API collections if routes changed
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have checked for breaking changes and documented them if applicable
  • If this change adds or modifies a metric, I have updated the Grafana dashboard and the alert rules in backend/docs/observability/

Additional Notes

- stream-cache.ts: IndexedDB persistence for cached streams (indexed by
  sender / recipient / tokenAddress / updatedAt) and pending mutations
- StreamContext: instant hydration from cache, background reconciliation,
  effective-stream view layering pending patches over canonical state
- useOptimisticStream: WITHDRAW / TOP_UP / CANCEL / PAUSE — folds patch
  into cache on success, rolls back + surfaces error on failure
- StreamCard: renders cached data with a non-blocking 'Pending Ledger
  Confirmation' badge; no blocking spinners
- tests cover: instant hydration, optimistic withdraw, badge lifecycle,
  rollback on failed tx, optimistic cancel
- dashboard-view: wrap tanstack refetch in void callback
- DashboardIncoming: drop unused InboxIcon import
- soroban: cast ScVal type to satisfy nativeToScVal overload
- StellarExplorerLink test: migrate jest.* -> vitest.* and drop unused import
- StreamCreationWizard: align ScheduleStep props at call site
- regenerate root package-lock.json to match package.json
- workflows: rust-cache input workspace -> workspaces
- workflows: node-version 20 -> 22
@K1NGD4VID
K1NGD4VID merged commit 498f6e0 into LabsCrypt:main Oct 10, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend] Optimistic UI State Engine & IndexedDB Offline Stream Cache

2 participants