Skip to content

add the short video, build the homepage CSS, and stop the boot overlay blocking the page - #507

Merged
gerardrecinto merged 5 commits into
masterfrom
perf-and-second-video
Oct 5, 2026
Merged

gerardrecinto merged 5 commits into
masterfrom
perf-and-second-video

Conversation

@gerardrecinto

@gerardrecinto gerardrecinto commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

  • demo/index.html: added the YouTube Short (oS1bfq_ZDkg) under the intro video. Vertical, lazy loaded, click to play.
  • Tailwind is now built ahead of time. The page linked the Tailwind CDN script, which compiled classes in the browser before first paint. It now links demo/tailwind.css (29 KB, built by scripts/build-css.sh with the Tailwind CLI that sop-arena already installs). The config moved to demo/tailwind.config.cjs. The Site Check job rebuilds the file and fails if the committed copy is stale.
  • The "Booting Embedded Go WASM Kernel" overlay used to cover the whole page until the 6 MB wasm loaded. It now covers only the Technical Demo section, so the hero, video and every other section are usable immediately. Same element id, same fade-out classes.
  • The wasm engine now starts before the icon library, so a slow icon CDN cannot hold it up.
  • Added a preload for sop.wasm and a preconnect for the icon CDN so the download starts during HTML parsing.
  • demo/logo-mark.png was 256x256 (66 KB) shown at 36px. It is now 72x72 (7 KB).
  • tools/blocklog/stats_test.go: one more Stats case, a block repeated within a run counts once, and a run that never blocked adds no rule.

Left alone

  • A slice instead of maps in blocklog Stats halved allocations but is quadratic for a run with many blocked steps, so it was reverted.
  • demo-agents/index.html still uses the Tailwind CDN. Same fix, separate page with a slightly different config.

Tested

  • go vet and go test for tools/blocklog
  • scripts/assemble-site.sh builds the site and finds every referenced file
  • playwright, whole suite on chromium and mobile-chrome: 68 passed, 2 skipped, including the CLS and WASM boot specs

Thanks, Gerard Recinto

@gerardrecinto gerardrecinto self-assigned this Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Gemini PR Review

Reviewed commit: 3d9bde0d8c21b5f2264a3076ebd787334a261baf
Verdict: FAIL

  • tools/blocklog/blocklog.go: The internal data structure for tracking blocked steps within the Stats method has been fundamentally changed from a map of maps (map[ruleRun]map[stepKey]bool) to a map of slices (map[ruleRun][]blockedStep). While the new logic appears to faithfully replicate the intended behavior, the diff does not include corresponding test updates or new tests to explicitly verify that this significant internal refactoring maintains correctness for all scenarios, such as adding new steps, marking steps as recovered, and accurately calculating overall run statistics, especially for various edge cases (e.g., a run having no blocked steps, or having all steps recovered).

This result blocks merge. Push a fix and comment /gemini review. To contest a finding, see the Gemini dispute process in CONTRIBUTING.md.

@gerardrecinto

Copy link
Copy Markdown
Collaborator Author

Pushed a test for the slice-based Stats: a repeated block in one run counts once and recovers with one commit, and a run that never blocked adds no rule. The existing stats_test.go cases already cover partial and full recovery across steps, per-rule recovery, expired entries, and recovery of a step that never blocked. /gemini review

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Gemini PR Review

Reviewed commit: 039f9307ce3a1798c32fdf1c25688d67615e5446
Verdict: FAIL

  • tools/blocklog/blocklog.go: The change in Log.Stats from map[ruleRun]map[stepKey]bool to map[ruleRun][]blockedStep with a linear scan to check for existing steps, while stated as an optimization for a "handful of steps," introduces a performance risk if the number of blockedStep entries per ruleRun grows unexpectedly large. For a small number of steps, the performance might be negligible or even better due to reduced map overhead, but for a larger number, the O(N) scan to check for existence or update will be slower than O(1) (average) map lookups. This is a potential performance regression, though not a correctness bug.

