This app uses react-aria-components + Panda CSS via @microbit/ui.
Read ../ui/docs/hints.md before styling/theming/UI work.
The private theme package is the sibling repo
../python-editor-v3-microbit (consumed via a manual node_modules
symlink locally — re-create it after npm install).
@microbit/ui is consumed as the published package, pinned in
package.json. To develop against a local ../ui checkout instead — what you
want whenever a change spans the library and this app — symlink
node_modules/@microbit/ui to ../ui/packages/ui, the same arrangement as the
theme package above. Re-create it after npm install (which restores the pinned
version), and regenerate clean afterwards (rm -rf styled-system && npm run panda) — incremental codegen does not detect external preset changes.
resolve.dedupe in vite.config.ts is what stops the symlinked package loading
its own copies of React and friends, so leave it in place either way.
After bumping the pinned @microbit/ui version, follow "Upgrading in an app" in
../ui/packages/ui/README.md.
Events go through Logging (src/logging/) and are documented in
docs/analytics-events.md; update the doc when adding or changing an event.
Names are snake_case with flat primitive params. There is no Google Analytics
backend or Foundation build mode. Events are recorded as console diagnostics
or Sentry breadcrumbs when a Sentry DSN is explicitly configured.
The bottom-left connection button connects the shared serial device without transferring code.
The lower button transfers the project to the selected CIRCUITPY root directory.
Keep these actions separate. The console and transfer use the same device instance.
Compare fresh target-file bytes and skip replacement writes for identical files.
Do not rely on a previous-upload cache; other editors may change the drive.
Before a transfer requests a soft restart, wait for the board to confirm that the
host-written files are readable with matching sizes and checksums. Run internal
checks through Raw REPL, then confirm the normal >>> prompt before the final
Ctrl-D: Ctrl-D in Raw REPL executes input instead of rebooting the program.
Check physical-device mount state on the host: the isolated runtime can expose a
different /proc/mounts view. Fresh-save hardware verification took about 32
seconds on the attached host/board, so retain the 60-second visibility deadline.
For the local Linux dev editor, flush all required files and their directories through
the loopback-only Vite helper before MCU verification. The helper only accelerates
writeback; its acknowledgement must never replace the board checksum gate.
Include byte-identical files: a previous transfer or another editor may have left
equal host bytes pending in the OS cache. Continue to skip identical writes.
Resolve static Python imports before a transfer, including imports in reachable
project modules and transitive catalog dependencies. Automatic libraries use the
pinned CircuitPython 10.x bundle in public/circuitpython/, generated by
tools/prepare-circuitpython-libraries.py; do not reformat the hash-verified JSON
assets. Preserve project-owned modules. Prepare all required assets before any
board writes, install into lib/ (font resources at root), and include them in
the existing byte comparison, MCU checksum gate and local nested-directory flush.
Read docs/sensebox-device-changes.md for the behavior, implementation changes,
validation and hardware limitations recorded on 2026-10-19.
- Unit tests:
npm test(vitest). E2e: run headlessly vianpm run test:e2e:headless. npm run typecheck,npm run lint.- Format with Prettier:
npx prettier --write(no npm script). - New source files need the licensing header —
npm run fix-licensing-headersapplies it.