Maintain and extend PizGallery Flutter grid runtime, including viewport windowing, reusable grid cells, local and remote thumbnail loading, LRU byte cache behavior, and remote prefetch/download queue scheduling. Use when changing files under lib/grid/ for grid flicker, wrong thumbnail quality, local pm-thumb/pm-origin issues, cache eviction behavior, prefetch priority tuning, fast-scroll behavior, or download queue bugs.
Use this skill to make safe, performance-aware changes in lib/grid/* where rendering, thumbnail loading, and prefetch scheduling interact.
Keep local and remote pipelines separate, and preserve request-guarded provider swap behavior.
layout/windowing (wrong cells/index, jumpy viewport, zoom column switch).cell rendering (blank frame, stale frame, wrong overlay, hero mismatch).thumbnail loading (local pm-thumb/pm-origin or remote HTTP/thumb URL).cache/queue (memory pressure, duplicate downloads, poor prefetch order).references/grid-runtime-map.md.references/grid-runtime-playbook.md.If the root cause is scanner/index/database freshness (not cell runtime behavior),
switch to $pizcloud-local-source.
lib/grid/grid_state.dartlib/grid/grid_state_helper.dartlib/grid/grid_visible_cells_builder.dartlib/grid/grid_window.dartlib/grid/grid_cell.dartlib/grid/reuse_grid_cell.dartlib/grid/grid_cell_pool.dartlib/grid/cell/grid_cell_resolver.dartlib/grid/cell/grid_cell_models.dartlib/grid/cell/grid_cell_render.dartlib/grid/lru_bytes_cache.dartlib/grid/download_queue.dartlib/grid/grid_prefetch_controller.dartlib/grid/piz_gallery_widget.dartlib/grid/sources/local_device_media_uri.dartlib/grid/grid_thumbnail_cache_manager.dartGridPrefetchController + DownloadQueue._prefetchLocalThumbs queue in PizGallery._requestToken, _localResolveToken)._lastShownLocalFrameBytes).LocalDeviceMediaUri.buildTypedThumbCacheKey).GridCell request equality tied to mediaId + thumbUrl + decodeSide.flutter analyze lib/grid lib/viewer lib/mediaflutter test test/gridreferences/grid-runtime-map.mdreferences/grid-runtime-playbook.md