69 Commits
Author SHA1 Message Date
junvandCopilot b9917f0a4e fix: add missing cached field to error fallback SearchResponse
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 18:14:57 +11:00
junvandCopilot df8bd7fa7d feat: configure Redis URL via UI settings
- Add redis_url to SQLite settings table (persisted across restarts)
- On startup, prefer DB-stored URL over REDIS_URL env var
- Add reconnect_redis() to support live URL changes without restart
- Settings API now accepts/returns redis_url field
- Cache tab shows editable URL input with save button and connection status
- Immediate feedback: shows Connected/Disconnected after save

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 18:10:11 +11:00
junvandCopilot 08937c3b8b feat: show cached badge in search stats when results from cache
- Add 'cached' boolean field to SearchResponse model
- Set cached=True when returning Redis-cached results
- Display green 'cached' pill with database icon in stats header

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:29:29 +11:00
junvandCopilot e9a5d68553 feat: Redis search cache with configurable TTL
- Add optional Redis caching for search results (REDIS_URL env var)
- Cache TTL configurable via UI: 0h (disabled) to 168h (1 week), default 6h
- New backend modules: cache.py (async Redis get/set/flush), settings.py (SQLite settings table)
- New API endpoints: GET/PUT /api/settings, DELETE /api/cache
- New 'Cache' tab in Settings modal with status indicator, preset buttons, slider, and flush
- Cache keys are deterministic hashes of query+category+page+image_size+engines
- Redis is fully optional: graceful no-op when REDIS_URL unset or Redis unreachable
- Updated Dockerfile, README, CHANGELOG, FEATURES

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:26:14 +11:00
junvandCopilot bf76393456 fix: forward browser Host via Vite proxy for correct API docs URLs
Vite proxy now sends X-Forwarded-Host and X-Forwarded-Proto headers
to the backend, so /openapi.json and /docs show the actual browser
address (e.g. http://192.168.1.28:5173) instead of localhost:8000.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:15:43 +11:00
junvandCopilot 0adad147f5 fix: dynamic API docs URLs match browser address
OpenAPI schema now derives the server URL from the incoming request
(Host header + X-Forwarded-Proto/X-Forwarded-Host for reverse proxies).
Curl examples in API docs use $BASE_URL placeholder which is replaced
at serve-time with the actual origin, so docs work correctly behind
nginx or any reverse proxy with a custom domain.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:12:35 +11:00
junvandCopilot b36d3e53b5 feat: accessibility overhaul, agent-friendly API, standardized errors
P0 fixes:
- Image result cards are now real <a> links (open-in-new-tab, Cmd-click, copy-link)
- aria-label on all icon-only buttons (settings, clear, close, nav, toggles, delete)
- Search input semantics: label, name=q, type=search, combobox ARIA pattern
- Visible focus-visible ring on all interactive elements, removed bare outline-none

P1 fixes:
- Skip to main content link for keyboard navigation
- Proper heading hierarchy (h1/h2) and landmark elements (nav, main, aside)
- aria-live regions for loading/results/error announcements
- Custom favicon SVG (eliminates 404 console errors)
- Dialog/modal semantics with role=dialog and aria-modal

P2 API improvements:
- result_id, rank, engine on every result; timestamp, total_results, has_next on response
- Standardized APIError model (code/message/details/retry_hint) on all error responses
- X-Response-Time-Ms and rate-limit headers on all responses
- curl examples and sample JSON in OpenAPI docs for every endpoint
- Global exception handler returns consistent error JSON
- engines parameter in URL for reproducible sessions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:06:09 +11:00
junvandCopilot bd22089d23 Update CHANGELOG and FEATURES docs for v1.3.0
- Lightbox navigation with arrow keys
- Visited link styling
- Mobile settings modal fix
- Search stats collapsed by default on mobile

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 16:28:04 +11:00
junv a09c245d6e UI update 2026-02-23 16:24:33 +11:00
junv 40ef206667 update 2026-02-23 16:22:07 +11:00
junv b1e6712283 update image 2026-02-23 16:13:45 +11:00
junv 16968b8565 add masonry image layout 2026-02-23 16:09:52 +11:00
junv 7c0430f2dc Update google and bing search logic 2026-02-23 15:55:25 +11:00
junv e78f9e95ef Add paging 2026-02-23 15:05:01 +11:00
junv cb1469c23d Update settings! 2026-02-23 14:56:27 +11:00
junv 2144687bd3 Add feature to exclude results from a website 2026-02-23 14:50:31 +11:00
junv 47d6cba194 Add justfile 2026-02-23 14:45:18 +11:00
junv 8ded475231 Update 2026-02-23 14:41:23 +11:00
junv 9d36d4aba9 Done by copilot 2026-02-23 14:37:07 +11:00