Skip to content

system/nxstore: Add LVGL touchscreen app-store frontend. - #3643

Open
aviralgarg05 wants to merge 8 commits into
apache:masterfrom
aviralgarg05:gsoc/nxstore-app-store-ui-pr6
Open

system/nxstore: Add LVGL touchscreen app-store frontend.#3643
aviralgarg05 wants to merge 8 commits into
apache:masterfrom
aviralgarg05:gsoc/nxstore-app-store-ui-pr6

Conversation

@aviralgarg05

@aviralgarg05 aviralgarg05 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Note: Please adhere to Contributing Guidelines.

Depends-On: /pull/3720

Summary

Installing a package meant typing nxpkg commands on a serial console. On
a board whose only input is a touchscreen there was no way to do it at all.

This adds a small LVGL front end over the existing nxpkg library: it
lists what the synchronized catalog offers, shows which versions are
installed, and installs and launches a package on a tap. It calls the
library directly rather than shelling out, so it gets real error codes back
and can tell a download failure from a digest mismatch.

A launched application is supervised: nxstore keeps its pid, asks it to
exit with SIGTERM when the user closes it, and returns to the list once the
child is reaped. include/system/nxstore_chrome.h describes that contract
for applications that want to cooperate with it.

The diff previously carried the system/nxpkg commits it was branched
from; those are now the separate series ending at #3720, and this contains
only the front end.

Impact

  • New feature: YES, a graphical package front end.
  • User adaptation: NO. nxpkg on the console is unaffected.
  • Build: New application, selected in Kconfig.
  • Hardware: Needs a framebuffer and a touchscreen; no driver change.
  • Documentation: The companion documentation is Documentation: Update nxpkg and add nxstore guide. nuttx#18875.
  • Security: NO new boundary. Installation goes through the same verified
    path as the command line.
  • Compatibility: Independent of existing applications.

Testing

Build host: macOS 26.5, arm64, xtensa-esp-elf-gcc 14.2.0
(esp-14.2.0_20251107).

Target: Xtensa / ESP32-S3, Waveshare ESP32-S3-Touch-LCD-7, 800x480 RGB565
with a GT911 touchscreen.

  • nxstyle, tools/checkpatch.sh, codespell and git diff --check
  • built for the target on top of the system/nxpkg series

On the board: the catalog was listed, a package was installed and launched
by tapping it, closing it sent SIGTERM and the application exited on its
own, and the list came back with the package now shown as installed.

This does not build on master alone because it uses the nxpkg library;
the Depends-On line above lets CI apply that series first.

PR verification Self-Check

  • This PR introduces one focused change.
  • I have updated all required description fields above.
  • I have reviewed and signed every commit.
  • This PR adheres to the current contribution and coding guidelines.
  • My PR is still work in progress.
  • My PR is ready for review and can be safely merged.

@acassis

acassis commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@aviralgarg05 nice work, please include a scheenshot in the Testing. Also please add a companion nuttx/Documentation

@aviralgarg05
aviralgarg05 force-pushed the gsoc/nxstore-app-store-ui-pr6 branch from 513edde to 79daf2c Compare July 24, 2026 10:01
@aviralgarg05 aviralgarg05 changed the title system/nxstore: add LVGL touchscreen app-store frontend system/nxstore: Add LVGL touchscreen app-store frontend. Jul 24, 2026
@aviralgarg05

Copy link
Copy Markdown
Contributor Author

Thanks. I have added a photograph of NXStore running on the ESP32-S3 target to the Testing section. The companion documentation is in apache/nuttx#18875, and the later signed-tree build and serial evidence remain recorded in the PR description.

@acassis

acassis commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Thanks. I have added a photograph of NXStore running on the ESP32-S3 target to the Testing section. The companion documentation is in apache/nuttx#18875, and the later signed-tree build and serial evidence remain recorded in the PR description.

@aviralgarg05 please double check, there is not screenshot in apache/nuttx#18875

@aviralgarg05

Copy link
Copy Markdown
Contributor Author

@aviralgarg05 please double check, there is not screenshot in apache/nuttx#18875

Sorry, missed it, Done now

@acassis

acassis commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@aviralgarg05 please double check, there is not screenshot in apache/nuttx#18875

Sorry, missed it, Done now

don't worry

Installing a package meant typing nxpkg commands on a serial console, so
on a board whose only input is a touchscreen there was no way to do it.

Add nxstore, which lists what the synchronized catalog offers, shows which
packages are installed, and installs and launches one on a tap. It calls
the nxpkg library directly rather than shelling out, so it gets the real
error code back and can say why an install failed.

A launched application gets its own screen with a Close button, drawn only
in the border region a scaled and centred framebuffer image does not cover,
so returning to it does not overwrite what the application has already put
on screen. Close sends SIGTERM and waits for the child; both the button
handler and the idle poll can reap it, so each treats ECHILD as "already
gone" rather than waiting for a wait() that can no longer succeed.

