Skip to content

Add favicons and improve feature flag handling and cleanup - #3606

Merged
pkendall64 merged 25 commits into
ExpressLRS:masterfrom
pkendall64:4.1/feature-flag-optimisation
Apr 22, 2026
Merged

pkendall64 merged 25 commits into
ExpressLRS:masterfrom
pkendall64:4.1/feature-flag-optimisation

Conversation

@pkendall64

@pkendall64 pkendall64 commented Apr 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Build and tooling

  • Updates src/html/package.json, src/html/vite.config.js, and src/html/babel.config.json as part of the web build upgrade and cleanup.
  • Adds src/html/scripts/check-syntax.mjs and src/html/scripts/check-lint.mjs.
  • Extends src/html/eslint.config.js to support the stricter validation flow.

Feature-flag and asset-size work

  • Reworks src/html/feature-blocks-plugin.js to support comment-based feature blocks more reliably, including nested block handling.
  • Moves the FEATURES object out of runtime app code into the build side via src/html/features.js and src/html/dev-mock-plugin.js.
  • Refactors src/html/src/pages/continuous-wave.js, src/html/src/pages/update-panel.js, and src/html/src/app.js to use the new build-time feature gating.
  • Utilize the @babel/plugin-transform-runtime plugin to reduce the duplicated decorator helper code (big savings here!)
  • Remove mui.js and have our own implementations for ripple effects, overlay and select inputs. This also provides big savings.

UI behavior and hardware gating

  • Adds RX/TX favicon selection in src/html/src/app.js.
  • Hides unsupported hardware features in src/html/src/utils/hardware-schema.js.
  • Fixes hardware page value handling for float-capable fields in src/html/src/pages/hardware-layout.js and src/html/src/utils/libs.js.
  • Minor fixes on the WiFi page around the save button enablement
  • Updates page grouping and related UI wiring in src/html/src/page-groups/general-group.js, src/html/src/page-groups/advanced-group.js, and a few smaller UI files.

Firmware Size Comparison Output

Path Master Firmware Diff Diff %
FCC/Unified_ESP32C3_2400_RX/firmware.bin 1264768 1254688 -10080 -0.80%
FCC/Unified_ESP32C3_2400_TX/firmware.bin 1426480 1417264 -9216 -0.65%
FCC/Unified_ESP32C3_900_RX/firmware.bin 1263920 1253840 -10080 -0.80%
FCC/Unified_ESP32C3_900_TX/firmware.bin 1425408 1416160 -9248 -0.65%
FCC/Unified_ESP32C3_LR1121_RX/firmware.bin 1339072 1328880 -10192 -0.76%
FCC/Unified_ESP32C3_LR1121_TX/firmware.bin 1502416 1493056 -9360 -0.62%
FCC/Unified_ESP32S3_2400_RX/firmware.bin 1132608 1122496 -10112 -0.89%
FCC/Unified_ESP32S3_2400_TX/firmware.bin 1499984 1490608 -9376 -0.63%
FCC/Unified_ESP32S3_900_RX/firmware.bin 1131984 1121824 -10160 -0.90%
FCC/Unified_ESP32S3_900_TX/firmware.bin 1499088 1489696 -9392 -0.63%
FCC/Unified_ESP32S3_LR1121_RX/firmware.bin 1206208 1195968 -10240 -0.85%
FCC/Unified_ESP32S3_LR1121_TX/firmware.bin 1574880 1565360 -9520 -0.60%
FCC/Unified_ESP32_2400_RX/firmware.bin 1186928 1176816 -10112 -0.85%
FCC/Unified_ESP32_2400_TX/firmware.bin 1636128 1626752 -9376 -0.57%
FCC/Unified_ESP32_900_RX/firmware.bin 1186272 1176112 -10160 -0.86%
FCC/Unified_ESP32_900_TX/firmware.bin 1635184 1625776 -9408 -0.58%
FCC/Unified_ESP32_LR1121_RX/firmware.bin 1260688 1250432 -10256 -0.81%
FCC/Unified_ESP32_LR1121_TX/firmware.bin 1711136 1701632 -9504 -0.56%
FCC/Unified_ESP8285_2400_RX/firmware.bin 554016 543344 -10672 -1.93%
FCC/Unified_ESP8285_2400_TX/firmware.bin 537456 527536 -9920 -1.85%
FCC/Unified_ESP8285_900_RX/firmware.bin 553328 542672 -10656 -1.93%
FCC/Unified_ESP8285_900_TX/firmware.bin 536496 526592 -9904 -1.85%
LBT/Unified_ESP32C3_2400_RX/firmware.bin 1265680 1255600 -10080 -0.80%
LBT/Unified_ESP32C3_2400_TX/firmware.bin 1428032 1418832 -9200 -0.64%
LBT/Unified_ESP32C3_LR1121_RX/firmware.bin 1340144 1329952 -10192 -0.76%
LBT/Unified_ESP32C3_LR1121_TX/firmware.bin 1504128 1494768 -9360 -0.62%
LBT/Unified_ESP32S3_2400_RX/firmware.bin 1133440 1123312 -10128 -0.89%
LBT/Unified_ESP32S3_2400_TX/firmware.bin 1501216 1491856 -9360 -0.62%
LBT/Unified_ESP32S3_LR1121_RX/firmware.bin 1207136 1196896 -10240 -0.85%
LBT/Unified_ESP32S3_LR1121_TX/firmware.bin 1576240 1566736 -9504 -0.60%
LBT/Unified_ESP32_2400_RX/firmware.bin 1187776 1177648 -10128 -0.85%
LBT/Unified_ESP32_2400_TX/firmware.bin 1637344 1627984 -9360 -0.57%
LBT/Unified_ESP32_LR1121_RX/firmware.bin 1261616 1251376 -10240 -0.81%
LBT/Unified_ESP32_LR1121_TX/firmware.bin 1712496 1702976 -9520 -0.56%
LBT/Unified_ESP8285_2400_RX/firmware.bin 554720 544064 -10656 -1.92%
LBT/Unified_ESP8285_2400_TX/firmware.bin 538480 528560 -9920 -1.84%

