Skip to content

Add the current Beta features to Main #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 71 commits into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
e61e6d7
Improved reliability on freshly booted board.
makermelissa Jul 25, 2024
7945dd5
Merge pull request #220 from makermelissa/beta
makermelissa Jul 26, 2024
883b7a2
Implement multiple file selection dialog
makermelissa Jul 31, 2024
4b38457
bug fixes
makermelissa Jul 31, 2024
a64c10a
more bug fixes
makermelissa Jul 31, 2024
8a8ce65
Add more file types and hide filename when multiple files selected
makermelissa Aug 1, 2024
a1d705f
Merge pull request #223 from makermelissa/beta
makermelissa Aug 2, 2024
90bdebd
Show more info for all workflows
makermelissa Aug 2, 2024
f956fb8
Fix merge conflicts
makermelissa Aug 2, 2024
352c2ae
Use newer npm version
makermelissa Aug 2, 2024
204dc70
Update workflow to remove node_modules
makermelissa Aug 2, 2024
fa624ae
Update workflow to remove package-lock.json
makermelissa Aug 2, 2024
e4853b2
More workflow tinkering
makermelissa Aug 2, 2024
e6b6652
Make path label more obvious
makermelissa Aug 5, 2024
882f956
Merge pull request #225 from makermelissa/beta
makermelissa Aug 5, 2024
bb274fe
Add rollup package
makermelissa Aug 5, 2024
4ff75fa
Merge branch 'beta' of https://github.com/circuitpython/web-editor in…
makermelissa Aug 5, 2024
306abfb
Empty-Commit test
makermelissa Aug 5, 2024
2c0c147
Merge pull request #226 from makermelissa/beta
makermelissa Aug 5, 2024
97dea7d
Undo GitHub Actions changes but use node 18 (same as beta)
makermelissa Aug 6, 2024
b16f172
Merge pull request #227 from makermelissa/beta
makermelissa Aug 6, 2024
7953aea
Add npm ci back in
makermelissa Aug 6, 2024
2acaef7
Merge pull request #228 from makermelissa/beta
makermelissa Aug 6, 2024
853ae24
Update repl js library to bug fixed version
makermelissa Aug 10, 2024
573df34
Merge branch 'beta' of https://github.com/circuitpython/web-editor in…
makermelissa Aug 10, 2024
5064e63
Merge pull request #231 from makermelissa/beta
makermelissa Aug 10, 2024
6bd1180
Updated REPL lib version and fix duplicate event listeners on usb
makermelissa Aug 16, 2024
423512b
Merge pull request #235 from makermelissa/beta
makermelissa Aug 16, 2024
afe597d
Fix merge conflict
makermelissa Aug 26, 2024
350e99d
Bug fixes for ESP32 C6
makermelissa Aug 26, 2024
06c7f01
Merge pull request #241 from makermelissa/beta
makermelissa Aug 26, 2024
f0da561
save callback on this, and await folder functions
FoamyGuy Aug 28, 2024
ae8276e
save messageCallback on this, and remove listener on it
FoamyGuy Aug 28, 2024
8b95e13
make private field
FoamyGuy Aug 28, 2024
f83bb2a
add _messageCallback to constructor
FoamyGuy Aug 28, 2024
dc21368
private field for remove too
FoamyGuy Aug 28, 2024
66f50e5
make fields private and add to constructor
FoamyGuy Aug 28, 2024
eddc427
Merge pull request #242 from FoamyGuy/beta_dev
makermelissa Aug 28, 2024
4ed7133
Merge branch 'beta' into beta_dupe_serial_fix
makermelissa Aug 28, 2024
aeb886c
Merge pull request #243 from FoamyGuy/beta_dupe_serial_fix
makermelissa Aug 28, 2024
548528d
Fix merge conflict
makermelissa Sep 10, 2024
17754a0
serial plotter implementation
FoamyGuy Sep 11, 2024
39cc946
commit after npm install
FoamyGuy Sep 11, 2024
9794dbf
Merge pull request #250 from FoamyGuy/serial_plotter_retry
makermelissa Sep 11, 2024
bf0dd6f
Merge branch 'beta' of https://github.com/circuitpython/web-editor in…
makermelissa Sep 11, 2024
abae501
Last panel settings are now saved
makermelissa Sep 13, 2024
d653287
remove \r from file contents when read via USB repl
FoamyGuy Jan 22, 2025
ce8c2d0
Initial resize fixes
makermelissa Jan 23, 2025
289b597
Merge pull request #286 from FoamyGuy/fix_extra_empty_lines_usb_repl
makermelissa Jan 23, 2025
6724e80
Fix file download issues
makermelissa Jan 31, 2025
e94c613
Fixed Downloading files in all cases
makermelissa Feb 5, 2025
59761cf
Show busy while user selects port and handle canceling properly
makermelissa Feb 7, 2025
dbf85b0
Merge pull request #292 from makermelissa/ws-busy
FoamyGuy Feb 8, 2025
971c313
Merge pull request #291 from makermelissa/beta
makermelissa Feb 11, 2025
d1024b2
Bump circuitpython-repl-js from 3.2.3 to 3.2.4
makermelissa Feb 12, 2025
6425df9
Merge pull request #295 from makermelissa/beta
makermelissa Feb 12, 2025
1e1970d
Merge branch 'beta' of https://github.com/circuitpython/web-editor in…
makermelissa Feb 12, 2025
f863277
Basic shrink fix
makermelissa Feb 12, 2025
80cf762
Replace fitter with custom solution
makermelissa Feb 12, 2025
bba27c3
Remove unused import
makermelissa Feb 14, 2025
4274fc1
Improve connection step updating and add checkmarks
makermelissa Feb 17, 2025
c08895f
Fix spelling error in variable name
makermelissa Feb 18, 2025
e68ab12
Merge pull request #296 from makermelissa/resize-fix
makermelissa Feb 18, 2025
c5ca119
Improvements to BLE connectivity
makermelissa Mar 2, 2025
35f571e
Disable Connect to Device after selected
makermelissa Mar 2, 2025
d4338ac
Reenable btnBond event listener
makermelissa Mar 2, 2025
71b617a
Merge pull request #298 from makermelissa/connection-improvements
tannewt Mar 3, 2025
39373d6
Merge branch 'beta' of https://github.com/circuitpython/web-editor in…
makermelissa Mar 4, 2025
8c1fc69
Merge pull request #300 from makermelissa/ble-improvements
makermelissa Mar 4, 2025
69dd5f8
Merge branch 'main' into beta
makermelissa Jun 23, 2025
29f5c08
Fix package.json and packagelock.json
makermelissa Jun 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions images/checkmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 71 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,21 @@
<div id="serial-bar">
<button class="purple-button btn-restart">Restart<i class="fa-solid fa-redo"></i></button>
<button class="purple-button btn-clear">Clear<i class="fa-solid fa-broom"></i></button>
<button class="purple-button btn-plotter">Plotter<i class="fa-solid fa-chart-line"></i></button>
<div id="terminal-title"></div>
</div>
<div id="plotter" class="hidden">
<label for="buffer-size">Buffer Size</label>
<input type="number" id="buffer-size" value="20">
<label for="plot-gridlines-select">Grid Lines</label>
<select id="plot-gridlines-select">
<option value="both">Both</option>
<option value="x">X Only</option>
<option value="y">Y Only</option>
<option value="none">None</option>
</select>
<canvas id="plotter-canvas"></canvas>
</div>
<div id="terminal"></div>
</div>
</div>
Expand Down Expand Up @@ -199,7 +212,9 @@ <h1>Web Bluetooth not available!</h1>
flag. However be careful as it would be risky to browse the web with this flag turned
on as it enables many other experimental web platform features. Starting with Chromium
version 100, enable the <a href="about://flags/#enable-web-bluetooth">about://flags/#enable-web-bluetooth</a>
safer flag instead.</p>
safer flag instead. You can also enable Web Bluetooth Binding by enabling the
<a href="about://flags/#enable-web-bluetooth-new-permissions-backend">about://flags/#enable-web-bluetooth-new-permissions-backend</a>
flag instead of the experimental features if it is available.</p>
</div>
</section>
<section class="step">
Expand Down Expand Up @@ -325,6 +340,22 @@ <h1>Select USB Host Folder</h1>
<td>IP Address:</td>
<td><a id="ip"></a></td>
</tr>
<tr>
<td>Build Date:</td>
<td><span id="builddate"></span></td>
</tr>
<tr>
<td>MCU Name:</td>
<td><span id="mcuname"></span></td>
</tr>
<tr>
<td>Board ID:</td>
<td><span id="boardid"></span></td>
</tr>
<tr>
<td>UID:</td>
<td><span id="uid"></span></td>
</tr>
</tbody>
</table>
<h3>More network devices<i class="refresh fa-solid fa-sync-alt" title="Refresh Device List"></i></h3>
Expand All @@ -333,6 +364,45 @@ <h3>More network devices<i class="refresh fa-solid fa-sync-alt" title="Refresh D
<button class="purple-button ok-button">Close</button>
</div>
</div>
<div class="popup-modal shadow closable" data-popup-modal="device-info">
<i class="fa-solid fa-2x fa-xmark text-white bg-primary p-3 popup-modal__close"></i>
<table class="device-info">
<thead>
<tr>
<th colspan="2">Current Device Info</th>
</tr>
</thead>
<tbody>
<tr>
<td>Board:</td>
<td><a id="board" target="_blank"></a></td>
</tr>
<tr>
<td>Version:</td>
<td><span id="version"></span></td>
</tr>
<tr>
<td>Build Date:</td>
<td><span id="builddate"></span></td>
</tr>
<tr>
<td>MCU Name:</td>
<td><span id="mcuname"></span></td>
</tr>
<tr>
<td>Board ID:</td>
<td><span id="boardid"></span></td>
</tr>
<tr>
<td>UID:</td>
<td><span id="uid"></span></td>
</tr>
</tbody>
</table>
<div class="buttons centered">
<button class="purple-button ok-button">Close</button>
</div>
</div>

