Skip to content

Optimize catalog preview loading - #750

Merged
kkd16 merged 2 commits into
mainfrom
optimize-catalog-previews
Aug 4, 2026
Merged

Optimize catalog preview loading#750
kkd16 merged 2 commits into
mainfrom
optimize-catalog-previews

Conversation

@kkd16

@kkd16 kkd16 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace eager blank iframe contexts with lightweight preview placeholders
  • keep at most two visible app previews alive
  • hand preview slots to the cards nearest the viewport center
  • stagger the two starts with simple timers
  • remove previews when they leave the viewport, are filtered out, or the tab is hidden
  • reduce each preview render surface from 400% to 250%

Simplification review

  • removed idle-callback abstraction, watchdogs, failure/retry state, and queue-state bookkeeping
  • reduced the branch from 208 added lines to 92
  • removed all comments introduced by this branch

Verification

  • node --check assets/catalog.js
  • git diff main --check
  • node scripts/build-site.mjs --catalog-only (45 projects published, 0 rejected)
  • headless Chromium smoke test: 45 cards, 45 placeholders, exactly 2 live iframes, 2 ready
  • DevTools scroll trace across 15 positions: slots now switch to each incoming row while its thumbnails are entering the viewport and remain stable through the visible pass

Merge note

This intentionally updates the shared catalog shell (assets/catalog.js and assets/catalog.css), so it requires the requested manual admin merge rather than the project-only auto-merge path.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 Out of scope. changes outside a project folder are never auto-merged (e.g. "assets/catalog.css")

Change only one projects/<slug>/ folder, then push again. Run node scripts/verify-project.mjs <slug> first — it catches this locally.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 Out of scope. changes outside a project folder are never auto-merged (e.g. "assets/catalog.css")

Change only one projects/<slug>/ folder, then push again. Run node scripts/verify-project.mjs <slug> first — it catches this locally.

@kkd16
kkd16 merged commit e78e8a0 into main Aug 4, 2026
1 of 2 checks passed
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