warper
Copilot instructions310 starsChanged 10 months agoMITView on GitHub
You are building Warper, a next-generation open-source React virtualization library designed to outperform every existing solution like react-window, react-virtualized, react-virtuoso, etc., by 1 million times in responsiveness and rendering power.
- Installs packages
We split this copilot-instructions.md into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Use ResizeObserver for dynamic measurement
- Very specific: line 32
Use transform: translate3d() with will-change hints
- Distinctive: line 33
Avoid layout thrashing and ensure consistent 60–120fps
- Very specific: line 38
Use Rust with wasm-bindgen and compile core layout/scroll calculations
- Distinctive: line 60
No manual overscan, batch size, height estimates
- Distinctive: line 102
All layouts share core engine with only config differences
- Distinctive: line 194
Use comparative insights from these sources:
- Very specific: line 212
Create useVirtualizer and <WarperComponent />
- Distinctive: line 214
Create examples and benchmarks
- Distinctive: line 217
Follow ultra-performance best practices
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🔮 MASTER PROMPT: Build Warper – The Fastest React Virtualization Library Ever Created
You are building Warper, a next-generation open-source React virtualization library designed to outperform every existing solution like react-window, react-virtualized, react-virtuoso, etc., by 1 million times in responsiveness and rendering power.
💥 Goals
- World’s fastest React virtualization engine
- WebAssembly-backed performance (Rust preferred)
- GPU-accelerated, smooth FPS (60–120fps)
- Handles 1M+ rows with sub-10ms render
- Cross-platform, cross-browser compatibility
- Built-in SSR + SEO support
- 100% TypeScript, highly developer-friendly
- Works out of the box with zero config
- Core library size ~6KB gzipped (19.1kB minified, tree-shakable)
🧠 Core Performance Architecture
Hybrid Windowing Engine
- Support both fixed and variable item sizes
- Use
ResizeObserverfor dynamic measurement - Pre-compute ranges in WebAssembly for speed
- Binary search logic and virtualization offset logic handled in WASM
GPU-Accelerated Scrolling
- Use
transform: translate3d()withwill-changehints - Avoid layout thrashing and ensure consistent 60–120fps
- Polyfill fallback for non-GPU-supported contexts
- Use
WebAssembly Integration (Rust Preferred)
- Use Rust with
wasm-bindgenand compile core layout/scroll calculations - WASM runs layout, binary search, scroll math
- React fetches pre-computed result and renders
- Use Rust with
Intelligent Memoization
- Smart
React.memo/useMemowith invalidation based on deep equality checks - Cache row measurements, visible ranges, scroll positions
- Skip re-renders for unmodified rows on scroll/data mutation
- Smart
Scroll Performance Target
- Render range adapts in real time to scroll speed
- Overscan dynamically increases on fast scrolls
- Drop animation frames only when absolutely necessary
🛠️ Developer Experience
Zero Config Autotuning
- No manual overscan, batch size, height estimates
- Autodetect system resources, scroll velocity, and set optimal defaults
Modern Declarative API with TypeScript
Hook-based core:
const { items } = useVirtualizer({ data: bigList, estimateSize: () => 44, overscan: 2 });Also provide
<WarperComponent />alternative:<WarperComponent data={bigList} estimateSize={() => 44} overscan={2} renderItem={(item) => <Row item={item} />} />
Visual Debug Tools
Dev-only overlay with:
- Real-time render window
- Scroll velocity
- Dropped frames
- Memory footprint
- Virtual vs physical node count
⚙️ Advanced Features
Seamless Layout Modes
- List, Grid, Masonry, Horizontal, Infinite Scroll, and Combo Layouts
- All layouts share core engine with only config differences
Built-in Async Support
- Infinite scroll with
onEndReached - Scroll position restoration with
restoreScrollPosition - Async placeholder rows and skeletons
- Infinite scroll with
Multi-Select and Navigation
- Built-in multi-select handling (Shift+Click, Ctrl+Click)
- Keyboard navigation (arrow keys, home/end)
Accessibility First
- ARIA roles out-of-the-box (
list,listitem,gridcell, etc.) - Full keyboard support
- Screen reader optimizations for only visible nodes
- ARIA roles out-of-the-box (
🌐 Ecosystem + Extensibility
Framework-Agnostic Core
- Pure WASM + TS virtualization logic, wrapped with React hooks/component
- Future bindings for Vue/Svelte/Vanilla
Plugin System
Allow registering:
- Scroll containers
- Radial/canvas layouts
- Animation interpolators
SSR/SEO Ready
- First N items rendered at server
- Hydrate and replace at client
- Placeholder fallback until hydration
📦 File Structure (Organized but Simple)
warper/
├── core/ # Core WASM-backed virtualization logic
│ └── virtualization.ts # Pure logic in TS or Rust/WASM bind
├── react/
│ ├── hooks/ # useVirtualizer.ts
│ ├── components/ # WarperComponent.tsx
│ └── devtools/ # Debug overlay
├── wasm/
│ └── rust/ # Rust source for wasm-pack
├── examples/ # Demo: list, grid, 1M rows, masonry
├── types/ # Shared TS types
├── benchmarks/ # Comparisons to react-window, virtualized
└── index.ts # Entry point🎯 Optimization Benchmarks
| Metric | Target |
| Scroll FPS | 60–120 fps |
| Initial Render (10k rows) | < 10ms |
| Bundle Size | ~6KB gzipped (19.1kB minified) |
| Memory Usage | 40% less than react-virtualized |
| Items Rendered | 1M+ handled with no lag or crash |
| Comparative Benchmarks | 2× faster than react-window under load |
📚 Include in README.md
- What is Warper?
- Performance Benchmarks (GIFs + stats)
- Installation:
npm install warper useVirtualizerAPI +WarperComponent- Layout Modes (list, grid, masonry)
- SSR/SEO, accessibility, debug tools
- VS
react-window,react-virtualized,virtuosotables - Plugin & Extensibility Guide
📎 References
Use comparative insights from these sources:
- npm-compare.com
- LogRocket
- Spritle
- React Virtualized GitHub
- YouTube Benchmarks
- Virtua
- Reddit Discussions
- Dev.to Comparative Posts
✅ Output Expectation
The AI should:
- Generate the core engine in TS + WASM (Rust)
- Create
useVirtualizerand<WarperComponent /> - Provide full TypeScript support
- Create examples and benchmarks
- Organize code per the structure
- Include debug overlay and SSR strategy
- Follow ultra-performance best practices
🤖 AI Assistance with Context7
For up-to-date documentation and code examples, use Context7 MCP in your AI coding assistant. Context7 provides real-time access to Warper's latest API reference, usage patterns, and best practices directly in your development workflow.
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

