From f04ddbe1f8cc49dbd9037e7210823ed813e0b2da Mon Sep 17 00:00:00 2001 From: ducoterra Date: Wed, 2 Sep 2026 01:29:42 -0400 Subject: [PATCH] =?UTF-8?q?fix(web):=20history=20tab=20copy=20=E2=80=94=20?= =?UTF-8?q?every=20chat=20saves=20automatically,=20there=20is=20no=20Save?= =?UTF-8?q?=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit meta description -> locked (A3) auto-save string (history.html L6). page-sub -> locked (A3) string, the Save emphasis retired with the button (L106-109). empty row -> locked (A3) string; colspan=6, hidden, and row id untouched (L163). h1, the anonymous gate section, and history.js are byte-identical — state language verified accurate. --- .../65_bottom_chat_actions/00_phase.md | 0 .../05_regressions_and_commit.md | 0 .../01_history_page_copy.md | 0 .../65_bottom_chat_actions__00_phase.a1.err | 0 .../65_bottom_chat_actions__00_phase.a1.md | 11 ++ ..._bottom_chat_actions__00_phase.a1.validate | 72 +++++++++++ ...t_actions__05_regressions_and_commit.a1.md | 16 +++ ...ons__05_regressions_and_commit.a1.validate | 72 +++++++++++ ...uto_save_copy__01_history_page_copy.a1.err | 0 ...auto_save_copy__01_history_page_copy.a1.md | 18 +++ ...ave_copy__01_history_page_copy.a1.validate | 72 +++++++++++ ...auto_save_copy__02_tests_and_commit.a1.err | 0 frontend/history.html | 7 +- tests/e2e/test_history_copy.py | 114 ++++++++++++++++++ tests/unit/test_history_copy.py | 79 ++++++++++++ tests/unit/test_history_page.py | 6 +- 16 files changed, 461 insertions(+), 6 deletions(-) rename .agent/phases/{todo => complete}/65_bottom_chat_actions/00_phase.md (100%) rename .agent/phases/{todo => complete}/65_bottom_chat_actions/05_regressions_and_commit.md (100%) rename .agent/phases/{todo => complete}/66_history_auto_save_copy/01_history_page_copy.md (100%) create mode 100644 .agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.err create mode 100644 .agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.md create mode 100644 .agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.validate create mode 100644 .agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__05_regressions_and_commit.a1.md create mode 100644 .agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__05_regressions_and_commit.a1.validate create mode 100644 .agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.err create mode 100644 .agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.md create mode 100644 .agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.validate create mode 100644 .agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__02_tests_and_commit.a1.err create mode 100644 tests/e2e/test_history_copy.py create mode 100644 tests/unit/test_history_copy.py diff --git a/.agent/phases/todo/65_bottom_chat_actions/00_phase.md b/.agent/phases/complete/65_bottom_chat_actions/00_phase.md similarity index 100% rename from .agent/phases/todo/65_bottom_chat_actions/00_phase.md rename to .agent/phases/complete/65_bottom_chat_actions/00_phase.md diff --git a/.agent/phases/todo/65_bottom_chat_actions/05_regressions_and_commit.md b/.agent/phases/complete/65_bottom_chat_actions/05_regressions_and_commit.md similarity index 100% rename from .agent/phases/todo/65_bottom_chat_actions/05_regressions_and_commit.md rename to .agent/phases/complete/65_bottom_chat_actions/05_regressions_and_commit.md diff --git a/.agent/phases/todo/66_history_auto_save_copy/01_history_page_copy.md b/.agent/phases/complete/66_history_auto_save_copy/01_history_page_copy.md similarity index 100% rename from .agent/phases/todo/66_history_auto_save_copy/01_history_page_copy.md rename to .agent/phases/complete/66_history_auto_save_copy/01_history_page_copy.md diff --git a/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.err b/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.err new file mode 100644 index 0000000..e69de29 diff --git a/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.md b/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.md new file mode 100644 index 0000000..fe35890 --- /dev/null +++ b/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.md @@ -0,0 +1,11 @@ +All verification is green. Final state check complete — no code changes were needed; this pass was pure verification. + +**Phase 65 — final verification pass (all tasks 01–05 already complete in `complete/`; commit `8a1f99c` landed)** + +- Verified implementation in code: `.chat-bottom` is the last child of `.chat-shell` wrapping `.chat-actions` (New chat → Share, ids/aria-labels intact) + `#composer`; `.chat-bottom` is `position: sticky; bottom: env(safe-area-inset-bottom, 0)` with no z-index (A1); `justify-content: flex-end` right-edge alignment (A2); ≤640px full-width vertical stack; `#composer` sticky declaration retained +- Dedicated suite: `uv run pytest tests/e2e/test_bottom_chat_actions.py -v --no-cov` → 4 passed (pin across sticky range, resting bottom, settled above footer, A2 + DOM order, mobile stack, 360px overflow, 44px targets, New chat/Share click-through) +- Regression E2E, each in isolation: pinned_composer 4 ✓, save_share_ux 5 ✓, chat_persistence 4 ✓, share_chat 4 ✓, chat_history 5 ✓, smoke 3 ✓ +- Full gate: `.agent/validate.sh` exit 0 — `uv run pytest --cov=app` 1251 unit+integration tests passed, coverage TOTAL 99% (>90%); `uv run ruff check .` clean; `uv run pyright` 0 errors +- Criteria 1–7: all met (see above). Criterion 8: single `--no-gpg-sign` commit `8a1f99c` exists staging exactly `.agent/ frontend/ tests/` (no gpgsig; `commit.gpgsign=false`); the `00_phase.md` move to `complete/` is the harness pipeline step — left in `todo/` per instructions + +**Deviations / notes:** No defects found, zero code edits. `.agent/PLAN.md` is absent from the repo (referenced by AGENTS.md; pre-existing — the phase overview/task files served as the binding spec). Worktree carries only uncommitted `.agent/` bookkeeping (task-05 file move + reports) managed by the harness. Next pending phase: `66_history_auto_save_copy`. diff --git a/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.validate b/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.validate new file mode 100644 index 0000000..6239700 --- /dev/null +++ b/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__00_phase.a1.validate @@ -0,0 +1,72 @@ +........................................................................ [ 5%] +........................................................................ [ 11%] +........................................................................ [ 17%] +........................................................................ [ 23%] +........................................................................ [ 28%] +........................................................................ [ 34%] +........................................................................ [ 40%] +........................................................................ [ 46%] +........................................................................ [ 51%] +........................................................................ [ 57%] +........................................................................ [ 63%] +........................................................................ [ 69%] +........................................................................ [ 74%] +........................................................................ [ 80%] +........................................................................ [ 86%] +........................................................................ [ 92%] +........................................................................ [ 97%] +........................... [100%] +=============================== warnings summary =============================== +.venv/lib/python3.13/site-packages/fastapi/testclient.py:1 + /var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead. + from starlette.testclient import TestClient as TestClient # noqa + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +================================ tests coverage ================================ +_______________ coverage: platform linux, python 3.13.13-final-0 _______________ + +Name Stmts Miss Cover +----------------------------------------------- +app/__init__.py 1 0 100% +app/api/__init__.py 0 0 100% +app/api/auth.py 22 0 100% +app/api/chat.py 131 0 100% +app/api/chats.py 110 0 100% +app/api/config.py 7 0 100% +app/api/doc_drafts.py 93 0 100% +app/api/docs.py 50 0 100% +app/api/git_sources.py 181 0 100% +app/api/health.py 10 0 100% +app/api/steering.py 42 0 100% +app/api/suggestions.py 8 0 100% +app/api/sync.py 101 0 100% +app/config.py 112 0 100% +app/core/__init__.py 0 0 100% +app/core/auth.py 20 0 100% +app/core/caching.py 108 0 100% +app/core/debugging.py 29 2 93% +app/core/docs_push.py 39 0 100% +app/core/logging.py 13 0 100% +app/db.py 21 0 100% +app/main.py 52 0 100% +app/models.py 86 0 100% +app/rag/__init__.py 0 0 100% +app/rag/agent.py 78 0 100% +app/rag/archive_upload.py 128 0 100% +app/rag/chunker.py 206 4 98% +app/rag/git_sources.py 14 0 100% +app/rag/importer.py 180 3 98% +app/rag/llm.py 189 0 100% +app/rag/overview.py 71 0 100% +app/rag/prompts.py 65 0 100% +app/rag/retriever.py 94 3 97% +app/rag/sources_meta.py 16 0 100% +app/rag/suggestions.py 27 0 100% +app/rag/summarizer.py 24 0 100% +app/schemas.py 201 0 100% +----------------------------------------------- +TOTAL 2529 12 99% +coverage gate: app/ 99% (>90%) OK +All checks passed! +0 errors, 0 warnings, 0 informations +validation OK diff --git a/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__05_regressions_and_commit.a1.md b/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__05_regressions_and_commit.a1.md new file mode 100644 index 0000000..88c9760 --- /dev/null +++ b/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__05_regressions_and_commit.a1.md @@ -0,0 +1,16 @@ +Task 05 complete — all green. + +**Report — Phase 65, Task 05 (regressions + commit)** +- Regression E2E matrix, each green in isolation (DB up, in task order): + - `uv run pytest tests/e2e/test_pinned_composer.py -v --no-cov` → 4 passed + - `uv run pytest tests/e2e/test_save_share_ux.py -v --no-cov` → 5 passed + - `uv run pytest tests/e2e/test_chat_persistence.py -v --no-cov` → 4 passed + - `uv run pytest tests/e2e/test_share_chat.py -v --no-cov` → 4 passed + - `uv run pytest tests/e2e/test_chat_history.py -v --no-cov` → 5 passed + - `uv run pytest tests/e2e/test_smoke.py -v --no-cov` → 3 passed +- Dedicated suite final run: `uv run pytest tests/e2e/test_bottom_chat_actions.py -v --no-cov` → 4 passed +- Full gate: `bash .agent/validate.sh` → exit 0 (unit+integration pass, app/ coverage **99%** >90%, `ruff check .` clean, `pyright` 0 errors) +- One atomic commit on `main`: `8a1f99c` `feat(web): move the chat action cluster to the pinned bottom and align the button sets` — `--no-gpg-sign`, staged exactly `.agent/ frontend/ tests/`, body has one line per task (01 move, 02 sticky `.chat-bottom` A1, 03 right-edge alignment A2, 04 dedicated suite, 05 regression outcome) +- No defects found in prior tasks' work — tasks 01–04 changes committed as-is; working tree clean +- Phase-dir move to `complete/` is the pipeline step (harness) per task rules — not done by me +- Next pending task: `.agent/phases/todo/66_history_auto_save_copy/01_history_page_copy.md` diff --git a/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__05_regressions_and_commit.a1.validate b/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__05_regressions_and_commit.a1.validate new file mode 100644 index 0000000..6239700 --- /dev/null +++ b/.agent/reports/65_bottom_chat_actions/65_bottom_chat_actions__05_regressions_and_commit.a1.validate @@ -0,0 +1,72 @@ +........................................................................ [ 5%] +........................................................................ [ 11%] +........................................................................ [ 17%] +........................................................................ [ 23%] +........................................................................ [ 28%] +........................................................................ [ 34%] +........................................................................ [ 40%] +........................................................................ [ 46%] +........................................................................ [ 51%] +........................................................................ [ 57%] +........................................................................ [ 63%] +........................................................................ [ 69%] +........................................................................ [ 74%] +........................................................................ [ 80%] +........................................................................ [ 86%] +........................................................................ [ 92%] +........................................................................ [ 97%] +........................... [100%] +=============================== warnings summary =============================== +.venv/lib/python3.13/site-packages/fastapi/testclient.py:1 + /var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead. + from starlette.testclient import TestClient as TestClient # noqa + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +================================ tests coverage ================================ +_______________ coverage: platform linux, python 3.13.13-final-0 _______________ + +Name Stmts Miss Cover +----------------------------------------------- +app/__init__.py 1 0 100% +app/api/__init__.py 0 0 100% +app/api/auth.py 22 0 100% +app/api/chat.py 131 0 100% +app/api/chats.py 110 0 100% +app/api/config.py 7 0 100% +app/api/doc_drafts.py 93 0 100% +app/api/docs.py 50 0 100% +app/api/git_sources.py 181 0 100% +app/api/health.py 10 0 100% +app/api/steering.py 42 0 100% +app/api/suggestions.py 8 0 100% +app/api/sync.py 101 0 100% +app/config.py 112 0 100% +app/core/__init__.py 0 0 100% +app/core/auth.py 20 0 100% +app/core/caching.py 108 0 100% +app/core/debugging.py 29 2 93% +app/core/docs_push.py 39 0 100% +app/core/logging.py 13 0 100% +app/db.py 21 0 100% +app/main.py 52 0 100% +app/models.py 86 0 100% +app/rag/__init__.py 0 0 100% +app/rag/agent.py 78 0 100% +app/rag/archive_upload.py 128 0 100% +app/rag/chunker.py 206 4 98% +app/rag/git_sources.py 14 0 100% +app/rag/importer.py 180 3 98% +app/rag/llm.py 189 0 100% +app/rag/overview.py 71 0 100% +app/rag/prompts.py 65 0 100% +app/rag/retriever.py 94 3 97% +app/rag/sources_meta.py 16 0 100% +app/rag/suggestions.py 27 0 100% +app/rag/summarizer.py 24 0 100% +app/schemas.py 201 0 100% +----------------------------------------------- +TOTAL 2529 12 99% +coverage gate: app/ 99% (>90%) OK +All checks passed! +0 errors, 0 warnings, 0 informations +validation OK diff --git a/.agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.err b/.agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.err new file mode 100644 index 0000000..e69de29 diff --git a/.agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.md b/.agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.md new file mode 100644 index 0000000..c3bcb78 --- /dev/null +++ b/.agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.md @@ -0,0 +1,18 @@ +Task 01 complete — all criteria verified, repo left green and functional (no commit; task 02 owns the atomic commit). + +**Implemented** +- `frontend/history.html`: replaced the three Save-button strings with the locked A3 auto-save copy — meta description, `.page-sub`, and the `#history-empty-row` cell (element, indentation, `colspan="6"`, `hidden` all preserved; markup otherwise byte-identical). +- `tests/unit/test_history_page.py`: updated the phase-50 pin that asserted the retired empty-row copy to the locked A3 string (required to keep the suite green). + +**Verification** +- `grep -c "pressed Save\|press Save\|every conversation you saved" frontend/history.html` → 0; each of the three A3 strings present exactly once. +- h1, gate section, table caption, `history.js` byte-identical (git diff shows only the 3 HTML strings + the test pin; history.js md5 unchanged). +- `uv run pytest --cov=app --cov-report=term-missing` → 1251 passed, TOTAL 99% (>90% gate). +- `uv run ruff check .` → all checks passed; `uv run pyright` → 0 errors/warnings. +- Remaining case-sensitive "Save" hits are only state strings ("Saved chats" h1/title/meta/caption/aria-label, "Saved conversations are admin-only"); no other page names a Save button (no follow-up material for the commit body). + +**Notes** +- `.agent/PLAN.md` does not exist in this repo; the phase's `00_phase.md` carries the binding A3 copy, which was followed exactly. +- Working tree also contains harness-side phase-65 move/report artifacts (pre-existing, untouched). + +**Next pending task:** `.agent/phases/todo/66_history_auto_save_copy/02_tests_and_commit.md` (unit pins + E2E `tests/e2e/test_history_copy.py` + regression + commit). diff --git a/.agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.validate b/.agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.validate new file mode 100644 index 0000000..6239700 --- /dev/null +++ b/.agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__01_history_page_copy.a1.validate @@ -0,0 +1,72 @@ +........................................................................ [ 5%] +........................................................................ [ 11%] +........................................................................ [ 17%] +........................................................................ [ 23%] +........................................................................ [ 28%] +........................................................................ [ 34%] +........................................................................ [ 40%] +........................................................................ [ 46%] +........................................................................ [ 51%] +........................................................................ [ 57%] +........................................................................ [ 63%] +........................................................................ [ 69%] +........................................................................ [ 74%] +........................................................................ [ 80%] +........................................................................ [ 86%] +........................................................................ [ 92%] +........................................................................ [ 97%] +........................... [100%] +=============================== warnings summary =============================== +.venv/lib/python3.13/site-packages/fastapi/testclient.py:1 + /var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead. + from starlette.testclient import TestClient as TestClient # noqa + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +================================ tests coverage ================================ +_______________ coverage: platform linux, python 3.13.13-final-0 _______________ + +Name Stmts Miss Cover +----------------------------------------------- +app/__init__.py 1 0 100% +app/api/__init__.py 0 0 100% +app/api/auth.py 22 0 100% +app/api/chat.py 131 0 100% +app/api/chats.py 110 0 100% +app/api/config.py 7 0 100% +app/api/doc_drafts.py 93 0 100% +app/api/docs.py 50 0 100% +app/api/git_sources.py 181 0 100% +app/api/health.py 10 0 100% +app/api/steering.py 42 0 100% +app/api/suggestions.py 8 0 100% +app/api/sync.py 101 0 100% +app/config.py 112 0 100% +app/core/__init__.py 0 0 100% +app/core/auth.py 20 0 100% +app/core/caching.py 108 0 100% +app/core/debugging.py 29 2 93% +app/core/docs_push.py 39 0 100% +app/core/logging.py 13 0 100% +app/db.py 21 0 100% +app/main.py 52 0 100% +app/models.py 86 0 100% +app/rag/__init__.py 0 0 100% +app/rag/agent.py 78 0 100% +app/rag/archive_upload.py 128 0 100% +app/rag/chunker.py 206 4 98% +app/rag/git_sources.py 14 0 100% +app/rag/importer.py 180 3 98% +app/rag/llm.py 189 0 100% +app/rag/overview.py 71 0 100% +app/rag/prompts.py 65 0 100% +app/rag/retriever.py 94 3 97% +app/rag/sources_meta.py 16 0 100% +app/rag/suggestions.py 27 0 100% +app/rag/summarizer.py 24 0 100% +app/schemas.py 201 0 100% +----------------------------------------------- +TOTAL 2529 12 99% +coverage gate: app/ 99% (>90%) OK +All checks passed! +0 errors, 0 warnings, 0 informations +validation OK diff --git a/.agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__02_tests_and_commit.a1.err b/.agent/reports/66_history_auto_save_copy/66_history_auto_save_copy__02_tests_and_commit.a1.err new file mode 100644 index 0000000..e69de29 diff --git a/frontend/history.html b/frontend/history.html index 1ac45cd..c5f884d 100644 --- a/frontend/history.html +++ b/frontend/history.html @@ -3,7 +3,7 @@ - + Saved chats · Brain of Reese @@ -104,8 +104,7 @@

Saved chats

- Every conversation you pressed Save on — - newest activity first. Click a title to return to that chat. + Every conversation is saved automatically — newest activity first. Click a title to return to that chat.