C-1: selection events carry per-item client data (wx DOM port fix + tests)#35
Open
matejcsok-ee wants to merge 3 commits into
Open
C-1: selection events carry per-item client data (wx DOM port fix + tests)#35matejcsok-ee wants to merge 3 commits into
matejcsok-ee wants to merge 3 commits into
Conversation
Drives pcbnew's Track & Via Properties dialog: seed predefined via sizes via (setup (user_via ...)), Ctrl+A the sole via, pick a size, assert the diameter field. RED (NULL client data -> 0) / GREEN (0.9). Bumps wxwidgets to the C-1 fix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Standalone Emscripten test app driving the exact buggy path: wxChoice/ wxListBox/wxComboBox items appended WITH client data; the selection handler checks the command event carries it (InitCommandEventWithItems), self-reporting [REPRO] <name>: PASS/FAIL to the console. Plus its Makefile.wasm target and the Playwright parity-audit spec that drives all three widgets. Extracted from the wxwidgets-diff parity-fix branch (e8f3b4c slice: C-1 only). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…-bugs) Cherry-pick of the wxwidgets-diff EH fix (wx cfadc51cc2, orig ac1427d156): wxApp::OnExceptionInMainLoop() returns true so a throwing event handler no longer reaches WXConsumeException -> ExitMainLoop(), which under native wasm-EH destroys the top-level window (blank page). Needed here because the dom-port-bugs e2e on main exercises exactly this path and fails without it (PR #35 CI run 29090433643). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extracts the parity audit's single Critical finding (C-1) from the
wxwidgets-diffumbrella branch into a standalone change: the wxWidgets DOM port's hand-rolledwxEVT_CHOICE/wxEVT_LISTBOX/wxEVT_COMBOBOXdispatch never calledInitCommandEventWithItems(), soevent.GetClientObject()/GetClientData()was always NULL — even for items appended with client data.Product impact: pcbnew's Track & Via Properties dialog reads a
VIA_DIMENSION*off the selection event with no null guard; in WASM the null deref silently reads 0 (no trap), so picking a predefined via size set the diameter/drill fields to 0 instead of the predefined value.Fix
wxwidgets@730b8862(branchc1-clientdataon the wx fork, atopwasm-port): callInitCommandEventWithItems()before dispatch insrc/wasm/{choice,combobox,listbox}.cpp— 3 files, 7 insertions, wasm layer only.Tests
tests/kicad/via-clientdata.spec.ts— KiCad-level e2e: crafted one-via board, Track & Via Properties, pick predefined0.9 / 0.45→ Via diameter field must become 0.9, not 0. (RED on the unfixed binary: field goes to 0.)tests/apps/standalone/selevent-clientdata/+tests/e2e/parity-audit.spec.ts— widget-level repro driving all three widget types; self-reports[REPRO] <widget>_clientdata: PASS/FAILto the console.Verification
Local run on a fresh
kicad_editorbuild: e2e green (diameter0.7 → 0.9), screenshot-checked. Both tests previously ran RED→GREEN onwxwidgets-diff(CI run 29019091857 green includes them).🤖 Generated with Claude Code