Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
774fbc5
16.0.0-beta
netmindz Mar 29, 2026
b293db6
Clarify instructions to always use the correct source code branch
softhack007 Mar 29, 2026
679bb39
Serialize fxdata without ArduinoJSON
willmmiles Mar 28, 2026
56a97a0
Fix off-by-one in fxdata serializer
willmmiles Mar 30, 2026
82ddeff
Remove declaration of removed function
willmmiles Mar 30, 2026
b5556aa
fix for HUB75 builds
softhack007 Mar 30, 2026
a3f7302
Factor out streaming JSON primitives
willmmiles Mar 30, 2026
e4f2964
hotfix: critical bug in candle FX, integer issue in flow FX
DedeHai Apr 2, 2026
da8bfda
bugfix: do not restrict segment inputs to allow trailing strips
DedeHai Apr 3, 2026
227d535
Fix leak in blockRouterAdvertisements
willmmiles Apr 4, 2026
1aba705
Merge pull request #5477 from willmmiles/16_x-ipv6-filter-oops
willmmiles Apr 5, 2026
8228c7e
bugfix in pixelforge (no blur by default), fix glitch in animated gif…
DedeHai Apr 7, 2026
19947ec
Merge pull request #5489 from wled/copilot/fix-wled-discovery-issues
netmindz Apr 10, 2026
188beec
Merge pull request #5465 from netmindz/usage-extended
netmindz Apr 11, 2026
945896d
Merge pull request #5462 from willmmiles/16_x-unlimited-fxdata-size
netmindz Apr 11, 2026
fadc75d
dynarray: Directly apply linker fix
willmmiles Mar 10, 2026
c789e3d
Fix usermod count for LTO
willmmiles Mar 27, 2026
f994c5e
validate_modules: Improve performance
willmmiles Mar 27, 2026
fd890b3
dynarray: Support ESP-IDF
willmmiles Mar 28, 2026
48ab88e
Fix up usermod validation again
willmmiles Mar 30, 2026
4cdc23a
Merge pull request #5497 from willmmiles/16_x-dynarray-fixes
willmmiles Apr 12, 2026
ae36f7e
use memory aligned allocations, fix bug in FFT magnitude (integer pat…
DedeHai Apr 12, 2026
e4a7eff
add search icon back(#5500)
DedeHai Apr 12, 2026
1e42ebf
mask out flag bits in DDP type for compatibility
DedeHai Apr 12, 2026
c1e5ac5
bugfixes in PS effects
DedeHai Apr 17, 2026
83dd1b0
Merge pull request #5516 from kilrah/fix_dmx_ident
softhack007 Apr 19, 2026
974c15c
Fix blending style options list filter for iOS (#5513)
DedeHai Apr 20, 2026
e6077ac
Update rules for PR descriptions and change logs
softhack007 Apr 20, 2026
79fde56
align AI instructions with ``main`` branch
softhack007 Apr 20, 2026
6394bec
Highlight target branch for pull requests
softhack007 Apr 20, 2026
96b0c7b
better packet queuing & pacing for custom palette live preview (#5515)
DedeHai Apr 20, 2026
6afc990
GoL missing return. (#5523)
Brandon502 Apr 22, 2026
7f292b9
fix indentation
DedeHai Apr 22, 2026
c53511b
add placeholder to keep custom palette ID's consistent (#5537)
DedeHai Apr 25, 2026
41e4bbf
Merge pull request #5473 from DedeHai/pin_dropdowns
netmindz Apr 25, 2026
456ddee
Merge pull request #5503 from RobertoD91/main
netmindz Apr 25, 2026
0325e30
cleanup of PR #5503: remove unnecessary changes (#5536)
DedeHai Apr 25, 2026
f79cf56
move pixelforge json list and cpt city palettes to wled repo (#5541)
DedeHai Apr 26, 2026
61bd8bf
update VERSION
DedeHai May 1, 2026
74e0b16
auto-migration for sunrise/sunset legacy config (#5555)
DedeHai May 1, 2026
9fdd487
relax restrictions on DDP protocol, minimal check for artNet (#5554)
DedeHai May 1, 2026
8248966
Name CI artifacts by WLED_RELEASE_NAME instead of PlatformIO env
netmindz Apr 26, 2026
967ef07
Relax artifact name regex to support forks with different project names
netmindz Apr 26, 2026
46dafa2
ci: opt into Node.js 24 for GitHub Actions runners
netmindz Apr 26, 2026
2fa5266
Enhance audio reactive logic with improved input validation and new "…
netmindz Apr 18, 2026
e551ca8
Add audioreactive custom_usermod to multiple ESP8266 environments in …
netmindz Apr 18, 2026
32de108
Clean up redundant preprocessor directive in audio_reactive.cpp
netmindz Apr 18, 2026
1c8cd15
Fix network-only dmType handling and debug diagnostics
Copilot Apr 21, 2026
2c1f3c5
Refactor AR init debug logging for network-only sentinel
Copilot Apr 21, 2026
25668bb
Validate gzipped firmware on ESP8266
willmmiles Apr 28, 2026
89aae70
fix refresh of custom palettes
DedeHai Apr 26, 2026
ef354d0
add usermod palettes to fix AR palette indexing
DedeHai Apr 26, 2026
52d897e
rename and bugfixes
DedeHai Apr 26, 2026
6dcae50
apply default pal before bounds check
DedeHai Apr 26, 2026
5521998
rename removeUsermodPalettes
DedeHai Apr 26, 2026
520d870
fix typo
DedeHai Apr 26, 2026
5dc627e
remove unneeded check
DedeHai Apr 26, 2026
dc5ee3f
Add name to usermod palette
netmindz May 3, 2026
8a653eb
Use usermod name prefix for usermod-supplied palette names
netmindz May 3, 2026
68640f5
Fix AudioReactive palette names to avoid duplication with usermod prefix
netmindz May 3, 2026
13aa7ed
ci: build HUB75 envs in release workflow
netmindz May 2, 2026
2ceeb67
Relax panel limit for devices with PSRAM
netmindz May 2, 2026
923a1ec
fix(ui): derive hasPSRAM from psrSz capability, not free bytes
netmindz May 2, 2026
129c68c
Add support for HD-WF2 ESP32-S3 (HUB75 without PSRAM)
netmindz May 3, 2026
28b4419
Update platformio configurations for 16MB ESP32-S3 MoonHub (HUB75) board
netmindz May 3, 2026
86a218e
Skip GPIO validation for HUB75 types in pin checks and clarify slot u…
netmindz May 3, 2026
a083217
move platformio_release.ini.template to .github/ for cleaner project …
netmindz May 3, 2026
0d93ca8
Merge pull request #5553 from intermittech/add-quinled-v4-ethernet-pr…
netmindz May 3, 2026
dd01940
Fixes issue in Dissolve when a palette has same color pixel as the cu…
BobLoeffler68 May 3, 2026
dd0a83f
align settings overview page width with rest of config pages
DedeHai May 2, 2026
7d999a6
16.0.0-rc1
netmindz May 3, 2026
f90990b
Upload then add notes
netmindz Apr 11, 2026
4374f01
16.0.0
netmindz May 3, 2026
527edf3
16.0.1-dev
netmindz May 3, 2026
362fc66
Add guideline for providing verifiable citations
softhack007 May 5, 2026
6922938
Remove usermods from release
netmindz May 4, 2026
09384e4
Automatically download the right bin for the latest release and install
netmindz May 4, 2026
81b588f
Improve update page UX and rename OTA button for consistency
netmindz May 4, 2026
f08b8b6
Change 'Latest release' to 'Latest version' in update.htm
netmindz May 5, 2026
ecc7f33
Initial plan
Copilot May 7, 2026
0ad958a
Add esp8266_2m_min minimal build env for ESP02 OTA recovery
Copilot May 7, 2026
3a28eba
no need to build esp8266_2m_min for PRs
netmindz May 7, 2026
bd45e1c
docs: clarify when usermod IDs are required
netmindz May 6, 2026
fceca39
Add accessibility guidelines for WLED web UI
softhack007 May 10, 2026
5fcabec
Update accessibility section in web instructions
softhack007 May 10, 2026
95e6efc
Fixed top-LED update logic in grav* audioreactive effects (#5602)
recliq May 11, 2026
a8788a2
fix(Fix_unreachable_netservices_v2): v16 compatibility fixes (#5590)
Joeboyc2 May 12, 2026
75cd8b9
Merge pull request #5608 from wled/softhack007-patch-1
softhack007 May 12, 2026
8300f4d
Audioreactive bugfix: auto-suspend in all realtime modes, but stay ac…
softhack007 May 15, 2026
c75fce1
Fix KIT-VE PHY address from 0 to 1 (#5618)
Techman749 May 16, 2026
e9f8897
Add new environments for ESP32-S3 without PSRAM
softhack007 May 19, 2026
e05e975
Add esp32s3dev_8MB_none to platformio_release.ini.template
softhack007 May 19, 2026
75faf5e
fix esp32s3_4M_none buildenv
softhack007 May 19, 2026
8f53447
use DRAM as fallback if PSRAM fails
DedeHai May 19, 2026
6685ffb
Update PSRAM guidelines in esp-idf instructions
softhack007 May 18, 2026
a9cb41d
Add PSRAM guidelines to AGENTS.md
softhack007 May 18, 2026
6e76071
coding guides: clatify how to check for PSRAM
softhack007 May 20, 2026
77937d3
Align AGENTS.md with `main`
softhack007 May 21, 2026
c7100bd
Update AGENTS.md with ESP32 task synchronization guidelines
softhack007 May 21, 2026
16c0a27
Make twinkle FX look more like it was in the past
DedeHai May 20, 2026
2f9af50
add inverse gamma for original looks
DedeHai May 22, 2026
69244a8
clarify scope of agents.md
softhack007 May 23, 2026
ac1757b
Document branch and release structure in AGENTS.md
softhack007 May 23, 2026
500250c
fix: esp8266_2m_min
netmindz May 8, 2026
493b6b7
Fix revert button #5574
netmindz May 23, 2026
1e3569f
coderabbit: Add base branches to auto_review configuration
softhack007 May 10, 2026
9dec64c
Remove 'V5_C6' from the list of base branches
softhack007 May 23, 2026
87fd423
move some generic AI rules from copilot-instructions.md to AGENTS.md
softhack007 May 25, 2026
a01add2
update usermod guidelines, update example with "be nice but not too n…
softhack007 May 25, 2026
4e98f97
adding coderabbit checks for typical AI slop
softhack007 May 25, 2026
41056f6
small addition to anti-slop rules
softhack007 May 27, 2026
7f640a9
extra debug info for wifi disconnect / teardown / setTxPower
softhack007 May 27, 2026
863213f
human-readable wifi events (WLED_DEBUG)
softhack007 May 27, 2026
dbe8196
add secure coding guides for AI reviews (#5572)
Copilot May 29, 2026
317d0ea
HUB75: use FM6124 driver for 4-scan panels, remove 64x64 limitation i…
softhack007 May 29, 2026
1bcf58a
fix button label regression (#5636)
benjamw May 29, 2026
9af95ec
fix(FX): restore palette wrap in color_wheel() (regression since 0.15…
kaibae19 May 29, 2026
c770e37
Update auth checks for '/reset' endpoint clarification
softhack007 May 29, 2026
47d569f
Modify verification step for numerical accuracy
softhack007 May 29, 2026
2e34fd4
small update
softhack007 May 29, 2026
ec8369d
Update caveats and pitfalls in cpp.instructions.md
softhack007 May 29, 2026
6f1907c
more robustness for improv - gracefully handle broken input
softhack007 May 29, 2026
4c385d4
Restructure usermod documentation for AI, and clarify details
softhack007 May 30, 2026
53e01e8
Remove duplicate sentence in secure code instructions
softhack007 May 30, 2026
dafde84
Update frequency details for usermod loop()
softhack007 May 30, 2026
0ca8664
Pin andelf/nightly-release tospecific commit SHA instead of @main bra…
Copilot May 30, 2026
e869a89
platformio: allow building with espressif framework (instead of tasmota)
softhack007 May 31, 2026
6a44bc0
Merge pull request #5665 from wled/hub75_gamma_hotfix
softhack007 Jun 4, 2026
2eb492c
Update verification instructions for AI-generated code
softhack007 Jun 4, 2026
cd51a4f
Update recommendations for synchronization methods
softhack007 Jun 4, 2026
e8820d7
Update package-lock.json
softhack007 Jun 4, 2026
a8105ca
Clarify repository language requirement
softhack007 Jun 5, 2026
4d2ad7a
Clarify branch maintenance status in instructions
softhack007 Jun 8, 2026
1694d38
Update links in CONTRIBUTING.md to reference AGENTS.md
softhack007 Jun 8, 2026
0d4abd2
Remove outdated Wiki link from CONTRIBUTING.md
softhack007 Jun 8, 2026
0828173
disable fb infer in coderabbit tools list
softhack007 Jun 8, 2026
06e6b23
bugfix in parsePacket(): accept short artnet packets (#5588) for 16_x
DedeHai Jun 9, 2026
76ef0d3
docs: refresh README to reflect current feature set and project state…
netmindz Jun 14, 2026
6f849fd
Update pixel buffer after changing matrix dimensions (#5675)
DedeHai Jun 15, 2026
1103c91
Analog button fix (#5659)
benjamw Jun 15, 2026
81f660f
fix parse error in platformio_override.sample.ini
softhack007 Jun 16, 2026
c5fade4
fix example buildenvs in platformio_override.sample.ini
softhack007 Jun 16, 2026
4c250a8
Rename LED Types: CCT instead of CW (#5612)
DedeHai Jun 18, 2026
76c966d
bugfix in segment deconstructor (#5687)
DedeHai Jun 19, 2026
15699eb
Fix LED glitches on long strips for C3 (#5688)
DedeHai Jun 19, 2026
fb55a50
Restore pre 16.0 looks on several FX (#5684)
DedeHai Jun 19, 2026
505292b
apply gamma during realtime override (#5666)
DedeHai Jun 19, 2026
4d8b73e
fix color jump if changing mid transition (#5601)
DedeHai Jun 19, 2026
2f15fdc
Prevent arduino core from assigning default MISO pin (#5672)
DedeHai Jun 19, 2026
a654469
Add support for Waveshare S3 Matrix Driver board
Will-wastelander May 30, 2026
69c6a93
Bump picomatch from 2.3.1 to 2.3.2
dependabot[bot] Mar 25, 2026
52c3da0
Bump requests from 2.32.4 to 2.33.0
dependabot[bot] Mar 26, 2026
522e458
Bump brace-expansion from 5.0.3 to 5.0.5
dependabot[bot] Mar 27, 2026
68f7eb1
defines needed for audioreactive for waveshare_esp32s3_32MB_hub75
netmindz Jun 20, 2026
9e51054
Pull new ERR_ values into upstream
netmindz Jan 23, 2026
abf263a
Add missing javascript function from WLED-MM
netmindz Jan 31, 2026
f1c7d6e
Add missing javascript function from WLED-MM
netmindz Jan 31, 2026
b9086fa
include waveshare_esp32s3_32MB_hub75 in releases
netmindz Jun 20, 2026
548bd69
remove audioreactive from esp01_1m_full_160 build
softhack007 Jun 20, 2026
d19d6d3
Fix ledmap parser reading past end of map array (#5693)
evanc Jun 21, 2026
106084e
Fix brighness not being applied properly in nightlight mode (#5625)
DedeHai Jun 22, 2026
0c44929
DHT usermod: only abort compilation when USERMOD_DHT_MQTT and WLED_DI…
softhack007 Jun 22, 2026
ce4e974
use NPB version with properly initialized buffers
DedeHai Jun 23, 2026
df5ed15
V5-C6 is now part of V5
softhack007 Jun 23, 2026
afac3ad
align with WLEDMM extended error codes, small improvement for brownou…
softhack007 Jun 23, 2026
c7578a6
fix white channel for "Rainbow" and other color_wheel() based effects…
chschu Jun 24, 2026
070fd3e
respect "make auto segments" when resetting segments (#5696)
DedeHai Jun 24, 2026
f7c9a52
improve bootup behaviour for boot presets (#5686)
DedeHai Jun 24, 2026
5d4e39c
make operator order explicit in showError (index.js)
softhack007 Jun 29, 2026
432e1d8
Add DO NOT MERGE to .coderabbit.yaml ignore PR list
softhack007 Jun 30, 2026
ae4387e
HUB75 bugfixes for 4-scan and chained panels + new "Seengreat" pinout…
softhack007 Jun 30, 2026
7fb1f50
Bugfix in cfg loading in settings_leds.htm (#5701)
DedeHai Jun 30, 2026
29b389d
16.0.1
netmindz Jun 30, 2026
5a787dd
feat: add support for ICN2038P HUB75 panels and implement bus managem…
Antoniojoshy Aug 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
260 changes: 260 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
#
# CodeRabbit configuration — references existing guideline files to avoid
# duplicating conventions. See:
# .github/copilot-instructions.md — project overview & general rules
# docs/cpp.instructions.md — C++ coding conventions
# docs/web.instructions.md — Web UI coding conventions
# docs/cicd.instructions.md — GitHub Actions / CI-CD conventions
# docs/hardening.instructions.md — basic rules for code hardening and robustness
# docs/securecode.instructions.md — more detailed checklists for common vulnerabilities
#
# NOTE: This file must be committed (tracked by git) for CodeRabbit to read
# it from the repository. If it is listed in .gitignore, CodeRabbit will
# not see it and these settings will have no effect.

language: en-US

reviews:
# generic review setting, see https://docs.coderabbit.ai/reference/configuration#reference
auto_apply_labels: true
# abort_on_close: false
high_level_summary: true
review_status: true
collapse_walkthrough: false
poem: false
# sequence_diagrams: false
auto_review:
enabled: true
base_branches:
- main
- 16_x
- 0_15_x
- V5
ignore_title_keywords:
- WIP
- DO NOT MERGE
tools:
fbinfer:
enabled: false # Arduino.h not available on Linux analysis host
cppcheck:
enabled: true # cppcheck works fine without Arduino headers
clang:
enabled: true # clang tidy likewise works

path_instructions:
- path: "**/*.{cpp,h,hpp,ino}"
instructions: >
Follow the C++ coding conventions documented in docs/cpp.instructions.md
and the general project guidelines in AGENTS.md and .github/copilot-instructions.md.

Key rules: 2-space indentation (no tabs), camelCase functions/variables,
PascalCase classes, UPPER_CASE macros. No C++ exceptions — use return codes and debug macros.

Hot-path optimization guidelines (attributes, uint_fast types, caching,
unsigned range checks) apply from pixel set/get operations and strip.show() downward —
NOT to effect functions in FX.cpp, which have diverse contributor styles.

When reviewing PRs labeled "AI" or when source code appears to be AI-generated, perform these additional checks:
1. VERIFY all referenced preprocessor macros, constants and flags exist by searching the codebase - do not trust the AI's claims about what exists.
2. CHECK for reinvention: search for existing functions/patterns that already solve the same problem.
3. CHECK for singleton data (defined but never used) and for dead/disabled code, and suggest to remove them.
4. VERIFY comments match code behavior - AI frequently generates plausible but incorrect comments.
5. VERIFY numerical stability / accuracy of arithmetic expressions. AI is often wrong when it comes to math and numbers.
6. CHECK for implied but weakly justified assumptions - like usermod loop() call frequency - and ask for clarification.
7. FLAG changes that appear unrelated: deleted comments, unnecessary re-formatting or re-factoring, and modifications in files that seem unrelated to the PR description.

# ── Security hardening — firmware (trust-boundary-aware) ────────────────
- path: "wled00/**/*.{cpp,h,hpp,ino}"
instructions: >
Apply the WLED security hardening rules from docs/hardening.instructions.md,
and consult docs/securecode.instructions.md when more details are needed for actionable recommendations.

Trust Boundary Model — enforce input-validation and bounds-checking rules
ONLY at the first untrusted ingress point. Untrusted ingress points are:
- HTTP/JSON API request bodies and query parameters (/json/*, /win, etc.)
- WebSocket message payloads
- UDP datagrams (parsePacket() / recvfrom() and protocol wrappers for
E1.31, DDP, Art-Net, TPM2.net)
- TCP socket reads
- Serial/UART command input
- ESP-NOW raw messages input

A value that has been validated and range-clamped at its ingress handler is
considered TRUSTED for all subsequent WLED core processing. Do NOT flag or suggest
repeated bounds/range checks or internal uses of already-sanitized data.
When it is unclear whether a value has been sanitized upstream, prefer
requesting clarification over raising a false-positive finding.

- path: "wled00/data/**"
instructions: >
Follow the web UI conventions documented in docs/web.instructions.md.

Key rules: indent HTML and JavaScript with tabs, CSS with tabs.
Files here are built into wled00/html_*.h and wled00/js_*.h by tools/cdata.js — never
edit those generated headers directly.

# ── Security hardening — WebUI (always an ingress/output surface) ────────
- path: "wled00/data/**"
instructions: >
Apply the WLED web UI security rules from docs/securecode.instructions.md
(sections WEB1-WEB7).

The Trust Boundary Model does NOT reduce scope here: the WebUI is both
an ingress point (user input, postMessage, fetched config data) and an
output/rendering surface. Always flag DOM XSS risks, unsafe
innerHTML / document.write / insertAdjacentHTML / outerHTML assignments,
postMessage handlers without origin validation, eval() / new Function(),
unsafe location.href or location.replace() assignments, and DOM insertion
from fetched or config-derived data — regardless of where the data
originates.

- path: "wled00/html_*.h"
instructions: >
These files are auto-generated from wled00/data/ by tools/cdata.js.
They must never be manually edited or committed. Flag any PR that
includes changes to these files.

- path: "wled00/js_*.h"
instructions: >
These files are auto-generated from wled00/data/ by tools/cdata.js.
They must never be manually edited or committed. Flag any PR that
includes changes to these files.

- path: "usermods/**"
instructions: >
Usermods are community add-ons.
Each usermod lives in its own directory under usermods/ and is implemented
as a .cpp file with a dedicated library.json file to manage dependencies.
Follow the same C++ conventions as the core firmware (docs/cpp.instructions.md).

# ── Security hardening — usermods (trust-boundary-aware, narrow scope) ───
- path: "usermods/**/*.{cpp,h,hpp}"
instructions: >
For usermods, the untrusted ingress points are:
- readFromConfig(JsonObject& root) and calls to getJsonValue()
- readFromJsonState(JsonObject& obj) — JSON is parsed, but values are client-supplied
- onMqttMessage(char* topic, char* payload) — raw network strings, no core sanitization
- onEspNowMessage(uint8_t* sender, uint8_t* payload, uint8_t len) — raw radio bytes
- onUdpPacket(uint8_t* payload, size_t len) — raw UDP buffer, no core filtering
Values retrieved at these ingress points are considered trusted only after the
usermod itself has validated and range-clamped them.

Flag ONLY downstream uses of ingress-derived values where an out-of-range or
unexpected value can cause misbehaviour that is not already guarded, for example:
- `switch` statements on an ingress-derived value with no `default` branch,
or with a missing `break` where fall-through is unintentional
- array or buffer indexing with an ingress-derived value where the index is
not clamped before use
- arithmetic with an ingress-derived value that can overflow or produce a
negative result used as a size or count

Do NOT flag:
- getJsonValue() call sites themselves (type coercion is handled by ArduinoJson)
- Internal logic that operates on values already confirmed safe at ingress
- Repeated range checks on values that have already been clamped
- General memory-safety patterns unrelated to ingress-derived data flow

- path: ".github/workflows/*.{yml,yaml}"
instructions: >
Follow the CI/CD conventions documented in docs/cicd.instructions.md.

Key rules: 2-space indentation, descriptive name: on every workflow/job/step.
Third-party actions must be pinned to a specific version tag — branch pins
such as @main or @master are not allowed. Declare explicit permissions: blocks
scoped to least privilege. Never interpolate github.event.* values directly
into run: steps — pass them through an env: variable to prevent script
injection. Do not use pull_request_target unless fully justified.

- path: "**/*.instructions.md"
instructions: |
This file contains both AI-facing rules and human-only reference sections.
Human-only sections are enclosed in `<!-- HUMAN_ONLY_START -->` /
`<!-- HUMAN_ONLY_END -->` HTML comment markers and should not be used as
actionable review criteria.

When this file is modified in a PR, perform the following alignment check:
1. For each `<!-- HUMAN_ONLY_START --> ... <!-- HUMAN_ONLY_END -->` block,
verify that its examples and guidance are consistent with (and do not
contradict) the AI-facing rules stated in the same file.
2. Flag any HUMAN_ONLY section whose content has drifted from the surrounding
AI-facing rules due to edits introduced in this PR.
3. If new AI-facing rules were added without updating a related HUMAN_ONLY
reference section, note this as a suggestion (not a required fix).

# ── Secrets / sensitive information scanning ────────────────────────────
- path: "platformio*.ini*"
instructions: >
Scan for secrets, passwords, and other sensitive information accidentally
committed to PlatformIO configuration files (platformio.ini,
platformio_override.ini, platformio_override.ini.sample).

Flag any of the following:
- build_flags entries that define credentials as literal values, e.g.:
-DWIFI_SSID=\"<YOUR_SSID>\" -DWIFI_PASS=\"<YOUR_PASSWORD>\"
-DOTA_PASS=\"<OTA_PASSWORD>\" -DMQTT_PASS=\"<MQTT_PASSWORD>\"
Flag only when the value is not a recognisable placeholder (see below).
- upload_flags or upload_port values that embed a password or auth token (e.g., --auth=<PASSWORD> or any URL using credential-bearing userinfo).
- Any key = <value> pair whose key name contains "pass", "password",
"secret", "token", "key", "credential", or "auth" where the value is
a non-empty, non-placeholder literal string.
- Hardcoded IP addresses or hostnames paired with credentials in the
same environment section.
- API keys or access tokens as literal strings in any field.

Do NOT flag:
- Values that are clearly template placeholders (e.g., YOUR_SSID,
<YOUR_PASSWORD>, changeme, example_token, your_password_here).
- Values that use PlatformIO environment variable substitution (${sysenv.WIFI_PASS} or ${env:WIFI_PASS}).
- Comments that only explain what a field should contain.
- platformio_override.ini.sample entries that contain only
placeholder/example values.

- path: "usermods/**/library.json"
instructions: >
Scan for secrets and sensitive information in usermod dependency manifests.

Flag any of the following:
- Dependency URLs that embed credentials in the URL itself (e.g., any URL containing credential-bearing userinfo).
- Personal access tokens, OAuth tokens, or API keys as literal strings
anywhere in the file.
- Values matching well-known secret patterns: GitHub PATs (ghp_...,
github_pat_...), AWS access keys (AKIA...), or similarly structured
high-entropy tokens.

Do NOT flag:
- Plain HTTPS or SSH URLs without embedded credentials.
- Version specifiers, semver ranges, or commit SHA references that
contain no credential prefix.
- Repository owner/name path segments (not credential material).

- path: "usermods/**/{readme,README,Readme}.md"
instructions: >
Scan for secrets, passwords, and sensitive information in usermod
documentation files, including inside code blocks, inline code, and prose.

Flag any of the following:
- Hardcoded Wi-Fi SSID or password values that appear to be real (non-placeholder)
strings in configuration or installation examples.
- Hardcoded OTA, AP, or MQTT passwords in code snippets or step-by-step
instructions.
- API keys, bearer tokens, or access tokens shown as literal values.
- Example platformio_override.ini snippets that contain real-looking
credential values instead of placeholders.
- Hardcoded IP addresses combined with credentials in the same example.

Do NOT flag:
- Values that are clearly template placeholders (e.g., YOUR_SSID,
<password>, my_secret, changeme, ****).
- Generic prose describing what a field means without supplying a value.
- Asterisk-masked values (e.g., ******, ••••••).

finishing_touches:
# Docstrings | Options for generating Docstrings for your PRs/MRs.
docstrings:
# Docstrings | Allow CodeRabbit to generate docstrings for PRs/MRs.
# default: true - disabled in WLED: has caused confusion in the past
enabled: false
unit_tests:
# default: true - disabled in WLED: we don't have a unit test framework, this option just confuses contributors
enabled: false
120 changes: 120 additions & 0 deletions .github/agent-build.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
applyTo: "**"
---
# Agent-Mode Build & Test Instructions

Detailed build workflow, timeouts, and troubleshooting for making code changes in agent mode. Always reference these instructions first when running builds or validating changes.

## Build Timing and Timeouts

Use these timeout values when running builds:

| Command | Typical Time | Minimum Timeout | Notes |
|---|---|---|---|
| `npm run build` | ~3 s | 30 s | Web UI → `wled00/html_*.h` `wled00/js_*.h` headers |
| `npm test` | ~40 s | 2 min | Validates build system |
| `npm run dev` | continuous | — | Watch mode, auto-rebuilds on changes |
| `pio run -e <env>` | 15–20 min | 30 min | First build downloads toolchains; subsequent builds are faster |

**NEVER cancel long-running builds.** PlatformIO downloads and compilation require patience.

## Development Workflow

### Code Style Summary
- **C++** files in `wled00/` and `usermods/`: 2-space indentation (no tabs), camelCase functions/variables, PascalCase classes, UPPER_CASE macros. No C++ exceptions — use return codes and debug macros.
- **Web UI** files in `wled00/data`: indent HTML and JavaScript with tabs, CSS with tabs.
- **CI/CD workflows** in `.github/workflows`: 2-space indentation, descriptive `name:` on every workflow/job/step. Third-party actions must be pinned to a specific version tag — branch pins such as `@main` or `@master` are not allowed. SHA pinning recommended.

### Web UI Changes

1. Edit files in `wled00/data/`
2. Run `npm run build` to regenerate `wled00/html_*.h` `wled00/js_*.h` headers
3. Test with local HTTP server (see Manual Testing below)
4. Run `npm test` to validate

### Firmware Changes

1. Edit files in `wled00/` (but **never** `html_*.h` and `js_*.h` files)
2. Ensure web UI is built first: `npm run build`
3. Build firmware: `pio run -e esp32dev` (set timeout ≥ 30 min)
4. Flash to device: `pio run -e [target] --target upload`

### Combined Web + Firmware Changes

1. Always build web UI first
2. Test web interface manually
3. Then build and test firmware


## Before Finishing Work - Testing

**You MUST complete ALL of these before marking work as done:**

1. **Run tests**: `npm test` — must pass
2. **Build firmware**: `pio run -e esp32dev` — must succeed after source code changes, **never skip this step**.
- Set timeout to 30+ minutes, **never cancel**
- Choose `esp32dev` as a common, representative environment
- If the build fails, fix the issue before proceeding
3. **For web UI changes**: manually test the interface (see below)

If any step fails, fix the issue. **Do NOT mark work complete with failing builds or tests.**

## Manual Web UI Testing

Start a local server:

```sh
cd wled00/data && python3 -m http.server 8080
# Open http://localhost:8080/index.htm
```

Test these scenarios after every web UI change:

- **Load**: `index.htm` loads without JavaScript errors (check browser console)
- **Navigation**: switching between main page and settings pages works
- **Color controls**: color picker and brightness controls function correctly
- **Effects**: effect selection and parameter changes work
- **Settings**: form submission and validation work

## Troubleshooting

### Common Build Issues

| Problem | Solution |
|---|---|
| Missing `html_*.h` | Run `npm ci; npm run build` |
| Web UI looks broken | Check browser console for JS errors |
| PlatformIO network errors | Retry — downloads can be flaky |
| Node.js version mismatch | Ensure Node.js 20+ (check `.nvmrc`) |

### Recovery Steps

- **Force web UI rebuild**: `npm run build -- -f`
- **Clear generated files**: `rm -f wled00/html_*.h wled00/js_*.h` then `npm run build`
- **Clean PlatformIO build artifacts**: `pio run --target clean`
- **Reinstall Node deps**: `rm -rf node_modules && npm ci`

## CI/CD Validation

The GitHub Actions CI workflow will:
1. Install Node.js and Python dependencies
2. Run `npm test`
3. Build web UI (automatic via PlatformIO)
4. Compile firmware for **all** `default_envs` targets

**To ensure CI success, always validate locally:**
- Run `npm test` and ensure it passes
- Run `pio run -e esp32dev` (or another common firmware environment, see next section) and ensure it completes successfully
- If either fails locally, it WILL fail in CI

Match this workflow in local development to catch failures before pushing.

## Important Reminders

- Always **commit source code**
-  Every pull request MUST include a clear description of *what* changed and *why*.
- **Never edit or commit** `wled00/html_*.h` and `wled00/js_*.h` — auto-generated from `wled00/data/`
- After modifying source code files, check that any **previous comments have been preserved** or updated to reflect the new behaviour.
- Web UI rebuild is part of the PlatformIO firmware compilation pipeline
- Common environments: `nodemcuv2`, `esp32dev`, `esp8266_2m`, `esp32c3dev`, `esp32s3dev_8MB_opi`
- List all PlatformIO targets: `pio run --list-targets`
Loading