Add KiCad fork diff statistics script

- scripts/kicad-diff-stats.sh: Shows how far our KiCad fork has diverged
  from upstream (last non-our commit)
- Outputs: commit count, files changed, lines added/deleted, file list
- Logs to logs/kicad-diff/ with timestamps
- Update CLAUDE.md with script reference

Current status: 5 commits, 81 files, +1536/-395 lines on top of upstream

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2026-01-05 11:16:46 +01:00
commit c2a69cf9db
2 changed files with 188 additions and 11 deletions

View file

@ -1,19 +1,22 @@
The goal is to build kicad with wasm and run it in a browser
The original research docs are in /docs
A lot of native module have to be compiled to wasm, the most complex is wxwidgets
/kicad and /wxwidgets are git submodules from our own forks
The e2e tests are in /tests, with a README and WHATWORKS md files
The e2e tests are separated per feature
The tests depend on canvas, there's an app to find button positions, use that, don't find buttons by estimating pixels
The test have screenshots that are tracked with git, use compare-screenshots.sh to see what changed, update them when a new image is added
The tests have log files after each run where the js console and cpp logs are visible
Wxwidgets wasm port has hooks for finding positions of UI elements, tests use that
The test have screenshots that are tracked with git, use compare-screenshots.sh to see what changed
Update test images with /scripts/update-baseline-screenshots.sh when a new image is added
The tests have log files in tests/logs/{wxwidgets/kicad}/{test-name} after each run where the js console and cpp logs are visible
Always check screenshots for validating tests
Our current goal is to test every wxwidgets feature kicad uses, write the wasm layer and e2e tests, documented in WHATWORKS
Never run builds manually, we have scripts that run the builds in the /scripts folder
Build wxwidgets and tests with scripts, not manually
Don't change the wxwidgets core unless absolutely necessary, try to fix things in the wasm layer
Don't try to guess what's broken in wxwidgets, use debug tools / symbols, supported by the build script
Build wxwidgets with scripts/build-wxuniversal-wasm.sh
Build kicad with docker/build.sh
Build CPP wxwidgets tests with scripts/builds-wasm-test.sh
# Next up
porting kicad, with most of the dependencies shimmed out and load it in a browser
Don't change the wxwidgets core unless absolutely necessary, try to fix things in the wasm layer.
Don't change kicad unless absolutely necessary - keep our fork as close to upstream as possible.
Run scripts/kicad-diff-stats.sh to see how far our KiCad fork has diverged from upstream.
It's okay to add temporary logging that will be removed for debugging.
Don't try to guess what's broken , use debug tools / symbols, supported by the build scripts