feat(profile): add a desktop Page-tags section
All checks were successful
deploy / test-backend (pull_request) Successful in 27m40s
deploy / test-frontend (pull_request) Successful in 10m22s
deploy / build-and-push (pull_request) Has been skipped
deploy / deploy (pull_request) Has been skipped

Page tags were a first-class section of the mobile Library tab but had no
home in the desktop /profile tabs, so desktop users couldn't browse their
tagged pages without going through /search. Add a /profile/page-tags route
that reuses PageTagsList (the same component the mobile Library renders) and
a "Page tags" tab between Collections and History.

The loader mirrors the library wrapper's page-tags fetch; 401 → sign-in
prompt, matching the other profile sub-routes.

e2e: the desktop Page-tags tab navigates to /profile/page-tags and renders
the list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-06-25 20:31:07 +02:00
parent dee53fa212
commit 18e6b501e0
7 changed files with 95 additions and 3 deletions

View File

@@ -50,6 +50,33 @@ test('Profile link in nav for authed users; landing shows counts', async ({ page
await expect(page.getByTestId('overview-collections')).toBeVisible();
});
test('Page tags tab reaches the page-tags list on desktop', async ({ page }) => {
// Page tags are a first-class Library section on mobile; desktop reaches
// them through this profile tab.
await stubAuthenticated(page);
await page.route('**/api/v1/me/page-tags?*', (route) =>
route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ items: [], page: { limit: 100, offset: 0, total: 0 } })
})
);
// Registered after the general route so distinct URLs resolve here.
await page.route('**/api/v1/me/page-tags/distinct*', (route) =>
route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ items: [] })
})
);
await page.goto('/profile');
await expect(page.getByTestId('tab-page-tags')).toBeVisible();
await page.getByTestId('tab-page-tags').click();
await expect(page).toHaveURL(/\/profile\/page-tags$/);
await expect(page.getByTestId('library-page-tags-empty')).toBeVisible();
});
test('Account tab reaches the password form', async ({ page }) => {
await stubAuthenticated(page);
await page.goto('/profile');