Repository navigation
Add thumbnail priority queue for viewport-based generation - #84
Merged
Merged
Conversation
- Backend: Added prioritize_thumbnail_jobs and create_or_update_thumbnail_job methods - API: Added POST /api/v1/operations/thumbnails/prioritize endpoint - Frontend: Added Intersection Observer to report visible documents - Priority levels: 100 (viewport), 50 (folder), 10 (background) - Includes map regression fix in TraceView and MapCanvas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a priority-based thumbnail generation system so that images visible in the current Explorer viewport are generated first, rather than using FIFO queue order.
Problem
Solution
Changes
Backend (
storage/postgres_backend.py)update_job_priority()- Update priority of a queued jobprioritize_thumbnail_jobs()- Batch update priorities for multiple documentscreate_or_update_thumbnail_job()- Create or update with deduplicationAPI (
api/routes/operations.py)POST /api/v1/operations/thumbnails/prioritizeendpointFrontend (
dashboard/src/)ArtifactExplorer.tsx- Added Intersection Observer to track visible itemsapi.ts- AddedprioritizeThumbnails()methodMap Fix (bonus)
TraceView.cssandMapCanvas.css- Addedheight: 100%to ensure proper flexbox height propagationSuccess Criteria
ORDER BY priority DESC)Testing
Build succeeded with no TypeScript errors.
@tamzrod can click here to continue refining the PR