Skip to content

Fix search result cursor flicker on row hover - #1977

Merged
David Pine (IEvangelist) merged 1 commit into
mainfrom
aspireagent/fix-search-result-cursor
Oct 29, 2026
Merged

David Pine (IEvangelist) merged 1 commit into
mainfrom
aspireagent/fix-search-result-cursor

Conversation

@davidfowl

@davidfowl David Fowler (davidfowl) commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #1962.

Keep Pagefind search-result hit areas stable when hovered. Starlight stretches each link's ::after over its result row, but the site's global link-hover brightness filter creates a new containing block on the anchor. The overlay then shrinks to the title, losing hover over the surrounding clickable padding and causing the cursor to oscillate.

Disable the filter only on hovered Pagefind result links. Existing row hover/focus styling, ordinary-link effects, keyboard behavior, and search coverage remain unchanged. This branch is independent of #1976 and does not change its deployment-cache repair.

Third-party links and affiliations

None.

Validation

  • Before the fix, both light/dark desktop regressions fail deterministically: hovered links compute brightness(1.1) / brightness(0.9) rather than none. An earlier padding-hover observation measured the stretched overlay shrinking from 550px to 84px.
  • New browser regressions use representative Pagefind title/nested-excerpt markup inside the actual site search dialog, exercising the installed Starlight and site CSS without requiring a production search index. They verify title and row-padding hover, computed overlay dimensions, hit testing, pointer cursor, pointer activation, and Enter activation.
  • Final browser regression: 18/18 passed, three planned repetitions of both themes across desktop/tablet/mobile Chromium, no retries. The final tests fail 2/2 against unchanged main CSS before the fix.
  • Full repository lint passed; 44/44 related search/presentation/recovery unit tests passed.
  • Existing installed native Pagefind input-presentation tests also passed all 18 planned theme/profile repetitions during the broader development run. That run exposed six failures in an earlier version of the new mobile fixture because it omitted Pagefind's form spacing; the final fixture includes the form and scoped native wrapper, and the complete 18-case affected-path repetition above passes.

Local validation uses pinned Bun 1.4.3 / Astro 7.4.1 and Chromium, with Node 26.12.1 versus CI's Node 24.x. No full local production build was performed. Test-local click interception observes activation without navigating away or closing the fixture dialog.

Production qualification: CI run 40824342803, attempt 1 succeeded for source 8e7e10b53e1308436e27c577c953a206e8a9c9a8 (tested merge e02360ff8dec31e8f0214966d365fe6d1619ccf7 into main 1a916aa5b5fd6cb8a02e5c75eedaead2d61a5263). All six Chromium shards completed: 1,491 registered cases = 1,395 first-attempt passes + one retry-recovered case + 95 existing skips. There were 1,396 executed cases and 1,397 attempts, with no terminal failures. All 51 site-search cases passed first attempt, including six new representative hover regressions and separate existing actual-index search/navigation/history/keyboard checks. Full production lint/unit validation passed: 1,103 passes, one existing skip, 81 files. Build, merged report, frontend gate and required ci-gate succeeded; the observed rollup was 18 successful checks and one expected AppHost scope skip.

The one retry-recovered case was unrelated-path mobile-ux.spec.ts:438: the /i18n/ translation table did not scroll after ArrowRight on the first attempt (scrollLeft remained 0); the existing internal retry passed. Its pre-existence and root cause have not been established here, and it is not demonstrated to be caused by this search-only patch. It is not counted as a first-attempt pass. Merged browser report artifact.

Visual evidence: before and after

Captured from source 8e7e10b53e1308436e27c577c953a206e8a9c9a8, desktop Chromium at 1200 x 900, using the same representative injected Pagefind markup as the regression inside the actual Astro dev search dialog. These are not indexed production search results. For "before", only this PR's filter: none repair rule was removed from the browser's CSSOM, restoring the base hover filter without changing other styles; "after" uses the unmodified PR stylesheet.

The cyan dashed outline marks the 550px result row; magenta outlines the real link ::after target, not a drawn replacement. The orange dot marks the actual pointer position on the title. In both themes the hovered target shrinks to 78 x 23px before, leaving the row padding outside it, versus 550 x 52px after. Outlines, dot and legend are diagnostic annotations only. These static screenshots show target geometry; pointer movement, padding hit testing and keyboard activation are established by the browser assertions above, not by the images.

Light: before

Light theme before: actual hovered target shrinks to title, leaving row padding outside the target

Light: after

Light theme after: actual hovered target spans the entire result row

Dark: before

Dark theme before: actual hovered target shrinks to title, leaving row padding outside the target

Dark: after

Dark theme after: actual hovered target spans the entire result row

🤖 Posted by AspireAgent (AI Agent)

Preserve Starlight's stretched result-link hit area by excluding it from global hover brightness filters. Add light/dark browser regression coverage for row geometry, hit testing, cursor and pointer/keyboard activation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1977. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1977 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

@davidfowl
David Fowler (davidfowl) marked this pull request as ready for review October 29, 2026 06:11
Copilot AI balanced review requested due to automatic review settings October 29, 2026 06:12

Copilot AI 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.

🟢 Approval recommended

No active review issues remain for the targeted Pagefind search-result hover fix.

No open issues 🎉

What changed in this PR

Fixes #1962 by keeping Pagefind search-result hit areas stable on hover, preventing cursor flicker without changing ordinary-link hover effects or deployment-cache behavior.

Changes:

  • Disables the hover filter specifically on Pagefind result links so their stretched hit areas retain the full row dimensions.
  • Adds light/dark browser regressions covering title and padding hover, hit-area geometry, pointer behavior, and click/Enter activation.
File Description
src/​frontend/​tests/​e2e/​site-search.spec.ts Adds hover and activation regressions using representative Pagefind markup in the search dialog.
src/​frontend/​src/​components/​starlight/​Search.astro Overrides the result-link hover filter to preserve full-row hit areas.

Review effort: Balanced

@IEvangelist
David Pine (IEvangelist) merged commit a1b8596 into main Oct 29, 2026
20 checks passed
@IEvangelist
David Pine (IEvangelist) deleted the aspireagent/fix-search-result-cursor branch October 29, 2026 12:54
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.

Search result cursor flickers between arrow and pointer

3 participants