Skip to content

fix: republish runtime modules + repoint demos at browser-safe APIs, case study #31#32

Merged
konard merged 3 commits intomainfrom
issue-31-169d11d48429
Apr 29, 2026
Merged

fix: republish runtime modules + repoint demos at browser-safe APIs, case study #31#32
konard merged 3 commits intomainfrom
issue-31-169d11d48429

Conversation

@konard
Copy link
Copy Markdown
Contributor

@konard konard commented Apr 29, 2026

Summary

Fixes #31. Every demo card on the new landing page (index.html) was clicked; four were broken on the live link-assistant.github.io/human-language/ site.

  • Primary cause — the _config.yml introduced in PR feat: demo gallery landing page, fix Pages republish, case study #29 #30 has an exclude: list whose globs (*.jsx, settings.js, wikidata-api-browser.js, unified-cache-browser.js) match files that the React-based entities.html and properties.html import at parse time. Jekyll dutifully omits them from _site/, every <script type=\"module\"> import 404s, and the page renders blank with TypeError: undefined is not an object (evaluating 'window.StatementComponents.StatementsSection').
  • Fix — keep only the Node-only modules (persistent-cache.js, unified-cache.js, wikidata-api.js) in exclude:. Everything that an HTML page imports is now published. Comment in _config.yml documents the invariant for future contributors.
  • Audit — the same walk-through revealed three more demos with latent bugs (independent of the Jekyll regression but uncovered while clicking through every link). All fixed in this PR.

What broke and what changed

Demo Pre-fix Post-fix
entities.html Blank page (Jekyll exclude → 404 on settings.js, *.jsx, wikidata-api-browser.js) Renders Q35120 with statements
properties.html Blank page (same cause) Renders P31 with statements
cache-demo.html Imported Node-only unified-cache.js (fs, crypto); transformer path 404 Imports wikidata-api-browser.js (CacheFactory re-export) and transformation/text-to-qp-transformer.js
search-demo.html Imported Node-only wikidata-api.js Imports wikidata-api-browser.js
search-test.js Same Node-only import (used by search-demo.html) Imports wikidata-api-browser.js
run-tests.html 404 on ./text-transformer-test.js (file lives at transformation/text-transformer-test.js) Correct path

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.js files 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 — Jekyll exclude: 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.html

Before After
entities before entities after

properties.html

Before After
properties before properties after

cache-demo.html and search-demo.html (after fix)

cache-demo.html search-demo.html
cache demo search demo

Reproduction

for f in settings.js wikidata-api-browser.js statements.jsx loading.jsx; do
  printf '%-30s %s\n' "$f" "$(curl -s -o /dev/null -w '%{http_code}' \"https://link-assistant.github.io/human-language/$f\")"
done

Pre-merge: every line returns 404. Post-merge (after Pages republishes): every line returns 200.

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.html renders Q35120 with statements (no console errors)
  • properties.html renders P31 with statements (no console errors)
  • cache-demo.html set/get round-trips against the IndexedDB cache
  • search-demo.html returns results for a sample query
  • run-tests.html runs the transformer test suite
  • transformation/index.html, transformation/test-ngram.html, browser-cache-test.html continue to work (no regressions)
  • Every doc/header/footer link on index.html resolves on GitHub
  • Verify post-merge that the four pre-fix 404s now return 200 on link-assistant.github.io/human-language/ (smoke-test in reproduction.md)

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #31
@konard konard self-assigned this Apr 29, 2026
…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.
@konard konard changed the title [WIP] We need to click all links in our landing page, and make sure it is working fix: republish runtime modules + repoint demos at browser-safe APIs, case study #31 Apr 29, 2026
@konard konard marked this pull request as ready for review April 29, 2026 14:58
@konard
Copy link
Copy Markdown
Contributor Author

konard commented Apr 29, 2026

Solution summary

Done. PR #32 is updated and ready for review: #32

Summary of what shipped:

  • _config.yml — exclude list trimmed to Node-only modules; comment documents the invariant.
  • cache-demo.html, search-demo.html, search-test.js, run-tests.html — repointed at the browser-safe APIs and corrected two ./text-*-transformer-*.js paths that were always 404 from the site root.
  • docs/case-studies/issue-31/ — full case study (README, timeline, requirements, root causes, solution plans, external research, reproduction guide) plus raw data dumps.
  • docs/screenshots/issue-31-*.png — before/after for the four affected demos.

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.

@konard
Copy link
Copy Markdown
Contributor Author

konard commented Apr 29, 2026

🤖 Solution Draft Log

This 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)

  1. 114.6K / 1M (11%) input tokens, 26.0K / 128K (20%) output tokens
  2. 53.2K / 1M (5%) input tokens, 10.9K / 128K (9%) output tokens

Total: (153.8K + 6.8M cached) input tokens, 41.6K output tokens, $5.403373 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Model: Claude Opus 4.7 (claude-opus-4-7)

📎 Log file uploaded as Gist (7468KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Contributor Author

konard commented Apr 29, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • No CI/CD checks are configured for this repository
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard konard merged commit 5e7bcf7 into main Apr 29, 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.

We need to click all links in our landing page, and make sure it is working

1 participant