Fix environment browser preview assets - #7822
Conversation
Serve task preview images from the Isaac Sim download host and remove the repository copies to avoid bundling them into each documentation version.
|
run-ci |
|
| const videoUrl = videoName | ||
| ? new URL(`../../_static/tasks/previews/${videoName}`, window.location.href).href | ||
| : undefined; | ||
| previewImage.src = new URL(previewImageFor(selectedTask()), previewImageBaseUrl).href; |
There was a problem hiding this comment.
Task thumbnails use deleted assets
The selected-task preview now uses the external image host, but refreshCard() still loads every task-card image from the local _static directory. Because this PR deletes those tasks/**/*.jpg files, cards request missing assets such as _static/tasks/classic/cartpole.jpg and display broken thumbnails. Resolve the card images against previewImageBaseUrl as well.
There was a problem hiding this comment.
Addressed in #7849 by routing task-card thumbnails through the shared preview image URL resolver.
There was a problem hiding this comment.
Isaac Lab Review Bot
The PR correctly redirects task preview images to the download host, fixes MP4 paths, and adds memoized video fallback behavior, but it also redirects one non-task image mapping to an S3 path outside the stated upload scope.
- Design and architecture: Externalizing the task JPEGs avoids repository and Git LFS deployment issues. However, the shared base-URL rewrite assumes every
previewImageForresult belongs under the migrated S3 hierarchy, whileLift-Soft-Frankastill maps tonewton/franka-mjwarp-vbd-coupling.png. - API: The preview markup and JavaScript selectors remain compatible, the default cartpole source matches the new hosted location, and the RST reference to a deleted task image was updated. No Python or extension public API is changed.
- Implementation: The corrected MP4 directory and failed-video memoization are internally consistent. Before merge, preserve local resolution for the
newton/...preview or ensure that asset is uploaded at the newly generatedisaaclab/images/newton/...URL; the statedisaaclab/images/tasks/upload does not cover it.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
| const videoUrl = videoName | ||
| ? new URL(`../../_static/tasks/previews/${videoName}`, window.location.href).href | ||
| : undefined; | ||
| previewImage.src = new URL(previewImageFor(selectedTask()), previewImageBaseUrl).href; |
There was a problem hiding this comment.
🟡 Warning · Implementation — Non-task preview path redirected to download host
previewImageFor does not only return tasks/... values: the Lift-Soft-Franka rule returns newton/franka-mjwarp-vbd-coupling.png, and that asset is not among the files deleted here. Prefixing every result with previewImageBaseUrl sends it to isaaclab/images/newton/..., outside the isaaclab/images/tasks/ upload scope stated for this change, so that preview can 404. Resolve non-tasks/ paths locally, or confirm the object is uploaded.
There was a problem hiding this comment.
Addressed in #7849 by preserving local _static resolution for non-task preview images.
## Description Follow-up to #7822 that addresses the two review comments left on the merged PR: - resolve task-card thumbnails from the external task-image host instead of the deleted local `_static/tasks` assets; and - keep non-task preview images, such as `Lift-Soft-Franka`, on their local `_static` paths. Both the selected-task preview and task-card thumbnails now use one shared URL resolver. Addresses: - #7822 (comment) - #7822 (comment) ## Type of change - Bug fix (non-breaking change which fixes an issue) - Documentation update ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Validation - `node --check docs/source/_static/css/environment-browser.js` - `uv run --extra test python -m pytest --noconftest tools/test/test_environ_docs.py` (35 passed) - `uv run --isolated --extra dev -- make -C docs current-docs` (succeeded without warnings) - Headless Chrome verified Cartpole resolves to the external task-image URL and `Lift-Soft-Franka` resolves to the local built `_static/newton` image. - `uv run isaaclab -f` (all applicable hooks passed; changelog validation passed separately against `upstream/develop` because the fork base is stale) ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] Existing environment documentation tests pass - [x] No source package was touched, so no changelog fragment is required - [x] My name already exists in `CONTRIBUTORS.md`
Description
The environment browser currently requests preview images from flattened documentation paths that do not exist. Its MP4 previews are also Git LFS objects, so multi-version documentation deployments can serve pointer text instead of decodable video.
This change:
tasks/...paths;_static/tasks/previewsdirectory;For example, the Cartpole fallback now loads from:
https://download.isaacsim.omniverse.nvidia.com/isaaclab/images/tasks/classic/cartpole.jpgThe S3 objects must be uploaded under
isaaclab/images/tasks/before this PR is ready to merge.Supersedes #7814.
Type of change
Validation
node --check docs/source/_static/css/environment-browser.jsuv run --extra test python -m pytest --noconftest tools/test/test_environ_docs.py(35 passed)uv run --isolated --extra dev -- make -C docs current-docs(succeeded without warnings)uv run isaaclab -f(all hooks passed)Checklist
CONTRIBUTORS.md