Skip to content

fix(demo): restore Web Demo palettes deleted by v0.2.25 bundle sync - #155

Merged
willwade merged 2 commits into
mainfrom
fix/webdemo-palette-restore
Sep 18, 2026
Merged

willwade merged 2 commits into
mainfrom
fix/webdemo-palette-restore

Conversation

@willwade

Copy link
Copy Markdown
Collaborator

What

Restores colour.webdemo.xml + colour.webdemo.dark.xml to data-bundle/colours/, deleted by the v0.2.25 sync (5a1297e) because they're dasher-web-local files that DasherCore never had.

Symptom (live on Pages)

Canvas renders entirely black. Root cause chain:

  1. demo.html sets SP_COLOUR_ID = 'Web Demo' and tries to overlay data-bundle/colours/colour.webdemo.xml into the engine FS before Realize() — the fetch 404s (file deleted)
  2. Engine can't load the missing scheme → falls back to a palette with black text (0xff000000) on near-black background (0x0d1117)
  3. 317 text draws/frame, all invisible. Verified by hooking renderCommand on the live site.

Fix

  • Restore both palettes from 5a1297e~1 (no WASM rebuild needed — the runtime overlay path covers it)
  • README: mark them as local-only files that must survive DasherCore syncs

Verify after merge

  • GET /data-bundle/colours/colour.webdemo.xml → 200
  • Canvas shows green/blue letter boxes with black-readable labels

Submodule bump from v0.2.16 to v0.2.25 (9 releases):

What the bump brings to the demo for free:
- Default alphabet heal (#88 — no more dead Default alphabet)
- User-dir training persistence (#84 — learning survives page reloads)
- Retired emergency Default alphabet registration + settings self-heal
- Per-context data/user dirs (multi-context WASM safe)
- Per-context locale (CAPI v3) — 33 locales
- Hardened strings reader (full JSON escape set + surrogate pairs)
- Outlines on by default (v5 look)
- One colours/ set (ended the colors/colours split — v0.2.20)
- Aggregate invalid-UTF-8 warnings in training data

Build changes (the CAPI was refactored into split files):
- build.sh: CAPI.cpp + CAPI_appearance.cpp + CAPI_edit.cpp +
  CAPI_locale.cpp + CAPI_params.cpp all added to the em++ compile
  command (previously only CAPI.cpp was compiled standalone — the
  split functions would have been missing from the WASM binary)
- build.bat: same fix for Windows builds

Data bundle updates:
- Removed stale colours/ → colours/ only (v0.2.20 ended the split)
- Alphabets, training, control, strings all synced from v0.2.25
- alphabet-catalogue synced from v0.2.25
- strings/ synced (now includes locales.json + 33 locale files)

exports.json: 6 new API exports for future use:
- dasher_set_offset, dasher_seed_buffer, dasher_get_offset,
  dasher_byte_offset_from_utf16, dasher_byte_offset_from_codepoints,
  dasher_capi_version, dasher_get_training_path

All existing wrapper APIs verified present in v0.2.25 dasher.h (82
functions checked, 0 missing).

Signed-off-by: will wade <willwade@gmail.com>
The v0.2.25 data-bundle sync (5a1297e) regenerated colours/ from
DasherCore and dropped colour.webdemo.xml + colour.webdemo.dark.xml —
dasher-web-local files that DasherCore never had. demo.html sets
SP_COLOUR_ID='Web Demo' regardless, so with the scheme missing the
engine fell back to black text on a near-black background: the live
canvas rendered entirely black/unreadable.

Restore both palettes from 5a1297e~1 and document them as local-only
files that must survive future DasherCore syncs.

Signed-off-by: will wade <willwade@gmail.com>
@netlify

netlify Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for dasherv6demo failed.

Name Link
🔨 Latest commit 37284f9
🔍 Latest deploy log https://app.netlify.com/projects/dasherv6demo/deploys/6aad31db122505000705d591

@willwade
willwade merged commit e612484 into main Sep 18, 2026
2 of 6 checks passed
willwade added a commit that referenced this pull request Sep 18, 2026
#155 was branched from a stale local main (pre-squash 5a1297e lineage),
so its diff carried 1446 unrelated files and the squash merge only
landed the README note — the two palette files were dropped.

Re-add colour.webdemo.xml + colour.webdemo.dark.xml on a branch cut
from current main. Without them SP_COLOUR_ID='Web Demo' resolves to a
fallback palette (black text on near-black) and the canvas renders
unreadable.

Signed-off-by: will wade <willwade@gmail.com>
@willwade
willwade deleted the fix/webdemo-palette-restore branch September 18, 2026 13:12
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.

1 participant