Skip to content

feat(folders): gamemode logos as folder icons - #176

Merged
SunkenInTime merged 1 commit into
mainfrom
devin/1790044602-gamemode-folder-icons
Sep 22, 2026
Merged

SunkenInTime merged 1 commit into
mainfrom
devin/1790044602-gamemode-folder-icons

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Valorant gamemode logos as folder icons, so a folder for Competitive or Premier strats can carry the mode's symbol instead of a generic glyph.

  • New FolderIconCategory.gamemode with stable ids 2000–2006: Competitive, Premier, Unrated, Deathmatch, Team Deathmatch, Spike Rush, Escalation. folderIconRegistryVersion stays at 97; unknown ids still fall back to the default icon.
  • FolderIconDefinition.asset now requires category (the agent-role entries say FolderIconCategory.role explicitly) so a new asset can't silently land in the wrong tab.
  • Folder edit dialog gets a "Modes" segment after "Roles", filtered via FolderIconRegistry.pickerEntriesFor(FolderIconCategory.gamemode).
  • Assets live in assets/gamemodes/*.webp (registered in pubspec.yaml), flattened to white silhouettes with alpha kept so FolderIconView's BlendMode.srcIn tint works the same as the role icons. assets/gamemodes/README.md records sources (Valorant wiki; Valorant-API for Unrated) and processing.

Decisions worth a look:

  • The wiki's Competitive logo is the Radiant rank flame, so that's what Competitive uses.
  • Swiftplay is omitted: its logo is identical to Unrated once monochrome.

Tests: stable-signature map extended with the seven new assets, unknown-id checks moved from 2000 to 9999, and a category assertion for the Modes tab.

Verified with fvm flutter analyze --no-fatal-infos (only pre-existing infos), fvm flutter test test/folder_icon_registry_test.dart, fvm flutter build linux --debug, and in the running Linux app:

Modes tab in the folder dialog

Side note (not in this PR): on Linux, main() throws MissingPluginException from custom_mouse_cursor (the path package only ships a macOS implementation) before runApp, so the window stays black. I bypassed it locally to capture the screenshot.

Link to Devin session: https://app.devin.ai/sessions/229a226d1db4497ebf0ed86aa193346a
Open in Devin Desktop: https://app.devin.ai/desktop/session/229a226d1db4497ebf0ed86aa193346a?variant=devin
Requested by: @SunkenInTime

RetriggerConfidence Score: 2/5

The asset bundle, stored-ID fallback, and category filtering behave as expected, but the release web runtime encountered a Flutter layout failure before the folder icon picker could be visually verified.

What we checked:

  • Unknown gamemode icon fallback: The registry resolves unknown IDs to the configured default entry. A focused runtime widget reproduction mounted an unknown gamemode-like ID through FolderIconView without an exception and rendered the default star icon. T-Rex
  • Gamemode assets are packaged: The Flutter asset manifest includes the gamemode directory, and the release web build emitted all seven gamemode assets. The focused registry test also passed for stable gamemode asset paths and picker entries. T-Rex
  • Modes picker category mapping: The dialog maps the Modes filter directly to the gamemode category. The executed focused Flutter test verifies that this category contains IDs 2000 through 2006, the seven gamemode choices. T-Rex
  • Rendered a recognized gamemode icon through FolderIconView and an unrecognized gamemode-like ID, where the unknown value resolved to the default ID 1 and displayed the default star icon with no exception. T-Rex
  • Built the release web application using the repository-local Flutter SDK, which completed successfully and emitted the gamemode asset directory, and the focused registry test passed all checks. T-Rex
  • Produced proof for a posted P1 finding with supporting media showing the gamemode-folder-icons rendering. T-Rex
  • Observed a runtime blocker during visual validation: Playwright/Chromium reported RenderBox not laid out and a 404, preventing visual confirmation of the seven icons. T-Rex

Summary

This change adds seven Valorant gamemode logos as selectable folder icons: Competitive, Premier, Unrated, Deathmatch, Team Deathmatch, Spike Rush, and Escalation.

The registry safely falls back to the default icon for unknown stored IDs, the release web build includes all seven assets, and the Modes filter returns the intended gamemode IDs. However, the recorded release-web run logged a RenderBox was not laid out error while loading the Flutter surface, so the folder-icon experience has not been shown to render reliably in the built web app. Do not merge until that layout failure is reproduced with an actionable stack and resolved.

Reviews (1) · Last reviewed commit: "feat(folders): gamemode logos as folder ..."

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 124a87df-3beb-48a2-9b81-1472acaae6ec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff

These findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.

  • P1 Web picker layout fails lib/widgets/folder_edit_dialog.dart:345

    The recorded release-web run creates the Flutter canvas but logs Bad state: RenderBox was not laid out before a valid folder-icon picker capture can be completed. The release artifact is minified, so it does not identify the exact widget that lacks constraints; however, this dialog is the changed UI path that must be exercised. Reproduce this in a debug or profile web build, fix the unconstrained layout, and verify that opening the Modes tab renders all seven images without framework errors.

  • P1 Real built web runtime logs a layout failure during the attempted icon UI capture

    • Bug
      • The recorded Chromium run against the real release web build created a Flutter canvas but logged Bad state: RenderBox was not laid out plus a failed resource request. Consequently the capture does not establish that the folder dialog's Modes tab or all seven FolderIconView image instances rendered successfully.
    • Cause
      • The existing runtime capture encountered a Flutter layout failure while loading the application; the precise source widget cannot be identified from the minified release stack recorded in the artifact.
    • Fix
      • Reproduce in a non-minified debug/profile web or desktop run, resolve the layout failure, then drive the real Add Folder dialog to Modes and capture all seven visible FolderIconView assets in the same recorded Playwright context.

@SunkenInTime
SunkenInTime marked this pull request as ready for review September 22, 2026 20:39
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Re Greptile's "Web picker layout fails" (RenderBox was not laid out): reproduced in a debug web build (fvm flutter build web --debug, headless Chrome, ~30s console capture) on both this branch and unmodified origin/main (8ae7af3). Both log the identical error at startup:

thrown while dispatching notifications for WidgetsBindingObserver.didChangeViewFocus:
Assertion failed: "RenderBox was not laid out: RenderSemanticsAnnotations#... NEEDS-LAYOUT"

It fires in the framework's focus/semantics notification during app load, before any dialog is opened, and is the same on main. Not introduced by this PR; the Modes tab renders on the desktop build (screenshot in the description). Leaving the web startup issue for a separate fix.

@SunkenInTime
SunkenInTime merged commit 6a8bbbe into main Sep 22, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant