- Extends GET /api/v1/tags with sort=count_desc and min_count query params - New TagsComponent at /tags (public, no auth guard) shows all tags sorted by image count - Clicking a tag navigates to /?tags=<name> for a pre-filtered library view - LibraryComponent reads ?tags= query param on init to support deep-linking from tag browser - Library header gains a "Browse tags" link to /tags for discoverability - All 15 TDD tasks complete; ruff, ng lint, and ng build clean Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.6 KiB
1.6 KiB
Quickstart: Tag Browser
Verifying the feature end-to-end
Prerequisites
- Docker stack running (
docker compose up) - At least 3 images uploaded with different tags (e.g.,
cat,funny,reaction) - At least one image with two tags (e.g., both
catandfunny)
Scenario 1 — Tag browser shows all tags with correct counts
- Open the app (not logged in).
- Navigate to
/tags. - Expected: A list of tags is shown. Each tag displays the number of images with that tag. Tags are ordered from most images to fewest.
- Verify: Count next to
catmatches the number of images actually taggedcat. - Verify: Tags with zero images are not shown.
Scenario 2 — Clicking a tag navigates to the filtered library
- On the
/tagspage, click thecattag. - Expected: Navigated to the library (
/) showing only images taggedcat. - Verify: The active filter chip shows
catin the library.
Scenario 3 — Library page links to tag browser
- Navigate to
/(library, logged in or out). - Expected: A link or button labelled "Browse by tag" (or similar) is visible.
- Click it.
- Expected: The tag browser page loads.
Scenario 4 — Empty state
- If the library has no images at all, navigate to
/tags. - Expected: An empty state message is shown rather than a blank page or error.
API verification
# Sorted by count, zero-count tags excluded
curl http://localhost:8000/api/v1/tags?sort=count_desc&min_count=1
# Existing autocomplete behaviour unchanged
curl http://localhost:8000/api/v1/tags?q=ca&limit=10