Repository navigation
feat: W2 passes on the task's own Client Documents block when the project tab shows nothing (issue 268) - #277
Merged
Conversation
… shows nothing (issue 268) Both fakes' task detail screens gain the Client Documents block as the 4 Dec 2026 live look saw it; new fake options: the project Documents tab showing "No Document Found" everywhere (issue 268), and the block's files. Red: the pass-path cases breach field=documents on the current code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/fakes/mysys.py patches every booking step: it gains task_documents_shown (False: its Documents tab always shows the row) and check_project_document takes task_documents. No expected value changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ject tab shows nothing (issue 268) Live 4 Dec 2026: MySys's project Documents tab failed server-side for one project and showed "No Document Found" in every section, while the task's own detail showed "Client Documents (1)" with the right PDF: a false ACCURACY_BREACH field=documents. W2 now reads that block before leaving the task detail (no click) and passes on it only when the tab never showed a row and showed "No Document Found" under every section heading on every read that counted. One row, two or more, a wrong row, or a block other than exactly (1) with one named link of the PDF: as before. Joey approved the pass path on 4 Dec 2026; decisions entry 6 Dec 2026. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… be empty (PR review) Red: a CSS-uppercased "Client Documents (1)" heading is not counted. Pin: two rows on an early tab read, "No Document Found" after, stays a breach. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A CSS text-transform would change the heading's inner text, not its accessible name. Decisions entry wording updated (review Nit 5) and the safe-side "every read that counted" note added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Fixes the second false
ACCURACY_BREACHat W2,field=documents(#268, Summit, 4 Dec 2026). A read-only live look found that MySys's project Documents tab fails server-side for one project: it shows "No Document Found" in every section, old tasks included. The new task's own detail screen showed "Client Documents (1)" with the right PDF, so the booking was correct. Joey approved a fallback pass path on 4 Dec 2026. The change is in the shared booker, so B1 gets the same path.What changed
booking.task_documents_shown(...): reads the task detail's own Client Documents block with no click, right aftercheck_task_detail(the screen W2 already reads). It returns True only when two reads in a row show exactly one heading whose accessible name isClient Documents (1)and exactly one named link (the download icon link has no name) that starts with the PDF name or adocument_namesform. Otherwise it returns False after 15 s, and it never raises.booking.check_project_document(..., task_documents=False): a new pass path. W2 passes only when all of these hold:ACCURACY_BREACH: 2+ rows, a wrong row, any section with a row, or an empty table without "No Document Found".docs/decisions.md(6 Dec 2026 entry),SPEC.mdW2 "Back and the document",docs/screen-map.mdrow 19.test:e16f2ba: new tests, and both browser fakes gain the task block.test:87683fc: the run fake gains the new read.feat:d3e5883: the code and docs.test:+fix:from the review: the heading is matched by accessible name, and a test pins "every read".Risk
High: touches
mysys/. No new click and no guard action;guard.pyis untouched. The change loosens a control by one pass path, which Joey approved.pr-reviewer (second model): no Important findings. How I handled them:
inner_text, which a CSS text-transform would change, so it is now matched by accessible name (red test, then the fix).test_w2_s_fallback_needs_every_read_of_the_tab_empty.Testing
uv run scripts/check.pyon 3f78410:4897 passed, 12 skipped, "check: all passed", exit 0.field=documentson the old code, and the uppercase-heading case failed before its fix.tests/test_task_documents.py(block rules: 0, 2, a heading/row count mismatch, wrong file, a name only containing the PDF name, filed_as, Certified ignored, no block, two blocks, closed page, CSS case), plus the fallback cases intests/test_summit_booking.pyandtests/test_booker_offline.py.production(CLAUDE.md Done means docs: use the 3 most recent real POs for the MVP's real-PO seam #3). Summit stays unloaded until then.🤖 Generated with Claude Code