Context Boundary
- Repo/module:
talkincode/GameKit, asset upload and drop handlers
- Version/commit:
main, 9eb811e7bc3db3193b57609425723c478e438d32
- Runtime: browser UI; file reads complete asynchronously
- OS/browser: not recorded; this is a source-level reproduction
- Dependencies/config: no feature flag involved
Expectation vs. Reality
Expected: Selecting or dropping several files adds every file to the current project.
Actual: Each file.arrayBuffer() callback calls an addBytes function created from the same render. That function builds the next project from the same captured project snapshot, so each completion overwrites the previous completion; only the last processed file remains.
Reproduction Path
- Open the Assets pane and choose Upload.
- Select two or more different files at once (or drop multiple files onto the workspace).
- Inspect the asset list and export the source ZIP.
Minimal reproduction: invoke the same captured addBytes twice with separate files before a rerender; each result is derived from the same starting project.
Blast Radius
- Affected users/paths: multi-select upload and multi-file drag-and-drop.
- Frequency: every batch containing more than one file can lose earlier items.
- Severity rationale: project assets silently go missing and are absent from exports; recommend P2.
- Workaround: upload or drop one file at a time.
Evidence
Context Boundary
talkincode/GameKit, asset upload and drop handlersmain,9eb811e7bc3db3193b57609425723c478e438d32Expectation vs. Reality
Expected: Selecting or dropping several files adds every file to the current project.
Actual: Each
file.arrayBuffer()callback calls anaddBytesfunction created from the same render. That function builds the next project from the same capturedprojectsnapshot, so each completion overwrites the previous completion; only the last processed file remains.Reproduction Path
Minimal reproduction: invoke the same captured
addBytestwice with separate files before a rerender; each result is derived from the same starting project.Blast Radius
Evidence