Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
d005901
Revert "potential merge prep"
amadeus Jan 21, 2026
2c1f72f
code before tests
amadeus Jan 26, 2026
181ded0
Adds a first pass at `iterateOverFile`
amadeus Jan 26, 2026
ad3255b
Update renderFileWithHighlighter to use new iterator and prep for
amadeus Jan 26, 2026
4ab9c16
Add FileRenderer implementation
amadeus Jan 26, 2026
17f048f
Update File to support renderRange and buffers
amadeus Jan 26, 2026
e8271cb
First pass at File virtualization along with a ton of fixes
amadeus Jan 28, 2026
da34c49
Fix FileStream to use new HTML architecture
amadeus Jan 28, 2026
b28fa7f
Allow virtualizaton params to be configurable
amadeus Jan 28, 2026
b40d4f1
WIP
amadeus Jan 29, 2026
9b7d8cc
AI Refactor: improve ast results for cleaner dom updates
amadeus Jan 29, 2026
6590b38
Misc tweaks and stuff
amadeus Jan 30, 2026
bd5a118
Some potential resize performance improvements
amadeus Jan 30, 2026
9592236
AI: V1 of partial dom updates
amadeus Jan 30, 2026
aff6681
AI: alternate incremental dom update
amadeus Jan 30, 2026
1c6bc87
Add placeholder visibility logic to SimpleVirtualizedFile
amadeus Feb 1, 2026
ffa6532
First pass at partial diff rendering (WIP)
amadeus Feb 1, 2026
2fdb8de
Add buffer merging support
amadeus Feb 1, 2026
32aa63d
internal API refactor for new gutter stuff
amadeus Feb 2, 2026
c21d4bf
Fix context rendering bug in unified
amadeus Feb 3, 2026
efa0426
Rework MouseEventManager to work with new DOM structure
amadeus Feb 2, 2026
8fffff7
Fix hover css config
amadeus Feb 3, 2026
3a70b9a
Fix line selection with new DOM, pt 1
amadeus Feb 3, 2026
bf2f0e5
Initial pass at mouse/line selection to work in a virtualized world
amadeus Feb 3, 2026
2a92499
Fix line selection expansion on unmounted lines
amadeus Feb 4, 2026
60b0e8c
Useless code style things, bcuz
amadeus Feb 4, 2026
e3090a5
Fix a bug with file partial rendering
amadeus Feb 4, 2026
3527a8c
Fix some line selection highlighting styles
amadeus Feb 4, 2026
10a44a2
Fix a additions default side issue
amadeus Feb 4, 2026
7d93e09
Allow annotation buffers to min-width to 0
amadeus Feb 4, 2026
e815b54
More line/style/selection fixes
amadeus Feb 4, 2026
5c601cd
Fix a line detection bug in unified
amadeus Feb 4, 2026
33b0688
Another helper mb?
amadeus Feb 4, 2026
0d1ce18
stupid (probably) performance optimizations
amadeus Feb 4, 2026
547e3ac
Add JS based hover feature
amadeus Feb 5, 2026
604b567
oxlint fix
amadeus Feb 5, 2026
49aeb42
Fix up computation for different hunk separator types
amadeus Feb 5, 2026
c0e6807
Deprecate custom hunk separators
amadeus Feb 5, 2026
69715b8
Remove `Simple` prefix
amadeus Feb 5, 2026
c8e917f
language
amadeus Feb 5, 2026
698c2b3
Add docs for hoverLine prop
amadeus Feb 5, 2026
4c7ae65
Tweak separator hunk expansion
amadeus Feb 5, 2026
31935d3
line hover fixes, api naming tweak
amadeus Feb 5, 2026
7b7204f
Add basic docs for virtualization
amadeus Feb 6, 2026
484569f
Virtualization beta release prep
amadeus Feb 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,51 @@ We use project references between each of our packages and apps.
block of the consuming package. This ensures fast and accurate type checking
without extra work across all packages.

## Performance

**CRITICAL: Avoid nested loops and O(n²) operations.**

- When iterating over collections, calculate expensive values ONCE before the
loop, not inside it
- Never nest loops unless absolutely necessary - it's expensive and usually
there's a better way
- If you need to check conditions on remaining elements, scan backwards once
upfront instead of checking inside the main loop

Example of BAD code:

```typescript
for (let i = 0; i < items.length; i++) {
// DON'T DO THIS - nested loop on every iteration
let hasMoreItems = false;
for (let j = i + 1; j < items.length; j++) {
if (items[j].someCondition) {
hasMoreItems = true;
break;
}
}
}
```

Example of GOOD code:

```typescript
// Calculate once upfront
let lastMeaningfulIndex = items.length - 1;
for (let i = items.length - 1; i >= 0; i--) {
if (items[i].someCondition) {
lastMeaningfulIndex = i;
break;
}
}

// Now iterate efficiently
for (let i = 0; i <= lastMeaningfulIndex; i++) {
const isLast = i === lastMeaningfulIndex;
// ...
}
```

## Testing

We use Bun's built-in testing framework for unit tests. Tests are located in a
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
<button id="load-diff">Load Large-ish Diff</button>
<button id="worker-load-diff">Worker Render Diff</button>
<label>
<input id="unified" type="checkbox" checked />
<input id="unified" type="checkbox" />
Unified Diffs
</label>
<label>
<input id="wrap-lines" type="checkbox" checked />
<input id="wrap-lines" type="checkbox" />
Wrap Lines
</label>
<!-- <div>[<strong>RAW</strong> / <a href="/react">REACT</a>]</div> -->
Expand Down
Loading