Skip to content

fix: some pdf might fail if they are loaded at once#318

Merged
asku1990 merged 1 commit into
developfrom
fix/pdf
Jun 30, 2026
Merged

fix: some pdf might fail if they are loaded at once#318
asku1990 merged 1 commit into
developfrom
fix/pdf

Conversation

@asku1990

Copy link
Copy Markdown
Owner

ref bej-126

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
beagle-db-v2 Ignored Ignored Jun 30, 2026 7:17pm

@asku1990 asku1990 merged commit 224f805 into develop Jun 30, 2026
4 checks passed
@asku1990 asku1990 deleted the fix/pdf branch June 30, 2026 19:18
@kilo-code-bot

kilo-code-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The PR adds pagination/lazy-loading for PDF items to limit initial load to 10 items with a "show more" button. Changes are minimal and focused:

  • INITIAL_VISIBLE_PDF_COUNT and PDF_REVEAL_BATCH_SIZE constants added
  • visibleItemCount state tracks visible items
  • visibleItems slice limits rendered items
  • "Show more" button reveals 10 additional items at a time
  • Tests added for both truncated and full-visible scenarios

The implementation correctly:

  • Passes visibleItems to getSharedPageWidth for width calculation
  • Only renders visible items to avoid overwhelming the browser
  • Shows the reveal control only when there are more items

No critical issues, logic bugs, or security concerns found in the changed code.

Files Reviewed (2 files)
  • apps/web/components/beagle-trials/beagle-trial-pdf-canvas-stack.tsx
  • apps/web/components/beagle-trials/__tests__/beagle-trial-pdf-shell.test.tsx

Reviewed by laguna-m.1-20260312:free · Input: 258.8K · Output: 11.7K · Cached: 875.3K

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.

1 participant