feat(web): move Hidden tracks out of main nav, surface from Settings

Hidden tracks (M5b quarantine) is a low-frequency surface — it doesn't
warrant a permanent slot in the main nav. Moves the link under a new
'Library' section card on /settings alongside ListenBrainz config.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-01 21:14:01 -04:00
parent 4e47b2e7f5
commit a598ea1418
3 changed files with 13 additions and 14 deletions
-1
View File
@@ -26,7 +26,6 @@
{ href: '/library/artists', label: 'Artists' },
{ href: '/library/albums', label: 'Albums' },
{ href: '/library/liked', label: 'Liked' },
{ href: '/library/hidden', label: 'Hidden' },
{ href: '/search', label: 'Search' },
{ href: '/discover', label: 'Discover' },
{ href: '/requests', label: 'Requests' },
+3 -13
View File
@@ -41,7 +41,7 @@ describe('Shell', () => {
test('renders nav items in expected order', () => {
render(Shell);
const labels = ['Home', 'Artists', 'Albums', 'Liked', 'Hidden', 'Search',
const labels = ['Home', 'Artists', 'Albums', 'Liked', 'Search',
'Discover', 'Requests', 'Playlists', 'Settings'];
for (const label of labels) {
expect(screen.getByRole('link', { name: label })).toBeInTheDocument();
@@ -55,19 +55,9 @@ describe('Shell', () => {
expect(screen.getByRole('link', { name: 'Playlists' })).toHaveAttribute('href', '/playlists');
});
test('Hidden nav link sits between Liked and Search', () => {
test('Hidden link is not in the main nav', () => {
render(Shell);
const hidden = screen.getByRole('link', { name: 'Hidden' });
expect(hidden).toHaveAttribute('href', '/library/hidden');
const labels = screen
.getAllByRole('link')
.map((el) => el.textContent?.trim())
.filter(Boolean);
const idxLiked = labels.indexOf('Liked');
const idxHidden = labels.indexOf('Hidden');
const idxSearch = labels.indexOf('Search');
expect(idxLiked).toBeLessThan(idxHidden);
expect(idxHidden).toBeLessThan(idxSearch);
expect(screen.queryByRole('link', { name: 'Hidden' })).not.toBeInTheDocument();
});
test('non-admin users do not see the Admin nav link', () => {
+10
View File
@@ -97,4 +97,14 @@
</div>
{/if}
</section>
<section class="space-y-3 rounded border border-border bg-surface p-4">
<h2 class="text-lg font-semibold">Library</h2>
<ul class="space-y-2 text-sm">
<li>
<a href="/library/hidden" class="text-accent hover:underline">Hidden tracks</a>
<span class="text-text-secondary"> — tracks you've flagged as bad rips, wrong tags, or otherwise unplayable.</span>
</li>
</ul>
</section>
</div>