Repository navigation
Open from computer: let iOS and iPadOS pick .solidcraft files (#6977) - #7351
Merged
bherbruck merged 2 commits intoOct 27, 2026
Merged
Conversation
…cy-labs#6977) The iOS file picker matches an input's accept list by system file type, not by extension. No system type has the .solidcraft extension, so the designs were greyed out. On an iPhone or iPad the file inputs now offer every file; other devices keep the extension filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
semmelrinde
marked this pull request as ready for review
October 27, 2026 01:09
bherbruck
added this pull request to the merge queue
Oct 27, 2026
Merged
via the queue into
tangency-labs:main
with commit Oct 27, 2026
9d01dcb
84 of 87 checks passed
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.
Fixes #6977
Change
On an iPhone or iPad, Open ▸ Open from computer showed every
.solidcraftdesign greyed out, so it could not be picked.Safari on iOS and iPadOS has no File System Access picker, so the web app opens a hidden
<input type=file>(input_pickerinapps/solidcraft-web/src/files.rs). Itsacceptattribute listed only file extensions (.solidcraft,.json,.step,…). The iOS file picker does not filter by extension. It turns eachacceptentry into a system file type (a Uniform Type Identifier) and offers only files of those types. A.solidcraftfile is a zip package with our own extension. No system type has that extension, so the file has no type in the list, and the picker greys it out. The same happens to other extensions the system does not know. Every browser on iOS uses the same WebKit picker, so Chrome and Firefox there behave the same way.Public references:
acceptattribute: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/acceptacceptentries into types: https://bugs.webkit.org/show_bug.cgi?id=142614What changed:
disk::apple_touch(user_agent, touch_points)tells whether the page runs on an iPhone or iPad. iPadOS reports itself as a Mac, so a Mac user agent with more than one touch point counts as an iPad. This is the same test the Install app steps use (safari_stepsincrates/ui-egui/src/install.rs), but for every browser, not only Safari.disk::input_accept(extensions, apple_touch)builds theacceptvalue. On an iPhone or iPad it is empty, so the picker offers every file. Everywhere else it is the extension list fromaccept_list, as before.input_picker(Open from computer and Insert without the File System Access API) andchoose_filethroughpick_upload(Insert DXF/SVG, images, meshes, settings), which had the same problem for extensions such as.dxf.Desktop browsers keep exactly the filter they had. On an iPhone or iPad, a picked file SolidCraft can't read goes through the same open or import path as before and gets its usual error in the status bar. I chose an empty
acceptover addingapplication/octet-stream: on iOS that type matches every file anyway, and on desktop browsers it would add unrelated extensions to the filter. Removingacceptis also the change the reporter tried on an iPad, and it made the design selectable.Changes a default: no
Validation
disk::tests::file_inputs_on_an_iphone_or_ipad_offer_every_fileinapps/solidcraft-web/src/disk.rs, next to the other file input test. It checks that:acceptvalue is empty on an iPhone or iPad and.solidcraft,.json,.stepelsewhere.main. Withinput_acceptchanged to ignoreapple_touch(the old behaviour, extensions only), the test fails onassert_eq!(input_accept(&designs, true), "").cargo test -p solidcraft-web --bin solidcraft-web disk::: 11 passed.cargo test -p solidcraft-web --bin solidcraft-web: 23 passed.cargo build -p solidcraft-web --target wasm32-unknown-unknown: builds.cargo clippy -p solidcraft-web --all-targets -- -D warnings(native): clean.cargo clippy -p solidcraft-web --target wasm32-unknown-unknown --no-deps -- -D warnings: nothing in the changed files. It reports twouseless_conversionlints inapps/solidcraft-web/src/install.rs, which this PR doesn't touch; they come from a newer clippy and are onmaintoo.cargo fmt -p solidcraft-web --check: clean.Not tested on a real iPhone or iPad: no device was available. The behaviour on such a device follows the reporter's test in the issue (no
accept, the design can be picked).Screenshots of the behavior (when observable)
No screenshots. The change only shows in the iOS and iPadOS file picker, which needs a real device or the iOS Simulator with Safari, and neither was available here. Desktop browsers look and behave as before. The reporter's screenshots in #6977 show the greyed-out design.
Integration status
Based on
mainat 610f2e4. Open PRs that touchapps/solidcraft-web/src/files.rsordisk.rs: #6696, #5821, #4839, #4507 and #4020. None of them changesinput_picker,choose_fileoraccept_list.🤖 Generated with Claude Code