@pkendall64 pkendall64 added bugfixes 🐞 house keeping 🧹 Cleanup of code and house keeping V4.1 🍑 labels Apr 10, 2026
@pkendall64
pkendall64 marked this pull request as draft April 10, 2026 02:16
@pkendall64
pkendall64 force-pushed the 4.1/feature-flag-optimisation branch 3 times, most recently from 29b0298 to bc7eead Compare April 10, 2026 03:48
@pkendall64
pkendall64 force-pushed the 4.1/feature-flag-optimisation branch from bc7eead to f6f9da9 Compare April 10, 2026 04:32
@pkendall64
pkendall64 marked this pull request as ready for review April 10, 2026 04:32
@pkendall64
pkendall64 force-pushed the 4.1/feature-flag-optimisation branch from 5b9fc1a to 906b008 Compare April 11, 2026 02:08
@pkendall64
pkendall64 force-pushed the 4.1/feature-flag-optimisation branch from 906b008 to 5086d02 Compare April 11, 2026 09:01
@pkendall64
pkendall64 force-pushed the 4.1/feature-flag-optimisation branch from 5086d02 to b99b21c Compare April 11, 2026 09:12

@mha1 mha1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ok on Nomad, SuperP and Bayck Gemini RX.

@pkendall64
pkendall64 force-pushed the 4.1/feature-flag-optimisation branch from b99b21c to 46cdac4 Compare April 11, 2026 23:44
@pkendall64
pkendall64 requested a review from mha1 April 11, 2026 23:47
@pkendall64

pkendall64 commented Apr 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Tested ok on Nomad, SuperP and Bayck Gemini RX.

I've asked for another review as I've pushed some more changes which give us another pretty big saving. I promiise theres no more 😄

clean up hashchange listener
fix connections help list markup
scope hardware layout DOM queries
extract inline layout styles
replace mui JS with minimal replacements for overlay, ripple and select fields
@pkendall64
pkendall64 force-pushed the 4.1/feature-flag-optimisation branch from 46cdac4 to 502704b Compare April 12, 2026 04:08

@mha1 mha1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, keep 'em coming. No obvious issues with Nomad, SuperP and Bayck DB Gemini RX. (maybe have another look at the save button color logic)

@pkendall64
pkendall64 force-pushed the 4.1/feature-flag-optimisation branch from 6e2d262 to c6a4c73 Compare April 16, 2026 21:39

@CapnBry CapnBry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on

  • BAYCKRC 900/2400 Dual Band Gemini RX
  • EP2
  • RadioMaster TX16S Internal 2.4GHz TX
  • RadioMaster Bandit 900MHz TX
  • Radiomaster Nexus-XR True Diversity 2.4GHz RX
  • RadioMaster ER6 2.4GHz Diversity+6xPWM RX

Every button and drop down and LED color change seems to light up and respond properly as far as I can tell. Everything looks the same! A lot of work to just make things better with no outward appearance changes. Smaller firmware though? I'll take it!

Comment thread src/html/src/pages/buttons-panel.js Resolved
@pkendall64
pkendall64 force-pushed the 4.1/feature-flag-optimisation branch from a532598 to 6b8c22b Compare April 22, 2026 20:17
@pkendall64
pkendall64 merged commit 5d1b497 into ExpressLRS:master Apr 22, 2026
26 checks passed
@pkendall64
pkendall64 deleted the 4.1/feature-flag-optimisation branch April 22, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfixes 🐞 house keeping 🧹 Cleanup of code and house keeping V4.1 🍑

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants