You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vibed/quotesdb/.beans/quotesdb-0flf--implement-br...

52 lines
1.6 KiB
Markdown

---
# quotesdb-0flf
title: Implement Browse page (/browse) — paginated quote list with author/tag filter controls
status: completed
type: task
priority: normal
created_at: 2026-03-10T23:32:07Z
updated_at: 2026-03-10T23:32:14Z
blocked_by:
- quotesdb-xqh3
- quotesdb-dgwi
- quotesdb-oukj
- quotesdb-6huz
- quotesdb-kg2l
- quotesdb-k258
- quotesdb-wlpv
---
<context>
The `quotesdb` UI is a Yew (Rust → Wasm) single-page app compiled by Trunk and hosted on Cloudflare Pages. It communicates with the backend API via `fetch` calls. Source lives in `src/bin/ui/`. Run with `trunk serve` for local development.
The Browse page displays a paginated list of all quotes with optional author and tag filters.
</context>
<goal>
Implement the Browse page component (`src/bin/ui/pages/browse.rs`):
1. Read `?page`, `?author`, `?tag` from the URL query string
2. Fetch quotes from `GET /api/quotes` with the query parameters
3. Render each quote with the `QuoteCard` component
4. Render the `Pagination` component with prev/next navigation (update URL query params on page change)
5. Render the `TagFilter` component and an author text input for filtering
6. Render `ErrorDisplay` on error
</goal>
<constraints>
- URL query parameters are the source of truth for current page and filters — use yew-router location hooks to read/write them.
- Changing a filter should reset to page 1.
- The author filter is a free-text input (case-insensitive match on the API side).
</constraints>
<validation>
From the `quotesdb/` directory:
```sh
trunk build
```
</validation>
<commit>
`feat(quotesdb): implement Browse page — paginated list with filters`
</commit>