fix: reject unsupported image formats before API call, fix scroll layout jumps (#351, #844)#845
Open
MrRealORG wants to merge 1 commit into
Conversation
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.
Summary
Fixes two bugs:
#351: Unsupported image format causes repeated 400 errors
When an unsupported image format (e.g.
.ico,.tiff) is attached to a conversation, the MiMo API rejects it with a 400 error. Because the invalid media stays in the message history, every subsequent turn re-sends it, causing the same error repeatedly and making the conversation unusable.Fix: Added a
SUPPORTED_IMAGE_MIMESallowlist inutil/media.ts(bmp, gif, jpeg, png, webp) and a pre-send filter inprovider/transform.tsthat converts unsupported image formats to a clear text error before they reach the API. This prevents the 400 error entirely.#844: Scroll causes right-side display glitch
CSS
content-visibility: autowithout matchingcontain-intrinsic-sizecauses the browser to estimate element sizes as 0px when off-screen, producing layout jumps during scrolling.Fix: Added
contain-intrinsic-sizeto all CSS rules usingcontent-visibility: auto:message-part.css:auto 500pxbasic-tool.css:auto 200pxfile.css:auto 300pxTest Plan
.icofile — verify clear error instead of 400 loop.pngfile — verify it still worksCloses #351
Closes #844