<script type="module" src="/js/script.js"></script>
</body>
Expand Down
43 changes: 43 additions & 0 deletions js/common/ble-file-transfer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import {FileTransferClient as BLEFileTransferClient} from '@adafruit/ble-file-transfer-js';

// Wrapper for BLEFileTransferClient to add additional functionality
class FileTransferClient extends BLEFileTransferClient {
constructor(bleDevice, bufferSize) {
super(bleDevice, bufferSize);
}

async versionInfo() {
// Possibly open /boot_out.txt and read the version info
let versionInfo = {};
console.log("Reading version info");
let bootout = await this.readFile('/boot_out.txt', false);
console.log(bootout);
if (!bootout) {
console.error("Unable to read boot_out.txt");
return null;
}
bootout += "\n";

// Add these items as they are found
const searchItems = {
version: /Adafruit CircuitPython (.*?) on/,
build_date: /on ([0-9]{4}-[0-9]{2}-[0-9]{2});/,
board_name: /; (.*?) with/,
mcu_name: /with (.*?)\r?\n/,
board_id: /Board ID:(.*?)\r?\n/,
uid: /UID:([0-9A-F]{12,16})\r?\n/,
}

for (const [key, regex] of Object.entries(searchItems)) {
const match = bootout.match(regex);

if (match) {
versionInfo[key] = match[1];
}
}

return versionInfo;
}
}

