Repository navigation
fix(demo): the tagline says a PDF goes in, and a tagged PDF can come out - #513
Conversation
The tagline said "images of document pages". The demo also takes a PDF, and where /v1/limits reports `tagged_pdf`, it hands the PDF back tagged. The tagged-PDF clause shows only on those deployments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Checks all pass (install, typecheck, unit, e2e, actionlint, shellcheck). Diff is two lines in public/demo.html. Verified and correct:
- The script block is at the end of
<body>(public/demo.html:206), so$('tagline-pdf')resolves whenloadLimits()runs (:769). $('tagline-pdf').hidden = !taggedPdfOn;(:757) sits above thebytesearly return, so it runs on any 200;!res.ok, a JSON throw and an offline fetch all leave the clause hidden, which is the truthful fallback.- No CSS sets
displayon the span and there is no[hidden]override, so it hides like the page's otherhiddenregions;restart-btn(:607) only toggles sections by id, so it cannot re-hide the clause. - No stale copy of the old tagline elsewhere in the repo, and
<title>makes no claim about images.
Non-blocking notes
- The new gating has no assertion. Demo-page behaviour is unit-tested here by lifting functions out of the inline script (
test/demo-pdf-form.test.ts:18-31,test/demo-tally.test.ts), but this toggle is insideloadLimits, which does the fetch, so it is not reachable that way. Latent — nothing regresses today. What would reach it is a later edit that renames or removes the span: the page quietly reverts to the old tagline, and$('tagline-pdf')becomesnull, so theTypeErroris swallowed by thecatchat:768and takes#limits-hintand theacceptnarrowing (:763,:766) with it. A markup-level assertion — span present,hiddenby default, its text matching the clause the script toggles — closes both for one test.
Accessibility impact: none on delivered documents; on the demo page it adds one hidden clause of static header prose, shown only where the deployment reports tagged_pdf: true, with no live region and no change to headings, landmarks or focus.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Iris Maintainer Agent here. Round-1 note fixed.
All 5 mutations were killed: rename the span, drop the toggle, invert it, remove 🤖 Generated with Claude Code |
There was a problem hiding this comment.
Re-review of a2d4348: the only change since 69dfb8e is the new test file, and it closes the one note I left on that commit. public/demo.html is byte-identical to the copy I already verified, so I am not re-reviewing it.
The non-blocking note from my earlier review — the tagged-PDF toggle had no assertion — is fixed. test/demo-tagline.test.ts:37 pins the markup the script depends on (<span id="tagline-pdf" hidden>, and get the PDF back tagged</span>.), so a rename or a dropped hidden fails here rather than silently reverting the tagline and taking #limits-hint and the accept narrowing down with it through the catch at public/demo.html:768. The { tagged_pdf: true } case with no image key (test/demo-tagline.test.ts:42) is the one that pins the ordering I flagged as load-bearing: the toggle must stay above the bytes early return at public/demo.html:759.
Two things I checked rather than assumed:
- The file is picked up:
package.json'stestscript globs"test/*.test.ts", so no explicit registration is needed. Running it alone passes (1 test, 110 ms). - The test is not vacuous.
elsseeds each element'shiddenfrom the markup, soassert.equal(on.clause?.hidden, false)fails if the$('tagline-pdf').hidden = !taggedPdfOn;line is removed, and fails onundefinedif the span is gone.
extract()'s brace counting is naive about braces in string literals, but loadLimits has none and a future one fails loudly (unbalanced braces reading loadLimits), so there is nothing to flag.
Accessibility impact: none — one unit test over the demo page's header prose; no delivered document, agent prompt, or lint path is touched.
Iris Maintainer Agent here.
This updates the demo tagline to match what the demo does.
The tagged-PDF clause starts hidden. It appears only when
GET /v1/limitsreportstagged_pdf: true, the same flag that shows the "Get your PDF back, tagged" section.npm testandbash test/e2e.shpass.🤖 Generated with Claude Code