Skip to content

fix(file-manager): Lua file upload — shortify + minify on save, expand on read - #1580

Open
kkerti wants to merge 2 commits into
stablefrom
fix/file-manager-lua-transform
Open

fix(file-manager): Lua file upload — shortify + minify on save, expand on read#1580
kkerti wants to merge 2 commits into
stablefrom
fix/file-manager-lua-transform

Conversation

@kkerti

@kkerti kkerti commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

The file manager tagged .lua files as intech_lua, but the save/read transforms compared selectedLanguage === "lua" — never true. So human-readable Grid API names (e.g. draw_rectangle_filled) were uploaded to modules verbatim and failed at runtime (attempt to call a nil value), and device files were shown without expanding.

Fix: route .lua save through GridScript.compressScript (shortify + minify — compact storage for memory-constrained flash) and read through GridScript.expandScript (humanize + beautify) — the same pipeline the runtime uses to send code to a module. The language id is centralized in one constant so the language map and the transform gates can't drift apart again.

🤖 Generated with Claude Code

kkerti and others added 2 commits August 6, 2026 17:05
The editor tagged .lua files "intech_lua" but the transform gates
compared "lua", so they were dead: human-readable Grid API names were
written to modules verbatim (nil at runtime) and device files shown
without expanding. Route .lua save through GridScript.compressScript
(shortify + minify — compact storage for memory-constrained flash) and
read through expandScript (humanize + beautify). Language id centralized
so the map and gates can't drift again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kkerti

kkerti commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

TEST: copying human readable function names with sequencer project works now, we should still do focused test with @Greg-Orca

@kkerti kkerti moved this from Todo to Sprint Backlog (Active) in Editor Roadmap Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Sprint Backlog (Active)

Development

Successfully merging this pull request may close these issues.

1 participant