Skip to content

Module pages ask in their own box, not browser pop-ups - #127

Merged
renatorgr merged 1 commit into
mainfrom
module-pages-dialogs
Nov 9, 2026
Merged

renatorgr merged 1 commit into
mainfrom
module-pages-dialogs

Conversation

@renatorgr

Copy link
Copy Markdown
Owner

Requested by Renato · project thread

What changes

Inside an AgOpenWeb web card a module page runs in a frame without allow-modals (official Docs/ADD_ON_CARDS.md), so the browser's confirm() and prompt() answer "no" at once without showing anything. Every button that asked a question first did nothing in a card: Save and restart (Wi-Fi), Install (a file or GitHub), Restart, the TM171 write and calibrations, the receiver set-up load and baud rate, the UM982 risky commands, the settings Defaults, Go back. Measured in the simulator inside a frame with the card's sandbox: confirm gives false, prompt gives null.

The four pages (Teensy zWebPage.h, XIAO xPage.h, sprayer sPage.h, seed drill dPage.h) now ask with their own box: ask(text) for OK / Cancel, askText(text) for the Wi-Fi password. Same wording as before, dark or light with the page, fits a 480 × 320 card, buttons 44 px high, Enter and Escape work, a tap outside cancels. The handlers behind those buttons are async and wait for the answer; nothing else in the pages changes. 34 places: Teensy 18, XIAO 8, sprayer 3 + the password, seed drill 3 + the password.

  • Sprayer 0.10.5 and seed drill 0.2.6: .ino.bin and .merged.bin recompiled here (arduino-cli, esp32 core 3.3.12); the other board of each program compiles too.
  • XIAO C3 and S3: .bin and _USB.bin recompiled here, same core.
  • Teensy: only zWebPage.h changes (the page text). The .hex is not rebuilt here: the Teensy toolchain cannot be installed in Claude's cloud sessions. The "Teensy firmware" check compiles it on this pull request; Renato exports the .hex from the Arduino IDE before or after merging, as usual.
  • Simulator check (smoke-test.js): a browser pop-up on any page now fails the check; the sprayer and Teensy pages are also opened inside a frame with an AgOpenWeb web card's sandbox, where the box must open, fit the card and answer (Cancel and Escape do nothing, OK and Enter go on). Passes locally.
  • READMEs: one changelog row each and a note in the page sections.

How to test

  1. An AgOpenWeb web card with the sprayer page (or the simulator once this is published): Module → Save and restart the module opens a box with Cancel / OK inside the card. Firmware → Restart: the box asks the password; Cancel does nothing, the password and OK restart the module.
  2. The same in a normal browser tab: the questions look the same, no browser pop-ups anywhere.
  3. Teensy page (with the new .hex): Firmware → Restart Teensy, IMU → Calibrate, Settings → Defaults: the box opens; OK goes on, Cancel does not.

Checks run here: python3 .github/scripts/check_shared_blocks.py OK (14 blocks), python3 .github/scripts/check_changelog.py OK, node --check on each page's script, python3 Firmware/simulator/build.py _site && node Firmware/simulator/smoke-test.js _site gives "Simulator pages OK".


Generated by Claude Code

…rompt()

Inside an AgOpenWeb web card the page's frame has no allow-modals (official
Docs/ADD_ON_CARDS.md): confirm() returns false and prompt() null without showing
anything, so Save and restart, Install, Restart, the TM171 and receiver actions
and the settings defaults did nothing there. The Teensy, XIAO, sprayer and seed
drill pages now ask with an in-page box (ask / askText) and their handlers await
the answer; the wording is unchanged.

Sprayer 0.10.5 and seed drill 0.2.6 with their .bin rebuilt, the XIAO C3 / S3
.bin rebuilt (esp32 core 3.3.12); the Teensy .hex is left to the IDE. The
simulator check fails on any browser dialog and opens the sprayer and Teensy
pages inside a frame with the card's sandbox, where the box must open, fit
480 x 320 and answer.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VKEBDGEvHbKp3vpaXLUKir
@renatorgr renatorgr self-assigned this Nov 9, 2026
@renatorgr
renatorgr marked this pull request as ready for review November 9, 2026 16:02
@renatorgr
renatorgr merged commit 62572bd into main Nov 9, 2026
5 checks passed
@renatorgr
renatorgr deleted the module-pages-dialogs branch November 9, 2026 16:02
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.

2 participants