Skip to content

Move allocations to external RAM, http client method support, lvgl symbols - #792

Merged
KenVanHoeylandt merged 10 commits into
mainfrom
ram-hunt
Nov 30, 2026
Merged

KenVanHoeylandt merged 10 commits into
mainfrom
ram-hunt

Conversation

@KenVanHoeylandt

@KenVanHoeylandt KenVanHoeylandt commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

This frees up about 35 kB of internal RAM on a LilyGO T-Deck Plus.

Summary by CodeRabbit

  • New Features
    • HTTP requests now support methods including POST, PUT, PATCH, DELETE, OPTIONS, and HEAD, with optional request bodies.
  • Bug Fixes
    • Improved reliability of Bluetooth, Wi-Fi, mesh, and radio operations that access files, including handling failed operations and deferred saves.
    • Bluetooth HID workers now start and stop with the radio, keeping connected-device behavior aligned with radio availability.
  • Improvements
    • Mesh message storage can buffer writes before saving while preserving pending changes for later save attempts.
    • File-operation activity now includes labels in system logs, making operations easier to identify.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

File access in the mesh service and several other subsystems now runs through the file-operations task. File-operation subscriptions can carry tags that the worker logs. Mesh storage adds deferred writes, buffer growth, and index-based lookups. HTTP requests support additional methods and request bodies. Bluetooth and Wi-Fi workers gain lifecycle changes, and several threads use external-RAM stacks. The changes also update LVGL file-open logging and shell buffer allocation.

Merge Risk: Moderate · up to d5a7f

This change moves file access and thread stacks off internal RAM and adds HTTP method support. Several failure paths remain open. Wi-Fi worker handling has a data race, and the mesh store can drop acknowledged messages or delivery updates under delayed file work. Backend teardown can lose ownership, and radio settings can block the UI thread. These should be fixed or explicitly accepted before merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title names two real parts of the changeset: moving allocations to external RAM (the stack-marking changes across the Bluetooth, mesh, WiFi, ESP-NOW, and LVGL-adjacent files) and HTTP client metho…
Full details: Title check

Explanation

The title names two real parts of the changeset: moving allocations to external RAM (the stack-marking changes across the Bluetooth, mesh, WiFi, ESP-NOW, and LVGL-adjacent files) and HTTP client method support (the new http_client_send API and its backend changes). It also names LVGL symbols, which matches the lvgl_esp32.c wrapper and the file_ops_tag symbol export. The title does not state the main purpose, which is the file-operations task routing, and it lists three topics in one line, so it is broad. It is not unrelated or vague.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 11

Additional comments: 1

Modules/lvgl-module/source/arch/lvgl_esp32.c-31-31: 1

31-31: Minor · Stability & Availability · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Synchronize access to lvgl_task.

If another task calls fopen() during LVGL startup or shutdown, the wrapper reads this variable while the lifecycle code writes it. The wrapper does not participate in lifecycle locking. These non-atomic accesses create a data race in the global diagnostic path. (raw.githubusercontent.com)

Use atomic stores and one atomic load into a local variable for each wrapper call. This preserves forwarding and avoids inconsistent repeated reads.

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9f5d7c4a-3c8b-43d6-9aeb-5870bf31f9e7
Commits

Reviewing files that changed from the base of the PR and between f912ee6 and b65e398.

Files selected for processing: 31

  • CMakeLists.txt
  • Documentation/ideas.md
  • Drivers/gps-meshtastic-module/source/gps_meshtastic.cpp
  • Libraries/minitar/minitar
  • Modules/bluetooth-module/source/bluetooth_service.cpp
  • Modules/development-module/source/server.cpp
  • Modules/development-module/source/session_app.cpp
  • Modules/lvgl-module/source/arch/lvgl_esp32.c
  • Modules/lvgl-window-manager-module/source/file_dialog.cpp
  • Modules/mesh-meshcore-module/source/meshcore_backend.cpp
  • Modules/mesh-meshtastic-module/source/meshtastic_backend.cpp
  • Modules/mesh-module/include/mesh/backend.h
  • Modules/mesh-module/private/mesh/mesh_store.h
  • Modules/mesh-module/source/mesh_service.cpp
  • Modules/mesh-module/source/mesh_store.cpp
  • Modules/wifi-module/source/wifi_autoconnect.cpp
  • Modules/wifi-module/source/wifi_settings.cpp
  • Platforms/platform-esp32/private/bluetooth/esp32_ble_hid_host.h
  • Platforms/platform-esp32/source/drivers/bluetooth/esp32_ble.cpp
  • Platforms/platform-esp32/source/drivers/bluetooth/esp32_ble_hid.cpp
  • Platforms/platform-esp32/source/drivers/bluetooth/esp32_ble_hid_host.cpp
  • Platforms/platform-esp32/source/drivers/bluetooth/esp32_ble_identity.cpp
  • Platforms/platform-esp32/source/drivers/esp32_wifi_pinned.cpp
  • Platforms/platform-esp32/source/drivers/espnow/esp32_espnow_radio.cpp
  • Tactility/Source/app/fileselection/FileSelection.cpp
  • Tactility/Source/app/launcher/Launcher.cpp
  • Tactility/Source/app/terminal/Shell.cpp
  • TactilityKernel/include/tactility/file_ops.h
  • TactilityKernel/source/file_ops.cpp
  • TactilityKernel/source/radio_settings.cpp
  • TactilityKernel/source/symbols.c
