Skip to content

Refactored events - #621

Open
KenVanHoeylandt wants to merge 8 commits into
mainfrom
develop
Open

Refactored events#621
KenVanHoeylandt wants to merge 8 commits into
mainfrom
develop

Conversation

@KenVanHoeylandt

@KenVanHoeylandt KenVanHoeylandt commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added unified event handling for application, system, and Wi‑Fi events.
    • Added direct Wi‑Fi radio controls and improved event subscriptions.
    • Wi‑Fi screens now refresh asynchronously and handle unavailable devices more gracefully.
    • Enabled Wi‑Fi by default on supported device configurations.
    • Renamed the Kernel Display app to Display.
  • Bug Fixes

    • Improved Wi‑Fi shutdown cleanup and radio-state handling.
    • Improved event delivery, queue handling, timeout behavior, and application close handling.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change introduces caller-owned task event groups with exclusive readiness bits and non-blocking app and system event polling. Wi-Fi drivers replace callback arrays with FIFO subscriptions, radio control APIs, and event-group signaling. The Wi-Fi service and Wi-Fi applications consume device events through dedicated polling flows. Application entry points migrate to explicit event-group loops. Tests cover combined event readiness, polling, timeouts, subscription lifecycle, and driver behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.66% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 122 functions across 51 files. (3 skipped: 2 unsupported, 1 over the file limit.) Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: the pull request refactors application, system, and Wi-Fi event handling.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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

Comment @coderabbitai help to get the list of available commands.

@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: 7

🧹 Nitpick comments (2)
Tactility/Source/app/grovesettings/GroveSettings.cpp (1)

96-124: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider a shared event-loop helper for the repeated boilerplate.

This exact 15-line sequence (construct group, subscribe, wait, drain, unsubscribe, destruct) now appears in every migrated app. A small RAII helper in the app framework would keep the per-app code to the event switch only, and would centralize future changes such as error handling of app_event_subscribe() or drain semantics. This can be deferred to a follow-up.

Modules/app-module/source/symbols.cpp (1)

25-32: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the duplicate task_event_group_* exports.

root_module starts before other modules, and global resolution returns the first matching symbol without rejecting duplicates. Keep these symbols in KERNEL_SYMBOLS only.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a3f589b8-6782-424f-8594-097d04338b0d

📥 Commits

Reviewing files that changed from the base of the PR and between db48dfe and f151543.

