Skip to content

Fix environment browser preview assets - #7814

Closed
kellyguo11 wants to merge 1 commit into
isaac-sim:developfrom
kellyguo11:codex/fix-task-preview-assets
Closed

kellyguo11 wants to merge 1 commit into
isaac-sim:developfrom
kellyguo11:codex/fix-task-preview-assets

Conversation

@kellyguo11

@kellyguo11 kellyguo11 commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fix the environment browser task preview panel so it loads images and videos from their published _static/tasks locations instead of nonexistent flattened paths.

When an LFS-backed preview video cannot be decoded in a multi-version docs deployment, fall back to the task image and remember the failed URL so subsequent control updates do not reveal a broken video again.

No new dependencies.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Release backport

  • A matching PR targets release/3.0.0

Screenshots

Not attached. The current published preview requests return 404s; the corrected image paths match the paths already used successfully by the task cards.

Validation

  • node --check docs/source/_static/css/environment-browser.js
  • Verified all 65 referenced task preview image paths exist
  • git diff --check
  • Full docs build not run locally: the lockfile does not support macOS arm64; the GitHub docs job will run it on Linux

Checklist

  • I have read and understood the contribution guidelines
  • Pre-commit checks passed in GitHub CI
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings (pending GitHub docs build)
  • I have added tests that prove my fix is effective (no browser-test harness exists; static path and JavaScript syntax validation performed)
  • No source package was touched, so no changelog fragment is required
  • My name already exists in CONTRIBUTORS.md

@kellyguo11
kellyguo11 requested a review from a team September 15, 2026 07:33
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation labels Sep 15, 2026
@greptile-apps

greptile-apps Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with no actionable correctness, security, or repository-rule violations identified.

Summary

This PR corrects environment-browser preview URLs and adds a persistent fallback for preview videos that fail to load or decode.

  • Resolves task images from their published _static paths.
  • Resolves preview videos from _static/tasks/previews.
  • Remembers failed video URLs and displays the corresponding task image instead.
  • Updates the initial Cartpole preview path in the environment-browser markup.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Task or controls change] --> B[Resolve task image URL]
  B --> C{Eligible preview video?}
  C -->|No| D[Display task image]
  C -->|Yes| E{URL previously failed?}
  E -->|Yes| D
  E -->|No| F[Load and play preview video]
  F -->|Media error| G[Remember failed URL]
  G --> D
  F -->|Success| H[Display preview video]
Loading

Reviews (1) · Last reviewed commit: "Fix environment browser preview assets"

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

The asset paths now target the published _static/tasks locations and video failures fall back to the still image, but dynamic still-image selection remains broken because the lookup receives a task object rather than the task name.

  • Design and architecture: The module-scoped failed-video URL set and image fallback fit the existing browser state flow. The remaining issue is localized to the preview image lookup rather than the overall design.
  • API: The RST and JavaScript agree on the _static/tasks asset layout, so the DOM and asset-path contract is preserved. No public API compatibility concerns were identified.
  • Implementation: At line 468, previewImageFor(selectedTask()) passes the selected task object to regexes expecting a task-name string. It therefore falls through to tasks/classic/cartpole.jpg for every task. Pass state.task so each selected task resolves to its intended still image.

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(`../../_static/${previewImageFor(selectedTask())}`, window.location.href).href;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Implementation — Preview image lookup receives task object

previewImageFor matches via pattern.test(taskName), but selectedTask() returns a task object (used as task.rl, task.physics, task.defaultAlgorithms nearby). The regex coerces it to "[object Object]", so no rule matches and every task falls back to tasks/classic/cartpole.jpg. The corrected _static path therefore still renders the cartpole image for all tasks, so the intended per-task preview fix does not take effect. Pass state.task, as previewVideos[state.task] already does.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previewImageFor accepts a task object by design: it first reads task.previewImage, then derives taskName as task.task before applying the regex rules. selectedTask() returns that object, so the current call is correct. Passing state.task would instead make task.task undefined and cause the Cartpole fallback.

@kellyguo11

Copy link
Copy Markdown
Contributor Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 15, 2026
@kellyguo11 kellyguo11 added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Sep 15, 2026
@StafaH StafaH mentioned this pull request Sep 15, 2026
7 tasks done
@kellyguo11

Copy link
Copy Markdown
Contributor Author

closing for #7822

@kellyguo11 kellyguo11 closed this Sep 16, 2026
kellyguo11 added a commit that referenced this pull request Sep 16, 2026
## 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:

- serves task preview images from the Isaac Sim S3-backed download host
while preserving their `tasks/...` paths;
- removes the 93 task preview JPEGs from the repository;
- resolves the four existing MP4 previews from their actual
`_static/tasks/previews` directory;
- falls back to the task image when a preview video cannot be loaded or
decoded; and
- remembers failed video URLs so later control changes do not expose the
broken video again.

For example, the Cartpole fallback now loads from:


`https://download.isaacsim.omniverse.nvidia.com/isaaclab/images/tasks/classic/cartpole.jpg`

The S3 objects must be uploaded under `isaaclab/images/tasks/` before
this PR is ready to merge.

Supersedes #7814.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Documentation update

## 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)
- `uv run isaaclab -f` (all hooks passed)
- Verified the upload archive contains all 93 task preview JPEGs and all
65 unique browser image paths

## 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`

---------

Co-authored-by: Kelly Guo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:run-docker Trigger the on-demand Docker and GPU CI workflow documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants