Skip to content

feature: add esp reset function > new button "reset"#63

Merged
Jason2866 merged 4 commits into
mainfrom
esp_reset
May 18, 2026
Merged

feature: add esp reset function > new button "reset"#63
Jason2866 merged 4 commits into
mainfrom
esp_reset

Conversation

@Jason2866

@Jason2866 Jason2866 commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added Reset button to hard reset the connected ESP chip; enabled only while connected
    • Reset button displays success confirmation (✓) and error details on failure
    • Enhanced Filter save feature with improved error messaging, processing-disabled state, and timed feedback notifications

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 35b06281-4870-44d5-b891-f8a2ba1c4c4b

📥 Commits

Reviewing files that changed from the base of the PR and between a66f4ef and fa444cb.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • CHANGELOG.md
  • package.json
  • src/serialPortManager.ts
  • src/webviewPanel.ts

📝 Walkthrough

Walkthrough

This PR implements a hard reset button feature for the ESP decoder extension. The serial port manager gains a hardReset() method that toggles RTS/DTR signals to reset the ESP chip. The webview receives a new Reset button tied to connection state, message handling, and brief success feedback. Version and changelog are updated to 0.27.0.

Changes

Hard Reset Feature Implementation

Layer / File(s) Summary
Serial port hard reset method
src/serialPortManager.ts
New hardReset() async method verifies connection, asserts RTS while DTR remains low with 100ms delay between phases, logs each step, and throws if no port is connected.
Webview Reset button UI and integration
src/webviewPanel.ts
Reset toolbar button wired with message handler that calls serialManager.hardReset(), click handler providing ✓ feedback, and connection-state binding to enable/disable based on active connection.
Version and release documentation
package.json, CHANGELOG.md
Package version bumped to 0.27.0; changelog documents new Reset button and updated Filter save features for v0.27.0 release.

Sequence Diagram

sequenceDiagram
  participant User
  participant Webview
  participant Extension
  participant SerialManager
  participant Hardware
  User->>Webview: Click Reset button
  Webview->>Extension: Post hardReset message
  Extension->>SerialManager: Call hardReset()
  SerialManager->>Hardware: Set RTS=true, DTR=false
  Hardware-->>SerialManager: Signal asserted
  SerialManager->>Hardware: Wait 100ms then set RTS=false
  Hardware-->>SerialManager: Signal deasserted
  SerialManager-->>Extension: Reset complete
  Extension->>Webview: Post success or error feedback
  Webview->>User: Show Reset ✓ confirmation
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Jason2866/ESP-Decoder#50: Implements auto-reconnect logic in SerialPortManager and webview, which shares the same serial manager and webview integration points as the reset button feature.

Poem

🐰 A button to reset, with RTS held tight,
ESP chip toggled through the digital night,
Connected or not, the state's now defined,
Clean reset feedback, peace of mind! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding an ESP reset function with a new button UI element. It directly matches the changeset content across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch esp_reset

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Jason2866

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

@Jason2866 Jason2866 merged commit d725f64 into main May 18, 2026
3 checks passed
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.

1 participant