📒 Files selected for processing (69)
  • .claude/rules/app-framework.md
  • Documentation/ideas.md
  • Modules/app-module/include/app/event.h
  • Modules/app-module/source/event.cpp
  • Modules/app-module/source/symbols.cpp
  • Modules/app-module/tests/source/app_event_test.cpp
  • Modules/app-module/tests/source/app_manager_test.cpp
  • Modules/app-module/tests/source/combined_event_test.cpp
  • Platforms/platform-esp32/CMakeLists.txt
  • Platforms/platform-esp32/source/drivers/esp32_wifi.cpp
  • Platforms/platform-esp32/source/drivers/esp32_wifi_pinned.cpp
  • Platforms/platform-posix/source/drivers/mock_wifi.cpp
  • Tactility/Include/Tactility/service/wifi/Wifi.h
  • Tactility/Source/Tactility.cpp
  • Tactility/Source/app/addgps/AddGps.cpp
  • Tactility/Source/app/alertdialog/AlertDialog.cpp
  • Tactility/Source/app/appdetails/AppDetails.cpp
  • Tactility/Source/app/apphub/AppHubApp.cpp
  • Tactility/Source/app/apphubdetails/AppHubDetailsApp.cpp
  • Tactility/Source/app/applist/AppList.cpp
  • Tactility/Source/app/appsettings/AppSettings.cpp
  • Tactility/Source/app/apwebserver/ApWebServer.cpp
  • Tactility/Source/app/audiosettings/AudioSettings.cpp
  • Tactility/Source/app/boot/Boot.cpp
  • Tactility/Source/app/btmanage/BtManage.cpp
  • Tactility/Source/app/btpeersettings/BtPeerSettings.cpp
  • Tactility/Source/app/chat/ChatApp.cpp
  • Tactility/Source/app/crashdiagnostics/CrashDiagnostics.cpp
  • Tactility/Source/app/development/Development.cpp
  • Tactility/Source/app/files/FilesApp.cpp
  • Tactility/Source/app/fileselection/FileSelection.cpp
  • Tactility/Source/app/gpssettings/GpsSettings.cpp
  • Tactility/Source/app/grovesettings/GroveSettings.cpp
  • Tactility/Source/app/i2cscanner/I2cScanner.cpp
  • Tactility/Source/app/imageviewer/ImageViewer.cpp
  • Tactility/Source/app/inputdialog/InputDialog.cpp
  • Tactility/Source/app/kerneldisplay/KernelDisplay.cpp
  • Tactility/Source/app/keyboard/KeyboardSettings.cpp
  • Tactility/Source/app/launcher/Launcher.cpp
  • Tactility/Source/app/localesettings/LocaleSettings.cpp
  • Tactility/Source/app/notes/Notes.cpp
  • Tactility/Source/app/power/Power.cpp
  • Tactility/Source/app/poweroff/PowerOff.cpp
  • Tactility/Source/app/screenshot/Screenshot.cpp
  • Tactility/Source/app/selectiondialog/SelectionDialog.cpp
  • Tactility/Source/app/settings/Settings.cpp
  • Tactility/Source/app/setup/Setup.cpp
  • Tactility/Source/app/systeminfo/SystemInfo.cpp
  • Tactility/Source/app/timedatesettings/TimeDateSettings.cpp
  • Tactility/Source/app/timezone/TimeZone.cpp
  • Tactility/Source/app/touchcalibration/TouchCalibration.cpp
  • Tactility/Source/app/trackball/TrackballSettings.cpp
  • Tactility/Source/app/usbsettings/UsbSettings.cpp
  • Tactility/Source/app/webserversettings/WebServerSettings.cpp
  • Tactility/Source/app/wifiapsettings/WifiApSettings.cpp
  • Tactility/Source/app/wificonnect/WifiConnect.cpp
  • Tactility/Source/app/wifimanage/WifiManage.cpp
  • Tactility/Source/service/espnow/EspNowHostedTransport.cpp
  • Tactility/Source/service/wifi/Wifi.cpp
  • TactilityKernel/include/tactility/concurrent/task_event_group.h
  • TactilityKernel/include/tactility/drivers/wifi.h
  • TactilityKernel/include/tactility/system_event.h
  • TactilityKernel/source/concurrent/task_event_group.cpp
  • TactilityKernel/source/drivers/wifi.cpp
  • TactilityKernel/source/symbols.c
  • TactilityKernel/source/system_event.cpp
  • TactilityKernel/tests/source/system_event_test.cpp
  • TactilityKernel/tests/source/task_event_group_test.cpp
  • Tests/SdkIntegration/main/Source/main.c
💤 Files with no reviewable changes (2)
  • Tactility/Source/Tactility.cpp
  • Tactility/Include/Tactility/service/wifi/Wifi.h

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

Comment thread Modules/app-module/include/app/event.h
Comment thread Platforms/platform-esp32/source/drivers/esp32_wifi.cpp
Comment thread Platforms/platform-posix/source/drivers/mock_wifi.cpp
Comment thread Platforms/platform-posix/source/drivers/mock_wifi.cpp
Comment thread Tactility/Source/app/wifimanage/WifiManage.cpp
Comment thread Tactility/Source/service/wifi/Wifi.cpp
Comment thread TactilityKernel/include/tactility/drivers/wifi.h

@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: 4

Caution

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

⚠️ Outside diff range comments (1)
Tactility/Source/service/wifi/Wifi.cpp (1)

537-539: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Fail service startup when the Wi-Fi event consumer cannot start.

When startWifiEventThread() fails, onStart() only logs the error and still returns success. The service then exposes a started device without consuming scan, connection, or disconnection events. Auto-connect and connection-state updates will not work.

