Add reported-issues, Goodreads sync & notifs

Introduce user-reported-issues and Goodreads shelf sync features and wire them into notifications. Adds Prisma migrations and schema changes (ReportedIssue, GoodreadsShelf, GoodreadsBookMapping), API endpoints for reporting (POST /audiobooks/[asin]/report-issue) and admin management (list, resolve/dismiss, replace), and an admin UI section to view/dismiss/replace reported issues. Adds a new notification event (issue_reported) with updates to notification schemas, docs and provider handling, plus a notification-events constants file. Refactors request creation to use createRequestForUser service, adds a Goodreads sync processor/service/hooks/UI modals, a scrape-resilience util, and related tests and minor integration updates.
This commit is contained in:
kikootwo
2026-02-11 16:49:55 -05:00
parent b013538b63
commit 20c8fb0898
69 changed files with 4167 additions and 766 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ vi.mock('@/components/requests/RequestCard', () => ({
const getStatValue = (label: string) => {
const labelNode = screen.getByText(label);
const container = labelNode.parentElement;
const valueNode = container?.querySelector('p:nth-of-type(2)');
const valueNode = container?.querySelector('div:first-child');
return valueNode?.textContent;
};
@@ -55,7 +55,7 @@ describe('ProfilePage', () => {
const { default: ProfilePage } = await import('@/app/profile/page');
render(<ProfilePage />);
expect(screen.getByText('Authentication Required')).toBeInTheDocument();
expect(screen.getByText('Sign in required')).toBeInTheDocument();
expect(screen.getByText('Please log in to view your profile')).toBeInTheDocument();
});
@@ -87,7 +87,7 @@ describe('ProfilePage', () => {
expect(getStatValue('Total')).toBe('6');
expect(getStatValue('Active')).toBe('2');
expect(getStatValue('Waiting')).toBe('1');
expect(getStatValue('Completed')).toBe('1');
expect(getStatValue('Complete')).toBe('1');
expect(getStatValue('Failed')).toBe('1');
expect(getStatValue('Cancelled')).toBe('1');