Closing therefore needs the application to handle SIGTERM itself. There is
deliberately no force-kill fallback: an earlier version called
task_delete() when a child did not exit quickly enough, and on this flat
memory build that hung the whole board rather than the one task when it
landed in the middle of a framebuffer or heap access.

The boot-time catalog sync waits up to fifteen seconds for DHCP before
trying to fetch. Association completing does not mean an address has been
assigned, and a fetch attempted in that window fails with -ENETUNREACH,
which is indistinguishable from being offline.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
…dware.

The device paths were borrowed from an unrelated example application, so a
board that wanted nxstore had to configure lvgldemo as well. It now has its
own framebuffer and input path settings. The catalog also moves off the
stack onto the heap, with a message on the screen if that allocation fails,
and the title buffer is sized from the name and version limits rather than
a fixed length that the compiler warned could truncate.

Launching an installed package now reads the manifest recorded for the
version that is actually on disk, and passes through the arguments it
declares. Combining an installed version with whatever the catalog
currently says about that name gives the wrong answer after a rollback.

Three faults showed up bringing this up on the board. A long press could
fire for a touch that was really starting a scroll, because the timer
elapses before the finger travels far enough for LVGL to commit to the
gesture, which silently uninstalled whichever package was under the finger.
Tapping a second package while an install was still running replaced the
supervised child, leaving the first one alive with nothing watching it and
no way to close it. And a package was shown as installed whether or not the
installed version was the latest, so tapping it launched a stale payload
with no indication an update existed; an out-of-date package now says so
and tapping it updates.

Also loads a package's optional icon, cached as a raw RGB565 image LVGL can
draw without a decoder. Anything wrong with the icon falls back to the
existing glyph, so a bad one never stops a package being listed.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Remove the dependency on an ESP-specific DHCP global. Retry catalog synchronization for a bounded period only while the network stack reports readiness-related errors, allowing the same frontend to work with Wi-Fi, Ethernet, and other boards.

Keep the LVGL timer serviced between attempts so the interface remains responsive while the network comes up.

Assisted-by: Codex:gpt-5
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Use nxstore-owned framebuffer and input configuration symbols instead of relying on an unrelated LVGL demo configuration.

Load the manifest for the installed version before launching it, validate that it matches the installed database entry, and pass its recorded arguments to posix_spawn(). Check spawn-attribute setup errors as well.

Add the shared supervisor-bar height header to the nxstore change itself so the branch builds independently and framebuffer applications can follow the required reserved-strip contract.

Assisted-by: Codex:gpt-5
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Keep the list behavior documentation consistent with the 20-pixel threshold used by the tested implementation.

Assisted-by: OpenAI Codex:gpt-5.6-sol
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Read cached icons completely, validate the RGB565 format and exact payload size, and discard corrupt cache entries so a later launch can retry acquisition.

Key the local cache by package name and version so a catalog update cannot silently reuse an older icon.

Assisted-by: OpenAI Codex:gpt-5.6-sol
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
@aviralgarg05
aviralgarg05 force-pushed the gsoc/nxstore-app-store-ui-pr6 branch from 79daf2c to e93ea02 Compare August 14, 2026 15:12
@aviralgarg05
aviralgarg05 marked this pull request as ready for review August 14, 2026 15:14
@aviralgarg05
aviralgarg05 force-pushed the gsoc/nxstore-app-store-ui-pr6 branch 2 times, most recently from e37eeeb to 7badb69 Compare August 14, 2026 15:51
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx-apps/actions/runs/31816523839

@linguini1 linguini1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly not going to finish reviewing this unless more effort is put into these patches to review AI output. These comments are way too long, some of the ones submitted before have been unrelated, and this is a consistent issue.

Comment thread system/nxstore/nxstore_main.c Outdated
Comment thread system/nxstore/nxstore_main.c Outdated
Comment thread system/nxstore/nxstore_main.c Outdated
@linguini1

Copy link
Copy Markdown
Contributor

On the board: the catalog was listed, a package was installed and launched by tapping it, closing it sent SIGTERM and the application exited on its
own, and the list came back with the package now shown as installed.

Show this. Text description is not enough.

Remove long comments that restate the install flow.

Assisted-by: OpenAI Codex:gpt-5.6-sol
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
@aviralgarg05
aviralgarg05 force-pushed the gsoc/nxstore-app-store-ui-pr6 branch from e5a969a to 68f50e7 Compare August 15, 2026 10:02
@aviralgarg05

Copy link
Copy Markdown
Contributor Author

Show this. Text description is not enough.

Will record a video of it, and put up asap

Remove implementation history and keep only the required invariants.

Assisted-by: OpenAI Codex:gpt-5.6-sol
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx-apps/actions/runs/31879473762

@linguini1

Copy link
Copy Markdown
Contributor

Even just photos is fine

Comment thread system/nxstore/Kconfig
default n
depends on GRAPHICS_LVGL && SYSTEM_NXPKG
select NETUTILS_CJSON
select SCHED_WAITPID

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change select to depend on

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@aviralgarg05 squash you change into one patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants