Repository navigation
feat(mobile): allow ten images per message - #837
Merged
Merged
Conversation
The phone's album could contribute at most four images. Raise the per-message
image cap to ten — the attachment cap — so a message can be filled with photos.
One rule, enforced where a remote send is validated:
- mobile/src/remote/files.ts MAX_IMAGES 4 -> 10. The image rule is checked
before the attachment rule so an image-heavy batch reports the specific limit
("at most 10 images") instead of the generic one.
- desktop backend remote_host::files MAX_IMAGES 4 -> 10: claim_uploads rejects a
phone send that carries more, so the two must agree or the phone's own limit
would be unreachable.
- Desktop-side selection keeps its own, smaller composer rule (4 images, vision
token budget); that is unchanged.
Docs updated for the mobile transfer rules (PRODUCT.md / PRODUCT.zh-CN.md) and
the mobile attachment line (README.md / README.zh-CN.md). Tests: mobile gains
"a message can be filled with ten images" (ten still accepted, the picker asks
for ten) and the quota cases are expressed in terms of MAX_IMAGES; the backend
test now checks ten accepted / eleven rejected.
huichen
enabled auto-merge (squash)
September 25, 2026 13:48
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
The phone's album (and every other attachment source) could contribute at most 4 images per message. This raises the per-message image cap to 10 — the attachment cap — so a message can be filled with photos, which is what the album grid's multi-select was already asking for.
The cap is enforced in two places that must agree, so both changed:
mobile/src/remote/files.tsMAX_IMAGES: 4 -> 10. The image rule now runs before the attachment rule, so an image-heavy batch reports the specific limit ("at most 10 images") rather than the generic one — with the two caps equal, the image message would otherwise be unreachable.desktop/src-tauri/src/remote_host/files.rsMAX_IMAGES: 4 -> 10:claim_uploadsvalidates a remote (phone) send, so leaving it at 4 would reject what the phone now allows.Desktop-side selection keeps its own, smaller composer rule (4 images for the vision token budget) — unchanged, and its docs still describe that.
Validation
tsc --noEmit,eslintclean, 128 suites / 2036 tests pass. New case "a message can be filled with ten images" (ten accepted, the OS picker is asked for ten); the quota cases now read in terms ofMAX_IMAGESinstead of a hard-coded 4.cargo test --release remote_host::files— 35 passed; the upload-rules test now checks ten images accepted and eleven rejected.docs/internals/desktop/PRODUCT.md,PRODUCT.zh-CN.md) and the mobile attachment line (docs/internals/mobile/README.md,README.zh-CN.md).Not verified on a device: the phone needs a rebuilt APK for the new limit.