fix(gamebook): scroll long passages + DELETE /game/file #39

Merged
electron merged 1 commits from fix/gamebook-scroll-and-delete into main 2026-06-19 14:30:34 +00:00
Owner

Body label scrolls (no more clipped passages); add DELETE /game/file to clean orphan SD assets. Hardware-validated.

Body label scrolls (no more clipped passages); add DELETE /game/file to clean orphan SD assets. Hardware-validated.
electron added 1 commit 2026-06-19 14:30:29 +00:00
fix(gamebook): scroll long passages + DELETE /game/file
CI / platformio (push) Failing after 5m21s
CI / platformio (pull_request) Failing after 5m25s
0027970907
Context:
Two issues surfaced with the longer kid stories: (1) long passages were
clipped on screen — the body label wrapped in a fixed 196px band and
the tail was simply cut off; (2) old orphan WAVs (demo + archived
adventures) piled up on the SD with no way to remove them, since the
master had POST /game/file but no delete.

Approach:
Make the gamebook body label scroll vertically so the whole passage
goes by, and add a DELETE verb to /game/file mirroring the POST routing
so the host can clean stale assets off the SD.

Changes:
- display_ui: gamebook body label LV_LABEL_LONG_WRAP ->
  LV_LABEL_LONG_SCROLL_CIRCULAR; body buffer 512 -> 1100 so a full
  ~1000-char passage is held and scrolled, not truncated.
- game_endpoint: new DELETE /game/file?path=sd/<…>|apps/<…> (same
  whitelist/traversal guard as POST; unlink + 200/404).
- ota_server: max_uri_handlers 22 -> 24 for the extra verb.

Impact:
Long passages are fully readable on the LCD (they scroll), and the SD
gamebook folder can be cleaned remotely. Hardware-validated: 121 orphan
files deleted, library still opens 6 stories.
electron merged commit 0027970907 into main 2026-06-19 14:30:34 +00:00
Sign in to join this conversation.