Stop and release the device, clear the pause callback, and return startup failure instead of entering this degraded state.

Proposed direction
             if (!startWifiEventThread()) {
                 LOG_E(TAG, "Failed to subscribe to WiFi events");
+                device_stop(state.device);
+                device_put(state.device);
+                state.device = nullptr;
+                wifi_auto_scan_set_paused_function(nullptr);
+                return false;
             }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6484b589-88b6-482b-8299-f0e4a9ee4d00

📥 Commits

Reviewing files that changed from the base of the PR and between f151543 and c5ae4d1.

📒 Files selected for processing (39)
  • Modules/app-module/include/app/event.h
  • Modules/app-module/source/event.cpp
  • Modules/app-module/source/symbols.cpp
  • Platforms/platform-esp32/source/drivers/esp32_wifi.cpp
  • Platforms/platform-posix/source/drivers/mock_wifi.cpp
  • Tactility/Source/Tactility.cpp
  • Tactility/Source/app/apphub/AppHubApp.cpp
  • Tactility/Source/app/applist/AppList.cpp
  • Tactility/Source/app/appsettings/AppSettings.cpp
  • Tactility/Source/app/apwebserver/ApWebServer.cpp
  • Tactility/Source/app/audiosettings/AudioSettings.cpp
  • Tactility/Source/app/boot/Boot.cpp
  • Tactility/Source/app/btmanage/BtManage.cpp
  • Tactility/Source/app/chat/ChatApp.cpp
  • Tactility/Source/app/crashdiagnostics/CrashDiagnostics.cpp
  • Tactility/Source/app/development/Development.cpp
  • Tactility/Source/app/display/Display.cpp
  • Tactility/Source/app/fileselection/FileSelection.cpp
  • Tactility/Source/app/i2cscanner/I2cScanner.cpp
  • Tactility/Source/app/imageviewer/ImageViewer.cpp
  • Tactility/Source/app/inputdialog/InputDialog.cpp
  • Tactility/Source/app/keyboard/KeyboardSettings.cpp
  • Tactility/Source/app/launcher/Launcher.cpp
  • Tactility/Source/app/localesettings/LocaleSettings.cpp
  • Tactility/Source/app/power/Power.cpp
  • Tactility/Source/app/poweroff/PowerOff.cpp
  • Tactility/Source/app/screenshot/Screenshot.cpp
  • Tactility/Source/app/selectiondialog/SelectionDialog.cpp
  • Tactility/Source/app/settings/Settings.cpp
  • Tactility/Source/app/systeminfo/SystemInfo.cpp
  • Tactility/Source/app/timezone/TimeZone.cpp
  • Tactility/Source/app/touchcalibration/TouchCalibration.cpp
  • Tactility/Source/app/trackball/TrackballSettings.cpp
  • Tactility/Source/app/usbsettings/UsbSettings.cpp
  • Tactility/Source/app/webserversettings/WebServerSettings.cpp
  • Tactility/Source/app/wifimanage/WifiManage.cpp
  • Tactility/Source/service/wifi/Wifi.cpp
  • TactilityKernel/include/tactility/drivers/wifi.h
  • TactilityKernel/source/system_event.cpp

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

Comment thread Platforms/platform-esp32/source/drivers/esp32_wifi.cpp
Comment thread Tactility/Source/app/selectiondialog/SelectionDialog.cpp
Comment thread Tactility/Source/service/wifi/Wifi.cpp
Comment thread TactilityKernel/source/system_event.cpp

@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

🧹 Nitpick comments (1)
Tactility/Source/app/appsettings/AppSettings.cpp (1)

