Skip to content

feat(native-chat): preview each rail tick with its reply, and land jumps at the top - #26056

Merged
brennanb2025 merged 1 commit into
stablyai:mainfrom
AmoabaKelvin:native-chat-rail-tick-previews
Oct 7, 2026
Merged

brennanb2025 merged 1 commit into
stablyai:mainfrom
AmoabaKelvin:native-chat-rail-tick-previews

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​605 $\color{#cf222e}{\Huge{\mathbf{−}}}$​537 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​68
Prod 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​569 $\color{#cf222e}{\Huge{\mathbf{−}}}$​281 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​288

ELI5

The message rail is the column of small ticks on the right edge of a chat, one per message you sent. Hovering it used to open a list of every message. Now each tick shows just its own message and a short preview of what the agent replied, and clicking a tick takes you there. The ticks are also darker so they are easier to see.

Clicking a tick was also unreliable: the first click from the bottom of a chat often did nothing, and the message you jumped to could land partly hidden above the top. Both are fixed.

What Changed

The rail

  • Before: hovering anywhere on the rail opened a popover listing every message. After: each tick is its own target. Hovering or focusing one shows a card beside that tick with your message (two lines) and the agent's reply (three lines). Clicking jumps to the message.
  • Idle ticks went from 10% to 50% foreground. The lit tick is full foreground, and it lights as soon as you click instead of after the scroll settles.
  • The rail is one tab stop. Arrow keys, Home and End walk every message, including ones a long thread has no room to draw a tick for. Escape closes the card.
  • A tick is now the only way to reach a message, so the rail fits as many ticks as about 70% of the pane height holds before it samples any away. It used to stop at 20.
  • Subagent prompts never appear on the rail, whether or not their section is expanded.

The reply preview

  • The reply is the last thing the agent said in that turn, as plain text: code fences, rules and markdown markers are dropped.
  • For messages that are loaded, the reply is read from the transcript when the card opens, so a streaming reply does not rebuild the rail on every frame.
  • For older messages that are not loaded, the reply comes from the host. The conversation outline the rail already fetches gains two optional fields per message: reply, and turnKey for a message sent into a turn that was already running. Nothing extra is fetched on hover.
  • Host and client derive the reply with the same function, using the transcript's own definition of a turn, so a follow-up sent mid-turn does not cut the reply short.

Jumping to a message

These bugs were already on main; the per-tick click made them easy to hit.

  • A jump from the bottom of a chat could be cancelled. Rows passed on the way turn out shorter than estimated, the page shrinks, the browser clamps the view to the bottom, and the follow-latest-output logic read that as the reader scrolling back down. A jump now owns the scroll until the view reaches its target or the reader scrolls.
  • A jump aimed at a pixel offset computed before those rows were measured, so it landed 100 to 270px off. It now aims at the row and re-aims as rows are measured.
  • The rail lit the newest turn whenever the view was within 48px of the end, which overrode a message jumped to near the end. That rule now applies within 4px.

Why

A list of every message answers "show me everything", but the rail's job is "where am I, and what is at this point". A card on the tick answers that without covering the transcript.

The reply is there because many prompts in an agent session are "continue", "yes" or "fix that". Without it those ticks are indistinguishable.

Visual Proof

Before:

CleanShot.2026-10-07.at.3.13.02.AM.mp4

After:

CleanShot.2026-10-07.at.2.40.24.AM.mp4

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Tested on macOS only.

  • tests/e2e/native-chat-message-rail.spec.ts drives the real app: every turn has a tick, hovering one shows only that message and its reply, and three jumps in a row (starting from the end) each land the message at the top with its tick lit. The transcript has headings and code blocks so rows resize under the jumps. The spec fails without the jump fixes.
  • Unit tests cover the reply derivation on host and client (including follow-ups sent mid-turn, tool results folded into a turn, and expanded subagent sections), the host dropping replies before it shortens prompt previews, keyboard navigation through a sampled rail, and the jump-in-flight rule.
  • Tests for the old list popover (open position, focus restore, wheeling the list) were removed with it.

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Mixed versions: reply and turnKey are optional additions to an existing reply. An older host omits them and the card shows the prompt alone until that page is loaded. An older client ignores them. No capability or protocol bump.
  • Payload: with short prompts the outline is about three times larger (191 KB to 613 KB for a synthetic 2,000-turn thread). It is fetched once per stale edge, and replies are the first thing dropped when it is over budget.
  • Host cost: a cold outline read on a synthetic 2,000-turn thread with 50 KB replies took about 41 ms; warm about 8 ms.
  • Long threads: past what the rail can hold, the ticks are sampled. Every message is still reachable with the arrow keys, but not with the pointer alone.
  • Behavior change outside jumps: parked 5 to 48px above the end, the rail now lights the turn at the top of the view, not the newest one.
  • Not fixed here: the "scroll this message to top" button on a row still aims at a fixed offset and can land slightly off on a long jump.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

Walkthrough

The conversation outline now carries assistant reply previews and turn keys. When the outline exceeds its byte budget, replies are removed before previews are shortened or entries are dropped. The message rail now uses individual ticks with reply previews, keyboard navigation, and viewport-based tick sampling. Transcript alignment and autoscroll now account for pending row jumps and reader input.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to c76f7

Some jumps may leave the requested message below the top when an earlier row resizes. The issue is narrow and recoverable, but the landing position should be fixed.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 47.37% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 38 functions across 27 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: per-tick reply previews and message jumps that land at the top.
Description check ✅ Passed The description explains the user-facing changes, reasons, visual proof, and testing in detail. It does not provide a linked issue, and the lint, typecheck, test, and build checklist item remains unch…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8be93545-b5bb-451e-8a86-0214916b3550
📥 Commits

Reviewing files that changed from the base of the PR and between 7c9c3d4 and c6830bc4f505aa744f0942a1503ac07344116458.

📒 Files selected for processing (26)
  • src/main/native-chat/agent-session-wire/agent-session-conversation-outline.test.ts
  • src/main/native-chat/agent-session-wire/agent-session-conversation-outline.ts
  • src/renderer/src/components/native-chat/NativeChatMessageList.message-rail-windowing.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.rail-history-jump.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageRail.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageRail.tsx
  • src/renderer/src/components/native-chat/native-chat-active-rail-item.test.ts
  • src/renderer/src/components/native-chat/native-chat-active-rail-item.ts
  • src/renderer/src/components/native-chat/native-chat-autoscroll.test.ts
  • src/renderer/src/components/native-chat/native-chat-autoscroll.ts
  • src/renderer/src/components/native-chat/native-chat-message-rail-items.test.ts
  • src/renderer/src/components/native-chat/native-chat-message-rail-items.ts
  • src/renderer/src/components/native-chat/native-chat-rail-outline-parity.test.ts
  • src/renderer/src/components/native-chat/native-chat-submission-navigation.test.tsx
  • src/renderer/src/components/native-chat/structured-agent-session-rail-outline.ts
  • src/renderer/src/components/native-chat/use-native-chat-message-rail.test.ts
  • src/renderer/src/components/native-chat/use-native-chat-message-rail.ts
  • src/renderer/src/components/native-chat/use-native-chat-transcript-scroll.test.tsx
  • src/renderer/src/components/native-chat/use-native-chat-transcript-scroll.ts
  • src/renderer/src/components/native-chat/use-native-chat-transcript-window.options.test.tsx
  • src/renderer/src/components/native-chat/use-native-chat-transcript-window.ts
  • src/renderer/src/components/native-chat/use-native-chat-viewport-align.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.resume.test.tsx
  • src/shared/agent-session-conversation-outline.ts
  • tests/e2e/native-chat-message-rail.spec.ts
💤 Files with no reviewable changes (1)
  • src/renderer/src/components/native-chat/NativeChatMessageList.message-rail-windowing.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@AmoabaKelvin
AmoabaKelvin force-pushed the native-chat-rail-tick-previews branch from c6830bc to 5f51b77 Compare October 7, 2026 11:55

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔇 Additional comments (3)
src/renderer/src/components/native-chat/NativeChatMessageList.tsx (1)

245-245: LGTM!

Also applies to: 262-262, 319-329

src/renderer/src/components/native-chat/native-chat-reader-scroll-input.ts (1)

70-71: LGTM!

Also applies to: 140-145

src/renderer/src/components/native-chat/use-native-chat-rail-jump-landing.ts (1)

36-49: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Release the request when the target row is missing.

If nativeChatSlotIndexOf returns -1, the selector [data-index="-1"] matches no row. The hook then calls onActivate and release(null) anyway. The tick lights up although the transcript did not move. The old inline code also cleared the request in this case, so the behavior is unchanged. Only activate the tick when the row was scrolled, or keep the request open until the row mounts.

Proposed change
     if (row) {
       scrollMessageToTop(row)
+      onActivate(railJump.messageId)
     }
-    // Lit now: the scroll's own position report only arrives once it settles.
-    onActivate(railJump.messageId)
     release(null)

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c0f39cfc-a8b0-403e-95e0-3177242a9174
📥 Commits

Reviewing files that changed from the base of the PR and between c6830bc4f505aa744f0942a1503ac07344116458 and 5f51b773796550ff235de609b7e11195bd71686b.

📒 Files selected for processing (3)
  • src/renderer/src/components/native-chat/NativeChatMessageList.tsx
  • src/renderer/src/components/native-chat/native-chat-reader-scroll-input.ts
  • src/renderer/src/components/native-chat/use-native-chat-rail-jump-landing.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Hovering the rail opened the whole message list. Also fixes rail jumps
that were cancelled, undone or landed off when rows resized mid-scroll.
@AmoabaKelvin
AmoabaKelvin force-pushed the native-chat-rail-tick-previews branch from 9f9d5f0 to c76f764 Compare October 7, 2026 12:40

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f9dc82ee-aee2-41df-9edf-dad7623458be
📥 Commits

Reviewing files that changed from the base of the PR and between 9f9d5f05dc2f4caf3fc1fa7fe9fdf4a275ed32f2 and c76f764.

📒 Files selected for processing (3)
  • src/renderer/src/components/native-chat/use-native-chat-transcript-window.options.test.tsx
  • src/renderer/src/components/native-chat/use-native-chat-transcript-window.ts
  • tests/e2e/native-chat-message-rail.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

Comment on lines +238 to +249
virtualizer.shouldAdjustScrollPositionOnItemSizeChange = (item, _delta, instance) => {
const offset = instance.scrollOffset ?? 0
const written = scrollRef.current?.scrollTop ?? offset
return (
Math.abs(written - offset) <= UNSEEN_SCROLL_PX &&
!(item.index === revealIndex && !instance.itemSizeCache.has(item.key)) &&
item.end <= offset &&
(instance.scrollDirection !== 'backward' ||
!instance.itemSizeCache.has(item.key) ||
isAlignHeld())
)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '210,360p' src/renderer/src/components/native-chat/use-native-chat-transcript-window.ts
sed -n '1,240p' src/renderer/src/components/native-chat/use-native-chat-viewport-align.ts
sed -n '245,315p' src/renderer/src/components/native-chat/use-native-chat-transcript-window.options.test.tsx

Repository: stablyai/orca

Length of output: 13607


🏁 Script executed:

git diff --unified=30 2dc98c93de675947958960061a335bcfbfb3f838 c76f76401350c530503929f122bfeb103e1c57c6 -- src/renderer/src/components/native-chat/use-native-chat-transcript-window.ts src/renderer/src/components/native-chat/use-native-chat-viewport-align.ts src/renderer/src/components/native-chat/use-native-chat-transcript-window.options.test.tsx
printf '\\n--- virtualizer binding / package version ---\\n'
rg -n --glob 'package.json' --glob '*lock*' --glob 'pnpm-workspace.yaml' '(@tanstack/react-virtual|react-virtual)' .
printf '\\n--- matching integration and tests ---\\n'
rg -n -F -- 'shouldAdjustScrollPositionOnItemSizeChange' src
rg -n -F -- 'measureElement' src/renderer/src/components/native-chat
printf '\\n--- available dependency source files ---\\n'
rg --files --hidden -g '*virtualizer*' -g '*react-virtual*' -g '!node_modules/.cache/**' | sed -n '1,100p'

Repository: stablyai/orca

Length of output: 33017


🏁 Script executed:

printf '%s\\n' '--- dependency source availability ---'
for f in node_modules/@tanstack/virtual-core/dist/esm/index.js node_modules/@tanstack/virtual-core/dist/cjs/index.cjs node_modules/@tanstack/react-virtual/dist/esm/index.js; do
  if test -f "$f"; then
    printf '\\n--- %s ---\\n' "$f"
    rg -n -C 8 'shouldAdjustScrollPositionOnItemSizeChange|_willUpdate|scrollToIndex|measureElement|resizeItem' "$f"
  fi
done
printf '\\n--- local pnpm store candidates ---\\n'
find node_modules/.pnpm -maxdepth 4 -type f \\( -path '*/@tanstack/virtual-core/dist/esm/index.js' -o -path '*/@tanstack/virtual-core/dist/cjs/index.cjs' \\) -print 2>/dev/null | head -20
printf '\\n--- alignment callers and tests ---\\n'
rg -n -F -- 'alignToViewportTop' src/renderer/src/components/native-chat
rg -n -F -- 'isAlignPending' src/renderer/src/components/native-chat
rg -n -F -- 'cancelAlign' src/renderer/src/components/native-chat

Repository: stablyai/orca

Length of output: 579


🏁 Script executed:

printf '%s\\n' '--- package source files ---'
if test -d node_modules/.pnpm; then
  find node_modules/.pnpm -type f -path '*virtual-core*' -print 2>/dev/null | head -40
else
  printf '%s\\n' 'node_modules/.pnpm is unavailable'
fi
printf '%s\\n' '--- direct package availability ---'
ls -la node_modules/@tanstack 2>&1 || true
printf '%s\\n' '--- alignment callers and tests ---'
rg -n -F -- 'alignToViewportTop' src/renderer/src/components/native-chat
rg -n -F -- 'isAlignPending' src/renderer/src/components/native-chat
rg -n -F -- 'cancelAlign' src/renderer/src/components/native-chat

Repository: stablyai/orca

Length of output: 5706


🏁 Script executed:

printf '%s\\n' '--- transcript alignment caller ---'
sed -n '100,175p' src/renderer/src/components/native-chat/use-native-chat-transcript-scroll.ts
printf '%s\\n' '--- message-list bindings ---'
sed -n '215,265p' src/renderer/src/components/native-chat/NativeChatMessageList.tsx
sed -n '295,335p' src/renderer/src/components/native-chat/NativeChatMessageList.tsx
printf '%s\\n' '--- alignment trigger context ---'
rg -n -C 5 -F -- 'alignToViewportTop(' src/renderer/src/components/native-chat

Repository: stablyai/orca

Length of output: 11254


🏁 Script executed:

curl -fsSL https://raw.githubusercontent.com/TanStack/virtual/v3.14.13/packages/virtual-core/src/index.ts | python3 -c '
import sys
lines = sys.stdin.read().splitlines()
needles = ("shouldAdjustScrollPositionOnItemSizeChange", "scrollToIndex", "resizeItem", "measureElement")
for i, line in enumerate(lines):
    if any(needle in line for needle in needles):
        start, end = max(0, i - 8), min(len(lines), i + 26)
        print(f"--- source lines {start + 1}-{end} ---")
        for n in range(start, end):
            print(f"{n + 1}: {lines[n]}")
'

Repository: stablyai/orca

Length of output: 200


🏁 Script executed:

printf '%s\\n' '--- virtual-core lock resolution ---'
rg -n -C 2 -F -- '@tanstack/virtual-core@' pnpm-lock.yaml
printf '%s\\n' '--- published virtual-core implementation ---'
set -o pipefail
curl -fsSL 'https://unpkg.com/@tanstack/[email protected]/dist/esm/index.js' | python3 -c '
import sys
lines = sys.stdin.read().splitlines()
needles = ("shouldAdjustScrollPositionOnItemSizeChange", "scrollToIndex", "resizeItem", "measureElement")
for i, line in enumerate(lines):
    if any(needle in line for needle in needles):
        start, end = max(0, i - 8), min(len(lines), i + 30)
        print(f"--- source lines {start + 1}-{end} ---")
        for n in range(start, end):
            print(f"{n + 1}: {lines[n]}")
'

Repository: stablyai/orca

Length of output: 678


🏁 Script executed:

python3 - <<'PY'
import io
import json
import tarfile
import urllib.request

metadata_url = "https://registry.npmjs.org/@tanstack%2fvirtual-core/3.17.11"
try:
    with urllib.request.urlopen(metadata_url, timeout=20) as response:
        metadata = json.load(response)
    print("package version:", metadata.get("version"))
    tarball_url = metadata["dist"]["tarball"]
    with urllib.request.urlopen(tarball_url, timeout=30) as response:
        archive_bytes = response.read()
    with tarfile.open(fileobj=io.BytesIO(archive_bytes), mode="r:gz") as archive:
        candidates = [
            member for member in archive.getmembers()
            if member.isfile() and member.name.endswith(("dist/esm/index.js", "src/index.ts"))
        ]
        print("source candidates:", [member.name for member in candidates])
        for member in candidates:
            text = archive.extractfile(member).read().decode("utf-8").splitlines()
            needles = (
                "shouldAdjustScrollPositionOnItemSizeChange",
                "scrollToIndex",
                "resizeItem",
                "measureElement",
            )
            for i, line in enumerate(text):
                if any(needle in line for needle in needles):
                    start, end = max(0, i - 8), min(len(text), i + 30)
                    print(f"--- {member.name}:{start + 1}-{end} ---")
                    for n in range(start, end):
                        print(f"{n + 1}: {text[n]}")
except Exception as error:
    print(type(error).__name__ + ":", error)
    raise
PY

Repository: stablyai/orca

Length of output: 42811


🏁 Script executed:

python3 - <<'PY'
import io
import json
import tarfile
import urllib.request

url = "https://registry.npmjs.org/@tanstack%2fvirtual-core/3.17.11"
with urllib.request.urlopen(url, timeout=20) as response:
    metadata = json.load(response)
with urllib.request.urlopen(metadata["dist"]["tarball"], timeout=30) as response:
    archive_bytes = response.read()
with tarfile.open(fileobj=io.BytesIO(archive_bytes), mode="r:gz") as archive:
    source = archive.extractfile("package/src/index.ts").read().decode("utf-8").splitlines()
for start, end in ((1120, 1245), (1684, 1795), (1948, 2008)):
    print(f"--- package/src/index.ts:{start}-{end} ---")
    for number in range(start, min(end, len(source)) + 1):
        print(f"{number}: {source[number - 1]}")
PY

Repository: stablyai/orca

Length of output: 13206


🏁 Script executed:

printf '%s\\n' '--- rail landing hook binding ---'
rg -n -C 8 -F -- 'useNativeChatRailJumpLanding' src/renderer/src/components/native-chat
printf '%s\\n' '--- exact-version core offset methods ---'
python3 - <<'PY'
import io
import json
import tarfile
import urllib.request

url = "https://registry.npmjs.org/@tanstack%2fvirtual-core/3.17.11"
with urllib.request.urlopen(url, timeout=20) as response:
    metadata = json.load(response)
with urllib.request.urlopen(metadata["dist"]["tarball"], timeout=30) as response:
    archive_bytes = response.read()
with tarfile.open(fileobj=io.BytesIO(archive_bytes), mode="r:gz") as archive:
    source = archive.extractfile("package/src/index.ts").read().decode("utf-8").splitlines()
for needle in ("const approxEqual", "getScrollOffset =", "_scrollToOffset ="):
    hits = [i for i, line in enumerate(source) if needle in line]
    print(f"{needle}: {[i + 1 for i in hits]}")
    for i in hits:
        start, end = max(0, i - 5), min(len(source), i + 25)
        for n in range(start, end):
            print(f"{n + 1}: {source[n]}")
PY

Repository: stablyai/orca

Length of output: 7812


🏁 Script executed:

printf '%s\\n' '--- rail landing hook ---'
sed -n '1,120p' src/renderer/src/components/native-chat/use-native-chat-rail-jump-landing.ts
printf '%s\\n' '--- exact-version approximation predicate ---'
python3 - <<'PY'
import io
import json
import tarfile
import urllib.request

url = "https://registry.npmjs.org/@tanstack%2fvirtual-core/3.17.11"
with urllib.request.urlopen(url, timeout=20) as response:
    metadata = json.load(response)
with urllib.request.urlopen(metadata["dist"]["tarball"], timeout=30) as response:
    archive_bytes = response.read()
with tarfile.open(fileobj=io.BytesIO(archive_bytes), mode="r:gz") as archive:
    source = archive.extractfile("package/src/index.ts").read().decode("utf-8").splitlines()
for i, line in enumerate(source):
    if "approxEqual" in line:
        start, end = max(0, i - 4), min(len(source), i + 9)
        print(f"--- package/src/index.ts:{start + 1}-{end} ---")
        for n in range(start, end):
            print(f"{n + 1}: {source[n]}")
PY

Repository: stablyai/orca

Length of output: 7366


🏁 Script executed:

python3 - <<'PY'
import io
import json
import tarfile
import urllib.request

def package_files(name, version):
    url = f"https://registry.npmjs.org/{name.replace('/', '%2f')}/{version}"
    with urllib.request.urlopen(url, timeout=20) as response:
        metadata = json.load(response)
    with urllib.request.urlopen(metadata["dist"]["tarball"], timeout=30) as response:
        data = response.read()
    archive = tarfile.open(fileobj=io.BytesIO(data), mode="r:gz")
    return metadata, archive

metadata, archive = package_files("@tanstack/react-virtual", "3.14.13")
print("--- @tanstack/[email protected] package dependencies ---")
print(json.dumps(metadata.get("dependencies", {}), sort_keys=True))
for name in ("package/src/index.ts", "package/dist/esm/index.js"):
    try:
        text = archive.extractfile(name).read().decode("utf-8").splitlines()
    except (KeyError, AttributeError):
        continue
    print(f"--- {name} relevant bindings ---")
    for i, line in enumerate(text):
        if "virtual-core" in line or "useVirtualizer" in line or "new Virtualizer" in line:
            start, end = max(0, i - 2), min(len(text), i + 9)
            for n in range(start, end):
                print(f"{n + 1}: {text[n]}")

metadata, archive = package_files("@tanstack/virtual-core", "3.17.11")
for name in ("package/src/utils.ts", "package/src/utils.tsx"):
    try:
        text = archive.extractfile(name).read().decode("utf-8").splitlines()
    except (KeyError, AttributeError):
        continue
    for i, line in enumerate(text):
        if "approxEqual" in line:
            start, end = max(0, i - 3), min(len(text), i + 9)
            print(f"--- {name}:{start + 1}-{end} ---")
            for n in range(start, end):
                print(f"{n + 1}: {text[n]}")
PY

Repository: stablyai/orca

Length of output: 3717


🏁 Script executed:

python3 - <<'PY'
import io
import json
import tarfile
import urllib.request

url = "https://registry.npmjs.org/@tanstack%2fvirtual-core/3.17.11"
with urllib.request.urlopen(url, timeout=20) as response:
    metadata = json.load(response)
with urllib.request.urlopen(metadata["dist"]["tarball"], timeout=30) as response:
    archive_bytes = response.read()
with tarfile.open(fileobj=io.BytesIO(archive_bytes), mode="r:gz") as archive:
    source = archive.extractfile("package/src/index.ts").read().decode("utf-8").splitlines()
for i, line in enumerate(source):
    if "elementScroll" in line or "observeOffset" in line:
        start, end = max(0, i - 3), min(len(source), i + 18)
        print(f"--- package/src/index.ts:{start + 1}-{end} ---")
        for n in range(start, end):
            print(f"{n + 1}: {source[n]}")
PY

Repository: stablyai/orca

Length of output: 3345


🏁 Script executed:

python3 - <<'PY'
import io
import json
import tarfile
import urllib.request

url = "https://registry.npmjs.org/@tanstack%2fvirtual-core/3.17.11"
with urllib.request.urlopen(url, timeout=20) as response:
    metadata = json.load(response)
with urllib.request.urlopen(metadata["dist"]["tarball"], timeout=30) as response:
    archive_bytes = response.read()
with tarfile.open(fileobj=io.BytesIO(archive_bytes), mode="r:gz") as archive:
    source = archive.extractfile("package/src/index.ts").read().decode("utf-8").splitlines()
for needle in ("getMeasurements = memo", "getOffsetForIndex ="):
    hits = [i for i, line in enumerate(source) if needle in line]
    print(f"{needle}: {[i + 1 for i in hits]}")
    for i in hits:
        start, end = i, min(len(source), i + 45)
        print(f"--- package/src/index.ts:{start + 1}-{end} ---")
        for n in range(start, end):
            print(f"{n + 1}: {source[n]}")
PY

Repository: stablyai/orca

Length of output: 3799


🏁 Script executed:

python3 - <<'PY'
import io
import json
import tarfile
import urllib.request

url = "https://registry.npmjs.org/@tanstack%2fvirtual-core/3.17.11"
with urllib.request.urlopen(url, timeout=20) as response:
    metadata = json.load(response)
with urllib.request.urlopen(metadata["dist"]["tarball"], timeout=30) as response:
    archive_bytes = response.read()
with tarfile.open(fileobj=io.BytesIO(archive_bytes), mode="r:gz") as archive:
    source = archive.extractfile("package/src/index.ts").read().decode("utf-8").splitlines()
start, end = 1350, 1450
print(f"--- package/src/index.ts:{start}-{end} ---")
for number in range(start, end + 1):
    print(f"{number}: {source[number - 1]}")
PY

Repository: stablyai/orca

Length of output: 4819


Re-aim the held row after skipping stale-offset compensation.

When the virtualizer accepts its 1.01 px reconciliation tolerance, it can write the exact index target and clear its active scroll state. The alignment hook still holds that target after isAlignPending() marks arrival. If an above-target row grows before the write’s scroll event updates the cached offset, the DOM offset can lead it by more than 1 px. This guard then skips compensation. The row’s new size moves the target down, but no active index reconciliation remains to re-aim it. Defer an index-based re-aim until after measurement when this guard rejects a resize for a still-held alignment. Do not compensate from the stale offset.

@brennanb2025
brennanb2025 merged commit e9b3efa into stablyai:main Oct 7, 2026
41 checks passed
@brennanb2025

Copy link
Copy Markdown
Contributor

Awesome thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants