Add controller button icons - #4
Conversation
There was a problem hiding this comment.
1 issue found across 10 files
Confidence score: 3/5
build.zignow addscontrol_icons.zigto the host test roots, causingzig build testto compile the transitive@cImport("SDL2/SDL.h")dependency throughpixel_font.zigandview_style.zig; this can make the test executable fail to build where SDL2 headers are unavailable. Verify the test environment provides SDL2 or isolate the host test root from this dependency.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="build.zig">
<violation number="1" location="build.zig:468">
P1: Adding control_icons.zig to the host test roots makes `zig build test` compile `@cImport("SDL2/SDL.h")` (via control_icons.zig and transitively pixel_font.zig/view_style.zig), but the test executable built by b.addTest gets no libc or SDL2 and no include path was added. CI (ubuntu-latest) installs only the Zig toolchain in bootstrap.sh, so the CI `build test` step will fail to compile unless SDL2 dev headers happen to be present on the runner. The other tested src/ui files deliberately avoid SDL imports. Either install libsdl2-dev (and link SDL2) for the test root, or restructure control_icons so its tested code doesn't import SDL (e.g. pull the face/width logic into an SDL-free module).</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe PR adds controller icon rendering, maps semantic buttons to physical layouts, replaces UI hint text with icon prompts, and changes loading-screen actions from nullable strings to ChangesController Prompt UI
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This change updates controller prompts to use icons and respects the selected button layout; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant View
participant HandheldUi
participant ControlIcons
participant SDLRenderer
View->>HandheldUi: render prompt or loading action
HandheldUi->>ControlIcons: build and draw icon prompts
ControlIcons->>SDLRenderer: render controller shapes and labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (8 skipped: 8 unsupported.) ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use 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 |
What does this change?
How did you test it?
tools/zig.sh build testtools/zig.sh build fmt-checktools/zig.sh build smoketools/zig.sh build product-checkPORTMASTER_NEW=/path/to/PortMaster-New tools/zig.sh build packageSummary by cubic
Replaces text-only controller hints with pixel controller icons across the UI, and makes face-button prompts respect the System/Swapped button layout setting.
control_icons.zigto render face buttons, dpad, sticks, bumpers, triggers, start, select, and guide icons.GoHandheldUiActionenum, centralizing allowed actions.Written for commit 6d359dc. Summary will update on new commits.
Summary by CodeRabbit
New Features
Tests