93-121: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Extract the repeated event-loop block into one helper. Every reviewed application repeats the same sequence: construct a TaskEventGroup, fill an AppEventSubscription, wait with task_event_group_wait_any(), drain with app_event_poll(), and stop on APP_EVENT_CLOSE. The stack outline lists about 40 files with this block. Each copy also ignores the app_event_subscribe() result, so a fix must be applied 40 times. A helper such as app_event_run_until_close(appInstanceId, TaskEventGroup*, AppEventSubscription*), or a small RAII wrapper for subscribe/unsubscribe, removes the duplication and centralizes error handling.

  • Tactility/Source/app/appsettings/AppSettings.cpp#L93-L121: replace the inline loop with the shared helper; this is the representative copy.
  • Tactility/Source/app/apwebserver/ApWebServer.cpp#L129-L153: replace the inline loop with the shared helper.
  • Tactility/Source/app/audiosettings/AudioSettings.cpp#L218-L242: replace the inline loop with the shared helper, then keep the audio-pubsub unsubscribe in place.
  • Tactility/Source/app/development/Development.cpp#L177-L216: replace the inline loop with the shared helper, then keep the timer stop in place.
  • Tactility/Source/app/fileselection/FileSelection.cpp#L65-L86: replace the while (true) variant with the shared helper.
  • Tactility/Source/app/i2cscanner/I2cScanner.cpp#L391-L416: replace the inline loop with the shared helper, and move the stopScanningIfRunning() call after the helper returns.
  • Tactility/Source/app/localesettings/LocaleSettings.cpp#L148-L172: replace the inline loop with the shared helper.
  • Tactility/Source/app/screenshot/Screenshot.cpp#L253-L277: replace the inline loop with the shared helper.
  • Tactility/Source/app/selectiondialog/SelectionDialog.cpp#L107-L128: replace the while (true) variant with the shared helper.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: afb1c830-8878-4fc7-8788-db77c529c285

📥 Commits

Reviewing files that changed from the base of the PR and between c5ae4d1 and 9fe4753.

📒 Files selected for processing (33)
  • Documentation/ideas.md
  • Modules/app-module/include/app/event.h
  • Modules/app-module/source/event.cpp
  • Modules/app-module/source/symbols.cpp
  • Tactility/Source/app/apphub/AppHubApp.cpp
  • Tactility/Source/app/applist/AppList.cpp
  • Tactility/Source/app/appsettings/AppSettings.cpp
  • Tactility/Source/app/apwebserver/ApWebServer.cpp
  • Tactility/Source/app/audiosettings/AudioSettings.cpp
  • Tactility/Source/app/boot/Boot.cpp
  • Tactility/Source/app/btmanage/BtManage.cpp
  • Tactility/Source/app/chat/ChatApp.cpp
  • Tactility/Source/app/crashdiagnostics/CrashDiagnostics.cpp
  • Tactility/Source/app/development/Development.cpp
  • Tactility/Source/app/display/Display.cpp
  • Tactility/Source/app/fileselection/FileSelection.cpp
  • Tactility/Source/app/i2cscanner/I2cScanner.cpp
  • Tactility/Source/app/imageviewer/ImageViewer.cpp
  • Tactility/Source/app/inputdialog/InputDialog.cpp
  • Tactility/Source/app/keyboard/KeyboardSettings.cpp
  • Tactility/Source/app/launcher/Launcher.cpp
  • Tactility/Source/app/localesettings/LocaleSettings.cpp
  • Tactility/Source/app/power/Power.cpp
  • Tactility/Source/app/poweroff/PowerOff.cpp
  • Tactility/Source/app/screenshot/Screenshot.cpp
  • Tactility/Source/app/selectiondialog/SelectionDialog.cpp
  • Tactility/Source/app/settings/Settings.cpp
  • Tactility/Source/app/systeminfo/SystemInfo.cpp
  • Tactility/Source/app/timezone/TimeZone.cpp
  • Tactility/Source/app/touchcalibration/TouchCalibration.cpp
  • Tactility/Source/app/trackball/TrackballSettings.cpp
  • Tactility/Source/app/usbsettings/UsbSettings.cpp
  • Tactility/Source/app/webserversettings/WebServerSettings.cpp
💤 Files with no reviewable changes (3)
  • Modules/app-module/include/app/event.h
  • Modules/app-module/source/symbols.cpp
  • Modules/app-module/source/event.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • Documentation/ideas.md

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