Files with no reviewable changes: 1

  • Documentation/ideas.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread TactilityKernel/source/file_ops.cpp Resolved
@KenVanHoeylandt KenVanHoeylandt changed the title Move allocations to external RAM Move allocations to external RAM and add http client method support Nov 30, 2026
To save on quotas

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (2)

Major · Check message storage before acknowledging reception. · meshcore_backend.cpp:545

Modules/mesh-meshcore-module/source/meshcore_backend.cpp:545
Major · Data Integrity & Integration · Heavy lift

Check message storage before acknowledging reception.

If a delayed file worker lets the new bounded buffer fill, store.add can reject a valid direct message. This path has already queued its ACK and added recentTexts. It ignores the zero sequence returned by mesh_host_receive_text, so the sender can report delivery although the receiver discarded the message. A later flush cannot recover it. (raw.githubusercontent.com)

Store or retain the message before acknowledging it. If acceptance fails, leave both duplicate-suppression caches retryable. Successful acceptance must still send the ACK.

Minor · Retain failed delivery transitions for persistence retry. · meshcore_backend.cpp:610

Modules/mesh-meshcore-module/source/meshcore_backend.cpp:610
Minor · Data Integrity & Integration · Heavy lift

Retain failed delivery transitions for persistence retry.

If the delivery record cannot fit in the deferred buffer, setDelivery now restores the previous state. mesh_host_set_delivery hides that failure, and Line 618 still removes the pending send. The message can remain RETRYING after its ACK, with no operation left to mark it delivered. Flushing later does not recreate the rejected transition. (raw.githubusercontent.com)

Retain failed terminal transitions and retry persistence after space becomes available. Do not retransmit an already acknowledged message.

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4ee02905-8dd0-4c1c-b614-319af46e1936
Commits

Reviewing files that changed from the base of the PR and between b65e398 and d5a7fb6.

Files selected for processing: 16

  • Modules/bluetooth-module/source/bluetooth_service.cpp
  • Modules/http-module/include/http/client.h
  • Modules/http-module/private/http/private/client.h
  • Modules/http-module/source/client.cpp
  • Modules/http-module/source/client_esp.cpp
  • Modules/http-module/source/client_posix.cpp
  • Modules/http-module/source/module.cpp
  • Modules/http-module/tests/source/client_test.cpp
  • Modules/lvgl-module/source/arch/lvgl_esp32.c
  • Modules/mesh-meshcore-module/source/meshcore_backend.cpp
  • Modules/mesh-module/source/mesh_service.cpp
  • Modules/mesh-module/source/mesh_store.cpp
  • Platforms/platform-esp32/source/drivers/bluetooth/esp32_ble_hid_host.cpp
  • Platforms/platform-esp32/source/drivers/esp32_wifi_pinned.cpp
  • Platforms/platform-esp32/source/drivers/espnow/esp32_espnow_radio.cpp
  • TactilityKernel/source/file_ops.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@KenVanHoeylandt KenVanHoeylandt changed the title Move allocations to external RAM and add http client method support Move allocations to external RAM, http client method support, lvgl symbols Nov 30, 2026
@KenVanHoeylandt
KenVanHoeylandt merged commit bbf80c6 into main Nov 30, 2026
2 of 23 checks passed
@KenVanHoeylandt
KenVanHoeylandt deleted the ram-hunt branch November 30, 2026 18:13
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