diff --git a/.agents/phases/todo/85_mobile_menu_gate_overlap/00_phase.md b/.agents/phases/complete/85_mobile_menu_gate_overlap/00_phase.md similarity index 100% rename from .agents/phases/todo/85_mobile_menu_gate_overlap/00_phase.md rename to .agents/phases/complete/85_mobile_menu_gate_overlap/00_phase.md diff --git a/.agents/phases/todo/85_mobile_menu_gate_overlap/01_gate_below_header.md b/.agents/phases/complete/85_mobile_menu_gate_overlap/01_gate_below_header.md similarity index 100% rename from .agents/phases/todo/85_mobile_menu_gate_overlap/01_gate_below_header.md rename to .agents/phases/complete/85_mobile_menu_gate_overlap/01_gate_below_header.md diff --git a/.agents/phases/todo/85_mobile_menu_gate_overlap/02_e2e_pin_updates.md b/.agents/phases/complete/85_mobile_menu_gate_overlap/02_e2e_pin_updates.md similarity index 100% rename from .agents/phases/todo/85_mobile_menu_gate_overlap/02_e2e_pin_updates.md rename to .agents/phases/complete/85_mobile_menu_gate_overlap/02_e2e_pin_updates.md diff --git a/.agents/phases/todo/85_mobile_menu_gate_overlap/03_verify_and_commit.md b/.agents/phases/complete/85_mobile_menu_gate_overlap/03_verify_and_commit.md similarity index 100% rename from .agents/phases/todo/85_mobile_menu_gate_overlap/03_verify_and_commit.md rename to .agents/phases/complete/85_mobile_menu_gate_overlap/03_verify_and_commit.md diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__00_phase.a1.err b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__00_phase.a1.err new file mode 100644 index 0000000..e69de29 diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__00_phase.a1.md b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__00_phase.a1.md new file mode 100644 index 0000000..bef412d --- /dev/null +++ b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__00_phase.a1.md @@ -0,0 +1,12 @@ +All verification complete. Final report: + +**Phase 85 final verification pass — all green** (tasks 01–03 already complete; independently re-verified from scratch) +- Verified fix in tree: `styles.css` `.auth-gate` z-index 500→15 + rewritten stacking comment (no `z-index: 500` left); `index.html`/`document.html` comment-only; `token-gate.js` docstring-only (logic byte-identical); `test_mobile_hamburger_nav.py` real-click conversion + new `test_anonymous_toggle_tappable_with_gate_up`; new `tests/unit/test_gate_header_stacking.py` (3 pins); `test_api_tokens.py` untouched +- `uv run pytest` → 1717 passed, 1 warning (exit 0) +- `uv run pytest --cov=app --cov-report=term-missing` → TOTAL **99%** (>90%) +- E2E in isolation: `test_mobile_hamburger_nav.py` **8 passed**; `test_api_tokens.py` **9 passed** (unchanged); `test_smoke.py` **3 passed**; `test_document_viewer.py` **7 passed** +- `uv run ruff check . && uv run pyright` → clean / 0 errors +- Live probe (375×812, anonymous, fresh server): on `/` and `/history.html` `elementFromPoint` at toggle → SVG `path`, never `#auth-gate`; real click opens menu (`aria-expanded=true`); exactly one visible nav link (Chat) + sign-in copy; Chat link topmost over gate; `#main` inert — criteria 1, 2, 3 confirmed directly +- Criteria: (1) real-click menu on / + /history ✅ (2) dropdown above gate ✅ (3) anonymous contents + #main inert ✅ (4) admin byte-identical (phase-46 tests green) ✅ (5) doc-viewer gate under bar (CSS pin + doc-viewer suite) ✅ (6) full gate green ✅ (7) diff scoped to the 5 code files + new unit test + phase files, nothing in `app/` ✅ (8) commit + todo→complete move left to harness per executor rules (task files already in `complete/`) +- Note: `.agents/remediation_plan.md` (untracked) is a pre-existing artifact of the earlier security audit — left untouched; a missing "N passed" line seen mid-pass was my own `-q`+addopts `-q` = `-qq` quirk, not a defect +- Next pending phase: `86_history_page_width` diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__00_phase.a1.validate b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__00_phase.a1.validate new file mode 100644 index 0000000..0914b55 --- /dev/null +++ b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__00_phase.a1.validate @@ -0,0 +1,85 @@ +........................................................................ [ 4%] +........................................................................ [ 8%] +........................................................................ [ 12%] +........................................................................ [ 16%] +........................................................................ [ 20%] +........................................................................ [ 25%] +........................................................................ [ 29%] +........................................................................ [ 33%] +........................................................................ [ 37%] +........................................................................ [ 41%] +........................................................................ [ 46%] +........................................................................ [ 50%] +........................................................................ [ 54%] +........................................................................ [ 58%] +........................................................................ [ 62%] +........................................................................ [ 67%] +........................................................................ [ 71%] +........................................................................ [ 75%] +........................................................................ [ 79%] +........................................................................ [ 83%] +........................................................................ [ 88%] +........................................................................ [ 92%] +........................................................................ [ 96%] +............................................................. [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 52 0 100% +app/api/chat.py 178 0 100% +app/api/chats.py 110 0 100% +app/api/config.py 7 0 100% +app/api/doc_drafts.py 94 0 100% +app/api/docs.py 50 0 100% +app/api/git_sources.py 212 0 100% +app/api/health.py 10 0 100% +app/api/steering.py 42 0 100% +app/api/suggestions.py 29 0 100% +app/api/sync.py 98 0 100% +app/api/tokens.py 28 0 100% +app/config.py 141 0 100% +app/core/__init__.py 0 0 100% +app/core/auth.py 45 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/errors.py 5 0 100% +app/core/logging.py 13 0 100% +app/core/rate_limit.py 44 0 100% +app/core/security_headers.py 19 0 100% +app/core/tokens.py 33 0 100% +app/db.py 21 0 100% +app/main.py 64 0 100% +app/models.py 94 0 100% +app/rag/__init__.py 0 0 100% +app/rag/agent.py 222 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 217 0 100% +app/rag/overview.py 71 0 100% +app/rag/prompts.py 88 0 100% +app/rag/retriever.py 150 3 98% +app/rag/scaffolding.py 55 0 100% +app/rag/source_removal.py 41 0 100% +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 232 0 100% +-------------------------------------------------- +TOTAL 3237 12 99% +coverage gate: app/ 99% (>90%) OK +All checks passed! +0 errors, 0 warnings, 0 informations +validation OK diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__01_gate_below_header.a1.err b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__01_gate_below_header.a1.err new file mode 100644 index 0000000..e69de29 diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__01_gate_below_header.a1.md b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__01_gate_below_header.a1.md new file mode 100644 index 0000000..7321af2 --- /dev/null +++ b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__01_gate_below_header.a1.md @@ -0,0 +1,17 @@ +Task 01 complete — all green. + +**Implemented** +- `frontend/assets/styles.css`: `.auth-gate` `z-index: 500 → 15` (the one-value fix, A1) + stacking comment rewritten to the phase-85 contract (15 gate < 20 header < 21 dropdown; skip-link 100 / 1000-family overlays unaffected; `#main` lock is JS, not z-order) +- `frontend/index.html` / `frontend/document.html`: gate-section comments reworded (header stays reachable; `#main` stays inert) — markup byte-identical, comment-only +- `frontend/assets/token-gate.js`: docstring sweep only — "only interactive surface" → "only CONTENT-level interactive surface" + phase-85 note; logic byte-identical +- New `tests/unit/test_gate_header_stacking.py`: 3 source-level z-order pins (gate=15, header=20 with gate15) + the gate still covers content (fixed/inset:0, `[hidden]` display:none) + +**Test / lint results** +- `uv run pytest tests/unit/test_gate_header_stacking.py -v` → 3 passed +- `uv run pytest --cov=app --cov-report=term-missing` → 1717 passed, `app/` TOTAL **99%** (>90% ✓) +- `uv run ruff check .` → All checks passed; `uv run pyright` → 0 errors, 0 warnings +- `git diff --stat` limited to the 4 frontend files (CSS value + comments only) + the new test; `grep "z-index: 500"` no longer matches anything + +**Decisions**: the dropdown's `z-index: 21` lives on the base `.app-nav` rule (shared with `.is-open`), so the pin targets `.app-nav` in the ≤640px block — same as the existing phase-46 pin; value 15 kept as owner-decided. + +**Next pending task**: `02_e2e_pin_updates.md` (same phase — real-click conversion + TODO-regression E2E pin). diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__01_gate_below_header.a1.validate b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__01_gate_below_header.a1.validate new file mode 100644 index 0000000..0914b55 --- /dev/null +++ b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__01_gate_below_header.a1.validate @@ -0,0 +1,85 @@ +........................................................................ [ 4%] +........................................................................ [ 8%] +........................................................................ [ 12%] +........................................................................ [ 16%] +........................................................................ [ 20%] +........................................................................ [ 25%] +........................................................................ [ 29%] +........................................................................ [ 33%] +........................................................................ [ 37%] +........................................................................ [ 41%] +........................................................................ [ 46%] +........................................................................ [ 50%] +........................................................................ [ 54%] +........................................................................ [ 58%] +........................................................................ [ 62%] +........................................................................ [ 67%] +........................................................................ [ 71%] +........................................................................ [ 75%] +........................................................................ [ 79%] +........................................................................ [ 83%] +........................................................................ [ 88%] +........................................................................ [ 92%] +........................................................................ [ 96%] +............................................................. [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 52 0 100% +app/api/chat.py 178 0 100% +app/api/chats.py 110 0 100% +app/api/config.py 7 0 100% +app/api/doc_drafts.py 94 0 100% +app/api/docs.py 50 0 100% +app/api/git_sources.py 212 0 100% +app/api/health.py 10 0 100% +app/api/steering.py 42 0 100% +app/api/suggestions.py 29 0 100% +app/api/sync.py 98 0 100% +app/api/tokens.py 28 0 100% +app/config.py 141 0 100% +app/core/__init__.py 0 0 100% +app/core/auth.py 45 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/errors.py 5 0 100% +app/core/logging.py 13 0 100% +app/core/rate_limit.py 44 0 100% +app/core/security_headers.py 19 0 100% +app/core/tokens.py 33 0 100% +app/db.py 21 0 100% +app/main.py 64 0 100% +app/models.py 94 0 100% +app/rag/__init__.py 0 0 100% +app/rag/agent.py 222 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 217 0 100% +app/rag/overview.py 71 0 100% +app/rag/prompts.py 88 0 100% +app/rag/retriever.py 150 3 98% +app/rag/scaffolding.py 55 0 100% +app/rag/source_removal.py 41 0 100% +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 232 0 100% +-------------------------------------------------- +TOTAL 3237 12 99% +coverage gate: app/ 99% (>90%) OK +All checks passed! +0 errors, 0 warnings, 0 informations +validation OK diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__02_e2e_pin_updates.a1.err b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__02_e2e_pin_updates.a1.err new file mode 100644 index 0000000..e69de29 diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__02_e2e_pin_updates.a1.md b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__02_e2e_pin_updates.a1.md new file mode 100644 index 0000000..6dc01c4 --- /dev/null +++ b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__02_e2e_pin_updates.a1.md @@ -0,0 +1,19 @@ +All green. Task 02 is complete. + +**Implemented** +- `tests/e2e/test_mobile_hamburger_nav.py`: retired `_js_open_menu` (JS-dispatch drive) — anonymous tests now use the real-click helper `_open_menu` (`page.click("#nav-toggle")`), docstring rewritten to the phase-85 contract (gate z 15 below header z 20) +- New regression pin `test_anonymous_toggle_tappable_with_gate_up`: with the gate up (`#main` inert), `elementFromPoint` at the toggle center resolves to the toggle/SVG child, never `#auth-gate`; real click opens the menu above the gate (Chat link visible + topmost at its center, gate still up); Esc settles closed +- Module docstring: phase-85 stacking paragraph + numbered mapping entry; all phase-79 "intercepted by the gate" test docstrings/comments swept (assertions kept exactly: one visible "Chat" link, Esc refocus, outside-click at (10,780) doesn't close, 180ms pins) +- `test_api_tokens.py`: verified no hamburger pins (grep clean); run unchanged, green + +**Results** +- `uv run pytest tests/e2e/test_mobile_hamburger_nav.py -v --no-cov` → 8 passed (isolation) +- `uv run pytest tests/e2e/test_api_tokens.py -v --no-cov` → 9 passed, file unchanged (isolation) +- `uv run pytest tests/e2e/test_smoke.py -v --no-cov` → 3 passed +- `uv run pytest --cov=app --cov-report=term-missing` → 1717 passed, coverage 99% (>90%) +- `uv run ruff check . && uv run pyright` → clean +- Criterion grep `querySelector('#nav-toggle').click()` → no matches; my diff touches only the one E2E file (frontend changes in tree are task-01's, committed atomically by the harness at phase end) + +**Deviations** — none; the JS helper was folded into `_open_menu` rather than duplicated (identical real-click body + same 3 assertions). + +**Next pending task:** `.agents/phases/todo/85_mobile_menu_gate_overlap/03_verify_and_commit.md` diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__02_e2e_pin_updates.a1.validate b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__02_e2e_pin_updates.a1.validate new file mode 100644 index 0000000..0914b55 --- /dev/null +++ b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__02_e2e_pin_updates.a1.validate @@ -0,0 +1,85 @@ +........................................................................ [ 4%] +........................................................................ [ 8%] +........................................................................ [ 12%] +........................................................................ [ 16%] +........................................................................ [ 20%] +........................................................................ [ 25%] +........................................................................ [ 29%] +........................................................................ [ 33%] +........................................................................ [ 37%] +........................................................................ [ 41%] +........................................................................ [ 46%] +........................................................................ [ 50%] +........................................................................ [ 54%] +........................................................................ [ 58%] +........................................................................ [ 62%] +........................................................................ [ 67%] +........................................................................ [ 71%] +........................................................................ [ 75%] +........................................................................ [ 79%] +........................................................................ [ 83%] +........................................................................ [ 88%] +........................................................................ [ 92%] +........................................................................ [ 96%] +............................................................. [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 52 0 100% +app/api/chat.py 178 0 100% +app/api/chats.py 110 0 100% +app/api/config.py 7 0 100% +app/api/doc_drafts.py 94 0 100% +app/api/docs.py 50 0 100% +app/api/git_sources.py 212 0 100% +app/api/health.py 10 0 100% +app/api/steering.py 42 0 100% +app/api/suggestions.py 29 0 100% +app/api/sync.py 98 0 100% +app/api/tokens.py 28 0 100% +app/config.py 141 0 100% +app/core/__init__.py 0 0 100% +app/core/auth.py 45 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/errors.py 5 0 100% +app/core/logging.py 13 0 100% +app/core/rate_limit.py 44 0 100% +app/core/security_headers.py 19 0 100% +app/core/tokens.py 33 0 100% +app/db.py 21 0 100% +app/main.py 64 0 100% +app/models.py 94 0 100% +app/rag/__init__.py 0 0 100% +app/rag/agent.py 222 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 217 0 100% +app/rag/overview.py 71 0 100% +app/rag/prompts.py 88 0 100% +app/rag/retriever.py 150 3 98% +app/rag/scaffolding.py 55 0 100% +app/rag/source_removal.py 41 0 100% +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 232 0 100% +-------------------------------------------------- +TOTAL 3237 12 99% +coverage gate: app/ 99% (>90%) OK +All checks passed! +0 errors, 0 warnings, 0 informations +validation OK diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__03_verify_and_commit.a1.err b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__03_verify_and_commit.a1.err new file mode 100644 index 0000000..e69de29 diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__03_verify_and_commit.a1.md b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__03_verify_and_commit.a1.md new file mode 100644 index 0000000..67ce83c --- /dev/null +++ b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__03_verify_and_commit.a1.md @@ -0,0 +1,11 @@ +Screenshot confirms the fix visually: the anonymous menu (Chat + Sign in) renders **above** the gate card. Phase 85 is fully gated. + +**Report — Phase 85, task 03 (verify & commit)** + +- Full gate green: `uv run pytest` → 1717 passed; `--cov=app` → TOTAL **99%** (>90% floor, no `app/` change) +- E2E in isolation: `test_mobile_hamburger_nav.py` → 8 passed (real-click contract + new `elementFromPoint` pin); `test_api_tokens.py` → 9 passed, **file unchanged** (phase-79 lock contract intact); `test_smoke.py` → 3 passed; `test_document_viewer.py` → 7 passed +- `uv run ruff check . && uv run pyright` → clean (0 errors/warnings) +- Live check (dev server :8000, 375×812, not signed in): 12/12 checks passed — real tap opens the menu above the gate (Chat + sign-in visible, token card behind/below), `elementFromPoint` at toggle resolves to the SVG (never `#auth-gate`), wrong-token error line + menu independence (Esc closes, gate stays), admin menu unchanged; log + 2 screenshots in `.agents/reports/85_mobile_menu_gate_overlap/` +- Working tree verified: only `styles.css` (z 500→15 + comment), `index.html`/`document.html` (comments only), `token-gate.js` (docstring only), `test_mobile_hamburger_nav.py`, new `tests/unit/test_gate_header_stacking.py` + phase files — nothing in `app/`, `pyproject.toml`, `uv.lock` +- Deviation (per executor rules, overrides task steps 3–4): **no `git commit` made and phase dir not moved** — all changes left in the working tree for the harness's single atomic phase commit and the `todo/ → complete/` move +- Next pending task: none in this phase (task 03 was the last); following phases: `86_history_page_width`, `87_big_read_progress` diff --git a/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__03_verify_and_commit.a1.validate b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__03_verify_and_commit.a1.validate new file mode 100644 index 0000000..0914b55 --- /dev/null +++ b/.agents/reports/85_mobile_menu_gate_overlap/85_mobile_menu_gate_overlap__03_verify_and_commit.a1.validate @@ -0,0 +1,85 @@ +........................................................................ [ 4%] +........................................................................ [ 8%] +........................................................................ [ 12%] +........................................................................ [ 16%] +........................................................................ [ 20%] +........................................................................ [ 25%] +........................................................................ [ 29%] +........................................................................ [ 33%] +........................................................................ [ 37%] +........................................................................ [ 41%] +........................................................................ [ 46%] +........................................................................ [ 50%] +........................................................................ [ 54%] +........................................................................ [ 58%] +........................................................................ [ 62%] +........................................................................ [ 67%] +........................................................................ [ 71%] +........................................................................ [ 75%] +........................................................................ [ 79%] +........................................................................ [ 83%] +........................................................................ [ 88%] +........................................................................ [ 92%] +........................................................................ [ 96%] +............................................................. [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 52 0 100% +app/api/chat.py 178 0 100% +app/api/chats.py 110 0 100% +app/api/config.py 7 0 100% +app/api/doc_drafts.py 94 0 100% +app/api/docs.py 50 0 100% +app/api/git_sources.py 212 0 100% +app/api/health.py 10 0 100% +app/api/steering.py 42 0 100% +app/api/suggestions.py 29 0 100% +app/api/sync.py 98 0 100% +app/api/tokens.py 28 0 100% +app/config.py 141 0 100% +app/core/__init__.py 0 0 100% +app/core/auth.py 45 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/errors.py 5 0 100% +app/core/logging.py 13 0 100% +app/core/rate_limit.py 44 0 100% +app/core/security_headers.py 19 0 100% +app/core/tokens.py 33 0 100% +app/db.py 21 0 100% +app/main.py 64 0 100% +app/models.py 94 0 100% +app/rag/__init__.py 0 0 100% +app/rag/agent.py 222 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 217 0 100% +app/rag/overview.py 71 0 100% +app/rag/prompts.py 88 0 100% +app/rag/retriever.py 150 3 98% +app/rag/scaffolding.py 55 0 100% +app/rag/source_removal.py 41 0 100% +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 232 0 100% +-------------------------------------------------- +TOTAL 3237 12 99% +coverage gate: app/ 99% (>90%) OK +All checks passed! +0 errors, 0 warnings, 0 informations +validation OK diff --git a/.agents/reports/85_mobile_menu_gate_overlap/livecheck_admin_menu.png b/.agents/reports/85_mobile_menu_gate_overlap/livecheck_admin_menu.png new file mode 100644 index 0000000..953aac7 Binary files /dev/null and b/.agents/reports/85_mobile_menu_gate_overlap/livecheck_admin_menu.png differ diff --git a/.agents/reports/85_mobile_menu_gate_overlap/livecheck_anonymous_menu_over_gate.png b/.agents/reports/85_mobile_menu_gate_overlap/livecheck_anonymous_menu_over_gate.png new file mode 100644 index 0000000..4ad172b Binary files /dev/null and b/.agents/reports/85_mobile_menu_gate_overlap/livecheck_anonymous_menu_over_gate.png differ diff --git a/frontend/assets/styles.css b/frontend/assets/styles.css index 848036e..d5291d0 100644 --- a/frontend/assets/styles.css +++ b/frontend/assets/styles.css @@ -1631,23 +1631,28 @@ details.thinking .thinking-text ul { margin: 0 0 0.5rem; } /* Phase 79 (task 05): the in-app token gate — the gate surface of the two token-only pages (the shell + the document viewer, one shared .auth-gate markup each). A body-level FIXED overlay (the - body-level doc-modal precedent): while visible it is the ONLY - interactive surface — assets/token-gate.js locks the root (#main, - inert) so focus and keyboard traversal stay inside the gate - (WCAG, the inert-pair contract). - Stacking: z-index 500 — above the app content (the sticky header is - 20, the skip-link 100) but BELOW the doc-modal (1000), which can - only be opened from the unlocked app anyway. Solid --bg: the canvas - + grid texture live on (the body stays transparent), so the - overlay reads as the app's own surface — no blur (the phase-08 - perf anchor). + body-level doc-modal precedent): while visible it is the only + CONTENT-level interactive surface — assets/token-gate.js locks the + root (#main, inert) so focus and keyboard traversal stay inside + the gate (WCAG, the inert-pair contract). + Stacking (phase 85, TODO.md L3): z-index 15 — ABOVE all app + content (static) but BELOW the sticky header (20) and its mobile + dropdown (21, inside the header's stacking context): the + unauthenticated visitor keeps a reachable hamburger + menu while + the gate still covers and locks the app content (#main stays + inert — the lock is JS, not z-order — phase 79). The skip-link + (100) and the 1000-family overlays (doc-modal, sync backdrop) are + unaffected — all above 15; the doc-modal can only be opened from + the unlocked app anyway. Solid --bg: the canvas + grid texture + live on (the body stays transparent), so the overlay reads + as the app's own surface — no blur (the phase-08 perf anchor). The centered card reuses the #sources-gate visual language (surface card + hairline + glyph + heading + sub + action) in a tighter column. */ .auth-gate { position: fixed; inset: 0; - z-index: 500; + z-index: 15; display: flex; /* the card is the only in-flow child — margin: auto centers it */ overflow-y: auto; /* short viewports: the card scrolls fully into view */ background: var(--bg); diff --git a/frontend/assets/token-gate.js b/frontend/assets/token-gate.js index 8de5944..d18300e 100644 --- a/frontend/assets/token-gate.js +++ b/frontend/assets/token-gate.js @@ -193,9 +193,13 @@ export async function mountGate(lockRoot, onAuthed) { /* Anonymous: reveal the gate (drop hidden AND inert — the inert-pair contract), lock the app, focus the token input. The gate is the - only interactive surface while visible: the lock root is inert, - so Tab never reaches the locked app (the composer on the shell, - the content on the viewer). */ + only CONTENT-level interactive surface while visible: the lock + root is inert, so Tab never reaches the locked app (the composer + on the shell, the content on the viewer). The header was never + the lock root (and is never inert) — it was only visually + covered pre-phase-85: the gate's z-index (15) now sits below the + header (20), so the mobile hamburger + menu stay reachable while + the app content stays inert-locked (TODO.md L3). */ if (gate) { gate.hidden = false; gate.inert = false; diff --git a/frontend/document.html b/frontend/document.html index 86183a7..1ed7474 100644 --- a/frontend/document.html +++ b/frontend/document.html @@ -162,7 +162,10 @@ root; the existing boot sequence (whoami → load content) runs as onAuthed — an admin (or a validly cached token user) gets it immediately, the gate never shows. SHIPS hidden + inert - (the phase-16 ship-hidden pattern). --> + (the phase-16 ship-hidden pattern). Phase 85 (TODO.md L3): + same stacking as the shell gate — the overlay (z-index 15) + sits below the viewer's sticky bar (20), so the hamburger + + menu stay reachable while #main stays inert-locked. -->