Smart search, SVG dedup, and infinite scroll#1285
Open
ekaya97 wants to merge 1 commit intoanomalyco:devfrom
Open
Smart search, SVG dedup, and infinite scroll#1285ekaya97 wants to merge 1 commit intoanomalyco:devfrom
ekaya97 wants to merge 1 commit intoanomalyco:devfrom
Conversation
- Add smart search: AND text logic, keyword prefixes (in:, out:, ctx:, p:, f:, sort:), natural language keywords - Add sort: keyword with short aliases (sort:input, sort:output, sort:context, etc.) with - prefix for descending - Search-triggered sorts auto-reset when keyword is removed; header-click sorts persist - SVG deduplication: symbols + use refs (HTML from 18MB to ~7MB) - Infinite scroll with bidirectional sliding window (500-row cap) - Ghost rows for Ctrl+F: hidden="until-found" with selectionchange fallback - Filter chip toggles with smart-match highlighting - Layout shift prevention with table.not-ready opacity - Deferred ghost building via requestIdleCallback (with Safari shim) - Help dialog with search keyword reference - Add data-column attributes to th elements for robust column lookup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
PS: I realize +1411 and -240 for a single commit looks like a lot but most of that is CSS, content of "How to use" dialog and html data- attributes. Tagging for visibility |
|
i like it! i didn't the main issue was |
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.
Motivation
models.dev is great but it's slow, consumes a bunch of memory, doesn't support filters or combinatory search.
In contrast to similar PRs, this PR addresses all of these issue with a very lightweight approach - without relying on TanStack Table or any other virtualization techniques. It supports in-browser search (Ctrl+F) across the entire dataset with bidirectional infinite-scroll pagination and SVG dedup - reducing browser memory load from ~1.5GB to 0.25GB
Summary
modelsdev.mp4
<symbol>definitions and<use>references reduces HTML payload from ~18MB to ~7MB. Infinite scroll reduces number of DOM elements by up to 40x.hidden="until-found"andselectionchangefallback ensure native find works across the full datasetrequestIdleCallbackshim and progressive enhancement for older browsersbedrock claude), keyword filters (in:image out:<5 p:openai), and sort keywords (sort:input,sort:-output)Details
requestIdleCallbackto keep first paint fasttable.not-readyopacity gateTest plan
sort:input,sort:-output,sort:contexttrigger and reset correctlyin:image,out:<5,p:openai,f:claude,ctx:>100kbedrock claude,reasoning vision,free🤖 Generated with Claude Code