Skip to content

fix: import bare Picture filenames as literal paths - #21

Merged
RandomChirp merged 1 commit into
FoxDevCommunity:mainfrom
edname:codex/picture-filename-import
Oct 5, 2026
Merged

RandomChirp merged 1 commit into
FoxDevCommunity:mainfrom
edname:codex/picture-filename-import

Conversation

@edname

@edname edname commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Import bare Picture filenames as literal paths

An SCX Properties memo can contain Picture = sample.bmp. The importer currently
stores that filename in meta.vfp.expressions and leaves the Image's Picture
unset. At runtime the filename is evaluated as code instead of reaching the
image renderer as a path.

Recognize bare paths ending in common graphics extensions for registered Picture
properties. Preserve quoted literals and defer computed expressions as before.
A later literal Picture also clears an earlier deferred Picture expression.
The generic value parser and unrelated properties are unchanged.

Synthetic decoded SCX fixtures cover filenames, relative and absolute paths,
spaces, quoted values, expression cases and overrides. A runtime lifecycle test
checks that the imported filename is available without evaluating it as code.
Before the fix, four filename cases and the lifecycle case fail.

Validation on macOS arm64:

  • Shared tests plus runtime expression-property tests: 157 passed.
  • Focused ESLint, TypeScript checks, production build and diff checks passed.
  • Build used the existing prebuilt nightly WASM for the unchanged Rust sources;
    Rust was not rebuilt and Windows/VFP runtime validation was not performed.

This is deliberately bounded filename recognition, not a complete SCX expression
parser. Unquoted filenames containing expression punctuation and unsupported
extensions are outside this rule; quoted paths remain supported. Dotted names
can be ambiguous, so qualified built-in references and macro syntax are excluded.
This does not fix standalone-player asset roots, copy images into bundles, or
change Icon/DisabledPicture/DownPicture handling.

Developed with AI assistance; regression tests use synthetic fixtures only.

@RandomChirp
RandomChirp merged commit 6381417 into FoxDevCommunity:main Oct 5, 2026
3 checks passed
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