Skip to content

Regenerate dita-demo with encoded answers; turn off search autocomplete in the template - #102

Merged
IanMayo merged 4 commits into
mainfrom
ccr-eb36b8e2-yhrk02
Nov 1, 2026
Merged

IanMayo merged 4 commits into
mainfrom
ccr-eb36b8e2-yhrk02

Conversation

@IanMayo

@IanMayo IanMayo commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

The demo and the PR previews still showed plain answers and the search box, because dita-demo/ had not been republished since SRD 013 WP3. This PR brings it up to date without Oxygen.

Changes

  • npm run protect-dita-demo (scripts/protect-demo-output.js, with unit tests): applies the template's rules to existing WebHelp output.

    • Encodes Answer cells and numeric tolerances as qd1:.
    • Adds the #qd-question-total and #qd-answer-key spans.
    • Removes the search box, the index and the results.
    • Turns off autocomplete.

    It is a stand-in for a republish, and dita/README.md says so. A real Oxygen publish is still the check that the template works.

  • dita-demo/ regenerated: 37 questions across 21 pages, default key, search index deleted.

    • check:answer-leak passes on it.
    • The total matches a count of qd-quiz rows in the DITA source.
    • The committed bundle is now the current release build; the old one (Nov 2025) could not decode qd1: when the demo is opened from a checkout. CI still copies a fresh bundle for previews and E2E.
  • Template fix found along the way: with the search box gone, WebHelp's autocomplete script throws Cannot set properties of undefined (setting '_renderItem') on every page. f13ldMan-CSA.opt now sets webhelp.enable.search.autocomplete=no. A real Oxygen publish of the current template would very likely have shown the same error.

  • E2E: the DITA flow tests expect "0 of 37 answered", since the demo now publishes its total.

  • Walkthrough:

    • Recaptured, so it shows "2 of 37 answered" and the real search-free header.
    • The capture no longer hides the search box.
    • The intro slide no longer says it does.

Verification

Check Result
typecheck, lint, format pass
Unit + coverage thresholds 1025 passed
Integration 94 passed. One run failed once after the coverage run; I couldn't reproduce it in 8 reruns and didn't capture which test it was. This PR doesn't touch src/.
Build, size check, gaps (23) pass
E2E, obfuscated storage 121 passed
E2E, plain storage all passed except dita-instructor-flow "View student answers", which fails intermittently on the original demo too (3 of 5 runs locally) at its 5 s test budget
Browser check no console errors on the topic pages; search.html keeps its earlier null.trim error, and nothing links to it now
Deck check 25 slides, all annotations present, no errors

Generated by Claude Code

WebHelp's autocomplete script runs on every page and throws
"Cannot set properties of undefined (setting '_renderItem')" once the
template no longer renders the search box (SRD 013 ANS-01). The
publishing template now sets webhelp.enable.search.autocomplete=no.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019erPampkiqiri3Gab6oSHB
…without Oxygen

npm run protect-dita-demo runs scripts/protect-demo-output.js on
dita-demo/. It follows the template's rules: qd1: encoding of Answer
cells and numeric tolerances (quizAnswerEncoding.xsl), the
#qd-question-total and #qd-answer-key spans (customHeader.xsl), search
box, index and results removed (header.xml, wt_search.html), and search
autocomplete off (f13ldMan-CSA.opt). It is a developer stand-in for an
Oxygen republish, documented as such in dita/README.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019erPampkiqiri3Gab6oSHB
Ran npm run protect-dita-demo: 37 questions across 21 pages, default
key, search index deleted. check:answer-leak passes on dita-demo. The
committed bundle is the current release build (npm run build:dita);
the old one could not decode qd1: values when the demo is opened from
a checkout.

The DITA flow E2E tests now expect "0 of 37 answered", since the demo
publishes its question total (SCO-05).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019erPampkiqiri3Gab6oSHB
Screenshots now show the question total ("2 of 37 answered") and the
template's header without search, so the capture no longer hides the
search box and the intro slide no longer says it does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019erPampkiqiri3Gab6oSHB
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

🚀 PR Preview Deployment

✅ Your changes are being built and deployed to a preview environment.

📋 Live PR Preview Links:

ℹ️ About PR Previews:

📦 Production Demo (main branch):

🧪 Testing Locally:

npm install
npm run build
# Open demo/quiz-index.html in your browser (use file:// or http-server)

This comment will be automatically updated when you push new commits.

github-actions Bot added a commit that referenced this pull request Nov 1, 2026
@IanMayo
IanMayo merged commit ae5bf7b into main Nov 1, 2026
9 checks passed
@IanMayo
IanMayo deleted the ccr-eb36b8e2-yhrk02 branch November 1, 2026 13:17
github-actions Bot added a commit that referenced this pull request Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants