Skip to content

feat(pager): share settings editors and apply live UI updates - #407

Open
ericlewis wants to merge 224 commits into
meshtastic:pagerfrom
ericlewis:codex/pager-home-settings
Open

ericlewis wants to merge 224 commits into
meshtastic:pagerfrom
ericlewis:codex/pager-home-settings

Conversation

@ericlewis

@ericlewis ericlewis commented Sep 17, 2026

Copy link
Copy Markdown

Summary

  • Use the same staged editors from Home and Settings for Wi-Fi, GPS, radio, MQTT, message popups, sound, display and input.
  • Preserve settings/screen PIN protection, full configuration snapshots and unrelated fields when saving a specific setting.
  • Apply brightness, timeout, theme and popup changes live without rebuilding the active conversation or navigation state.
  • Add the persistent double-space-period preference and clearly distinguish focused OK/Cancel buttons with a green fill and dark text.

Implementation

Depends on #409. Merge/review order: #405#406#409#407#408. These are cumulative stages on the upstream pager branch at f31965d. Dependent PRs include earlier stages until those changes reach pager; use the focused comparison below to review this contribution.

Focused diff: #409 → #407. SettingsPlugin owns the reusable dialogs, input group and origin-focus restoration. Values remain staged until OK; Cancel/Escape sends no configuration. Editors require loaded configuration and copy the current full protobuf before changing selected fields, preserving credentials, position and other settings. Home entry points honor the stored six-digit settings PIN, and a screen-unlock prompt remains blocking when cancelled.

Sound enables the message buzzer on the appropriate I2S/PWM path while preserving other notification preferences. The input preference uses an atomic replacement of /prefs/double-space-period; no protobuf schema changes are needed. Physical keyboards omit a redundant launcher, with an on-screen keyboard available when needed.

ViewController handles later UI-config snapshots separately from initial setup. Serial sends now report queue acceptance and reject empty encodings. Live firmware delivery is supplied by meshtastic/firmware#11888.

Testing

  • Combined native tlora-pager-tft firmware build passed: pio run -e tlora-pager-tft -t mtjson, using firmware 6013049 and the public UI archive e9c8eee. All 648 tracked archive files match that UI snapshot; all four manifest artifact sizes and checksums matched.
  • This validates the complete combined implementation, not independent builds of each intermediate PR stage.
  • Automated tests: Not run. The native plugin firmware has not been flashed; hardware validation is pending.

Risks

Queue acceptance is not an acknowledgement of firmware persistence. Native PIN, focus restoration, configuration preservation and live-setting behavior require hardware verification. Live updates cover the named display/notification fields; startup behavior and all map configuration fields are not dynamically reapplied.

mverch67 and others added 30 commits August 21, 2025 18:26
* Create: da.yml - full Danish translation

* Add: Danish translation + sort list of translations
* added Danish language support

* trunk fmt
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
* handle custom lora preset/frequency

* trunk fmt
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
* Explain the file system to format to

* Remove MBR section

I believe MBR is not relevant at all

* Add back MBR (also known as msdos)
* Map compatibility information

* Add compatibility information for CrowPanel Advance HMI

---------

Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
feat: Support 4.3" TFT display JC4827W543C
Co-authored-by: mverch67 <71137295+mverch67@users.noreply.github.com>
* add time zone offset

* reverse order new chats
@ericlewis
ericlewis marked this pull request as ready for review September 18, 2026 02:07
Copilot AI lite review requested due to automatic review settings September 18, 2026 02:07
@ericlewis
ericlewis marked this pull request as draft September 18, 2026 02:20

Copilot AI 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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

This PR adds Pager-specific UI behavior to reuse the same configuration editors from both Home and Settings, introducing shared GPS/MQTT enable dialogs, explicit OK/Cancel commit semantics, and improved focus/navigation handling on the Pager’s screen variant.

Changes:

  • Route Home rows to open the same editors used in Settings, and block sidebar navigation while an editor/modal is open.
  • Add GPS and MQTT “enable/disable” rows with a shared modal, OK/Cancel actions, and Escape-to-cancel support.
  • Render richer configured/connection state on Home (Wi‑Fi, LoRa TX, alerts, MQTT) and apply a focus-key style to confirmation buttons.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
