docs: document shared search pattern for feed, gists, and project listings

Add a reusable `text_search_clause` helper in `database.py` that builds a SQLAlchemy `or_` of `ilike` clauses over specified columns, returning `None` when search is blank or the table lacks the columns. Wire it into `get_feed_posts`, `get_gists_list`, and the projects listing so all three public index pages support free-text search via a `search` query parameter. Introduce `_sidebar_search.html` as the single search-box partial, included at the top of each listing's left filter panel with `_action`, `_placeholder`, and `_hidden` locals to preserve active category/tab filters on submit. Expose the `search` field on `FeedOut`, `GistsOut`, and `ProjectsOut` API schemas with corresponding OpenAPI documentation. Update `CLAUDE.md` to note the rate-limiter exemption for `GET`/`HEAD` and the `/openai` gateway, and refresh `README.md` route tables to mention the new search capability on `/feed`, `/gists`, and `/projects`.
This commit is contained in:
2026-06-13 13:24:48 +00:00
parent 6756c980cf
commit 7985336934
15 changed files with 240 additions and 23 deletions
@@ -112,6 +112,7 @@ ACTIONS: tuple[Action, ...] = (
params=(
query("tab", "Feed tab to view."),
query("topic", "Filter by topic."),
query("search", "Search post title and content."),
query("before", "Pagination cursor."),
),
),
@@ -888,6 +889,7 @@ ACTIONS: tuple[Action, ...] = (
params=(
query("language", "Filter by language."),
query("user_uid", "Filter by owner uid."),
query("search", "Search gist title and description."),
query("before", "Pagination cursor."),
),
),