Skip to content

perf(ui): keep wrapped large diffs responsive - #607

Open
mplibunao wants to merge 1 commit into
modem-dev:mainfrom
mplibunao:bugfix/wrapped-large-diff-main
Open

perf(ui): keep wrapped large diffs responsive#607
mplibunao wants to merge 1 commit into
modem-dev:mainfrom
mplibunao:bugfix/wrapped-large-diff-main

Conversation

@mplibunao

Copy link
Copy Markdown

Fixes #600

Summary

  • Enable exact file-level windowing for wrapped reviews instead of mounting every file section.
  • Highlight selected and visible files immediately, while deferring speculative neighbor/offscreen highlighting until navigation is idle.
  • Share wrapped-row width budgets between rendering and geometry, including note-guide and add-note columns.
  • Give no-hunk messages an explicit two-row body so window spacers and mounted content stay aligned.
  • Add component, geometry, render-window, and PTY regressions for wrapped navigation and rapid scrolling.

Why

Wrapping previously bypassed file-level windowing. On a large review this mounted the entire file stream and eagerly queued syntax highlighting on the main thread, producing a blank startup and high memory use. Exact precomputed section geometry now lets wrapped reviews mount only nearby files without changing scroll or hunk-navigation coordinates.

Validation

  • bun run lint
  • bun run format:check
  • bun run typecheck
  • bun run check:docs
  • bun run changeset:status
  • 96 focused unit/component tests
  • 15 targeted PTY tests, including wrapped cross-window hunk navigation and rapid scroll-to-edge recovery
  • 64/64 PTY integration tests with an isolated Git/TMP environment
  • Compiled binary build
  • Frozen 142-file wrapped review (20,853 insertions / 1,480 deletions, 216x60 Kitty), 5/5 valid runs:
    • first paint median 1.403s, max 1.505s
    • peak RSS max 348,618,752 bytes
    • prior affected baseline did not paint within 30s and reached 1,242,595,328 bytes
  • Literal local wrapper launch with the compiled candidate: paint, hunk navigation, and clean quit all passed

The broader macOS bun run test attempt reached 1,474 passing and 17 skipped tests; three pre-existing session E2E cases remained host-dependent because the harness assumes Linux script behavior and has daemon timing sensitivity. The changed surface and PTY integration suites pass, and upstream Linux CI remains authoritative for those session cases.

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

@mplibunao is attempting to deploy a commit to the Modem Team on Vercel.

A member of the Team first needs to authorize it.

@mplibunao
mplibunao marked this pull request as ready for review July 27, 2026 08:32
@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

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.

Wrapped large diff remains blank on v0.17.6 while v0.13.2 renders

1 participant