export {FileTransferClient};
38 changes: 37 additions & 1 deletion js/common/dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ class DiscoveryModal extends GenericModal {
let ip = this._currentModal.querySelector("#ip");
ip.href = `http://${deviceInfo.ip + port}/code/`;
ip.textContent = deviceInfo.ip;
this._currentModal.querySelector("#builddate").textContent = deviceInfo.build_date;
this._currentModal.querySelector("#mcuname").textContent = deviceInfo.mcu_name;
this._currentModal.querySelector("#boardid").textContent = deviceInfo.board_id;
this._currentModal.querySelector("#uid").textContent = deviceInfo.uid;
}

async _refreshDevices() {
Expand Down Expand Up @@ -378,11 +382,43 @@ class DiscoveryModal extends GenericModal {
}
}

class DeviceInfoModal extends GenericModal {
async _getDeviceInfo() {
const deviceInfo = await this._showBusy(this._fileHelper.versionInfo());
this._currentModal.querySelector("#version").textContent = deviceInfo.version;
const boardLink = this._currentModal.querySelector("#board");
boardLink.href = `https://circuitpython.org/board/${deviceInfo.board_id}/`;
boardLink.textContent = deviceInfo.board_name;
this._currentModal.querySelector("#builddate").textContent = deviceInfo.build_date;
this._currentModal.querySelector("#mcuname").textContent = deviceInfo.mcu_name;
this._currentModal.querySelector("#boardid").textContent = deviceInfo.board_id;
this._currentModal.querySelector("#uid").textContent = deviceInfo.uid;
}

async open(workflow, documentState) {
this._workflow = workflow;
this._fileHelper = workflow.fileHelper;
this._showBusy = workflow.showBusy.bind(workflow);
this._docState = documentState;

let p = super.open();
const okButton = this._currentModal.querySelector("button.ok-button");
this._addDialogElement('okButton', okButton, 'click', this._closeModal);

const refreshIcon = this._currentModal.querySelector("i.refresh");
this._addDialogElement('refreshIcon', refreshIcon, 'click', this._refreshDevices);

await this._getDeviceInfo();
return p;
}
}

export {
GenericModal,
MessageModal,
ButtonValueDialog,
UnsavedDialog,
DiscoveryModal,
ProgressDialog
ProgressDialog,
DeviceInfoModal
};
Loading