This result blocks merge. Push a fix and comment /gemini review. To contest a finding, see the Gemini dispute process in CONTRIBUTING.md.

@gerardrecinto gerardrecinto changed the title add the short video under the intro and trim page load and blocklog cost add the short video under the intro and start the wasm download earlier Oct 5, 2026
@gerardrecinto

Copy link
Copy Markdown
Collaborator Author

Reverted the slice change in blocklog Stats, so the diff no longer touches blocklog.go. Only the demo page and one extra Stats test remain. /gemini review

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Gemini PR Review

Reviewed commit: b3b90733f09c0e04d5625183c22c1c1041142768
Verdict: PASS

  • No actionable findings.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Gemini PR Review

Reviewed commit: b3b90733f09c0e04d5625183c22c1c1041142768
Verdict: PASS

There are no actionable findings.

…owser, scope the boot overlay to the demo section, shrink the header logo
@gerardrecinto gerardrecinto changed the title add the short video under the intro and start the wasm download earlier add the short video, build the homepage CSS, and stop the boot overlay blocking the page Oct 5, 2026
@gerardrecinto

Copy link
Copy Markdown
Collaborator Author

Reworked the two open decisions: the homepage stylesheet is built ahead of time and the boot overlay now covers only the demo section. /gemini review

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Gemini PR Review

Reviewed commit: 6c215449b988a8a5c09b88944eaa65cb392194d8
Verdict: PASS

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Gemini PR Review

Reviewed commit: 6c215449b988a8a5c09b88944eaa65cb392194d8
Verdict: FAIL

  • Correctness (Missing Functionality on CDN Failure): In demo/index.html, the lucide.createIcons() call is now guarded by if (window.lucide). While this prevents a hard JavaScript error if the https://unpkg.com/lucide@0.368.0/dist/lucide.min.js script fails to load or execute correctly, it means that if the Lucide CDN is unavailable or the script is otherwise broken, the icons will silently fail to render without any explicit error reporting to the user or console. This represents a change in error handling that may hide a critical UI dependency failure, though it does allow the WASM engine to initialize. The lucide.min.js script is loaded synchronously, so window.lucide should be defined by DOMContentLoaded if the script loads successfully.

This result blocks merge. Push a fix and comment /gemini review. To contest a finding, see the Gemini dispute process in CONTRIBUTING.md.

@gerardrecinto

Copy link
Copy Markdown
Collaborator Author

The icon guard now logs a console error when the Lucide script is missing, so the failure is visible and the engine still starts. /gemini review

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Gemini PR Review

Reviewed commit: cb2f8338b2989817139b27b7fa78bd8b368744b0
Verdict: PASS

  • Correctness/Robustness Improvement: demo/index.html The DOMContentLoaded handler now prioritizes the initWasmEngine() call before lucide.createIcons(), and includes an if (window.lucide) check with a console error fallback. This ensures the critical WASM engine initialization is not blocked by a potentially slow or failed Lucide CDN load, and provides better error visibility.
  • Test Improvement: .github/workflows/site-check.yml A new step Check the homepage stylesheet is up to date is added to the CI workflow. This step runs the scripts/build-css.sh and then uses git diff --exit-code demo/tailwind.css to ensure that the generated tailwind.css is always committed and up-to-date with the configuration, preventing stale styling.
  • Test Improvement: tools/blocklog/stats_test.go A new test TestStatsCountsARepeatedBlockOnceAndIgnoresRunsThatNeverBlocked is added. This test specifically verifies the blocklog tool's behavior for counting unique blocked steps within a single run and correctly handling recovery, improving coverage for an important edge case.

@gerardrecinto
gerardrecinto merged commit 0502b2e into master Oct 5, 2026
30 checks passed
gerardrecinto added a commit that referenced this pull request Oct 5, 2026
…chable

The boot overlay used to stay up for good if the icon script failed to
load, which left the homepage a black screen that still returned 200.
This blocks unpkg.com and checks the headline is the topmost element at
its own position. It fails on the homepage from before #507.
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.

1 participant