Skip to content

fix: repair two frontend tests broken by the hover-gate cross-merge - #16210

Closed
bolichen97 wants to merge 1 commit into
mainfrom
fix/hover-policy-cross-merge
Closed

bolichen97 wants to merge 1 commit into
mainfrom
fix/hover-policy-cross-merge

Conversation

@bolichen97

@bolichen97 bolichen97 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Make main's frontend test suite pass again after #14807 merged on top of two label/markup changes it never saw.

Every PR's Frontend Tests shards 1 and 2 now fail on main 57d71bb54e:

Why it matters

Both tests fail on main itself, so every open PR that runs the frontend suite is red for reasons unrelated to its diff.

Not a goal

  • Changing any product code or label.

What changed (motivation → approach → change)

Cross-merge breakage: each change was green alone, red combined. The fix updates the two tests to current main:

  • The Duplicate-item test now finds the item by its current label, Fork chat.
  • REVEAL and HIDDEN now accept bracketed arbitrary-variant prefixes ([@media(...)]:), so a hover-only reveal behind an arbitrary media query is still scanned. Deleting the row instead would have hidden that blind spot.
  • The WelcomeView DECORATIVE entry is kept, with its snippet updated to :group-hover:line-clamp-none.

Backwards compatibility

Compatible: test-only change.

Removes nothing. The policy scan now sees more sites, not fewer.

Tests

  • website/src/test/SessionActionsMenu.duplicate.test.tsx: still checks the item appears with a handler and is absent without one.
  • website/src/test/hoverVariantPolicy.test.ts: passes with the WelcomeView row; removing that row makes it fail on components/WelcomeView.tsx:130, so the site is classified again.

Both files: 41 passed locally on current main; both failed before the change.

Manual verification

N/A — test-only change; the two suites are the verification.

Related Issues

Breakage introduced by #14807 combined with #16101 and #15820.

Pattern harvest

Rule candidate: a source-scanning policy test must recognise Tailwind arbitrary variants ([...]:) in its variant-prefix pattern, or a site written that way silently leaves the scan. This PR applies that to the hover policy's REVEAL and HIDDEN. The Fork chat label pin is not generalizable.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

@bolichen97
bolichen97 requested a review from a team as a code owner October 2, 2026 17:31
@bolichen97
bolichen97 requested a review from kyleseaman October 2, 2026 17:31
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

UX-level review of 83ac64cf78886d9f4c1326584b9f8f08060b1726 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Nothing to check.

[UX-REVIEWED] 83ac64c

Description read

[DESCRIPTION-READ] 73fdae8067af5dd62c54600eec7f672455e4dfffc774fbd9926701f3f7ca1cb8

That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 83ac64cf78886d9f4c1326584b9f8f08060b1726 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 83ac64c

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 83ac64cf78886d9f4c1326584b9f8f08060b1726: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 83ac64cf78886d9f4c1326584b9f8f08060b1726 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Confirm Frontend Tests shards 1–2 run green on this PR's own CI — the suites are the verification the description leans on.

[DESIGN-REVIEWED] 83ac64c

Description read

[DESCRIPTION-READ] 5cc494a38d53dfa11a892d140766c52bb91715a46d0e56ced5021a69d4b6c733

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed 83ac64cf78886d9f4c1326584b9f8f08060b1726 — this comment is updated in place on each push.

Review details

The touch-only ⋯ menu still draws the clipboard glyph beside the renamed "Fork chat" label.

FINDING — website/src/components/SessionActionsMenu.tsx:276 — the menu item this test now pins renders <Copy size={13} .../> {i18nT('pages.chatSidebar.duplicate')}, so on touch (where this menu is the only route to the action, the sidebar row's GitFork cluster being hidden) "Fork chat" ships with the clipboard icon #11820 removed for reading as "copy text" → Fix: import and use GitFork in place of Copy at that item, matching pages/ChatSidebar.tsx:1694; requires editing a file this PR does not touch.

[OPUS-REVIEWED] 83ac64c

Verdict parsed from the review's SHA-scoped output markers for commit 83ac64cf78886d9f4c1326584b9f8f08060b1726.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 83ac64cf78886d9f4c1326584b9f8f08060b1726: <one-sentence reason>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 2, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) October 2, 2026 17:59

@buluoray buluoray 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.

Reviewed at 25b59fca4e. Auto-merge is on, so an approval here ships it; holding for one change.

What holds

  • SessionActionsMenu.duplicate.test.tsx: pages.chatSidebar.duplicate is "Fork chat" on main (en.json:6715), so pointing both assertions at the current label is correct.
  • CI at the head is green (93 checks), and main has not fixed either test since this branch's base.

Blocking: the WelcomeView entry is the only signal that a hover-reveal site fell out of the scan

The DECORATIVE row failed because REVEAL no longer recognises WelcomeView's site, not because the site went away. Main's WelcomeView.tsx:130 still has [@media(min-width:640px)_and_(min-height:600px)]:line-clamp-2 ... [@media(min-width:640px)_and_(min-height:600px)]:group-hover:line-clamp-none, which is a hover-only reveal behind a clamp. REVEAL only allows one [a-z]+: prefix, so an arbitrary-value variant makes the line invisible to the policy. I ran both regexes against that exact line: this PR's REVEAL gives false.

Deleting the row turns the test green by removing the tripwire, and from then on any hover-only reveal written behind an arbitrary media variant passes the policy unseen. The PR body's "the scanner no longer reports that line as a hover-reveal site, so the entry has nothing to describe" is accurate, but that blind spot is the defect, not a resolution. Because the squash body lands in main, the history would also record the coverage loss as cleanup.

Fix (small, test-only): let REVEAL (and HIDDEN) accept bracketed arbitrary-variant prefixes, e.g. (?:(?:[a-z]+|\[[^\]\s]+\]):)*, and keep the WelcomeView row with its current snippet. That keeps the site classified and stops the next arbitrary variant from slipping through. The same regex against line 130 gives true.

Note: #16223 (opened after this PR) takes exactly that approach for the policy test, alongside the same label fix. It also swaps the menu icon Copy for GitFork in SessionActionsMenu.tsx, which is product code. Either adopt the regex change here, or coordinate with that PR so only one of the two lands. Otherwise whichever merges second conflicts on the same lines.

Point the Duplicate-item test at the current 'Fork chat' label, and teach the hover policy's REVEAL/HIDDEN patterns bracketed arbitrary variants so WelcomeView's [@media(...)]:group-hover:line-clamp-none reveal stays classified; its DECORATIVE row is kept with an updated snippet.
@bolichen97
bolichen97 force-pushed the fix/hover-policy-cross-merge branch from 25b59fc to 83ac64c Compare October 2, 2026 21:32
@bolichen97

Copy link
Copy Markdown
Contributor Author

Addressed in 83ac64c (rebased on current main).

  • REVEAL prefix is now (?:(?:[a-z]+|\[[^\]\s]+\]):)*; HIDDEN also accepts one bracketed prefix. Without that, [@media(...)]:line-clamp-2 was not seen as hidden either.
  • The WelcomeView DECORATIVE row is back, snippet :group-hover:line-clamp-none (the old sm: form no longer exists on main).
  • Tripwire check: with the row removed, the test fails on components/WelcomeView.tsx:130. With it, 41/41 pass.
  • PR body updated so the squash records the scan gap as the defect, not as cleanup.

On #16223: same test fix, plus a product icon swap. This PR stays test-only; if this lands first, #16223 just needs to drop its two test hunks.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 2, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 2, 2026
@bolichen97
bolichen97 added this pull request to the merge queue Oct 2, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 3, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Closing as superseded: #16227 (merged) repairs the same two frontend tests on main.

@bolichen97 bolichen97 closed this Oct 3, 2026
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 3, 2026
@bolichen97
bolichen97 deleted the fix/hover-policy-cross-merge branch November 20, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants