fix: make GraphicalDisplayRenderer subclassable - #433
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedNext included review available in 17 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughGraphicalDisplayRenderer adds Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Feature · Severity of issue fixed: Low Merge Risk: 🔵 Low · up to A custom item callback can remove and delete itself while the renderer still exposes it as active, allowing a subclass to access freed storage. This is a narrow extension-code risk; clear the active context before removal to address it. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new accessors do not change how items are selected or grant control over them. They do expose a borrowed item pointer whose validity during item removal is not guaranteed, so custom renderer code needs care when using it. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
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 |
## Summary - Removes the dangling esp8266 `include` block from the Compile Examples workflow matrix. ## Why Since bbd2b8f ("Remove esp8266 board configuration from compile workflow") removed the esp8266 matrix board entry, the leftover `include` block (no `fqbn`, empty `libraries`/`sketch-paths`) has spawned a broken esp8266 job on every workflow run — it fails with `IndexError: list index out of range` before compiling anything (see the failed job on #433 and #434). That commit's own verification run was cancelled, so the breakage went unnoticed. This completes the original removal intent and un-breaks the compile workflow for all current and future PRs. ## Verification - `git diff`: only the 9-line esp8266 include block removed; the four board matrix entries (esp32, avr:uno, mkr1000, stm32) and all remaining include blocks (AVR, ESP32, SAMD, STM32) are untouched. - YAML validated: `yaml.safe_load` (temp venv) and independently via ruby `YAML.load_file` — both pass. ## Notes - If the esp8266 compile job is listed as a required status check in branch protection, that repository setting should be updated after this merges. - After this merges, open PRs with a recorded failed esp8266 job (e.g. #433) may need a branch update to re-run checks. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Automated build validation no longer includes ESP8266 board configurations. This changes which board builds are checked automatically; it does not describe a change to the behavior of existing devices. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Makes
GraphicalDisplayRendererproperly subclassable by opening up the geometry helpers and active-item state that custom renderer subclasses need (reported against v5.13.0).Changes
src/renderer/GraphicalDisplayRenderer.h:measureText,toggleIndicatorWidth,rowHeight,drawScrollBar,getMaxRows,getMaxCols,getEffectiveColsfromprivatetoprotected(Some GraphicalDisplayRenderer methods are private and should be at least protected #431).getActiveItem()andisActiveItem(const MenuItem*)with Doxygen comments, exposing the previously privateactiveItemstate (GraphicalDisplayRenderer activeItem information is not available to subclasses #432).MenuRenderer::hasFocuswas verified to already beprotected, so no change was needed there.Verification
pio run -e esp32: SUCCESS (RAM 7.1%, flash 25.8%)pio run -e uno: compiles; fails only the pre-existingcheckprogsizesize limit, byte-identical to the pre-change baseline (local harnesssrc/main.cppincludes all dependencies)GraphicalDisplayRenderersubclass overridingdrawItemand calling the newly protected members plus the new accessors compiles on both environments (proof code reverted afterward)clang-format --dry-run -Werrorclean;git diff --checkcleanFixes #431
Fixes #432
Summary by CodeRabbit