Skip to content

feat: increase watchlist item limit and prewarm installs (STR-52) - #46

Merged
leo-mathurin merged 5 commits into
stagingfrom
leo/str-52-increase-watchlist-item-limit
Sep 1, 2026
Merged

leo-mathurin merged 5 commits into
stagingfrom
leo/str-52-increase-watchlist-item-limit

Conversation

@leo-mathurin

Copy link
Copy Markdown
Owner

Summary

  • raise the supported IMDb watchlist/list ceiling to 15,000 items
  • fetch adaptive 750-item GraphQL pages, including an exact-size final request at cursor boundaries
  • start cache-first prewarming after configuration saves with Vercel waitUntil
  • add background lifecycle, failure-isolation, pagination, and config-route coverage

Performance validation

  • real 10,000-title cold scrape: 44.1s on the Vercel preview
  • config response returned in 962ms while the scrape continued in the same invocation
  • the first catalog request used the completed R2 cache without another IMDb fetch
  • private-list prewarm failures remained background-only, with no 5xx or timeout logs

Preview: https://stremlist-backend-b4n6rbi25-lelemathrins-projects.vercel.app

Tests

  • pre-commit pnpm turbo run build test
  • 122 backend tests passed
  • backend typecheck, lint, format check, and production build passed

Issue

STR-52

@linear

linear Bot commented Sep 1, 2026

Copy link
Copy Markdown

STR-52

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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

2 Skipped Deployments
Project Deployment Actions Updated
stremlist-backend Ignored Ignored Preview Sep 1, 2026 2:09pm UTC
stremlist-frontend Ignored Ignored Preview Sep 1, 2026 2:09pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown

Greptile Summary

The PR raises the supported IMDb list size and adds cache-first background prewarming after configuration saves.

  • Uses adaptive page sizes at IMDb cursor-window boundaries.
  • Runs prewarms through Vercel background lifecycle support with bounded concurrency and cross-instance leases.
  • Coalesces concurrent cache misses and adds pagination, lifecycle, and route coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/backend/src/services/imdb-scraper.ts Adds adaptive 750-item pagination while respecting 10,000-item cursor windows and a 15,000-item ceiling.
apps/backend/src/services/watchlist-prewarm.ts Adds bounded cache-first prewarming with per-instance coalescing and database-backed owner leases.
apps/backend/src/services/watchlist.ts Coalesces concurrent canonical refreshes before applying caller-specific sorting and poster customization.
apps/backend/src/routes/api.ts Schedules prewarming after successful configuration persistence without delaying the response.
supabase/migrations/20260901110000_add_watchlist_prewarm_lease.sql Adds a bounded, service-role-only atomic lease used to coordinate prewarms across instances.

Reviews (5): Last reviewed commit: "fix(backend): coalesce concurrent watchl..." | Re-trigger Greptile

Comment thread apps/backend/src/services/imdb-scraper.ts
Comment thread apps/backend/src/routes/api.ts
@leo-mathurin

Copy link
Copy Markdown
Owner Author

@greptile review

@leo-mathurin

Copy link
Copy Markdown
Owner Author

@greptile review

@leo-mathurin

Copy link
Copy Markdown
Owner Author

@greptile review

@leo-mathurin

Copy link
Copy Markdown
Owner Author

@greptile review

@leo-mathurin
leo-mathurin merged commit 974ba64 into staging Sep 1, 2026
6 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