Comment thread Tactility/Source/app/appsettings/AppSettings.cpp
Comment on lines 214 to 218
window_manager_remove(window);
app_event_unsubscribe(&sub);
task_event_group_destruct(&event_group);

service::espnow::unsubscribeReceiver(ctx.receiveSubscription);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Unsubscribe the ESP-NOW receiver before destroying the window.

onReceive() can call ctx->view.displayMessage() from the receiver callback. The current order removes the window before unsubscribeReceiver() runs. A packet received during this interval can access destroyed LVGL widgets.

Unsubscribe the receiver, and ensure that unsubscription quiesces in-flight callbacks, before window_manager_remove(window).

Comment thread Tactility/Source/app/i2cscanner/I2cScanner.cpp

@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.

Caution

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

⚠️ Outside diff range comments (2)
Tactility/Source/service/wifi/Wifi.cpp (2)

104-107: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Handle pending radio states explicitly.

isRadioOn() returns false for both WIFI_RADIO_STATE_OFF and WIFI_RADIO_STATE_ON_PENDING. If the radio is WIFI_RADIO_STATE_ON_PENDING and enabled is false, dispatchSetEnabled() returns without calling wifi_set_radio_off(). The pending enable can then complete after the user requested disable. Query the full WifiRadioState and handle WIFI_RADIO_STATE_ON_PENDING and WIFI_RADIO_STATE_OFF_PENDING as transitions.

