Skip to content

fix: Example was failing to load images - #2854

Merged
jbocce merged 2 commits into
mainfrom
fix/local-example-exception
Aug 11, 2026
Merged

fix: Example was failing to load images#2854
jbocce merged 2 commits into
mainfrom
fix/local-example-exception

Conversation

@wayfarer3130

@wayfarer3130 wayfarer3130 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Context

Just a fix in the local demo where the images were not being registered correctly for the newer image loader

Changes & Results

Testing

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] "OS:
  • [] "Node version:
  • [] "Browser:

Summary by CodeRabbit

  • Bug Fixes
    • Improved metadata prefetching by reusing cached image information and loading required metadata more reliably.
    • Improved handling of multiframe images by using available frame metadata for more accurate image expansion.
    • Preserved existing behavior for legacy metadata and ensured single-frame images retain their original identifiers.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The helper now prefetches metadata through the core image loader. It uses typed base-image and frame-image metadata for multiframe expansion, preserves single-frame IDs, and retains legacy frame generation when typed frame metadata is unavailable.

Changes

Multiframe conversion

Layer / File(s) Summary
Core metadata prefetching
utils/demo/helpers/convertMultiframeImageIds.js
The helper uses imageLoader.loadAndCacheImage and skips image IDs that already have naturalized metadata.
Typed multiframe expansion
utils/demo/helpers/convertMultiframeImageIds.js
The helper expands typed frame metadata, preserves original IDs for single-frame instances, and uses legacy MULTIFRAME expansion when frame-image metadata is unavailable.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides context but leaves Changes & Results, Testing, and Tested Environment sections incomplete. Describe the implemented changes, testing steps and results, and the tested OS, Node version, and browser.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the semantic-release format and accurately describes the image-loading fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/local-example-exception

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
utils/demo/helpers/convertMultiframeImageIds.js (1)

12-20: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Avoid serial image metadata prefetch.

When cache misses exist, call imageLoader.loadAndCacheImages or use bounded concurrency. The current loop waits for each image load before starting the next one, which adds cumulative network and decode latency for large studies.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@utils/demo/helpers/convertMultiframeImageIds.js` around lines 12 - 20, Update
prefetchMetadataInformation to avoid awaiting each imageLoader.loadAndCacheImage
call serially; collect cache-missing image IDs and prefetch them through
imageLoader.loadAndCacheImages, or apply bounded concurrency while preserving
the NATURALIZED metadata cache check.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@utils/demo/helpers/convertMultiframeImageIds.js`:
- Around line 12-20: Update prefetchMetadataInformation to avoid awaiting each
imageLoader.loadAndCacheImage call serially; collect cache-missing image IDs and
prefetch them through imageLoader.loadAndCacheImages, or apply bounded
concurrency while preserving the NATURALIZED metadata cache check.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d7c82070-18ca-4ece-934e-fd1e6011df70

📥 Commits

Reviewing files that changed from the base of the PR and between 49e9ce3 and 6a034a4.

📒 Files selected for processing (1)
  • utils/demo/helpers/convertMultiframeImageIds.js

@wayfarer3130
wayfarer3130 requested a review from jbocce August 11, 2026 18:17
@jbocce

jbocce commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Please update your branch and push so that the tests run. There are changes merged in #2851 that are needed. Sorry.

@jbocce jbocce left a comment

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.

Approved but don't merge until you update your branch and the tests pass please.

@jbocce
jbocce merged commit 696ad05 into main Aug 11, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants