fix: filter flat odds shifts + add color emojis to change indicators - #18
Merged
Conversation
- Pre-filter markets with <1% absolute change from Odds Shifts section (previously only checked top item post-slice, showing flat markets) - Add changeEmoji() helper for magnitude-based color coding: 🚀 ≥10% up | 🟢 ≥1% up | ⚪ flat | 🔴 ≥1% down | 🚨 ≥10% down - Apply emojis in formatOutcomeWithChange, formatMoverItem, formatOddsShiftItem - Update tests with new expectations + add changeEmoji test suite
chapati23
approved these changes
Mar 2, 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.
Changes
1. Pre-filter flat markets from Odds Shifts
Markets with
maxAbsDayChange < 0.01(1%) are now filtered out before sorting/slicing, not just checked on the top item after. This prevents the section from showing markets with essentially zero change.2. Color-coded change emojis
Added
changeEmoji()helper that maps change magnitude to emojis:Applied consistently across all three format functions:
formatOutcomeWithChange()— multi-market outcomesformatMoverItem()— binary market change displayformatOddsShiftItem()— binary odds shift displayTests
changeEmojitest suite (6 tests)formatOutcomeWithChangeexpectations for new emoji prefixes