new features#10
Merged
Merged
Conversation
Owner
razzkumar
commented
Mar 3, 2026
- fix: implement HIGH and MEDIUM priority improvements across codebase
- test: add comprehensive test coverage for all recent changes
Address 13 identified issues (5 HIGH, 8 MEDIUM) plus a bonus fix: HIGH fixes: - H1: Deduplicate detection providers - extract shared buildDetectionPrompt, parseJSONDetectionResponse, extractLabelsFromPlainText, parseTextResponse into detection.go; providers become thin wrappers - H2: Surface metadata write errors via MetadataWriteWarning type with Unwrap() support instead of silently swallowing - H3: Fix formatFilterName() by adding Name field to ResampleFilter struct and setting it on all 15 filters - H4: Unify JPEG quality default to 95 via DefaultJPEGQuality constant - H5: Add parallelWithContext() with context cancellation support MEDIUM fixes: - M1: Export GCD() and FormatAspectRatio() from root package, deduplicate CLI - M2: Fix Format.String() to return "Unknown" for invalid formats, remove redundant formatToString() - M3: Deep clone DetectionResult via JSON round-trip in Clone() - M4: Clamp encode options (JPEG [1,100], WebP [0,100], GIF [1,256]) - M5: Clean up partial file on encode/close error - M6: Add instance-based API tests (method chain, save round-trip, clone independence, metadata tracking) - M7: Add WebP support to CLI format functions - M8: Fix mimeFromFormat() default to application/octet-stream Bonus: Fix error prefix from "imaging:" to "imgx:" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover 15 previously untested features across 3 modules: - Root: encode option clamping, DefaultJPEGQuality, save cleanup on error, MetadataWriteWarning type, parallelWithContext, GCD, FormatAspectRatio - Detection: buildDetectionPrompt, parseJSONDetectionResponse, extractLabelsFromPlainText, parseTextResponse - CLI: ParseFormat, FormatName, ParseFilter, ParseAnchor, changeExtension
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.