Convert the four open TODO items into executable phases (append mode,
starting at 190 after the completed 189):
190_app_name_settings_fix - the Settings-panel app name wins over the
Theme tab; the three brand strings stripped from the Theme tab
(colors-only); live brand re-apply on save, no reload
191_source_name_labels_tags - source_labels table + admin API + Sources
page editor; the separate bounded source_name_hit_bonus retrieval
boost; label surfacing in the <document> blocks and KB overview
192_verbatim_inline_midturn - an additive verbatim_block SSE frame at
the show_text success moment; in-place mid-turn fence hydration;
the done/restore per-locator dedupe; the done frame, record key,
restore and shared page stay byte-identical
193_sync_remaining_count - the running sync/upload label counts down:
"N remaining" (N = total - done), hidden at the final file; the
chunk/image/summaries/terminal parts untouched
TODO.md is cleared (its items now live in .agents/phases/todo/).
LLM-Generated: true
4.3 KiB
4.3 KiB
Task 03 — The phase E2E suite, the full gates, the docs pass, the commit
Phase: 193_sync_remaining_count · Source: TODO.md:7
Story: n/a
Objective
The dedicated Playwright suite proves the owner-visible contract — the label counts DOWN as the run progresses and goes quiet at the final file — run in isolation per AGENTS rule 4; the full gates pass; the docs are consistent; one atomic commit.
Work
tests/e2e/test_sync_remaining_count.py(NEW — the module docstring names the TODO item, the A1/A2 assumptions and the "server untouched" clause) — the module-app fixture pattern (the phase-64/98 E2E convention — verify intests/e2e/conftest.py/ the sibling sync suites):- the fixture: a small git source with N files (N ≥ 4, the phase-98 fixture convention — the
N_FILESshape oftest_sync_upload_progress.py). - (a) the count-down arm: start the sync through the RAG page's sync flow; capture
#sync-progress(and the button title — the A4 full-label placement) across the run: while files are in flight the label matches^Syncing… <file> [1-N] remainingand the displayedNis NON-INCREASING across polls (thetotal − doneshape — a strict count-down; the pin: the sequence of capturedNs, when a new value appears, is smaller); the· chunk n/mpart coexists when a batch is in flight (the phase-129 part, unbroken); when the walk reaches the final file the part is ABSENT (the main part names the file —^Syncing… <last-file>$, no count part — the A1 hidden edge); the run's terminal result line is the phase-64 shape (thecounts_linehelper — byte-identical, the terminal-line pin). - (b) the upload arm (A2): the upload job (the same fixture as an archive, the
test_sync_upload_progress.pyconvention) → the label showsImporting <file> [1-N] remaining(the shared builder, the shared shape — the pin) and the chunk part coexists (the pin). - (c) the pre-walk edge: the first poll before the walk knows the total → NO count part (
^Syncing…$, the phase-64 contract — thetotal === 0guard, owner-visible).
- the fixture: a small git source with N files (N ≥ 4, the phase-98 fixture convention — the
- Regression, run in isolation:
tests/e2e/test_sync_label_mobile.py,tests/e2e/test_sync_upload_progress.py(the task-02 retargets),tests/e2e/test_sync_chunk_progress.py,tests/e2e/test_sync_summary_visibility.py(the chunk/image/summaries pins) — green. - The full gates, in order:
uv run pytest(unit + integration) — 100% passing;uv run pytest --cov=app --cov-report=term-missing— >90% onapp/;uv run pytest tests/e2e/test_sync_remaining_count.py -v --no-cov— green in isolation;uv run ruff check . && uv run pyright— clean.
- Documentation pass (the phase file's Documentation section):
README.md+AGENTS.mdreviewed in their entirety against the post-phase app; the sync section's running-label example (the(done/total)shape, if present inREADME.md) becomes theN remainingone;AGENTS.mdcorrected only where a phase-64/98 clause names the running count part. - Commit: one atomic, professional commit (Conventional Commits,
--no-gpg-sign), e.g.feat(sync): the running label counts down — "N remaining" (phase 193)— the body names the one-linefmtSyncLabelchange (sync + upload through the shared builder), the hidden-at-final-file edge, and the untouched chunk/image/summaries/terminal parts..agents/phases/todo/193_sync_remaining_count/moves to.agents/phases/complete/in the SAME commit (AGENTS rule 8).
Testing & Quality
- E2E: the suite above, isolated; the regression suites green.
- Coverage: >90% on
app/. - Lint/types: clean.
Completion Criteria
tests/e2e/test_sync_remaining_count.pygreen in isolation — (a) the count-down (non-increasingNacross polls, the chunk part coexisting, the part absent at the final file, the terminal line byte-identical); (b) the upload arm (Importing <file> N remaining); (c) the pre-walk edge (no count part before the total is known).uv run pytest100% passing;uv run pytest --cov=app --cov-report=term-missing>90%;uv run ruff check . && uv run pyrightclean.README.md/AGENTS.mdconsistent (the running-label shape).- the phase directory is in
.agents/phases/complete/; one atomic commit with--no-gpg-sign.