Skip to content

feat: custom audio/video file icons#54

Merged
twangodev merged 5 commits into
mainfrom
feat/audio-video-file-icons
Jun 22, 2026
Merged

feat: custom audio/video file icons#54
twangodev merged 5 commits into
mainfrom
feat/audio-video-file-icons

Conversation

@twangodev

@twangodev twangodev commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Distinct music (audio) and film (video) file-type icons via a FileIconProvider, plus a fix so .m2t files classify as video instead of audio.

Summary by CodeRabbit

  • New Features

    • Added custom audio and video file icons displayed in the editor for improved visual file identification
  • Bug Fixes

    • Fixed TypeScript file type conflict affecting media file classification
    • Expanded video format support to include additional media transport stream containers

The frontend descriptor registers .m2t but MediaClassification.VIDEO_EXTENSIONS
omitted it, so .m2t files classified as audio. This affects both the file icon
and playback (PlayerConfig.isVideo drives the player UI via EditorMediaSource).
Sync the set to the descriptor's video extensions: add m2t, drop the unused ts
(.ts stays unregistered to avoid clobbering TypeScript files).
16x16 monochrome SVGs (light #6C707E, dark #CED0D6) adapted from Lucide
file-music and file-video-camera. Live in the frontend module so they ship
client-side for Remote Dev split mode.
Add a FileIconProvider that returns the audio or video icon per file based on
MediaClassification.isVideo, keeping the single Media file type intact. Providers
are consulted before FileType.getIcon, so this overrides the generic icon in the
project tree, tabs, and navigation without touching the editor-selection paths.
Swap the file-shaped file-music/file-video-camera pair for the bolder music
note and film strip so the type reads at a glance, and thin the stroke from
2.5 to Lucide's native 2.0.
Copilot AI review requested due to automatic review settings June 22, 2026 16:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@twangodev, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 37 minutes and 58 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2f8ffc50-2987-403d-94e3-9eeba62218c6

📥 Commits

Reviewing files that changed from the base of the PR and between f12fbd7 and d7c6602.

📒 Files selected for processing (1)
  • THIRD-PARTY-NOTICES.md
📝 Walkthrough

Walkthrough

Removes "ts" from VIDEO_EXTENSIONS in MediaClassification (to avoid conflicting with TypeScript files) and adds "m2t". Adds JetplayIcons with Audio/Video SVG icon constants, a MediaFileIconProvider that returns the appropriate icon based on extension classification, registers it in the plugin XML, and adds resource-presence and classification tests.

Changes

Media Icon Provider and Classification Fix

Layer / File(s) Summary
VIDEO_EXTENSIONS fix and transport-stream test
shared/src/main/kotlin/dev/twango/jetplay/media/MediaClassification.kt, shared/src/test/kotlin/dev/twango/jetplay/media/MediaClassificationTest.kt
Removes "ts" from VIDEO_EXTENSIONS and adds "m2t", updates the comment to explain the TypeScript exclusion, and adds a test asserting mts, m2ts, and m2t classify as video.
JetplayIcons, MediaFileIconProvider, plugin wiring, and resource test
frontend/src/main/kotlin/dev/twango/jetplay/editor/JetplayIcons.kt, frontend/src/main/kotlin/dev/twango/jetplay/editor/MediaFileIconProvider.kt, frontend/src/main/resources/dev.twango.jetplay.frontend.xml, frontend/src/test/kotlin/dev/twango/jetplay/editor/MediaFileIconResourcesTest.kt
Defines JetplayIcons with Audio and Video icon fields loaded from SVGs, implements MediaFileIconProvider to return the correct icon via MediaClassification.isVideo, registers it as a fileIconProvider in the plugin XML, and tests that all four icon SVG resources exist on the classpath.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • twangodev/jetplay#12: Also modifies VIDEO_EXTENSIONS in MediaClassification.kt, directly touching the same set that this PR updates by removing "ts" and adding "m2t".

Poem

🐰 Hippity hop, an icon's the thing,
A musical note or a video ring!
No TypeScript files shall masquerade here,
m2t joins the party with mts and cheer.
The rabbit paints icons with SVG art—
Audio 🎵, Video 🎬, each plays its part!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: custom audio/video file icons' directly and clearly summarizes the main change—introducing custom icons for audio and video files—which is the primary focus of the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/audio-video-file-icons

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 and usage tips.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2026.1.0
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@twangodev twangodev merged commit b3769a4 into main Jun 22, 2026
9 checks passed
@twangodev twangodev deleted the feat/audio-video-file-icons branch June 22, 2026 16:30
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.

2 participants