Add transactional named saved-list management - #1446
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1446 +/- ##
==========================================
- Coverage 0.40% 0.35% -0.05%
==========================================
Files 20 20
Lines 17176 19451 +2275
Branches 11 11
==========================================
Hits 69 69
- Misses 17103 19378 +2275
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR introduces transactional, named saved-list management for WiFiScan saved artifacts (SSIDs, APs, AirTags), including SD-backed atomic save/load with recovery behavior and updated UI flows for selecting and naming .log files.
Changes:
- Add saved-list types/results and new transactional save/load APIs (with temp/backup files, verification, and recovery).
- Extend SD directory listing to support prefix-filtered, bounded results for type-filtered pickers.
- Update screen menus to support saved-list pickers, “Save As” naming, replace confirmation, and persistent status screens.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| esp32_marauder/WiFiScan.h | Adds saved-list enums/structures and updates save/load method signatures to support transactional behavior and status reporting. |
| esp32_marauder/WiFiScan.cpp | Implements atomic save/load, verification, snapshots, and recovery paths for SSID/AP/AirTag lists. |
| esp32_marauder/SDInterface.h | Expands listDirToLinkedList to support prefix filtering, result limits, truncation reporting, and success/failure return. |
| esp32_marauder/SDInterface.cpp | Implements the enhanced, bounded, filtered SD directory listing with heap guarding. |
| esp32_marauder/MenuFunctions.h | Adds saved-list picker/save/replace/status menu helpers and supporting enum. |
| esp32_marauder/MenuFunctions.cpp | Implements saved-list pickers, Save As flow, replace confirmation, and load/save status screens. |
Suppressed comments (2)
esp32_marauder/WiFiScan.cpp:5187
DynamicJsonDocument doc(10048)duplicates theMAX_SAVED_AIRTAG_FILE_SIZEconstant (also 10048). Using the constant here avoids divergence if the AirTag list size limit changes.
if (file_size > MAX_SAVED_AIRTAG_FILE_SIZE) {
file.close();
return fail(F("file is too large"));
}
DynamicJsonDocument doc(10048);
const DeserializationError error = deserializeJson(doc, file);
const bool trailing_data_valid = !error &&
hasOnlySavedListTrailingWhitespace(file);
file.close();
esp32_marauder/WiFiScan.cpp:5226
- Parsing the AirTag payload currently creates a temporary
Stringcopy of the JSON field (String(object["payload"].as<const char*>())). For large payloads this doubles peak memory and can cause valid loads/verifications to fail under memory pressure. Consider adding an overload ofparseSavedAirTagPayloadthat takesconst char*(+ length) so you can parse the ArduinoJson-owned string without allocating a second copy.
return fail_loaded(F("invalid MAC"));
const uint16_t payload_size = object["payload_size"].as<uint16_t>();
std::vector<uint8_t> payload;
if (!parseSavedAirTagPayload(
String(object["payload"].as<const char*>()),
payload_size,
payload))
return fail_loaded(F("invalid payload"));
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
All 22 firmware matrix builds and the Native Unity tests pass on this head. The remaining red statuses are limited to the repository-wide Codecov policy addressed separately in #1448. |
Stack
Summary
.logpickers and user-definedSave Asnames for SSID, AP, and AirTag listsTesting