fix: backwards-compat timestamp, safe eviction sort, aligned test batch size#1192
Merged
Merged
Conversation
✅ Deploy Preview for vortex-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for vortexfi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ning in sort, align test batch size - Make `timestamp` optional in `RampEphemeralEntry` for backwards compatibility with entries from older app versions - Use optional chaining (`?.timestamp ?? 0`) in eviction sort to guard against null/corrupt localStorage entries; legacy entries without a timestamp get value 0 (treated as oldest) - Update `expectedDeleteBatchSize` in base.service.test.ts from 500 to 5000 to match the production `EXPIRED_QUOTE_DELETE_BATCH_SIZE` constant
Copilot
AI
changed the title
[WIP] Fix code per review comments and add legacy timestamp handling
fix: backwards-compat timestamp, safe eviction sort, aligned test batch size
Jun 3, 2026
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.
Three fixes from the PR review targeting
rampState.tsxandbase.service.test.ts.Changes
timestampmade optional inRampEphemeralEntry—readRampEphemerals()can return entries persisted by older app versions that lack this field; marking it required was unsafe and inaccurate.Optional chaining in eviction sort — guards against corrupted localStorage entries (e.g.
{ "someId": null }). Legacy entries without atimestampfall back to0, treating them as the oldest and evicting them first.Test batch size aligned with production —
expectedDeleteBatchSizeupdated from500→5000to matchEXPIRED_QUOTE_DELETE_BATCH_SIZEinbase.service.ts, preventing a false test failure after the batch size increase.