source/graphics/TFT/TFTView_320x240.cpp Adds Pager-only editor routing, new GPS/MQTT toggle modal, OK/Cancel commit logic changes, focus restoration, and updated status rendering on Home.
include/graphics/view/TFT/TFTView_320x240.h Extends the settings state enum and declares Pager-only UI members and helper methods.
include/graphics/view/TFT/PagerDialogStyle.h Introduces Pager-only focus styling for dialog confirmation buttons and applies it across generated OK/Cancel panels.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +14 to +28
lv_obj_t *panels[] = {objects.obj2__ok_cancel_panel_w, objects.obj3__ok_cancel_panel_w, objects.obj4__ok_cancel_panel_w,
objects.obj5__ok_cancel_panel_w, objects.obj6__ok_cancel_panel_w, objects.obj7__ok_cancel_panel_w,
objects.obj8__ok_cancel_panel_w, objects.obj9__ok_cancel_panel_w, objects.obj10__ok_cancel_panel_w,
objects.obj11__ok_cancel_panel_w, objects.obj12__ok_cancel_panel_w, objects.obj13__ok_cancel_panel_w,
objects.obj14__ok_cancel_panel_w, objects.obj15__ok_cancel_panel_w, objects.obj16__ok_cancel_panel_w,
objects.obj17__ok_cancel_panel_w, objects.obj18__ok_cancel_panel_w, objects.obj21__ok_cancel_panel_w,
objects.obj27__ok_cancel_panel_w};
for (auto panel : panels) {
for (uint32_t i = 0; i < lv_obj_get_child_count(panel); ++i) {
lv_obj_t *button = lv_obj_get_child(panel, i);
if (!lv_obj_check_type(button, &lv_button_class))
continue;
stylePagerDialogButtonFocus(button);
}
}
Comment thread source/graphics/TFT/TFTView_320x240.cpp Outdated
Comment on lines +1887 to +1911
void TFTView_320x240::ui_event_PagerHomeSettings(lv_event_t *e)
{
auto code = lv_event_get_code(e);
if ((code != LV_EVENT_SHORT_CLICKED && code != LV_EVENT_LONG_PRESSED) || THIS->activeSettings != eNone ||
!THIS->configComplete)
return;
if (code == LV_EVENT_LONG_PRESSED && lv_indev_active())
lv_indev_wait_release(lv_indev_active());
auto *row = lv_event_get_target_obj(e);
lv_event_t open = {.code = LV_EVENT_CLICKED};
if (row == objects.home_location_button)
ui_event_gps_button(&open);
else if (row == objects.home_wlan_button)
ui_event_wifi_button(&open);
else if (row == objects.home_lora_button)
ui_event_preset_button(&open);
else if (row == objects.home_bell_button)
ui_event_alert_button(&open);
else if (row == objects.home_mqtt_button)
ui_event_mqtt_button(&open);
if (THIS->activeSettings != eNone) {
THIS->settingsReturnRow = row;
THIS->disablePanel(objects.home_panel);
}
}
Comment thread source/graphics/TFT/TFTView_320x240.cpp Outdated
Comment on lines +1993 to +1994
lv_event_t cancel = {.code = LV_EVENT_CLICKED};
ui_event_cancel(&cancel);
Reconcile the published contribution with the native Pager plugin branch.
Preserve the existing PR history and the cumulative dependency stage.
Reconcile the published contribution with the native Pager plugin branch.
Preserve the existing PR history and the cumulative dependency stage.
Reconcile the published contribution with the native Pager plugin branch.
Preserve the existing PR history and the cumulative dependency stage.
Reconcile the published contribution with the native Pager plugin branch.
Preserve the existing PR history and the cumulative dependency stage.
@ericlewis
ericlewis changed the base branch from master to pager September 18, 2026 02:58
Retain the published PR head and the preceding cumulative PR as parents.
Keep the intended feature-stage tree unchanged.
Retain the published PR head and the preceding cumulative PR as parents.
Keep the intended feature-stage tree unchanged.
Retain the published PR head and the preceding cumulative PR as parents.
Keep the intended feature-stage tree unchanged.
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.