harbor run -t scale-ai/hil-bench-swe_50-ask_humanharbor download scale-ai/hil-bench-swe_50-ask_humanWhile HEIC MIME types were defined, the system lacks browser capability detection to determine when these formats (and the new JXL format) can be safely used for thumbnail and preview generation. The MIME type detection is also unnecessarily complex.
Missing JXL format support entirely
HEIC formats defined but not included in supported image detection
No browser capability detection for modern image formats
Overly complex MIME type detection using file content analysis
Add conditional support for HEIC/JXL formats when running on macOS/iOS Safari with native format decoding support, simplify MIME type detection to use file type and extension-based detection.
JXL and HEIC files are not recognized as supported images
The system returns 'application/octet-stream' as the default MIME type instead of the correct type
Previews cannot be generated for these modern image formats
mimeTypeFromFile function should simplify MIME type detection logic by removing the use of ChunkFileReader and complex validations, and rely on file metadata and extension information.
SupportedMimeTypes enum should include support for JXL format with the value 'image/jxl'.
EXTRA_EXTENSION_TYPES object should map the 'jxl' extension to MIME type 'image/jxl'.
Implementation should include the functions isJXLSupported and isHEICSupported, which detect compatibility for JXL and HEIC-related formats on Apple platforms with appropriate Safari version support for native format decoding.
For the current rollout, JXL compatibility should be treated as desktop-only behavior: isJXLSupported must return false on iOS Safari even when the Safari version meets the support threshold.
isSupportedImage function should incorporate support validations for HEIC-related formats and JXL based on compatibility detection functions.
Import statement in mimetype.ts should be updated to include the getOS function from the browser helpers module for OS detection. The getOS() function returns an object with name and version string properties representing the detected operating system.
Both isHEICSupported and isJXLSupported should include Safari version detection to confirm the browser meets the minimum Safari version for native format decoding support, following browser-version checking patterns established in the file. Note that getBrowser() returns name: 'Safari' for desktop Safari and name: 'Mobile Safari' for iOS Safari; both variants must be recognized when checking for Safari browser compatibility.
Apply the MIME detection simplification to applications/drive/src/app/store/_uploads/mimeTypeParser/mimeTypeParser.ts. If a mirrored implementation exists in packages/drive-store/store/_uploads/mimeTypeParser/mimeTypeParser.ts, keep it consistent as a follow-up.
No new interfaces introduced. Existing interfaces should maintain backward compatibility with Chrome and Firefox browsers.