Improve annotation mode sorting, status updates, and notifications#5
Merged
anderstorstensson merged 2 commits intomainfrom Feb 4, 2026
Merged
Improve annotation mode sorting, status updates, and notifications#5anderstorstensson merged 2 commits intomainfrom
anderstorstensson merged 2 commits intomainfrom
Conversation
Features: - Sort unclassified images by ROI area (largest first) in annotation mode This groups similar-sized organisms together for faster annotation - Add width, height columns to classifications data frame for size-based sorting Bug fixes: - Fix sample dropdown not updating status symbol (pencil) after saving Use JavaScript to update display text without rebuilding entire dropdown - Only update sample status when changes are actually saved Previously status changed even when switching from unchanged samples - Fix incorrect image count in loading notifications Now shows count after filtering empty triggers, not before Files changed: - R/sample_loading.R: Add width/height columns to all loading functions - R/server.R: - Add pending_sample_select to reactiveValues - Add update_current_sample_status() helper using JavaScript - Modify filtered_images() reactive for size-based sorting in annotation mode - Capture save_sample_annotations() return value before updating status - Move loading notification to after empty trigger filtering - Add mode_message parameter to extract_sample_images()
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #5 +/- ##
==========================================
+ Coverage 86.89% 87.59% +0.70%
==========================================
Files 4 4
Lines 351 379 +28
==========================================
+ Hits 305 332 +27
- Misses 46 47 +1
🚀 New features to boost your workflow:
|
…on switch - Escape single quotes and backslashes in update_current_sample_status() before interpolating into JavaScript via sprintf (XSS prevention) - Replace unsafe positional indexing in load_from_mat() with safe roi_number lookup via which(), matching load_from_classifier_mat() - Use NA_real_ fallback for missing ROI dimensions in both loading functions (consistent with load_from_csv) - Replace sapply with vapply for type safety in ROI data extraction - Extract duplicated switch-to-validation logic (~48 lines) into shared do_switch_to_validation() helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features:
Bug fixes:
Files changed: