Skip to content

fix: preset file selection + FS access fallback bugs (save + delete)#1677

Merged
outercloudstudio merged 8 commits into
bridge-core:mainfrom
grMLEqomlkkU5Eeinz4brIrOVCUCkJuN:fix/localfilesystem-fallback
Jul 24, 2026
Merged

fix: preset file selection + FS access fallback bugs (save + delete)#1677
outercloudstudio merged 8 commits into
bridge-core:mainfrom
grMLEqomlkkU5Eeinz4brIrOVCUCkJuN:fix/localfilesystem-fallback

Conversation

@grMLEqomlkkU5Eeinz4brIrOVCUCkJuN

@grMLEqomlkkU5Eeinz4brIrOVCUCkJuN grMLEqomlkkU5Eeinz4brIrOVCUCkJuN commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes 3 reported bugs. One is a cross platform regression in the "new file" preset window. The other three are all in the fallback file system path used by browser without the file system access API (various browsers).

Motivation

Issue Bug
#1653, #1630 Selecting a model/texture in "New File" does nothing
#1669 (1) Folders can't be deleted in Safari/Firefox
#1667 Saved files don't persist on Android

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@outercloudstudio

Copy link
Copy Markdown
Member

Sorry for the late review. Been busy with work :)

Some things I'm noticing in the PR that would need to be changed before this is merged:

You reference a input field like this:

const input = document.getElementById(`preset-file-input-${fieldId}`)

This isn't standard in Vue and I'd recommend changing it to a template ref. This is the documentation for it: https://vuejs.org/guide/essentials/template-refs

Regarding the data cloning issue:

config: this.project.config ? JSON.parse(JSON.stringify(this.project.config)) : this.project.config,

I think it might be a good idea to investigate why the object is not a plain object before attempting this fix.

Everything else looks good here though, so just resolve those and I can merge this in.

@outercloudstudio outercloudstudio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See note

@grMLEqomlkkU5Eeinz4brIrOVCUCkJuN

Copy link
Copy Markdown
Contributor Author

i accidentally re requested a review

@grMLEqomlkkU5Eeinz4brIrOVCUCkJuN

Copy link
Copy Markdown
Contributor Author

my bad i was thinking of using the shortcut by fetching from the id directly. Ill make sure to be careful about the vue lifecycle in the future 💀💀💀

for the object part it is already in my commit message. The handoff from vue reactive to the dash compiler (specifically a proxy). And because it uses postMessage (serializes with structured clone), it can't clone a proxy. I actually made an assumption about safari, which is that safari is stricter, so it throws an error message about cloning.

@outercloudstudio

ill make changes when i reach home im on a bus now 🚌🚌🚌🚌

@outercloudstudio

Copy link
Copy Markdown
Member

I see. Can we just toRaw or markRaw or whatever the vue API is to extract the raw object from the ref instead?

@grMLEqomlkkU5Eeinz4brIrOVCUCkJuN

Copy link
Copy Markdown
Contributor Author

I see. Can we just toRaw or markRaw or whatever the vue API is to extract the raw object from the ref instead?

we can, but that's kinda lazy and it isn't really figuring out why it isn't a plain obj to begin with. Don't worry, ill clean this up. :>

@grMLEqomlkkU5Eeinz4brIrOVCUCkJuN

Copy link
Copy Markdown
Contributor Author

@outercloudstudio I got a Macbook from a friend to tried testing it appears that the original dataclone issue might be a red herring (likely in the setup payload somewhere). I could not replicate it an honestly plain objects were fine.

for the vue template ref part, since it renders inside a v-for, i used a function ref instead that collects into a lookup, which uses key ids

@grMLEqomlkkU5Eeinz4brIrOVCUCkJuN grMLEqomlkkU5Eeinz4brIrOVCUCkJuN changed the title fix: preset file selection + FS access fallback bugs (delete export save) fix: preset file selection + FS access fallback bugs Jul 22, 2026
@grMLEqomlkkU5Eeinz4brIrOVCUCkJuN grMLEqomlkkU5Eeinz4brIrOVCUCkJuN changed the title fix: preset file selection + FS access fallback bugs fix: preset file selection + FS access fallback bugs (save + delete) Jul 22, 2026
@outercloudstudio
outercloudstudio merged commit 9dd6af9 into bridge-core:main Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants