-
-
Notifications
You must be signed in to change notification settings - Fork 120
404 mystery (implements #288) #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds a compact 404 HTML asset, updates the main 404 page content and styling (including language attribute, typography, and a new "Akemi" mysteries list), registers the new asset in the UI generation list, and makes the server NotFound handler choose between mini and full 404 pages based on build-time macros. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
Note over Server: NotFound handler (build-time decision)
Client->>Server: Request unknown path
Server->>Server: Evaluate build-time flags\n(WLEDMM_SAVE_FLASH defined OR !ARDUINO_ARCH_ESP32)
alt mini page condition true
Server-->>Client: Respond with PAGE_404_mini (compact HTML)
else
Server-->>Client: Respond with PAGE_404 (full HTML with intro and mysteries list)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
wled00/data/404.htm(1 hunks)wled00/data/404mini.htm(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
wled00/data/**/*.{htm,html,css,js}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
wled00/data/**/*.{htm,html,css,js}: Use tabs for indentation in web UI files (.htm/.html/.css/.js) under wled00/data
After editing web UI files, run npm run build to regenerate embedded headers
Manually validate web UI changes via local HTTP server and browser
Files:
wled00/data/404.htmwled00/data/404mini.htm
wled00/data/**/*.{htm,html,js,css}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Check the browser console for JavaScript errors after web UI changes
Files:
wled00/data/404.htmwled00/data/404mini.htm
🧠 Learnings (3)
📓 Common learnings
Learnt from: softhack007
Repo: MoonModules/WLED-MM PR: 270
File: wled00/fcn_declare.h:403-406
Timestamp: 2025-10-22T21:59:24.331Z
Learning: In MoonModules/WLED-MM PR #270, the out-of-bounds null-terminator write in wled00/util.cpp (extractModeSlider) is deferred and tracked in Issue #272; do not address it within PR #270.
📚 Learning: 2025-10-12T21:55:59.766Z
Learnt from: CR
Repo: MoonModules/WLED-MM PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-12T21:55:59.766Z
Learning: Applies to wled00/data/**/*.{htm,html,css,js} : Manually validate web UI changes via local HTTP server and browser
Applied to files:
wled00/data/404mini.htm
📚 Learning: 2025-10-12T21:55:59.766Z
Learnt from: CR
Repo: MoonModules/WLED-MM PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-12T21:55:59.766Z
Learning: Applies to wled00/data/**/*.{htm,html,js,css} : Check the browser console for JavaScript errors after web UI changes
Applied to files:
wled00/data/404mini.htm
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
- GitHub Check: Builds (esp32_4MB_PSRAM_S)
- GitHub Check: Builds (athom_music_esp32_4MB_M)
- GitHub Check: Builds (adafruit_matrixportal_esp32s3_tinyUF2)
- GitHub Check: Builds (esp32S3_16MB_PSRAM_M_HUB75)
- GitHub Check: Builds (seeed_esp32c3_4MB_S)
- GitHub Check: Builds (esp32S3_WROOM-2_M)
- GitHub Check: Builds (esp32c3dev_4MB_M)
- GitHub Check: Builds (esp32c3mini_dio_4MB_M)
- GitHub Check: Builds (esp32c3dev_2MB_M)
- GitHub Check: Builds (esp32S3_4MB_PSRAM_S)
- GitHub Check: Builds (esp32S3_4MB_S)
- GitHub Check: Builds (esp32S3_4MB_PSRAM_M)
- GitHub Check: Builds (esp32S3_8MB_S)
- GitHub Check: Builds (esp32S3_8MB_M)
- GitHub Check: Builds (esp32_16MB_V4_M)
- GitHub Check: Builds (esp32_4MB_V4_HUB75_forum)
- GitHub Check: Builds (esp32_16MB_V4_S)
- GitHub Check: Builds (esp32S3_16MB_PSRAM_M_HUB75)
- GitHub Check: Builds (esp32S3_8MB_PSRAM_M)
🔇 Additional comments (3)
wled00/data/404.htm (1)
1-83: Reminder: Build and validate the web UI changes.After modifying this file, ensure you:
- Run
npm run buildto regenerate embedded headers- Manually validate via local HTTP server and browser
- Check the browser console for JavaScript errors
As per coding guidelines, these steps are required for all web UI file changes under wled00/data.
wled00/data/404mini.htm (2)
1-47: LGTM! Minimal 404 page implementation looks good.The implementation is clean and appropriate for a minimal 404 page. The structure, styling, and content are straightforward.
Note: This file shares CSS and the base64 image with 404.htm. While this creates some duplication, it's acceptable for static HTML assets where both files need to be self-contained.
1-47: Reminder: Build and validate the web UI changes.After adding this new file, ensure you:
- Run
npm run buildto regenerate embedded headers- Manually validate via local HTTP server and browser
- Check the browser console for JavaScript errors
As per coding guidelines and retrieved learnings, these steps are required for all web UI file changes under wled00/data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
wled00/data/404.htm(3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
wled00/data/**/*.{htm,html,css,js}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
wled00/data/**/*.{htm,html,css,js}: Use tabs for indentation in web UI files (.htm/.html/.css/.js) under wled00/data
After editing web UI files, run npm run build to regenerate embedded headers
Manually validate web UI changes via local HTTP server and browser
Files:
wled00/data/404.htm
wled00/data/**/*.{htm,html,js,css}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Check the browser console for JavaScript errors after web UI changes
Files:
wled00/data/404.htm
🧠 Learnings (4)
📓 Common learnings
Learnt from: softhack007
Repo: MoonModules/WLED-MM PR: 270
File: wled00/fcn_declare.h:403-406
Timestamp: 2025-10-22T21:59:24.331Z
Learning: In MoonModules/WLED-MM PR #270, the out-of-bounds null-terminator write in wled00/util.cpp (extractModeSlider) is deferred and tracked in Issue #272; do not address it within PR #270.
Learnt from: softhack007
Repo: MoonModules/WLED-MM PR: 289
File: wled00/data/404.htm:51-76
Timestamp: 2025-11-23T18:45:51.978Z
Learning: In wled00/data/404.htm, the heading "Top 10 Mysteries" intentionally lists 11 items—the count mismatch is a deliberate meta-joke and easter egg that fits the mystery theme of the 404 page.
📚 Learning: 2025-11-23T18:45:51.978Z
Learnt from: softhack007
Repo: MoonModules/WLED-MM PR: 289
File: wled00/data/404.htm:51-76
Timestamp: 2025-11-23T18:45:51.978Z
Learning: In wled00/data/404.htm, the heading "Top 10 Mysteries" intentionally lists 11 items—the count mismatch is a deliberate meta-joke and easter egg that fits the mystery theme of the 404 page.
Applied to files:
wled00/data/404.htm
📚 Learning: 2025-10-22T21:59:24.331Z
Learnt from: softhack007
Repo: MoonModules/WLED-MM PR: 270
File: wled00/fcn_declare.h:403-406
Timestamp: 2025-10-22T21:59:24.331Z
Learning: In MoonModules/WLED-MM PR #270, the out-of-bounds null-terminator write in wled00/util.cpp (extractModeSlider) is deferred and tracked in Issue #272; do not address it within PR #270.
Applied to files:
wled00/data/404.htm
📚 Learning: 2025-11-14T13:55:44.442Z
Learnt from: softhack007
Repo: MoonModules/WLED-MM PR: 0
File: :0-0
Timestamp: 2025-11-14T13:55:44.442Z
Learning: In MoonModules/WLED-MM, always flag Variable Length Arrays (VLA) during code reviews, especially when they could overflow available stack space (typically 2K-4K on ESP32/ESP8266). VLAs based on dynamic parameters like segment dimensions, particle counts, or pixel buffers should be highlighted and require justification from the author. Prefer fixed-size arrays, heap allocation, or bounded VLAs with explicit maximum size constraints.
Applied to files:
wled00/data/404.htm
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
- GitHub Check: Builds (esp32S3_4MB_PSRAM_M)
- GitHub Check: Builds (esp32_4MB_V4_S)
- GitHub Check: Builds (esp32_4MB_V4_HUB75_forum)
- GitHub Check: Builds (esp32c3dev_2MB_M)
- GitHub Check: Builds (adafruit_matrixportal_esp32s3_tinyUF2)
- GitHub Check: Builds (athom_music_esp32_4MB_M)
- GitHub Check: Builds (esp32c3mini_dio_4MB_M)
- GitHub Check: Builds (seeed_esp32c3_4MB_S)
- GitHub Check: Builds (esp32s2_PSRAM_S)
- GitHub Check: Builds (esp32S3_8MB_PSRAM_M)
- GitHub Check: Builds (esp32S3_8MB_M)
- GitHub Check: Builds (esp32S3_WROOM-2_M)
- GitHub Check: Builds (esp32S3_16MB_PSRAM_M_HUB75)
- GitHub Check: Builds (esp32S3_8MB_S)
- GitHub Check: Builds (esp32S3_4MB_PSRAM_S)
- GitHub Check: Builds (esp32S3_4MB_PSRAM_M)
- GitHub Check: Builds (esp32_16MB_V4_S)
- GitHub Check: Builds (esp32_16MB_V4_M)
- GitHub Check: Builds (esp32_4MB_V4_S)
- GitHub Check: Builds (esp32_4MB_V4_HUB75_forum)
🔇 Additional comments (3)
wled00/data/404.htm (3)
2-2: LGTM! Good accessibility improvement.Adding the
lang="en"attribute helps screen readers and improves the page's accessibility.
35-35: LGTM! Good CSS improvements.Adding the
sans-seriffallback (line 35) improves font rendering reliability, and simplifying0pxto0(line 39) follows CSS best practices.Also applies to: 39-39
1-76: Remember to regenerate embedded headers after modifying web UI files.After making changes to this HTML file, ensure you run
npm run buildto regenerate the embedded headers, and validate the changes via a local HTTP server and browser console.As per coding guidelines for web UI files.
the page that exists where no page should exist
-D WLEDMM_SAVE_FLASH, no size increaseSummary by CodeRabbit
New Features
Style
✏️ Tip: You can customize this high-level summary in your review settings.