fix(script-error): dedupe popups, richer errors, and deactivate rule #6
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/script-error-popup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Hardens the Run JavaScript action failure UX: one popup per navigation, real exception details (including stack where Firefox Xray allows), and a Deactivate rule path so a broken script can be turned off without leaving the dialog stuck.
What changed
onCompleted/onHistoryStateUpdatedhandlers so a single navigation opens at most one script-error window.name/message/stackinto the popup instead of Firefox’s opaqueERRORstring; keep content-scriptErrorbuiltins out of the pagewithscope so stacks aren’t blanked by Xray..cursor/rules/— optional; can ship separately.Why
Script failures were noisy (duplicate windows), hard to debug (no useful exception text/stack), and awkward to recover from when a rule keeps failing. This makes failures actionable and quieter.
Verification
xpi.src/viaabout:debuggingand trigger a rule script that throws — confirm a single popup, readable details/stack, Deactivate works../build.sh --lint-only(or full build) if packaging/lint is required before merge.Notes / deviations
xpi.src/*(and optional.cursor/rules/*); commit or drop before opening.devper project workflow; do not targetmain.