Skip to content

Conversation

@ZegesMenden
Copy link
Collaborator

Summary

  • add a landing page with UI controls for connecting to an ESP32 board, choosing panel size, and flashing firmware
  • load esptool-js in the browser to detect the connected chip, download the matching binary, and program the device
  • provide modern styling and a live activity log to guide the user through connection, flashing, and disconnect operations

Testing

  • not run (UI-only change)

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

Copy link

@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 automated review suggestions for this pull request.

ℹ️ 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
  • 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 address that feedback".

Comment on lines +206 to +209
} catch (error) {
log(`❌ ${error.message ?? error}`);
await disconnectDevice();
} finally {

Choose a reason for hiding this comment

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

P1 Badge Ensure disconnect runs after connection failure

The catch block in connectToDevice calls disconnectDevice() while state.busy is still true from the earlier setBusy(true). Because disconnectDevice immediately returns when state.busy is true, any failure that occurs after the serial port is opened leaves the port and UI state untouched, so the device remains connected and the user cannot reconnect without reloading. Clear the busy flag (or provide a cleanup path that bypasses the guard) before invoking disconnectDevice so resources are always released on error.

Useful? React with 👍 / 👎.

Comment on lines +248 to +252
eraseAll: false,
compress: true,
reportProgress: options.onProgress
};
return loader.flash(files, flashOptions);

Choose a reason for hiding this comment

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

P1 Badge Pass flash options object to esptool loader.flash

In flashBinary, the code constructs flashOptions containing fileArray but then invokes loader.flash(files, flashOptions). esptool-js v0.9.x expects a single options object (loader.flash({ fileArray, ... })); supplying two positional arguments means the first parameter is an array without the expected properties and the call will reject before any data is written. As a result, flashing fails on builds that expose loader.flash. Pass the constructed options object directly instead of separating the array and options into two parameters.

Useful? React with 👍 / 👎.

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.

2 participants