Proposed direction
-    if (enabled == isRadioOn()) {
+    WifiRadioState radio = WIFI_RADIO_STATE_OFF;
+    if (wifi_get_radio_state(state.device, &radio) != ERROR_NONE) {
+        LOG_E(TAG, "Failed to query WiFi radio state");
+        return;
+    }
+    if ((enabled && radio == WIFI_RADIO_STATE_ON) ||
+        (!enabled && radio == WIFI_RADIO_STATE_OFF)) {
         LOG_W(TAG, "Can't enable/disable from current state");
         return;
     }

Also applies to: 179-182


539-541: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Fail startup when the event consumer cannot start.

When startWifiEventThread() returns false, onStart() only logs the failure and continues. The service then reports successful startup with an active device but no consumer for scan-finished or station-connection-result events. Auto-connect and connection-state cleanup will not run. Retry the subscription or stop and release the device before returning false.

Proposed cleanup
             if (!startWifiEventThread()) {
                 LOG_E(TAG, "Failed to subscribe to WiFi events");
+                device_stop(state.device);
+                device_put(state.device);
+                state.device = nullptr;
+                wifi_auto_scan_set_paused_function(nullptr);
+                return false;
             }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b3c82151-f72f-4680-9f0f-05fe5af511f7

📥 Commits

Reviewing files that changed from the base of the PR and between 9fe4753 and 5f41c7d.

📒 Files selected for processing (50)
  • Devices/btt-panda-touch/bigtreetech,panda-touch.dts
  • Devices/cyd-2432s024c/cyd,2432s024c.dts
  • Devices/cyd-2432s024r/cyd,2432s024r.dts
  • Devices/cyd-2432s028r/cyd,2432s028r.dts
  • Devices/cyd-2432s028rv3/cyd,2432s028rv3.dts
  • Devices/cyd-2432s032c/cyd,2432s032c.dts
  • Devices/cyd-3248s035c/cyd,3248s035c.dts
  • Devices/cyd-4848s040c/cyd,4848s040c.dts
  • Devices/cyd-8048s043c/cyd,8048s043c.dts
  • Devices/cyd-e32r28t/cyd,e32r28t.dts
  • Devices/cyd-e32r32p/cyd,e32r32p.dts
  • Devices/elecrow-crowpanel-advance-28/elecrow,crowpanel-advance-28.dts
  • Devices/elecrow-crowpanel-advance-35/elecrow,crowpanel-advance-35.dts
  • Devices/elecrow-crowpanel-advance-50/elecrow,crowpanel-advance-50.dts
  • Devices/elecrow-crowpanel-basic-28/elecrow,crowpanel-basic-28.dts
  • Devices/elecrow-crowpanel-basic-35/elecrow,crowpanel-basic-35.dts
  • Devices/elecrow-crowpanel-basic-50/elecrow,crowpanel-basic-50.dts
  • Devices/es3c28p/es3c28p.dts
  • Devices/generic-esp32/generic,esp32.dts
  • Devices/generic-esp32c6/generic,esp32c6.dts
  • Devices/generic-esp32s3/generic,esp32s3.dts
  • Devices/guition-jc2432w328c/guition,jc2432w328c.dts
  • Devices/guition-jc8048w550c/guition,jc8048w550c.dts
  • Devices/heltec-wifi-lora-32-v3/heltec,wifi-lora-32-v3.dts
  • Devices/lilygo-tdeck-max/lilygo,tdeck-max.dts
  • Devices/lilygo-tdeck-plus/lilygo,tdeck-plus.dts
  • Devices/lilygo-tdeck-pro/lilygo,tdeck-pro.dts
  • Devices/lilygo-tdeck/lilygo,tdeck.dts
  • Devices/lilygo-tdisplay-s3/lilygo,tdisplay-s3.dts
  • Devices/lilygo-tdisplay/lilygo,tdisplay.dts
  • Devices/lilygo-tdongle-s3/lilygo,tdongle-s3.dts
  • Devices/lilygo-thmi/lilygo,thmi.dts
  • Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts
  • Devices/m5stack-cardputer-adv/m5stack,cardputer-adv.dts
  • Devices/m5stack-cardputer/m5stack,cardputer.dts
  • Devices/m5stack-core2/m5stack,core2.dts
  • Devices/m5stack-cores3/m5stack,cores3.dts
  • Devices/m5stack-papers3/m5stack,papers3.dts
  • Devices/m5stack-stackchan/m5stack,stackchan.dts
  • Devices/m5stack-stickc-plus2/m5stack,stickc-plus2.dts
  • Devices/m5stack-sticks3/m5stack,sticks3.dts
  • Devices/tulip-4r11/tulip-4r11.dts
  • Devices/unphone/unphone.dts
  • Devices/waveshare-esp32-s3-geek/waveshare,esp32-s3-geek.dts
  • Devices/waveshare-s3-lcd-13/waveshare,s3-lcd-13.dts
  • Devices/waveshare-s3-touch-lcd-128/waveshare,s3-touch-lcd-128.dts
  • Devices/waveshare-s3-touch-lcd-147/waveshare,s3-touch-lcd-147.dts
  • Devices/waveshare-s3-touch-lcd-43/waveshare,s3-touch-lcd-43.dts
  • Devices/wireless-tag-wt32-sc01-plus/wireless-tag,wt32-sc01-plus.dts
  • Tactility/Source/service/wifi/Wifi.cpp
💤 Files with no reviewable changes (49)
  • Devices/cyd-2432s032c/cyd,2432s032c.dts
  • Devices/heltec-wifi-lora-32-v3/heltec,wifi-lora-32-v3.dts
  • Devices/generic-esp32s3/generic,esp32s3.dts
  • Devices/cyd-2432s028r/cyd,2432s028r.dts
  • Devices/cyd-8048s043c/cyd,8048s043c.dts
  • Devices/lilygo-tdeck-max/lilygo,tdeck-max.dts
  • Devices/cyd-3248s035c/cyd,3248s035c.dts
  • Devices/cyd-2432s024c/cyd,2432s024c.dts
  • Devices/waveshare-s3-touch-lcd-43/waveshare,s3-touch-lcd-43.dts
  • Devices/waveshare-s3-lcd-13/waveshare,s3-lcd-13.dts
  • Devices/m5stack-cardputer-adv/m5stack,cardputer-adv.dts
  • Devices/waveshare-s3-touch-lcd-128/waveshare,s3-touch-lcd-128.dts
  • Devices/m5stack-sticks3/m5stack,sticks3.dts
  • Devices/waveshare-esp32-s3-geek/waveshare,esp32-s3-geek.dts
  • Devices/wireless-tag-wt32-sc01-plus/wireless-tag,wt32-sc01-plus.dts
  • Devices/guition-jc8048w550c/guition,jc8048w550c.dts
  • Devices/lilygo-tdeck/lilygo,tdeck.dts
  • Devices/generic-esp32/generic,esp32.dts
  • Devices/elecrow-crowpanel-basic-50/elecrow,crowpanel-basic-50.dts
  • Devices/btt-panda-touch/bigtreetech,panda-touch.dts
  • Devices/lilygo-thmi/lilygo,thmi.dts
  • Devices/guition-jc2432w328c/guition,jc2432w328c.dts
  • Devices/cyd-2432s028rv3/cyd,2432s028rv3.dts
  • Devices/lilygo-tdongle-s3/lilygo,tdongle-s3.dts
  • Devices/elecrow-crowpanel-basic-28/elecrow,crowpanel-basic-28.dts
  • Devices/elecrow-crowpanel-advance-28/elecrow,crowpanel-advance-28.dts
  • Devices/m5stack-papers3/m5stack,papers3.dts
  • Devices/m5stack-stickc-plus2/m5stack,stickc-plus2.dts
  • Devices/m5stack-cardputer/m5stack,cardputer.dts
  • Devices/elecrow-crowpanel-advance-50/elecrow,crowpanel-advance-50.dts
  • Devices/m5stack-core2/m5stack,core2.dts
  • Devices/cyd-e32r32p/cyd,e32r32p.dts
  • Devices/generic-esp32c6/generic,esp32c6.dts
  • Devices/lilygo-tdisplay/lilygo,tdisplay.dts
  • Devices/tulip-4r11/tulip-4r11.dts
  • Devices/m5stack-cores3/m5stack,cores3.dts
  • Devices/unphone/unphone.dts
  • Devices/lilygo-tdisplay-s3/lilygo,tdisplay-s3.dts
  • Devices/lilygo-tdeck-plus/lilygo,tdeck-plus.dts
  • Devices/lilygo-tdeck-pro/lilygo,tdeck-pro.dts
  • Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts
  • Devices/elecrow-crowpanel-basic-35/elecrow,crowpanel-basic-35.dts
  • Devices/elecrow-crowpanel-advance-35/elecrow,crowpanel-advance-35.dts
  • Devices/m5stack-stackchan/m5stack,stackchan.dts
  • Devices/cyd-e32r28t/cyd,e32r28t.dts
  • Devices/es3c28p/es3c28p.dts
  • Devices/cyd-4848s040c/cyd,4848s040c.dts
  • Devices/cyd-2432s024r/cyd,2432s024r.dts
  • Devices/waveshare-s3-touch-lcd-147/waveshare,s3-touch-lcd-147.dts

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@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.

Caution

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

⚠️ Outside diff range comments (2)
Modules/app-module/source/event.cpp (1)

25-48: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Reject every existing subscription before linking it.

Line 35 only rejects a duplicate when sub is the list head. If sub is already later in the list, this code creates a cycle. app_event_emit() then loops forever while holding subscriptions_mutex.

Traverse the list for sub before assigning sub->internal.next. Release the newly claimed bit before returning ERROR_INVALID_STATE.

Proposed fix
-    if (subscriptions == sub) {
+    for (auto* existing = subscriptions; existing != nullptr; existing = existing->internal.next) {
+        if (existing != sub) {
+            continue;
+        }
         mutex_unlock(&subscriptions_mutex.handle);
         task_event_group_release_bit(event_group, bit);
         return ERROR_INVALID_STATE;
     }
Tactility/Source/app/gpssettings/GpsSettings.cpp (1)

318-319: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Synchronize timer callbacks before window_manager_remove.

Both applications stop a timer and immediately destroy the window. An in-flight callback can still access the app context and LVGL widgets. Add callback completion synchronization before removing the window.

  • Tactility/Source/app/gpssettings/GpsSettings.cpp#L318-L319: wait for the GPS state-update callback to finish before removing the window.
  • Tactility/Source/app/power/Power.cpp#L271-L272: wait for the power UI-update callback to finish before removing the window.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ad18a9c0-6146-48d5-bc7f-851e7ffb701b

📥 Commits

Reviewing files that changed from the base of the PR and between 5f41c7d and 13a8c5b.

📒 Files selected for processing (53)
  • .claude/rules/app-framework.md
  • Documentation/ideas.md
  • Modules/app-module/include/app/event.h
  • Modules/app-module/include/app/loader.h
  • Modules/app-module/source/app_internal_loader.cpp
  • Modules/app-module/source/event.cpp
  • Modules/app-module/source/symbols.cpp
  • Modules/app-module/tests/source/app_event_test.cpp
  • Modules/app-module/tests/source/app_manager_test.cpp
  • Modules/app-module/tests/source/combined_event_test.cpp
  • Tactility/Source/app/addgps/AddGps.cpp
  • Tactility/Source/app/alertdialog/AlertDialog.cpp
  • Tactility/Source/app/appdetails/AppDetails.cpp
  • Tactility/Source/app/apphub/AppHubApp.cpp
  • Tactility/Source/app/apphubdetails/AppHubDetailsApp.cpp
  • Tactility/Source/app/applist/AppList.cpp
  • Tactility/Source/app/appsettings/AppSettings.cpp
  • Tactility/Source/app/apwebserver/ApWebServer.cpp
  • Tactility/Source/app/audiosettings/AudioSettings.cpp
  • Tactility/Source/app/boot/Boot.cpp
  • Tactility/Source/app/btmanage/BtManage.cpp
  • Tactility/Source/app/btpeersettings/BtPeerSettings.cpp
  • Tactility/Source/app/chat/ChatApp.cpp
  • Tactility/Source/app/crashdiagnostics/CrashDiagnostics.cpp
  • Tactility/Source/app/development/Development.cpp
  • Tactility/Source/app/display/Display.cpp
  • Tactility/Source/app/files/FilesApp.cpp
  • Tactility/Source/app/fileselection/FileSelection.cpp
  • Tactility/Source/app/gpssettings/GpsSettings.cpp
  • Tactility/Source/app/grovesettings/GroveSettings.cpp
  • Tactility/Source/app/i2cscanner/I2cScanner.cpp
  • Tactility/Source/app/imageviewer/ImageViewer.cpp
  • Tactility/Source/app/inputdialog/InputDialog.cpp
  • Tactility/Source/app/keyboard/KeyboardSettings.cpp
  • Tactility/Source/app/launcher/Launcher.cpp
  • Tactility/Source/app/localesettings/LocaleSettings.cpp
  • Tactility/Source/app/notes/Notes.cpp
  • Tactility/Source/app/power/Power.cpp
  • Tactility/Source/app/poweroff/PowerOff.cpp
  • Tactility/Source/app/screenshot/Screenshot.cpp
  • Tactility/Source/app/selectiondialog/SelectionDialog.cpp
  • Tactility/Source/app/settings/Settings.cpp
  • Tactility/Source/app/setup/Setup.cpp
  • Tactility/Source/app/systeminfo/SystemInfo.cpp
  • Tactility/Source/app/timedatesettings/TimeDateSettings.cpp
  • Tactility/Source/app/timezone/TimeZone.cpp
  • Tactility/Source/app/touchcalibration/TouchCalibration.cpp
  • Tactility/Source/app/trackball/TrackballSettings.cpp
  • Tactility/Source/app/usbsettings/UsbSettings.cpp
  • Tactility/Source/app/webserversettings/WebServerSettings.cpp
  • Tactility/Source/app/wifiapsettings/WifiApSettings.cpp
  • Tactility/Source/app/wificonnect/WifiConnect.cpp
  • Tactility/Source/app/wifimanage/WifiManage.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • Documentation/ideas.md

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.

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