3.7 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, documentation, priority, ordinal
| id | title | status | assignee | created_date | updated_date | labels | dependencies | documentation | priority | ordinal | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ML-197 | Provide Elm-style Presto Music Library application | In Progress |
|
2026-05-26 05:39 | 2026-05-26 05:43 |
|
|
medium | 30000 |
Description
Add an alternative Presto Music Library application organized around the message/update/view architecture demonstrated by the local proof of concept, while retaining the user-facing behavior of the existing device application.
Acceptance Criteria
- #1 A
music_library.pyapplication exposes the existing Home, calendar/day browsing, search, record detail, scrobble, network error, and display sleep interactions through the Elm-style runtime. - #2 Scrolling, cover loading, wake handling, and API request behavior remain consistent with the current Presto app constraints.
- #3 Headless verification covers the new application screens and prevents accidental network access during render tests.
- #4 User-facing or deployment documentation is updated if introducing the alternative application changes available usage or verification instructions.
Implementation Plan
- Add a standalone
presto/music_library.pyentrypoint that remains deployable as devicemain.py, retaining the current screens, layout, API behavior, cached cover handling, scroll throttling, partial updates, and sleep/wake behavior. - Reshape application control flow around the POC contract: application model/runtime state, message constants, effect constants, pure state transitions in
update(), hardware polling inwire_events(), effect execution inrun_effect(), queued dispatch, and screen rendering inrender(). - Keep network activity out of render hot paths in the new entrypoint, including routing initial detail-cover loading through an effect before detail rendering while using cached/placeholder imagery during drag redraws.
- Extend emulator coverage for
music_library.py, retaining the render/partial-update/image safety contracts and adding focused coverage of message/effect orchestration. - Add a deployment task for the architecture-based entrypoint and update
presto/README.mdwith its optional deployment and verification path; no root architecture or production-infrastructure update is required because the API/default app contract is unchanged. - Verify with syntax compilation and
mise run test; do not claim physical device behavior without hardware testing.
Implementation Notes
Read the project architecture, Presto guidance, README, project conventions, available task guidance, and testing skill before implementation. The change is scoped as one focused port with verification.
Inspected presto/poc.py, presto/main.py, test harness, and presto/mise.toml. The POC boundary is Model/Runtime plus messages, update, commands, dispatch, run_effect, and render; the current app invokes navigation/network/redraw directly in its polling loop. main.py also downloads the medium detail cover from drawing code, which should be preloaded by an effect in the new entrypoint to preserve a render-only view path. Existing smoke tests assert display regions, cover-size contracts, drag placeholders, and every visible screen.
User approved the implementation plan on 2026-05-26 and requested that this task record be committed before application work begins.