Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Native browser find (`Ctrl/Cmd+F`) does not search the full diff in diff view

Đang mở
#12 0 bình luận 3 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Issue không nêu tên file hoặc test, vì vậy hãy bắt đầu bằng cách lần theo triển khai của diff view và các nhánh virtualization, collapsed-section, preview và Load diff. So sánh hành vi hybrid được đề xuất và xác định các test cho native find trên cả các section bị ẩn và đã render; được xem là hoàn tất khi có thể tìm kiếm các kết quả khớp mà không loại bỏ các đặc tính hiệu năng của diff lớn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

In diff view, native browser find only searches content that is currently mounted in the DOM. Today that means Ctrl/Cmd+F can miss valid matches because parts of the diff are intentionally hidden or not rendered:

  • Virtualized file blocks outside the viewport are not mounted.
  • Auto-collapsed files hide their diff content.
  • Rendered previews replace source diff text for renderable files.
  • Large diffs may show a Load diff placeholder instead of line content.
  • Omitted context is not present until expanded.

This makes browser find unreliable for reviewing large or mixed-content diffs.

Proposals

  • Add a temporary “browser find mode” on Ctrl/Cmd+F that fully renders the diff, expands hidden sections, and forces source view so native browser find can search the whole diff.
  • Make the normal diff mode always fully searchable by keeping all source diff text mounted in the DOM, even when sections are collapsed or previewed.
  • Build an app-level search experience instead of relying on native browser find.

Recommendation

Use a hybrid approach:

  • For small diffs, keep the normal mode fully searchable without a separate mode.
  • For large diffs, enter a temporary browser-find mode on Ctrl/Cmd+F that fully renders the diff and forces source text visible.

This keeps the common case simple while avoiding the steady-state performance and UI cost of fully rendering large diffs all the time.

Notes

  • Native browser find cannot tell us which hidden section matched, so lazy “expand only the matching file” behavior is not practical.
  • The hybrid approach preserves current performance characteristics for large diffs while improving searchability for most day-to-day reviews.
Image
Ngôn ngữ chính
TypeScript
Star
775
Fork
57
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nilbuild/diffity

Tất cả issue của nilbuild/diffity

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.