Skip to content

fix(website): repair homepage animation and link interactions - #2701

Merged
hidb4ai merged 2 commits into
oceanbase:masterfrom
frf12:codex/fix-homepage-interactions
Dec 3, 2026
Merged

hidb4ai merged 2 commits into
oceanbase:masterfrom
frf12:codex/fix-homepage-interactions

Conversation

@frf12

@frf12 frf12 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Problem and change

Follow-up fixes for #2629:

Returning from the docs now restarts the homepage Hero playback. Visible repeated testimonial cards can open their links while their copies remain outside sequential keyboard navigation and screen-reader announcements. Reduced-motion and no-JavaScript presentation retain the completed static illustration.

The homepage footer keeps its sticky position while focus changes. Focused links appear above the page sheet without moving the pointer target between mousedown and mouseup. In short windows, the footer scrolls internally below the fixed navigation so every link remains reachable in both Tab directions. The ordinary unfocused reveal and current homepage styling are preserved.

Browser coverage and CI

The existing check-website job runs the production export and then the homepage browser suite in required mode. The locked website-tests dependency group and shared Chromium setup provide the prerequisites; missing Playwright, Chromium or export output fails the required run. The shared action preserves the existing browser cache, Ubuntu mirror and upstream fallback used by the knowledge-base job. Runner routing is unchanged. Browser traces, screenshots and JUnit results are retained for diagnosis.

The suite covers direct/client navigation, reduced motion, forward/reverse keyboard focus, actual repeated-card link activation, and first physical clicks on a partially revealed footer. First-click cases cover English/Chinese and 390px/1440px widths, both before and after keyboard interaction. Additional 320×320 and 390×400 cases exercise every footer link in both directions and activate the first and last links.

Validation

  • make docs-test: passed, including 39 website tests, TypeScript checks, production export and validation of 1,148 public pages.
  • After uv sync --frozen --group website-tests, POWERCONTEXT_TEST_HOMEPAGE_BROWSER=1 uv run --no-sync pytest tests/e2e/test_homepage_browser.py -q: 18 passed against the production export, with traces, screenshots and JUnit output retained.
  • POWERCONTEXT_TEST_BLOG_SITE=1 uv run pytest tests/e2e/test_blog_site.py -q: 7 passed.
  • CI selection/pipeline checks: 275 passed; 422 action pins validated.
  • make ci-runners-check and the full pre-commit checks: passed.

These browser results establish local Chromium behavior; the updated CI job still requires its own current-head run. The build also reports the existing Next.js dependency advisory; dependency versions are outside this interaction fix.

AI usage

Implemented, tested and independently reviewed with OpenAI Codex assistance.

Comment thread website/src/components/home/home.css Outdated

/* Focused links must scroll into view instead of staying behind the page sheet. */
main.pc-home > footer:focus-within {
position: relative;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] When the footer is partially visible, :focus-within can move a link before mouseup, causing the first click to miss. Could we use footer:has(:focus-visible) instead?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Confirmed on the production export of b18d789 at both 1440px and 390px viewport widths (1000px height). Scroll to 60px above the document bottom and click the visible Changelog link: mousedown focuses it, this rule moves it down by about 60px, and mouseup leaves the page at /zh/ instead of navigating. Overriding only this rule back to position: sticky makes the same first click navigate successfully at both widths. Please preserve pointer activation while fixing keyboard visibility, and cover a first mouse click with the footer partially revealed; the added test currently exercises only Tab/Shift+Tab.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in dc94ad748, after integrating master 07f419041. The footer now keeps its sticky position; focus only raises its stacking level above the page sheet. A fixed viewport height bound and internal scrolling keep all links reachable below the header in short windows. None of these geometry rules changes on focus.

I reproduced the original first-click failure on the production export. :has(:focus-visible) alone still moved the target when switching from keyboard to pointer input, so the fix keeps the layout stable across both input modes. The final production export passed all 18 browser cases, including first physical clicks at 60px above the document bottom in English/Chinese at 390px/1440px widths, both with and without prior keyboard focus. The 320×320 and 390×400 cases also passed forward/reverse Tab through every footer link and activation of the first and last links.

The PR description contains the complete validation. Current-head CI has not appeared yet during the ongoing GitHub Webhooks/Actions incident: https://www.githubstatus.com/incidents/121bhnw0ptrb . Please re-review the corrected behavior.

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The footer focus fix introduces a reproducible first-click navigation regression. I added production-page reproduction and control evidence to the existing P2 thread: #2701 (comment). Please address it before merging.

