Repository navigation
feat(ux): central actionable toast for PTP Ethernet failures and board events, including Advanced - #273
Conversation
…ed; deduplicate board failures
… fade and short lifecycle
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2736431ae2
ℹ️ 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".
| function onLastErrorChanged() { | ||
| if (device.lastError && device.lastError.length > 0) | ||
| root.showMessage(device.lastError, true) |
There was a problem hiding this comment.
Consume each device error only once
DeviceController::setError() emits lastErrorChanged and then deviceMessage for the same failure, so this new handler first records/displays it as critical and the existing onDeviceMessage immediately processes it again as informational. Every native error therefore creates duplicate history entries with conflicting severity, and errors containing words matched by meaningful—for example the Ethernet-driver message containing “not STARTED”—replace the critical 4.2-second toast with a non-error 2.3-second toast. Suppress the paired informational handling or expose a single severity-aware event.
Useful? React with 👍 / 👎.
| const key = (critical ? "E:" : "I:") + userMessage | ||
| const now = Date.now() | ||
| const duplicate = key === lastToastKey && now - lastToastAt < 4000 |
There was a problem hiding this comment.
Allow identical failures after the dedupe window
The four-second deduplication cannot provide another toast for a repeated native error because DeviceController::setError() returns whenever lastError_ == message, so neither signal reaches this code again. For example, after a PHY-down PTP attempt fails and its toast expires, retrying against the same disconnected cable produces the identical actionable error and no second toast even minutes later; the asynchronous start was initially accepted, so PtpExpertPanel does not supply a fallback notification. Clear or re-emit the error per operation before applying this time-bounded UI deduplication.
Useful? React with 👍 / 👎.
2026-10-21 — Actionable center-screen toast UX validated and packagedHEAD The physical operator discovered ESP32-P4 Ethernet was NOT connected to an active laptop/switch port and wanted prompt, actionable UX instead of guessing from PTP OFF. Studio now centrally displays short (~4.2s error/~2.3s info) readable multilined toast on both Main and detached Advanced windows. Native DeviceController error source Matched Windows native installer only, extracted and checksum-verified from GitHub Actions https://github.com/masarray/arstack61850/actions/runs/39552645099/artifacts/12324622926 ; Acceptance not claimed: real board hardware must show ETH driver STARTED, PHY UP before successful verified Announce/Sync/FollowUp; test physical cable-down failure toast and PHY-up recovery toast while Advanced is foreground, and PTP+SV endurance. GUI CI success is not physical GM/SMV lock proof. Keep PR #273/#271/#270 unmerged. |
Physical operator feedback: PTP SOURCE refused to start because ESP32-P4 Ethernet is not connected; the app returned OFF without clearly instructing the operator what to do. UX must be smart, not hide errors in scrollable diagnostics.
Stacked on PR #271/#270, NOT merged to main. Native Windows/Qt CI and bench acceptance mandatory; current hardware PTP SOURCE still unproven.