fix: republish runtime modules + repoint demos at browser-safe APIs, case study #31#32
fix: republish runtime modules + repoint demos at browser-safe APIs, case study #31#32
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #31
…case study #31 Stops the Jekyll exclude list in _config.yml from silently dropping files that demo HTML pages import at parse time (settings.js, *.jsx, wikidata-api-browser.js, unified-cache-browser.js). Only Node-only modules remain excluded. Repoints cache-demo, search-demo, search-test and run-tests at the browser-safe entry points and corrects two ./text-*-transformer-*.js paths that were always 404 from the site root. Adds the case study under docs/case-studies/issue-31/ (timeline, requirements, root causes, solution plans, external research, reproduction guide) and before/after screenshots for the four demos that were broken on production.
Solution summaryDone. PR #32 is updated and ready for review: #32 Summary of what shipped:
PR title: fix: republish runtime modules + repoint demos at browser-safe APIs, case study #31. State: open, not draft, mergeable (CLEAN). No CI workflows are configured for this repo, so no checks to wait on. This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $5.403373📊 Context and tokens usage:Claude Opus 4.7: (2 session segments)
Total: (153.8K + 6.8M cached) input tokens, 41.6K output tokens, $5.403373 cost 🤖 Models used:
📎 Log file uploaded as Gist (7468KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This reverts commit 7fd9477.
Summary
Fixes #31. Every demo card on the new landing page (
index.html) was clicked; four were broken on the livelink-assistant.github.io/human-language/site._config.ymlintroduced in PR feat: demo gallery landing page, fix Pages republish, case study #29 #30 has anexclude:list whose globs (*.jsx,settings.js,wikidata-api-browser.js,unified-cache-browser.js) match files that the React-basedentities.htmlandproperties.htmlimport at parse time. Jekyll dutifully omits them from_site/, every<script type=\"module\">import 404s, and the page renders blank withTypeError: undefined is not an object (evaluating 'window.StatementComponents.StatementsSection').persistent-cache.js,unified-cache.js,wikidata-api.js) inexclude:. Everything that an HTML page imports is now published. Comment in_config.ymldocuments the invariant for future contributors.What broke and what changed
entities.htmlsettings.js,*.jsx,wikidata-api-browser.js)properties.htmlcache-demo.htmlunified-cache.js(fs,crypto); transformer path 404wikidata-api-browser.js(CacheFactoryre-export) andtransformation/text-to-qp-transformer.jssearch-demo.htmlwikidata-api.jswikidata-api-browser.jssearch-test.jssearch-demo.html)wikidata-api-browser.jsrun-tests.html./text-transformer-test.js(file lives attransformation/text-transformer-test.js)Case study
Full deep-dive lives at
docs/case-studies/issue-31/:README.md— overview and contents.timeline.md— sequence of events, including the original 2025-07-18 ESM split that made the*.jsx/settings.jsfiles runtime-critical.requirements.md— R1–R6 distilled from the issue body.root-causes.md— primary cause + three secondary causes.solution-plans.md— chosen approach, alternatives considered, follow-ups.external-research.md— Jekyllexclude:semantics, GitHub Pages publishing model, prior art, tools that would have caught this in CI.reproduction.md— 12-line shell script that reproduces the bug locally without installing Ruby/Jekyll.Raw data dumps (issue payload, PR metadata, Pages config and full build history, live HTML snapshots captured while the bug was live) are in the same folder for archival reference.
Visual verification
entities.htmlproperties.htmlcache-demo.htmlandsearch-demo.html(after fix)cache-demo.htmlsearch-demo.htmlReproduction
Pre-merge: every line returns
404. Post-merge (after Pages republishes): every line returns200.For an offline reproduction without waiting for Pages, see
reproduction.md— 12 lines of bash that mirror Jekyll's exclude filter on top of the working tree.Test plan
entities.htmlrenders Q35120 with statements (no console errors)properties.htmlrenders P31 with statements (no console errors)cache-demo.htmlset/get round-trips against the IndexedDB cachesearch-demo.htmlreturns results for a sample queryrun-tests.htmlruns the transformer test suitetransformation/index.html,transformation/test-ngram.html,browser-cache-test.htmlcontinue to work (no regressions)index.htmlresolves on GitHublink-assistant.github.io/human-language/(smoke-test inreproduction.md)