arcraiderstats: add 2x resolution support#408
Conversation
- Add canvas-aware rendering with SCALE factor for all dimensions
- Use 6x10 (header) and terminus-12 (events) fonts at 2x resolution
- Add ArcRaidersTitle@2x.webp logo asset (128x16, nearest-neighbor upscale)
- Add 2x preview image
- Add supports2x: true to manifest
- Add runtime exception for cold-cache HTTP fetch timing
- Change timer text to camel case ("Ends In")
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update recommended interval from 10 seconds to 10 minutes to match the manifest's recommendedInterval of 600 seconds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the arcraiderstats application by introducing comprehensive 2x resolution support. The changes ensure that the application dynamically adapts its rendering, including screen dimensions, scaling factors, and font choices, to provide an optimized visual experience on higher-resolution displays. Additionally, it includes minor fixes for documentation accuracy and text formatting, alongside a necessary adjustment for runtime checks. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively adds 2x resolution support to the arcraiderstats app by introducing resolution-aware constants, fonts, and assets. The changes are well-structured and correctly apply scaling to maintain visual consistency between resolutions. I've identified a minor issue where the font for the map name in 1x resolution is unintentionally changed, which contradicts the PR's goal of leaving 1x rendering unaffected. A suggestion to fix this has been provided.
| # Row 0: Map name (white, tom-thumb) | ||
| map_text = get_event_row_text(event, 0, frame, animation_start_time, timeline_entry["scroll_in_start"], horizontal_scroll_speed) | ||
| row_y = vertical_y + 0 | ||
| content_children.append(render_positioned_text(map_text, row_x, row_y, FONT_TOM_THUMB, COLOR_WHITE)) | ||
| content_children.append(render_positioned_text(map_text, row_x, row_y, FONT_EVENT, COLOR_WHITE)) |
There was a problem hiding this comment.
Using FONT_EVENT for the map name changes its font for 1x rendering from tom-thumb to CG-pixel-3x5-mono. This contradicts the PR description which states that 1x rendering is unchanged. Additionally, the comment on line 537 is now inaccurate as it still refers to tom-thumb.
To maintain the original 1x appearance, consider using FONT_HEADER, which is defined as "6x10" if canvas.is2x() else "tom-thumb". This would be appropriate for the map name text.
| # Row 0: Map name (white, tom-thumb) | |
| map_text = get_event_row_text(event, 0, frame, animation_start_time, timeline_entry["scroll_in_start"], horizontal_scroll_speed) | |
| row_y = vertical_y + 0 | |
| content_children.append(render_positioned_text(map_text, row_x, row_y, FONT_TOM_THUMB, COLOR_WHITE)) | |
| content_children.append(render_positioned_text(map_text, row_x, row_y, FONT_EVENT, COLOR_WHITE)) | |
| # Row 0: Map name (white) | |
| map_text = get_event_row_text(event, 0, frame, animation_start_time, timeline_entry["scroll_in_start"], horizontal_scroll_speed) | |
| row_y = vertical_y + 0 | |
| content_children.append(render_positioned_text(map_text, row_x, row_y, FONT_HEADER, COLOR_WHITE)) |
There was a problem hiding this comment.
Good catch on the stale comment — fixed in 9d9b882.
However, the font change itself is intentional. All three event rows (map, event name, timer) were unified to use the same FONT_EVENT for visual consistency. Using FONT_HEADER for the map name would make it noticeably larger than the other event rows, which we specifically wanted to avoid. The PR description has been updated to clarify this intent.
Font names are now resolution-dependent via FONT_EVENT constant, so inline font references in comments were stale and misleading. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Test plan
pixlet lintpassespixlet checkpasses (with 3s runtime exception)pixlet formatpasses🤖 Generated with Claude Code