Restore legacy issue icons

- bring back the old symbol-based issue category icons in the React issues UI
- keep the issue detail modal fallback aligned with the shared metadata
- add a small regression check for the restored icon set
pull/388/head
Antti Kettunen 2 weeks ago
parent 3470654fc5
commit 497a6f41ed
No known key found for this signature in database
GPG Key ID: C6B2A3D250359BD7

@ -26,8 +26,10 @@ dist/
build/
# Frontend build artifacts and local dependency caches
webui/node_modules/
webui/.tanstack/
webui/.vite/
webui/node_modules/
webui/test-results/
webui/static/dist/
# Virtual environments

@ -1,6 +1,6 @@
import { describe, expect, it } from 'vite-plus/test';
import { normalizeIssuesSearch } from './-issues.helpers';
import { ISSUE_CATEGORY_META, normalizeIssuesSearch } from './-issues.helpers';
describe('normalizeIssuesSearch', () => {
it('falls back to all for unknown categories', () => {
@ -32,4 +32,10 @@ describe('normalizeIssuesSearch', () => {
issueId: 7,
});
});
it('keeps the legacy category icons', () => {
expect(ISSUE_CATEGORY_META.wrong_metadata.icon).toBe('✎');
expect(ISSUE_CATEGORY_META.wrong_cover.icon).toBe('📷');
expect(ISSUE_CATEGORY_META.audio_quality.icon).toBe('🎵');
});
});

@ -14,61 +14,61 @@ export const ISSUE_CATEGORY_META: Record<
> = {
wrong_track: {
label: 'Wrong Track',
icon: 'XT',
icon: '',
description: 'This file plays a different song than expected',
applies: ['track'],
},
wrong_metadata: {
label: 'Wrong Metadata',
icon: 'MD',
icon: '',
description: 'Title, artist, year, or other tags are incorrect',
applies: ['track', 'album'],
},
wrong_cover: {
label: 'Wrong Cover Art',
icon: 'CA',
icon: '📷',
description: 'The artwork is wrong or missing',
applies: ['album'],
},
wrong_artist: {
label: 'Wrong Artist',
icon: 'AR',
icon: '👤',
description: 'This track is filed under the wrong artist',
applies: ['track'],
},
duplicate_tracks: {
label: 'Duplicate Tracks',
icon: 'DT',
icon: '🔁',
description: 'The same track appears more than once in this album',
applies: ['album'],
},
missing_tracks: {
label: 'Missing Tracks',
icon: 'MT',
icon: '',
description: 'Tracks that should be here are missing',
applies: ['album'],
},
audio_quality: {
label: 'Audio Quality',
icon: 'AQ',
icon: '🎵',
description: 'Audio has quality issues like clipping or low bitrate',
applies: ['track'],
},
wrong_album: {
label: 'Wrong Album',
icon: 'AL',
icon: '💿',
description: 'This track belongs to a different album',
applies: ['track'],
},
incomplete_album: {
label: 'Incomplete Album',
icon: 'IA',
icon: '',
description: 'Album is partially downloaded',
applies: ['album'],
},
other: {
label: 'Other',
icon: 'OT',
icon: '💬',
description: 'Any other issue not listed above',
applies: ['track', 'album', 'artist'],
},

@ -236,7 +236,7 @@ export function IssueDetailModal({
<img className={styles.issueHeroAlbumArt} src={issueArtwork} alt="" />
) : (
<div className={styles.issueHeroAlbumPlaceholder}>
{ISSUE_CATEGORY_META[issue.category]?.icon || 'OT'}
{ISSUE_CATEGORY_META[issue.category]?.icon || ISSUE_CATEGORY_META.other.icon}
</div>
)}
</div>

Loading…
Cancel
Save