Skip to content

fix(website): load footer animation before it scrolls into view - #19592

Closed
benjcooley wants to merge 1 commit into
mainfrom
benjcooley/footer-animation-prefetch
Closed

benjcooley wants to merge 1 commit into
mainfrom
benjcooley/footer-animation-prefetch

Conversation

@benjcooley

Copy link
Copy Markdown
Collaborator

Summary

Give the deferred footer animation enough time to load before scrolling brings it on screen, following #19580.

Changes

  • Increase Astro's existing client:visible preload margin from 200px to 100%. No changes to Mar's markup, CSS, images, or animation code; no new dependencies or abstractions.
  • Strengthen the existing browser regression: images must start loading while the footer is still off-screen, and must not load during initial catalogue display. The shared fixture keeps media requests local.

Review Focus

Real-network Chromium measurements at 1280×800, with a three-second read followed by wheel scrolling, showed 48–127 ms of blank canvas across four runs before this change. The same four-run workload measured 0 ms after it. This measures first canvas draw, not merely network completion; it is not a guarantee for every network or scroll speed.

The strengthened test fails against the old built margin and passes with this change. All 69 targeted browser runs pass (performance and render-guard suites, repeated three times). The original 1,000 ms loader, layout-shift, and JavaScript budgets are unchanged. CI-env production build, internal-link check, website typecheck, targeted lint/format, and pre-push checks pass.

Static appearance and translated copy are unchanged; only off-screen loading timing changes. BILL is the sole reviewer for this follow-up.

@benjcooley
benjcooley requested a review from a team September 30, 2026 07:30
@vercel

vercel Bot commented Sep 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
billing-web Ignored Ignored Sep 30, 2026 7:30am UTC
billing-web-test Ignored Ignored Sep 30, 2026 7:30am UTC

Request Review

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

This candidate changes nothing the matrix measures, so every expensive stage was skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since b1845a0826c44969e7eccd953ce06ca7379413a7

Full docs: ADR-DEVEX-LINT-0015

🔗 Website Preview

Website Preview: https://comfy-website-preview-pr-19592.vercel.app

Models is built and gated by PostHog (workshop-enabled), using staging Cloud.

This commit: https://website-frontend-kydimt6vn-comfyui.vercel.app

Last updated: 2026-09-30T07:33:54Z for 1f16eab

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: dc52f475-53d7-4429-81da-3466a7b58935

📥 Commits

Reviewing files that changed from the base of the PR and between b1845a0 and 1f16eab.

📒 Files selected for processing (2)
  • apps/website/e2e/models-performance.spec.ts
  • apps/website/src/layouts/BaseLayout.astro

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The footer’s Astro client:visible root margin changes from 200px to 100%. The performance test scrolls to a position above the footer, confirms it is outside the viewport, and checks that the animation frame request succeeds.

Changes

Footer visibility threshold

Layer / File(s) Summary
Footer visibility and test
apps/website/src/layouts/BaseLayout.astro, apps/website/e2e/models-performance.spec.ts
The footer’s visibility root margin changes to 100%. The test checks that the footer remains outside the viewport before checking the animation frame response.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: maanilverma

Merge Risk: ⚪ Minimal · up to 1f16e

The footer animation is configured to preload earlier than before at the tested desktop size. No concrete user-facing regression is established, so the change is ready to merge subject to normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to 1f16e

The change affects 1 system.

Changed systems: apps/website

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — apps/website (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in apps/website/e2e/models-performance.spec.ts: The test replaces scrolling the footer into view with an explicit scroll to 1.5 viewport heights above its position, then asserts the footer is outside the viewport before checking the frame response.
  • observed — Modified behavior in apps/website/src/layouts/BaseLayout.astro: SiteFooter now uses a 100% visibility root margin instead of 200px.
🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: loading the footer animation before it enters the viewport.
Description check ✅ Passed The description explains the change, test coverage, measured impact, unchanged behavior, and review focus. It does not use the template's exact What, Breaking, and Dependencies labels, but it provides…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
End-To-End Regression Coverage For Fixes ✅ Passed The PR uses bug-fix language, but all changed files are under apps/website. The check explicitly excludes PRs that change only apps/website, and the PR also updates `apps/website/e2e/models-perfor…
Website End-To-End Regression Coverage ✅ Passed The PR changes website runtime behavior in apps/website/src/layouts/BaseLayout.astro by increasing the client:visible root margin from 200px to 100%. It also updates `apps/website/e2e/models-p…
Adr Compliance For Entity/Litegraph Changes ✅ Passed PASS: The changed files are apps/website/e2e/models-performance.spec.ts and apps/website/src/layouts/BaseLayout.astro. None are under src/lib/litegraph/, src/ecs/, or graph-entity-related path…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@benjcooley benjcooley left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👨‍💻 BILL: APPROVED at 1f16eabbc6. 0 BLOCKER / 0 SHOULD FIX / 0 TRIVIAL.

  • rootMargin: '100%': a valid IntersectionObserver margin (one viewport). It fixes the blank-logo gap I measured on #19580 (149–221 ms at 200px), and your real-network drawImage probe shows 0 ms at 100%. The markup, CSS and animation are unchanged.
  • It doesn't re-contend the catalogue load, which was the risk with a wider margin. On a CI-env build, /hub/models/ requests no footer frame before scrolling at 1280×800 (search ready 614–1155 ms) or 393×852 (cards at ~160 ms, footer ~7400 px below the fold), 3/3 each. On short pages the footer hydrates immediately, as it did before #19580.
  • Test: it now puts the footer 1.5 viewports below the fold, asserts it's off-screen, and requires a frame response, so it fails at 200px. The no-frames-before-search-ready assertion is kept.
  • Verified: models-render-guard + models-performance 69/69 at --repeat-each=3, with all budgets unchanged.

@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main   #19592      +/-   ##
==========================================
- Coverage   84.22%   84.11%   -0.11%     
==========================================
  Files        3325     3253      -72     
  Lines      160060   157882    -2178     
  Branches    41666    40942     -724     
==========================================
- Hits       134803   132801    -2002     
+ Misses      23357    23291      -66     
+ Partials     1900     1790     -110     
Flag Coverage Δ
billing-web-unit ?
website-unit 79.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 72 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 30, 2026
@benjcooley

Copy link
Copy Markdown
Collaborator Author

Closing at Ben’s request. This is optional polish for the brief footer-animation delay, not required for the original CI fix or the already-merged Seedance and analytics work. The branch is retained if we choose to revisit it; no changes to main.

@benjcooley benjcooley closed this Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant