Skip to content

fix: log JsVar rejections and handler panics without alerts - #535

Merged
linkdata merged 3 commits into
mainfrom
fix/jsvar-rejection-alerts
Oct 7, 2026
Merged

linkdata merged 3 commits into
mainfrom
fix/jsvar-rejection-alerts

Conversation

@linkdata

@linkdata linkdata commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

JsVar proposal rejections and recovered event-handler panics produce generic browser alerts that users cannot act on. Log these failures without automatic alerts, preserving JsVar rollback, canonical corrections, and size-limit cancellation. Applications can send useful feedback explicitly with source.Request.Alert(...) inside ClientCheck. Ordinary returned handler errors still produce danger alerts.

Replace the internal clientAlertError text-selection interface and helper with ErrEventLogOnly, matched through errors.Is in browser-event and test-hook dispatch. Recovered panics and JsVar rejection errors match this sentinel; explicit alerts remain unaffected. Update the callback and runtime documentation.

Validation:

  • Regression tests cover logged details, returned errors, panics, hooks, wrapped log-only errors, explicit alerts, JsVar rollback/correction, read-only stores, ErrEventUnhandled, and size-limit cancellation.
  • JAWS_REQUIRE_NODE=1 go test -race ./... and JAWS_REQUIRE_NODE=1 go test ./... pass.
  • go generate ./..., go vet ./..., staticcheck ./..., golangci-lint run, gosec -quiet ./..., and go build ./... pass.
  • gofmt, changed-file gofumpt, git diff --check, and rendered go doc review pass.

@linkdata linkdata changed the title fix(ui): leave JsVar rejection alerts to ClientCheck fix: log JsVar rejections and handler panics without alerts Oct 7, 2026
@linkdata
linkdata merged commit ca6c927 into main Oct 7, 2026
7 checks passed
@linkdata
linkdata deleted the fix/jsvar-rejection-alerts branch October 7, 2026 06:41
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.

1 participant