You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Notifications, system menu rework, mesh improvements and CL-32 power - #766
This adds a notification module with UI, splits the system menu into separate Settings and Notifications overlays, adds memory and volume controls to the Settings overlay, and extends the mesh service with unread counts and notifications. It also adds a MAX17048 fuel gauge driver for the CL-32 v0.3, fixes charge detection on the CL-32 v0.4, and makes LVGL's draw buffer placement configurable per device.
Notification module
New Modules/notification-module (C API, no LVGL, part of the SDK).
A notification is built in a NotificationContext (like AppStartContext) and sent. It has an optional title, a severity, key/value data in a Bundle, an action callback and a sticky flag.
The 16 most recent notifications are kept in memory. Readers get a clone of the data and call notification_release().
Subscribe with an event group and notification_poll() (posted, dismissed, cleared, updated).
notification_update(id, ctx, bump) replaces a notification. bump decides whether it moves to the newest position. notification_context_for_notification() starts a context from a stored notification, so a sender can change one field.
Senders are tracked and can be switched off per app or service. The choice is persisted. A disabled sender's notifications are refused and its pending ones are removed.
Actions run on the UI task, so they must only forward to a task of their own. This is documented on the API.
notification_preload() reads the sender settings once the file systems are mounted. It is called from the boot sequence.
System menu and system bars
The menu is now two overlays, Settings and Notifications, never shown together. A swipe from the right half opens Notifications, the left half and the status icons open Settings. The system bars have a notifications button.
The button switches to the notifications_unread icon when a new notification arrives while the list is closed. Updates and notifications that arrive while the list is open don't count. It resets when the list opens.
Top row: close button (devices without touch), centered memory indicators, power off button on the right. Notifications has a "Clear" button on the right instead. Clear leaves sticky notifications alone and is hidden when there is nothing to clear.
Settings toggles (Wi-Fi, location, Bluetooth, mesh) open their settings app on long press, unless it already runs.
Volume row for devices with sound output: mute toggle, minus and plus, and a slider when there is a pointer and room. Otherwise the percentage with a fixed width.
Memory indicators: ring gauges for free internal RAM and PSRAM (kB/MB/GB, at most 3 digits). Amber and error colours for low and critical memory, inverted when critical on the mono theme. Hidden when there is no room. memory_external_free() was added to the kernel for this. The simulator shows the host's memory.
Notification list: left bar like the mesh chat, sticky notifications on top with a pin, readable app name on the mono theme.
Keyboard navigation: the top row, toggles and the volume row are grid navigation groups. The power off dialog buttons are too. In the side layout, the keys enter the strip on the notifications button first.
The status icon container uses the width of the strip (the height in the split layout) and keeps its selection ring inside the statusbar.
Fix: a crash on shutdown when focus moved to the page bar after system_bars_detach() had freed its state. The focus and key callbacks now check for it.
Swipe detection: pointer coordinates of an SDL motion event were taken from the wrong place in the simulator, which picked the wrong overlay.
Mesh
Unread counts per conversation are counted as messages arrive and stored in the background, instead of being counted from the history. The notification, the badges and mesh_get_unread() read them. They are loaded once when the service starts, without the global lock.
A "new messages" notification with the total unread count. It is sticky, opens the Mesh app, and is not shown while that app is open. It comes back after a restart and is removed when mesh is turned off or the backend changes.
Per conversation notification choice (all messages or none).
Opening the message store and the contacts no longer holds the global lock, which blocked the UI for several seconds on a slow SD card when mesh started. The store has an explicit opened flag and scans segments through a larger stdio buffer.
Mesh UI additions: Info screen, contact details, Set and Reset path for MeshCore, delete message history, advanced radio settings with a legal warning, RX boosted gain, and Meshtastic public key encryption of direct messages.
Devices and drivers
New Drivers/max17048-module: voltage, charge level and a charging flag derived from the charge rate. It is created on the CL-32 v0.3 only, where it also tells the board revision.
CL-32 v0.4 power: charging is reported from REG_POWER_CONTROL (value 2). Power off still sets bit 0x80, which is what the core chip firmware responds to.
lvgl.preferExternalRam in device.properties (with Kconfig and device.py support) replaces the display capability flag. Devices whose display driver can read from PSRAM set it.
The SD card mount is retried twice with a short backoff.
Icons: notifications, notifications_unread, volume_up, volume_off and push_pin were added to the shared icon set. The notification settings app has its own icon. The statusbar keeps the most important icons when it is full.
Improved Cardputer memory usage and added a warning about App Hub.
Theming and widgets
Selection outline is now 1dp on device with below size 40 and 2dp on anything above. This improves the identification of selected widgets.
Toolbar close button is now always selected first when gridnav focus occurs.
Summary by CodeRabbit
New Features
Added a notification center with unread indicators, notification history, and controls to manage notification sources.
Added mesh-chat unread counts, per-conversation notification settings, message-history deletion, contact details, mesh status information, and configurable contact routes.
Added encrypted direct messaging when recipient public keys are available.
Added battery charging status and fuel-gauge support for applicable devices, plus an optional radio reception setting.
Added notification and volume icons, improved status-bar icon prioritization, and swipe-based access to settings or notifications.
Improvements
Improved alert-dialog scrolling, keyboard focus behavior, and simulator pointer tracking.
Improved SD card mounting reliability and adjusted memory-sensitive device settings.
Added translations for new mesh, notification, and settings features.
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.
This pull request adds a notification module, notification settings, and notification controls in the system UI. It expands mesh APIs and applications with unread tracking, conversation deletion, contact paths, status information, and Meshtastic public-key encryption. It adds a MAX17048 fuel-gauge driver and CL32 integration. Other changes update radio settings, UI input and focus behavior, SD-card mount retries, device properties, memory and properties-file handling, and translations.
Merge Risk: Moderate · previous review 7fe3f
The change adds notifications, mesh unread tracking and PKI support. Several open edge-case defects remain, mainly in notification lifetime handling and mesh persistence. Resolve the higher-severity concurrency and data-integrity items before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title lists four themes: notifications, system menu rework, mesh improvements, and CL-32 power. The changeset contains a new notification module, a split Settings/Notifications system menu, mesh u…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title lists four themes: notifications, system menu rework, mesh improvements, and CL-32 power. The changeset contains a new notification module, a split Settings/Notifications system menu, mesh unread counts and PKI/contact-path work, and CL-32 v0.3 MAX17048 fuel gauge and v0.4 charge detection changes. The title is a comma-separated list of the main themes, so it is broad but matches real and central parts of the change. It does not name every area, such as the MAX17048 driver, LVGL icons, or SD mount retries, which is acceptable.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
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.
KenVanHoeylandt
changed the title
Mesh, notifications and system bars
Notifications, system menu rework, mesh improvements and CL-32 power
Nov 19, 2026
Isolate persistent source settings for each test run.
New IDs do not isolate the bounded source registry. After earlier runs retain 64 sources, notification_send() still succeeds but cannot register another source. The registration test then fails its before + 2 assertion, and the disabling test cannot find its sender. Use a temporary settings root or reset a test-owned settings file. Finish queued writes before cleanup. The public API fixes the source limit at 64 and retains source settings across restarts. (raw.githubusercontent.com)
168-168: Minor · Data Integrity & Integration · Quick win
Do not write a stale snapshot when loading source settings.
If two callers enter the initial load, one can retain an old settings snapshot while the other finishes loading and disables a source. After the queued save completes, the first caller reaches Line 168. properties_file_close() writes that old snapshot back to disk, even without changes. The source becomes enabled again after restart. Serialize loading with settings writes, or use a read-only loader with initialization coordination. (raw.githubusercontent.com)
267-268: Minor · Functional Correctness · Quick win
Use the swipe's starting x-coordinate.
On a 240-pixel display, a mostly vertical swipe can start at x=119 and reach x=125 before recognition. This code passes 125 to systemMenuShow, which opens Notifications instead of Settings. The menu contract uses the starting half.
Record the pointer x-coordinate at press time and pass that value here. Keep -1 for icon clicks.
650-650: Minor · Functional Correctness · Quick win
Preserve the existing keyboard-focus state.
If the icon row already has LV_STATE_FOCUS_KEY, a layout change calls this helper and clears that state. The row remains focused, but its selection ring disappears. The theme applies that ring specifically under LV_STATE_FOCUS_KEY. (raw.githubusercontent.com)
Record whether the state was already set. Remove it only when this helper added it.
471-472: Minor · Functional Correctness · Quick win
Refresh the time label layout before the icon limit reads its size.
update_time changes the label text. LVGL recalculates the label size only in a later layout pass. update_icons then reads the time label's width and height in the same call, so the calculation can use the size of the previous text. When the clock first becomes valid, the previous text is empty. The calculation then reserves no space for the time and can keep more icons than fit. No later recalculation corrects it: the bar's size callback does not observe the time label, and in the split layout the label does not change the bar's size. The result persists until the next minute tick.
Call lv_obj_update_layout on the time label after its text changes, and before the icon limit reads its size:
106-106: Minor · Functional Correctness · Quick win
Ignore activation of a hidden notification button.
If the notification button retains focus after the last notification is removed, a key can still activate the hidden button. Line 98 documents this behavior. This handler then opens the notification panel because it checks only the callback.
Check that the notification button is visible before calling show_notifications, as the previous and next button handlers already do. Keep normal activation unchanged when the button is visible.
Tactility/Source/lvgl/SystemMenu.cpp: 3
354-354: Minor · Functional Correctness · Heavy lift
Do not mark a post after close as seen.
If the panel closes and a notification is posted later in the same millisecond, notificationsChangedMs >= uptimeMs treats the post as seen. The status bar does not set the unread indicator. Use an event-order marker captured under the notification module lock. Changing >= to > would misclassify posts that occurred just before close in the same millisecond. (raw.githubusercontent.com)
875-876: Minor · Functional Correctness · Quick win
Acknowledge notifications only after the panel opens.
If notificationPanelCreate() returns nullptr, this code has already cleared the unread indicator. The window manager leaves the incomplete overlay installed, and closing it advances the seen timestamp again. Record a successful view only after the panel has loaded its initial list. On failure, leave unread state unchanged and remove the incomplete overlay or show a retry control. (raw.githubusercontent.com)
773-774: Minor · Functional Correctness · Quick win
Do not clone action data to clear notifications.
If a sticky notification's bundle cannot be cloned, notification_get_all() fails and Clear removes nothing, including notifications with no bundle. Clear only needs to identify and remove non-sticky entries. Use a module operation that clears them without allocating or copying bundles. (raw.githubusercontent.com)
109-109: Minor · Functional Correctness · Quick win
Make each source switch identifiable.
If org.alpha.sync and org.beta.sync both send notifications and neither has a matching app manifest, both switches are labeled sync. The switches change different sources, but the user cannot tell them apart. Keep the friendly name and show the full ID when names collide. Include the source type when an app and a service share the same ID. (raw.githubusercontent.com)
168-168: Minor · Stability & Availability · Quick win
Exit if the Settings window cannot open.
If the window manager stops before this call, window_manager_create() returns 0. The app then waits indefinitely for events, but it has no window and no close control. Check the returned ID before entering the event loop. On failure, unsubscribe, destroy the event group, and return an error so the user can relaunch the app. (raw.githubusercontent.com)
212-212: Minor · Functional Correctness · Quick win
Synchronize notification visibility on the first refresh.
If LVGL stops with notifications present, notificationVisible remains true across system-bars detach. If a sender clears the notifications while LVGL is stopped, the new service starts with both present and notification_last_state false. This condition skips the setter and leaves an empty notification button visible indefinitely. Force an initial visibility update, then cache later observations. (raw.githubusercontent.com)
Modules/mesh-module/source/mesh_store.cpp: 2
346-346: Minor · Data Integrity & Integration · Quick win
Restore the sequence watermark from deletion records.
If segment retention removes all message records, a deletion record can be the only remaining record. For example, with segmentSize=1 and segmentCount=1, flush message 1, then delete its conversation. The deletion flush rotates the segment and removes the message segment.
After reopening, this branch reads lastSeq=1 but leaves nextSeq=1. The next message reuses sequence 1, contrary to the unique, increasing sequence contract. Advance nextSeq from the validated deletion watermark, even when no matching messages remain.
368-369: Minor · Data Integrity & Integration · Quick win
Propagate message-read failures during deletion.
If readEntry() fails, this predicate retains the message. If the later tombstone flush succeeds, removeConversation() still returns ERROR_NONE. When reads recover, the deleted conversation remains accessible until a successful replay or another deletion.
Distinguish a read failure from a nonmatching message. Propagate the failure through live deletion and replay instead of reporting successful deletion or a fully rebuilt store. Keep the exact backend/address checks for successful reads.
129-130: Minor · Functional Correctness · Quick win
Compare the complete decoded public key.
These assertions accept corruption in any byte after the first. If decoding drops the key, the nonfatal size check also leaves the next assertion indexing an empty vector. Compare decoded.publicKey directly with user.publicKey to check all bytes without indexing the result.
Modules/mesh-module/source/mesh_service.cpp: 8
2603-2607: Minor · Functional Correctness · Quick win
Use the resolved backend for conversation notification preferences.
An empty settings.backend selects the first registered backend through getSelectedBackend(). Mesh Chat can receive messages on that backend, but this setter rejects muting and the getter always reports enabled. Resolve the backend in both accessors and use its ID for the token. Return ERROR_INVALID_STATE only if no backend resolves. (raw.githubusercontent.com)
2533-2533: Minor · Functional Correctness · Quick win
Report current duty-cycle blocking, not the last warning state.
getAirtimeUsedMs() can expire an old transmission and free enough budget for the queued frame. The next line still copies dutyCycleLogged from the previous transmit attempt, so Mesh Info can report that transmission is paused when the frame now fits. Derive the flag from the current airtime, the queue front, and the same budget check used by pumpTx. (raw.githubusercontent.com)
1578-1581: Minor · Data Integrity & Integration · Heavy lift
Retry failed unread saves without losing the latest count.
If a mark-read save fails, the worker logs the error and frees the only pending update. If no later message arrives, the old nonzero count remains on disk and returns at restart. An enqueue failure at Line 1593 loses the update in the same way. Keep the latest unsaved value per conversation and retry it after storage recovers. A retry must not overwrite a newer count.
1977-1977: Minor · Data Integrity & Integration · Heavy lift
Preserve outstanding direct messages when changing receive gain.
If a Meshtastic DM is SENT and waiting for its ACK, the gain change destroys the backend and its pendingAcks map. deactivateBackend() does not resolve SENT messages, and the new backend cannot match the ACK. Apply the gain change without recreating the protocol backend, or explicitly preserve or resolve outstanding sends across the reconfiguration.
1697-1699: Minor · Functional Correctness · Quick win
Do not restore a notification for a muted-only backlog.
A muted conversation still accumulates unread messages. On receipt, isMuted() prevents a notification. After restart, restoreMessageNotification() ignores that preference and posts one for the same messages. Require at least one unread message from an unmuted conversation before restoring the notification. Keep the stored unread counts for muted conversations. (raw.githubusercontent.com)
2637-2637: Minor · Functional Correctness · Quick win
Release unread slots when conversations are read.
Clearing a count leaves its entry in globals().unread. After 256 distinct conversations have been counted and read, the table can be full of zero counts. The next new conversation gets no count despite its message being stored. Erase zero-count entries, or reuse them before rejecting an insertion. Continue to persist the clear and emit the unread event.
2544-2544: Minor · Functional Correctness · Quick win
Count repeated channel messages as sent.
When MeshCore hears a sent channel message repeated, the store changes its delivery state to MESH_DELIVERY_REPEATED. This count includes only SENT and DELIVERED, so evidence of a repeat makes the displayed sent count decrease. Include REPEATED in the total. (raw.githubusercontent.com)
1619-1621: Minor · Functional Correctness · Heavy lift
Tapping a notification must raise a running Mesh Chat instance.
When Mesh Chat already runs in the background, onMessageNotificationAction returns at lines 1619-1621 without requesting activation. The panel then hides its overlay. The user does not reach Mesh Chat and sees the window that was there before. Activate the existing Mesh Chat instance in this branch. Start the app only when no instance exists.
1053-1054: Minor · Data Integrity & Integration · Quick win
Do not evict a manual path that the user did not reset.
The backend can hear more than 64 distinct contacts over time. After the manual-path table fills, setting a path for a new contact silently deletes another contact's path and saves that deletion. If the original contact advertises again, its path is gone. Reject a new entry when the table is full, or give manual paths a retention policy that preserves the API guarantee. Continue to allow replacement of an existing entry. (raw.githubusercontent.com)
237-237: Minor · Data Integrity & Integration · Quick win
Recover manual paths from paths.bin.old after an interrupted save.
On filesystems that require the backup rename, power loss between the two renames leaves the last committed list in paths.bin.old. The loader checks only paths.bin and starts with no manual paths. Use the same primary-then-backup recovery pattern as loadChannels. Treat a valid empty primary file as authoritative so a completed reset does not restore old paths.
Keep recently used peer keys when the cache fills.
publicKeys.begin() selects the lowest node number, not the least recently used peer. In a network with more than 128 peers, this can repeatedly remove an active contact's key and cause its next DM to use channel encryption. Keep the cap, but use recent key use or an explicit trust policy to select an eviction candidate.
276-276: Minor · Functional Correctness · Quick win
Load the shared controls from the selected backend.
If both backends have presets, hasMeshCore selects MeshCore even when Meshtastic is active. Different saved overrides then make the common Frequency and Transmit power controls show MeshCore values. Confirming the prefilled frequency can also overwrite the active Meshtastic frequency with that value.
Query the selected backend first. Use another backend only as a fallback when the selected backend has no applicable radio parameters.
266-266: Minor · Functional Correctness · Quick win
Keep the requested RX value separate from the loaded value.
If the switch callback runs during an unrelated refresh, it stores the requested value and signals rxBoostedGainBit. This getter can then overwrite that value with the saved value. On the next iteration, Line 877 saves the old value, so the switch action has no effect.
Keep pending switch intent separate from the value loaded for display. Synchronize that intent between the callback and the app task, and consume it only when handling the switch event.
Tactility/Source/app/meshchat/MeshApp.cpp: 1
812-812: Minor · Data Integrity & Integration · Quick win
Resolve the selected contact from a dialog snapshot.
If contacts change while the dialog is open, selected still refers to the displayed names, but this line reads the current contact list. For example, if the dialog shows [A, B] and A is removed, a refresh changes the list to [B]. Selecting displayed A then sets or resets B's path.
Store the contact addresses alongside the dialog's names. Resolve the result against that snapshot, and let the service report if the selected contact no longer exists.
For a long message at the top, Next passes direction=-1, so this call receives a positive dy. LVGL clamps that movement to zero. Previous passes a negative dy and shows later text instead. The page actions therefore operate in reverse. Use direction * step with the existing callbacks. This makes Next advance and Previous return while retaining boundary clamping. (raw.githubusercontent.com)
Add a PKI ciphertext fixture from Meshtastic firmware.
Both sides of this round trip call the same nonce builder. A shared change to byte order could pass the test but break communication with Meshtastic nodes. Keep the round trip and add a fixed upstream ciphertext and tag for known inputs to check the wire format independently. (raw.githubusercontent.com)
Use the external-preferred allocator for retained mute tokens.
tt::std::vector controls allocation for the vector, but its std::string elements still allocate their own token buffers with the default allocator. Those buffers remain live in Globals. Use tt::std::string for the retained tokens and the preload vector. As per coding guidelines, “Containers that live long use the tt::std replacements from TactilityKernel.”
Use the external-preferring container for the retained menu map.
contactMenuItems remains allocated for the app lifetime. Change this declaration to tt::std::vector<int> so the new retained allocation follows the repository's RAM policy.
As per coding guidelines, “Containers that live long use the tt::std replacements.”
Use the required allocator for lifecycle-owned state.
Both allocations use ordinary new instead of the required external-memory allocation policy. Use the policy allocator for Device and Max17048Internal. Update all matching releases, including startup rollback and normal stop. Keep the existing allocation-failure checks.
As per coding guidelines, “In C++ use tt::newObject<T>() and tt::deleteObject()” and “With a lifecycle (start and stop): allocate on start, free on stop.”
Also applies to: 167-167
Source: Coding guidelines
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: 81f66da6-c90e-4d43-aaa0-380b36d3a434
Commits
Reviewing files that changed from the base of the PR and between 8766542 and 0273707.
Files ignored due to path filters: 3
Data/system/app_icon/tactility.notificationsettings.svg is excluded by !**/*.svg
Data/system/app_icon/tactility.notificationsettings_mono.svg is excluded by !**/*.svg
Data/system/fonts/MaterialSymbolsRounded.ttf is excluded by !**/*.ttf
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Minor comments: 13
Modules/notification-module/source/module.cpp: 1
31-32: Minor · Functional Correctness · Quick win
Export notification_get_event_order in notification_module_symbols.
notification.h declares notification_get_event_order() as public API. notification_module_symbols has no DEFINE_MODULE_SYMBOL(notification_get_event_order) entry. Code linked into the firmware, such as SystemMenu.cpp, resolves the function directly. A loadable app that calls it cannot resolve the symbol through the module table. Add the entry next to the other new symbols.
568-568: Minor · Stability & Availability · Quick win
Handle a module stop that happens while waitForActions(0) runs.
waitForActions releases the lock and returns false when state becomes nullptr. In notification_set_source_enabled, the && skips the removal loop in that case. The code then still calls queueSave(), which reads state->sourceCount. This dereferences a null pointer. The trigger is module_stop while this function waits for an action on another task.
Return ERROR_INVALID_STATE when the wait reports that the module stopped. notification_update, notification_dismiss and notification_send already handle this case.
Proposed fix
- if (!enabled && waitForActions(0)) {+ if (!enabled) {+ if (!waitForActions(0)) {+ unlock();+ return ERROR_INVALID_STATE;+ }
// The pending notifications of the sender go with it
...
}
463-473: Minor · Stability & Availability · Quick win
Check source enablement again after the full-history wait.
notification_send checks source->enabled before the while (state->count == NOTIFICATION_HISTORY_CAPACITY) loop. waitForActions releases the lock inside the loop. Another task can call notification_set_source_enabled(..., false) during that wait. That call removes the sender's pending entries and returns. When the wait ends, notification_send posts the new entry for the disabled source. The entry stays in history, and the user sees a notification from a source that was just disabled.
Look up the source again after the loop. Return ERROR_NOT_ALLOWED if it is now disabled. The caller keeps the Bundle in that case, as with the early rejection.
631-634: Minor · Stability & Availability · Quick win
Do not run an action that is not registered in state->runs.
When state->runCount is already MAX_ACTION_RUNS, registered is false. The function still calls action(id, actionData) after the unlock. notification_dismiss, notification_update and the other waiting calls do not see that run. The header states that the sender can free the action data once those calls return. For this unregistered run, that guarantee does not hold. Unloaded sender code or freed action_data can then be used. The table can only fill when many actions are active at once, so this is an edge case. The fallback still silently removes the safety guarantee.
381-381: Minor · Functional Correctness · Quick win
Record the swipe start for presses on the icon row.
onStatusbarPressed runs only for presses that reach obj. icon_row and its icons are clickable, and they do not forward LV_EVENT_PRESSED. A press that starts on them leaves statusbar_press_x at the x of an earlier press on the statusbar. A downward swipe from those widgets still reaches onStatusbarGesture, because gestures bubble by default. The menu then receives that stale x, and it can open the wrong overlay if it chooses by position.
Record the press start for presses on icon_row and on the icons it contains. Also check action_container and its children. Enabling LV_OBJ_FLAG_EVENT_BUBBLE on those widgets also forwards their click events to the icon_row handlers, so confirm that change in click behavior is intended.
Tactility/Source/lvgl/SystemMenu.cpp: 1
881-882: Minor · Functional Correctness · Quick win
Mark notifications seen only after a successful snapshot read.
notificationPanelCreate() returns a non-null panel even when its initial read fails and sets retryRead. These lines still clear unread state. If the user closes the overlay before a successful retry, destruction records the notifications as seen although no notification was displayed. (raw.githubusercontent.com)
Have the panel report successful reads. Use that signal to clear unread state and advance the seen watermark. Keep failed reads retryable.
Modules/mesh-module/source/mesh_service.cpp: 6
2737-2739: Minor · Functional Correctness · Quick win
Make Mark All Read wait for unread initialization.
At startup, service and the open store can be visible before configure() loads persisted unread counts. If Mark All Read runs then, it sees an empty vector and returns. Preload can then restore the unread messages the user just tried to clear. Load unread state before exposing the operation, or queue the clear behind initialization.
1758-1759: Minor · Functional Correctness · Quick win
Restore the notification from one unread snapshot.
Suppose A has one unmuted unread message and B has one muted unread message. If the user reads A after this unlock, getTotalUnread() counts only B, but the earlier unmutedUnread value still allows the notification. The queued refresh keeps it because the total is nonzero. Compute eligibility and total together. Recheck eligibility when a read or mute change refreshes a restored notification.
2766-2767: Minor · Data Integrity & Integration · Heavy lift
Keep unread state consistent when a failed delete has already been logged.
removeConversation() can flush the deletion record and still return ERROR_RESOURCE if it cannot read one candidate message. This path retains the unread count. If that message is readable on restart, replay completes the deletion, but the old count can still generate a notification for an empty conversation. Validate the deletion before logging it, or record enough information to reconcile unread state when the deletion completes on replay.
1585-1586: Minor · Maintainability & Code Quality · Quick win
Use external allocators for the pending unread entries.
tt::newObject covers the map object but not the nodes allocated by std::map or the key storage allocated by std::string. Pending entries can remain resident while storage is unavailable. Use tt::std::map with tt::std::string so the entries also prefer external RAM.
As per coding guidelines, “Containers that live long use the tt::std replacements from TactilityKernel.”
Source: Coding guidelines
2688-2690: Minor · Data Integrity & Integration · Quick win
Do not apply the mute preference if saving it fails.
With no explicit backend setting, this setter now reaches the first registered backend. If saving fails, the caller receives ERROR_RESOURCE, but incoming messages already use the changed mute state. A restart can restore the opposite preference. Commit the preference before exposing it to receive processing, or restore the previous state on failure without overwriting a later update. (raw.githubusercontent.com)
2040-2040: Minor · Functional Correctness · Heavy lift
Apply a live boosted-gain change to the running SX1262, or state that it takes effect on the next radio enable.
The posted write at mesh_service.cpp:2038-2042 reaches Sx1262Radio::setParameter, which only stores the value. The hardware gain changes only in doBegin(). On an enabled radio, the setting saves and reports success, but the receiver keeps its old gain until the radio starts again. The settings UI reads the saved preference, so it also shows a value the radio does not use.
Require one of these behaviors. Either the live path applies the gain to the running radio, or the setting and UI report that the change applies on the next radio enable. Do not report the gain as applied while the running radio is unchanged.
753-753: Minor · Data Integrity & Integration · Quick win
Announce the public key after persistence recovers.
If the initial pki.bin write fails, startup sends NodeInfo without a public key. A successful retry enables PKI sends immediately, but the broadcast timer still reflects that keyless announcement. Announce on the transition to a persisted key so peers can learn it without waiting for the periodic broadcast.
Nitpick comments: 1
Modules/mesh-module/source/mesh_service.cpp: 1
1607-1607: Trivial · Performance & Scalability · Heavy lift
Batch pending unread saves into one settings update.
Marking conversations read queues one file-worker job. That job calls mesh_settings_save_unread() once for each pending conversation. The file worker runs queued jobs one at a time, so the next file operation waits until the whole loop finishes. App loading uses the same worker and can be delayed by this loop.
Persist the pending unread counts in one settings update instead:
Copy the pending entries under the global lock.
Write the copied entries in a single settings update.
Remove an entry from the pending map only when its value still matches the copied value.
Keep all entries pending when the update fails.
This change needs a batch save helper in mesh_settings.cpp. The current helper persists a single token.
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: 5d88070f-7532-4d04-80ca-7d1b64e1a78b
Commits
Reviewing files that changed from the base of the PR and between 0273707 and f506955.
Files skipped from review as they are similar to previous changes: 8
Translations/mesh/de-DE.po
Translations/mesh/es-ES.po
Translations/mesh/fr-FR.po
Translations/mesh/nl-NL.po
Translations/notificationsettings/de-DE.po
Translations/notificationsettings/es-ES.po
Translations/notificationsettings/fr-FR.po
Translations/notificationsettings/nl-NL.po
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
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 GitHub limitations.
⚠️ Outside diff range comments (1)
Major · Do not skip action cleanup when the sender is already disabled. · notification.cpp:569-571
Modules/notification-module/source/notification.cpp:569-571 Major · Stability & Availability · Quick win
Do not skip action cleanup when the sender is already disabled.
If task A disables a sender, it sets source->enabled=false before waiting for an active action. If task B then disables the same sender, this early return bypasses the new wait and returns success while the action still runs.
The documented contract lets the sender free action data after disabling returns. Task B can therefore free data that the active callback still uses. For disabling, complete the action wait and notification removal even when the flag is already false. Keep the no-op return for an already-enabled sender.
Nitpick comments: 1
Modules/mesh-module/source/mesh_store.cpp: 1
377-378: Trivial · Performance & Scalability · Low value
Reuse the preflight results instead of reading each candidate twice.
canEraseConversation() reads every index entry that matches the deletion filter. eraseConversation() then reads the same entries again. Both passes run inside removeConversation(), so the duplicate reads extend the time the operation holds the store. The cost scales with the number of messages in the conversation. Conversation deletion is a rare user action, so the impact is likely small.
If the extra reads matter, collect the matching sequence IDs during preflight. After appendRecord() succeeds, erase those IDs without reading the messages again. Keep the rejection of unreadable candidates before the append. Use sequence IDs rather than index pointers, because a successful append can flush and enforce retention.
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: ec5580a8-e2bc-4c23-90bc-4bbba42e23f6
Commits
Reviewing files that changed from the base of the PR and between f506955 and 7d41bd0.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Major · Preserve the private key when reading fails. · meshtastic_backend.cpp:255-257
Modules/mesh-meshtastic-module/source/meshtastic_backend.cpp:255-257 Major · Data Integrity & Integration · Quick win
Preserve the private key when reading fails.
If pki.bin exists but a transient read error prevents a complete read, this path generates a replacement key. If the subsequent write succeeds, peers that pinned the old key can no longer exchange PKI messages with this node. Distinguish a missing key file from a read error, and retry or report the error instead of replacing the identity.
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: 381c297e-0804-4d8c-8169-ac770db80251
Commits
Reviewing files that changed from the base of the PR and between 7d41bd0 and 06d82c3.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Quick win
Remove a contact's manual path when the contact is removed.
MeshCore leaves on_contact_removed unset, so a removed contact keeps its manual path. These stale entries count toward the 64-entry limit and persist across restarts. After 64 removals, new manual paths for other contacts fail with ERROR_OUT_OF_RANGE.
Implement the callback so it removes the removed contact's entry and saves the list. Use the existing reset logic in resetContactPath. Wrap it in a void function because resetContactPath returns error_t. The callback must run on the same thread as the other backend path operations.
Add an overlapping repeated-disable regression test.
The first disable has already finished when Line 710 runs. The previous source->enabled == enabled guard also passes every assertion in this test.
Keep one action running. Start the first disable on another task, then call disable again after the source becomes disabled. Check that neither disable completes until the action finishes. Use synchronization barriers to control this order.
This tests the waiting behavior that the changed guard restores.
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: 04f608a9-eb81-4141-ab6d-5128d695ac25
Commits
Reviewing files that changed from the base of the PR and between 06d82c3 and 7fe3fd4.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds a notification module with UI, splits the system menu into separate Settings and Notifications overlays, adds memory and volume controls to the Settings overlay, and extends the mesh service with unread counts and notifications. It also adds a MAX17048 fuel gauge driver for the CL-32 v0.3, fixes charge detection on the CL-32 v0.4, and makes LVGL's draw buffer placement configurable per device.
Notification module
New
Modules/notification-module(C API, no LVGL, part of the SDK).NotificationContext(likeAppStartContext) and sent. It has an optional title, a severity, key/value data in aBundle, an action callback and a sticky flag.notification_release().notification_poll()(posted, dismissed, cleared, updated).notification_update(id, ctx, bump)replaces a notification.bumpdecides whether it moves to the newest position.notification_context_for_notification()starts a context from a stored notification, so a sender can change one field.notification_preload()reads the sender settings once the file systems are mounted. It is called from the boot sequence.System menu and system bars
notifications_unreadicon when a new notification arrives while the list is closed. Updates and notifications that arrive while the list is open don't count. It resets when the list opens.memory_external_free()was added to the kernel for this. The simulator shows the host's memory.system_bars_detach()had freed its state. The focus and key callbacks now check for it.Mesh
mesh_get_unread()read them. They are loaded once when the service starts, without the global lock.openedflag and scans segments through a larger stdio buffer.Devices and drivers
Drivers/max17048-module: voltage, charge level and a charging flag derived from the charge rate. It is created on the CL-32 v0.3 only, where it also tells the board revision.REG_POWER_CONTROL(value 2). Power off still sets bit 0x80, which is what the core chip firmware responds to.lvgl.preferExternalRamindevice.properties(with Kconfig anddevice.pysupport) replaces the display capability flag. Devices whose display driver can read from PSRAM set it.notifications,notifications_unread,volume_up,volume_offandpush_pinwere added to the shared icon set. The notification settings app has its own icon. The statusbar keeps the most important icons when it is full.Theming and widgets
Summary by CodeRabbit
New Features
Improvements