homelab-codex-ws/services
oskar a73a986bbe feat(kb-query): add search frontend (module 5 phase 4, plan §7, Krok 4)
Krok 4 of the phase-4 plan done ahead of the local-embed-fallback step
(Krok 2, deliberately deferred -- embed stays a plain SOLARIA call, per
task instruction): one FastAPI process now serves both the /search API
and the UI, no separate frontend build (plan §2 decision 4).

- GET / renders a Jinja2 shell; app/static/app.js (vanilla, no build) and
  style.css are the whole client. Query -> /search, results grouped by
  envelope_id client-side (chunks sorted by dist, <details> fragments).
- Colour thresholds per plan §7: dist<0.45 green, 0.45-0.55 yellow (still
  shown with a warning), >0.55 never rendered as an individual result; if
  a query ends up with nothing renderable, one "Brak odpowiedzi w KB"
  message replaces the list, carrying the best observed dist.
- Paperless hits link out; gmail hits get a "kopiuj Message-ID" button
  (there's nothing to link to yet, plan §2 decision 3) plus header
  metadata. Cascade/flat toggle defaults to cascade. Footer shows
  sol_status, refreshed from /healthz on load and after each search.
- /search gained additive summary/summary_tags fields (document_summary,
  haiku track) so the UI can show a document summary as each result
  group's header -- non-breaking, existing response shape untouched.
- Tests: app/db.py + app/search.py unit tests (mocked DB/HTTP, no live
  deps) cover the new summary join; tests/test_frontend.py drives GET /
  and /static/* via TestClient without running the DB-requiring lifespan;
  tests/frontend/app.test.js (Node's built-in test runner, no framework)
  covers query-URL encoding, threshold colouring, and envelope grouping.
- Verified live: docker build + container against kb-postgres@PIHA over
  LAN and Ollama@SOLARIA over Tailscale -- GET / (HTML), /static/app.js,
  /healthz, and /search (cascade + flat) all round-tripped correctly,
  including real summary/summary_tags data.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 16:49:36 +02:00
..
agent-system fix(actions): mirror pending z VPS na panel PIHA + mutate proxy do VPS — Action Queue byla slepa 2026-07-20 19:55:54 +02:00
brain-watchdog feat(brain-watchdog): poll Prometheus /api/v1/alerts as second alert source (Telegram) 2026-06-30 18:51:34 +02:00
control-plane fix(observer): map containers_not_running to unhealthy status + incident — dead/crash-looping containers created no incident, so supervisor never alerted 2026-07-22 16:28:31 +02:00
fleet-prometheus feat(kb): faza 3 krok 5 — cykliczny ingest (systemd timer) + alerting 2026-07-17 15:54:13 +02:00
forgejo fix(inventory): correct owner_node — forgejo→piha, mosquitto→vps (per 2026-07-02 verify) 2026-07-02 16:48:12 +02:00
gokapi feat(gokapi): config publicznego file-share na VPS (share.okit.pl, E2E, Tailscale-bind za npm@VPS, disk-protection) — do deployu 2026-07-09 17:29:28 +02:00
ha-diag-agent fix(ha-diag): node_name from env + fail-fast on unknown — evt-unknown-* files poisoned observer checkpoint (see d5139c9) 2026-07-15 19:48:58 +02:00
home-assistant feat(ha): archival import of ken-legacy config 2026-07-22 16:49:09 +02:00
kb-postgres feat(kb): faza 3 krok 2 — migracja 004 (document_summary) + pilot streszczeń A/B 2026-07-17 13:30:47 +02:00
kb-query feat(kb-query): add search frontend (module 5 phase 4, plan §7, Krok 4) 2026-07-22 16:49:36 +02:00
llm-gateway feat(llm-gateway): wciagniecie shadow-serwisu z PIHA do GitOps 2026-07-03 15:08:33 +02:00
mosquitto fix(inventory): correct owner_node — forgejo→piha, mosquitto→vps (per 2026-07-02 verify) 2026-07-02 16:48:12 +02:00
nextcloud feat(kb): configi Paperless/Nextcloud wg 9 decyzji — NC na PIHA, domeny kapala, Redis requirepass, backup SOLARIA, NC pin 34 2026-07-09 16:17:27 +02:00
node-agent fix(events): service_healthy tylko na transition + cleanup 358k backlog + retencja — glob zalewu paralizowal reconcile supervisora 2026-07-16 20:20:17 +02:00
node_exporter feat(kb): faza 3 krok 5 — cykliczny ingest (systemd timer) + alerting 2026-07-17 15:54:13 +02:00
npm Add node capability model 2026-05-11 20:46:50 +02:00
ollama fix(ollama): restore GPU reservation on SOLARIA, close 07-15 cutover docs 2026-07-16 14:43:29 +02:00
paperless fix(paperless-worker): celery command bypassed manage.py + missing shared scratch dir 2026-07-12 20:51:04 +02:00
paperless-worker fix(paperless-worker): celery command bypassed manage.py + missing shared scratch dir 2026-07-12 20:51:04 +02:00
planner-agent fix+debug(planner-agent): use base_url (not api_base) for litellm.acompletion, add print [TEMP] 2026-05-28 13:07:58 +02:00
stability-agent fix(stability-agent): run as uid 1000 with docker group access 2026-06-03 18:20:54 +02:00
vikunja fix(vikunja): PUBLICURL na vikunja.kapala.org 2026-07-02 17:28:56 +02:00
zigbee2mqtt docs: compress CLAUDE.md + fix zigbee2mqtt coordinator docs 2026-05-29 14:17:23 +02:00
.gitkeep Add infrastructure standards and deployment conventions 2026-05-07 21:16:03 +02:00