Repository navigation
fix: clamp the history pane frame index in the frontend - #2228
AKjangid99 wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Reviewer's GuideAPIUpdate the public Python
ImplementationAdd shared frame-index clamping and use the valid frame consistently throughout image and plot history rendering and updates.
UIRemove the focused pane's accent outline while retaining its shadow treatment.
TestsCover uploaded dashboards with invalid history selections and verify the panes display the expected valid frames without page errors.
Test
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@mariobehling,
|

Description
Motivation and Context
If a saved env or an uploaded dashboard has a bad selected value (like 0.5, -1 or missing), the pane tries to draw a frame that doesn't exist and the whole dashboard goes blank. Old envs saved before the server checked this, and any uploaded dashboard, can hit it.
image_select() only had an assert, so it let True through, rejected numpy integers, and stopped checking at all under python -O. Its errors are now TypeError/ValueError instead of AssertionError.
How Has This Been Tested?
Screenshots (if appropriate):
Without the fix, loading such a dashboard leaves a completely blank page.
Types of changes
Checklist:
Summary by Sourcery
Keep dashboards rendering when history panes contain invalid stored frame selections.
Bug Fixes:
image_select()inputs consistently withupdate_image_slider(), including accepting integral floats and NumPy integer values while rejecting invalid values withTypeErrororValueError.Documentation:
image_select().Tests:
image_select()input validation.