feat(web): /admin/quarantine aggregated queue with resolution actions

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-30 20:40:34 -04:00
parent 0d7a65cffb
commit 3bfec944c7
4 changed files with 677 additions and 5 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
{ href: '/admin', label: 'Overview', icon: LayoutGrid },
{ href: '/admin/integrations', label: 'Integrations', icon: Plug },
{ href: '/admin/requests', label: 'Requests', icon: ListChecks },
{ href: '/admin/quarantine', label: 'Quarantine', icon: ShieldX, placeholder: true },
{ href: '/admin/quarantine', label: 'Quarantine', icon: ShieldX },
{ href: '/admin/users', label: 'Users', icon: Users, placeholder: true },
{ href: '/admin/library', label: 'Library', icon: FolderTree, placeholder: true }
];
+19 -4
View File
@@ -38,14 +38,29 @@ describe('AdminSidebar', () => {
);
});
test('Quarantine link is active when on /admin/quarantine', () => {
state.pageUrl = new URL('http://localhost/admin/quarantine');
render(AdminSidebar);
expect(screen.getByRole('link', { name: /quarantine/i })).toHaveAttribute(
'aria-current',
'page'
);
});
test('Quarantine renders as a real link', () => {
state.pageUrl = new URL('http://localhost/admin');
render(AdminSidebar);
const link = screen.getByRole('link', { name: /quarantine/i });
expect(link).toHaveAttribute('href', '/admin/quarantine');
});
test('placeholder items render as non-links with aria-disabled', () => {
state.pageUrl = new URL('http://localhost/admin');
render(AdminSidebar);
expect(screen.queryByRole('link', { name: /quarantine/i })).not.toBeInTheDocument();
const quar = screen.getByText(/quarantine/i);
expect(quar.closest('[aria-disabled="true"]')).toBeInTheDocument();
// Users + Library are also placeholders today.
// Users + Library are still placeholders today.
expect(screen.queryByRole('link', { name: /^users$/i })).not.toBeInTheDocument();
expect(screen.queryByRole('link', { name: /^library$/i })).not.toBeInTheDocument();
const users = screen.getByText(/^users$/i);
expect(users.closest('[aria-disabled="true"]')).toBeInTheDocument();
});
});