Surface the 500-row cap in the Tweets tab#6
Merged
Conversation
TweetsTab sliced filtered results to 500 with no UI indication, so on large datasets users would believe matching tweets were missing. - Compute the full match count (matched) separately from the capped render list (filtered = matched.slice(0, MAX_VISIBLE)); the result count now reads the true total, not the capped 500. - Show 'Showing the top 500 of N matches' when matches exceed the cap. - Extract MAX_VISIBLE + capNotice into lib/display.js (pure, unit-tested). Adds lib/display.test.js (4 tests). Build + 44 tests green.
cybermejo
pushed a commit
that referenced
this pull request
Jun 18, 2026
PR #10 (config/query/api/cli split + __main__.py) had merged into its stacked base branch but not into main, which still carried the flat tweet_scraper.py. Bring the split to main. Touches only scraper/CI/docs — no Studio files, so the PR #6/#7 Studio work is untouched. CLAUDE.md auto-merged (kept the PR #8 Studio note + the split's python -m updates). Validation loop green: 65 tests, mypy on the package, python -m tweet_scraper verified.
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
Surfaces the Tweets tab's 500-row render cap, which was previously applied silently.
Why
TweetsTabdid.slice(0, 500)with no UI hint. On a large dataset, users filtering down would see exactly 500 rows and reasonably conclude matches were missing.What changed
matchedis the full filtered+sorted set;filtered = matched.slice(0, MAX_VISIBLE)is the render list.matched.length of tweets.length), not the capped 500.MAX_VISIBLE+capNotice()intosrc/lib/display.js— pure and unit-tested.Testing
Adds
src/lib/display.test.js(4 tests: at/below cap → null, above cap, thousands formatting, default cap). Build green; 44 tests pass.Note: this is the lightweight half of the original review item. Full list virtualization (react-window) is the heavier scale answer and is intentionally out of scope here.