Refactor core library (constants, endpoint helpers, README, drop ArduinoOTA) - #11
Conversation
|
Warning Review limit reached
Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…inoOTA example Non-functional cleanup extracted from the SerialImprov work so it can be reviewed on its own: - Extract string literals into named constants (ERROR_FLASH, ENDPOINT_NOT_FOUND, ERROR_AP_START, JSON templates, content types). - Add ensureMainEndpoint() and reindent the source (2-space) with related endpoint/JSON handling cleanup. - Rewrite README with expanded usage, HTTP API reference, and callback docs. - Remove the ArduinoOTA example. No behavior change to the WiFi portal or HTTP endpoints. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
54deeff to
6efde55
Compare
Reconstructs Serial Improv support cleanly (the earlier Home Assistant integration was merged non-functional: it did not compile with Improv enabled, never serviced the protocol, and reset the device on provisioning). Serial Improv: - Non-blocking WiFi callback: save credentials, start WiFi.begin(), return. ImprovWiFi::loop() polls WiFi.status() and sends PROVISIONED with the device URL. No blocking connect (which caused a task-watchdog reset) and no restart (which dropped the serial session). - serialImprovLoop() serviced from connect()/portal(), so a fresh device can be provisioned from the portal before it has credentials. - Depend on ESPresense/ImprovWiFi (serial-parser frame-desync fix) via __has_include, so Improv stays optional. - Advertise the detected chip family; keep device-info strings in members. - Guard connect()'s Serial prints while Improv is active. - SerialImprov and ImprovWithHTTP examples build against the fork and pin the tasmota 2023.07.00 platform (ships SPIFFS). Core refactor (previously #11): - Named string constants, ensureMainEndpoint(), endpoint/JSON cleanup, 2-space reindent, README rewrite, remove the ArduinoOTA example. Verified on an ESP32-C3: fresh device, IDENTIFY -> AUTHORIZED -> PROVISIONING -> PROVISIONED in ~3s, device URL returned, correct device name, no reboot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Non-functional core-library cleanup, split out of the Serial Improv work (#3) so it can be reviewed on its own. No behavior change to the WiFi portal or HTTP endpoints.
ERROR_FLASH,ENDPOINT_NOT_FOUND,ERROR_AP_START, JSON templates, content-type strings).ensureMainEndpoint()helper and reindentsrc/(2-space) with related endpoint/JSON handling cleanup.ArduinoOTAexample.Why
The
codex/add-serialimprov-...branch had bundled this refactor + whitespace + README rewrite together with the Serial Improv feature. Pulling it into a base PR keeps the feature PR (#3) focused on Serial Improv only.Testing
pio test -e native— JSON encoder tests pass.connect()/portal()logic is unchanged frommain(only reindented); the refactor is confined to constants, endpoint helpers, and docs.🤖 Generated with Claude Code