@AlexStocks AlexStocks added the 1.6.0 v1.6.0 release tracking label Nov 18, 2026

@AlexStocks AlexStocks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

审查了 b18d789b。hero-demo.tsx 里补 data-step 初始化 / 清理、testimonial-wall.tsx 用 tabIndex={-1} 取代 inert(让可见的重复卡片可点,同时保持 tab 顺序跳过)这两处改动方向都对得上 PR 标题。

下面一条是关于这份新测试本身的实际执行情况——它直接影响「CI 绿了」这件事能证明什么。

Comment thread tests/e2e/test_homepage_browser.py Outdated

import pytest

playwright = pytest.importorskip("playwright.sync_api")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] 这份回归测试在当前 CI 里必然被跳过,所以 CI 绿灯证明不了首页修复有效

两个前置条件在 CI 里都不成立:

  1. pytest.importorskip("playwright.sync_api") —— playwright 只声明在 [dependency-groups] notebooks 里(pyproject.toml:183),没有进 dev;而 make e2e-test(CI 的 tests (x, e2e) job)走的是默认组,装不到 playwright。
  2. 第 41-43 行的 website/out 存在性检查 —— website/out 在 website/.gitignore 里,checkout 出来没有;CI 里唯一构建站的 check-website job(make docs-test)不跑 pytest,tests job 又不构站。

结果是这个文件在 make e2e-test 里被收集、然后 100% 走 pytest.skip。也就是说 hidb4ai 复现出来的「1440 / 390 宽度下第一次点击落空」这类问题,本来正是这份用例应该拦住的东西,而它从不执行。

建议至少选一条:(a) 给 tests 的 e2e job 加 --group notebooks + pnpm exec playwright install chromium,并让 docs-test 的产物在同一个 job 里可复用;(b) 如果确定只做手工验证,就在模块 docstring 里写明「本文件不在 CI 执行」,别让它看起来是门禁的一部分。当前形态是最容易误读的那种:看着有测试,实际零执行。

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in dc94ad748. The existing check-website job now installs the locked website-tests dependency group, builds the production export, uses the shared .github/actions/setup-playwright helper, and runs tests/e2e/test_homepage_browser.py in the same job with POWERCONTEXT_TEST_HOMEPAGE_BROWSER=1. In required mode, missing Playwright or export output is an error; a missing Chromium executable also fails the run. Browser traces, screenshots and JUnit output are uploaded for diagnosis. Test-file changes select the website suite, and shared browser-helper changes select both consumers.

The helper preserves the knowledge-base job's browser cache, Ubuntu mirror and upstream fallback; runner routing and dependency versions are unchanged. Local production validation passed 18 browser cases, 39 website tests, 7 blog checks, 275 CI selection/pipeline tests, action pin validation and runner checks. The four original first-click cases failed before the fix and passed after it; mixed-input and short-viewport cases are included as well.

The new head has no GitHub Actions run yet during the current platform incident: https://www.githubstatus.com/incidents/121bhnw0ptrb . These local results and workflow checks do not substitute for the outstanding current-head CI run.

@AlexStocks AlexStocks added 1.6.1 v1.6.1 release tracking 1.6.2 v1.6.2 release tracking and removed 1.6.0 v1.6.0 release tracking 1.6.1 v1.6.1 release tracking labels Nov 24, 2026
@hidb4ai

hidb4ai commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Mergeability update: head b18d789 now conflicts with current master 246f70b in website/src/components/home/home.css, confirmed with git merge-tree and GitHub's CONFLICTING status. Please update against master, reconcile the footer behavior, and rerun the browser regressions on the merged result, including the first-click scenario documented in the existing P2 thread. The earlier green CI run does not validate this merge result. The existing footer finding remains unresolved.

@hidb4ai hidb4ai added module:core Core: PR changes under src/ module:other Other: changes without an applicable Knowledge base, Gateway, Core, Desktop or pc-mate label and removed module:core Core: PR changes under src/ labels Dec 2, 2026

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-reviewed dc94ad7. The footer now preserves pointer geometry while keeping focused links visible, and the required homepage browser job addresses the previously skipped coverage. The current production export passed the actual Chromium interaction suite, including mixed-input first clicks and short-viewport keyboard navigation. No remaining actionable defect found. Current-head GitHub Actions validation is still outstanding; this approval does not mark the PR merge-ready.

@hidb4ai
hidb4ai merged commit 2886be5 into oceanbase:master Dec 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6.2 v1.6.2 release tracking module:other Other: changes without an applicable Knowledge base, Gateway, Core, Desktop or pc-mate label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants