Move preview fetching to worker; add ability to detect pagination