Repository navigation
fix: repair two frontend tests broken by the hover-gate cross-merge - #16210
bolichen97 wants to merge 1 commit into
Conversation
UX Review (Fable 5) — ✅ PASSUX-level review of 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 |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — ✅ PASSDesign-level review of 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 |
Opus 5 Review — ✅ no blocking findingsReviewed Review detailsThe 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 [OPUS-REVIEWED] 83ac64c Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
buluoray
left a comment
There was a problem hiding this comment.
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.duplicateis"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.
25b59fc to
83ac64c
Compare
|
Addressed in 83ac64c (rebased on current main).
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. |
|
Closing as superseded: #16227 (merged) repairs the same two frontend tests on main. |
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:SessionActionsMenu.duplicate.test.tsxlooks for the menu textDuplicate, but fix(sidebar): name the session-row fork action "Fork chat" #16101 renamed that label toFork chat.hoverVariantPolicy.test.tslists a DECORATIVE entry forcomponents/WelcomeView.tsxwith the snippetsm:group-hover:line-clamp-none, but fix(chat): keep floating composer chrome off the transcript and hero #15820 rewrote that class to a[@media(min-width:640px)_and_(min-height:600px)]:arbitrary variant. The scanner'sREVEALpattern allows only one[a-z]+:prefix, so it stopped seeing that hover-only reveal at all, and the entry matched no site.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
What changed (motivation → approach → change)
Cross-merge breakage: each change was green alone, red combined. The fix updates the two tests to current main:
Fork chat.REVEALandHIDDENnow 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.: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 oncomponents/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'sREVEALandHIDDEN. TheFork chatlabel pin is not generalizable.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement