feat(ui): responsive + WCAG AA polish pass across chat and sources — v1 feature complete

This commit is contained in:
2026-08-21 19:44:46 -04:00
parent e5810b0bcf
commit 1b29b1cf9d
9 changed files with 582 additions and 15 deletions
+22 -6
View File
@@ -9,6 +9,13 @@ the relevant notes with **Postgres 17 + pgvector** cosine search, feeds the
If it doesn't have notes for your question, it admits it:
*"I haven't done anything like that"* — plus suggestions for what it **does** know.
> **Updated your notes?** The knowledge base is refreshed by re-running the
> import — it's idempotent and only re-embeds what changed:
> ```bash
> uv run python -m scripts.import_docs --prune
> ```
> Details in [Updating the documents](#updating-the-documents).
- **Stack:** FastAPI · Pydantic v2 · SQLAlchemy 2 · Alembic · pgvector ·
vanilla HTML/CSS/JS (no CDN) · Playwright E2E
- **Planning:** architecture, LOCKED decisions and the phase roadmap live
@@ -60,10 +67,14 @@ uv run uvicorn app.main:app --reload
# → http://localhost:8000 (chat) http://localhost:8000/sources.html (KB)
```
> 📝 **After this, day-to-day is just: edit markdown → re-run the import.**
> See [Updating the documents](#updating-the-documents) below.
## Updating the documents
The knowledge base is refreshed by **re-running the import**. It is
idempotent and delta-based (sha256 per file):
**This is the workflow you'll use most.** The knowledge base is refreshed by
**re-running the import**. It is idempotent and delta-based (sha256 per
file), so a refresh after a normal editing session takes seconds:
```bash
# After editing/adding/removing markdown in your projects:
@@ -74,13 +85,18 @@ uv run python -m scripts.import_docs --prune # also drop deleted files
uv run python -m scripts.import_docs --source ~/SomeOtherDocs
```
Then check the **Sources** page (`http://localhost:8000/sources.html`):
the *documents* / *chunks* counters and *last indexed* timestamp should
reflect the new files, and each document row shows when it was last
embedded.
- The import prints one line per file (`import: added|updated|unchanged|
pruned …`) and ends with a greppable summary (`import: summary files=…
added=… updated=… unchanged=… pruned=… chunks=… embed_batches=…`), so it
is safe to run from a cron job or after every commit.
- Only **`*.md`** files are indexed. Directories like `.venv`,
`node_modules`, `.git`, `__pycache__`, `.pytest_cache`, `dist`, `build`
are skipped (see `.agent/PLAN.md` anchor A9).
- Every file is logged on its own line (`import: added|updated|unchanged|
pruned …`), and the run ends with a one-line summary (`import: summary
files=… added=… updated=… unchanged=… pruned=… chunks=… embed_batches=…`)
so the counts are greppable in logs.
- Unchanged files are **not re-embedded** — only new/changed ones, so
refreshes are cheap.
- To sanity-check the LLM backend (models + embedding dimension) after any