Skip to content

Surface live settings action updates#98

Merged
baba-dev merged 2 commits into
mainfrom
codex/audit-and-update-settings_controller-actions
Sep 19, 2025
Merged

Surface live settings action updates#98
baba-dev merged 2 commits into
mainfrom
codex/audit-and-update-settings_controller-actions

Conversation

@baba-dev
Copy link
Copy Markdown
Owner

Summary

  • emit OTA, diagnostics, and backup status events from the integration layer and propagate error handling
  • plumb live status updates into the settings page UI and expose getters for the pills/labels
  • extend the host test build with LVGL stubs and add a unit test that exercises the new status plumbing

Testing

  • cmake -S tests -B build/tests -DROMS_ONLY=OFF
  • cmake --build build/tests
  • ctest --test-dir build/tests

https://chatgpt.com/codex/tasks/task_e_68cd5a4436508324b276ccfa3e2e9a52

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines 83 to +112
handles->mqtt = esp_mqtt_client_init(&mqtt_config);
if (handles->mqtt)
{
esp_mqtt_client_start(handles->mqtt);
esp_err_t mqtt_err = esp_mqtt_client_start(handles->mqtt);
if (mqtt_err != ESP_OK)
{
ESP_LOGE(TAG, "MQTT start failed: 0x%x", (unsigned int)mqtt_err);
emit_diag_event(callback, user_data, DIAG_EVENT_ERROR, mqtt_err);
return mqtt_err;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P1] Clean up HTTP server when diagnostics MQTT start fails

When esp_mqtt_client_start fails, the new callback code returns the error immediately, but the HTTP diagnostics server started just above remains running and handles->httpd stays set. Callers see a failure and leave diag_running_ false, so the HTTP server and MQTT handle are never stopped, leaking resources and blocking subsequent starts because port 80 is still bound. The function should tear down any partially initialized resources before returning.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex fix comments

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

  • Ensured diag_start destroys the MQTT client and stops the diagnostics HTTP server when esp_mqtt_client_start fails so partially initialized resources are cleaned up before returning. components/diag/src/diag.cL104-L119

Testing

  • ⚠️ idf.py set-target esp32p4 (command unavailable in container)
  • ⚠️ idf.py build (command unavailable in container)
  • ⚠️ idf.py lint (command unavailable in container)

View task →

@baba-dev baba-dev merged commit 0b3fadf into main Sep 19, 2025
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant