Repository navigation
fix(website): gate hover so iOS taps land on the first try - #14807
Conversation
|
Intent: Make hover-revealed controls activate on the first tap on iOS by keeping Tailwind's hover variant gated to hover-capable devices, while every control that relied on a tap to appear stays visible on touch screens. |
UX Review (Fable 5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS No blind reader has cold-read these 30+ newly always-visible touch controls; every site is shown in the committed screenshots, so the cap is this lane's limit, not a gap. Watch
[UX-REVIEWED] c5bde1c Description read[DESCRIPTION-READ] d038b11713e37914348d8b8e65997b34c21a9557e06729d27381d4cc56d760ba That sha256 names everything this verdict read: the PR description, plus the 37 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 |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify on a real iPhone that one tap now activates (not just reveals) a drawer/composer control — screenshots prove visibility, not the dropped-click fix. Suggestions
[DESIGN-REVIEWED] c5bde1c Description read[DESCRIPTION-READ] 6f1eb2a47223367a2580c5111aaf280478725c8e2afa4952dcc77917af59b6a2 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 |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify on a physical iPhone that a first tap now clicks — the new test pins CSS emission and markup, not Safari's actual tap dispatch. What this change shipsInventory (10 items) — 10 justifiedIntent: One tap activates a control on an iPhone and every hover-revealed control stays reachable on touch — a FIX, at cause level (the ungated
Checks run: [FIRST-PRINCIPLES-REVIEWED] c5bde1c Description read[DESCRIPTION-READ] dcfb8c547242d7ce48956eca09cdc24bceaf2588fc6f367301e1cdb40379395b That sha256 names the PR description this verdict read. Recompute it with |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed Review detailsThe tag status bolt goes fully invisible on touch for the duration of its own save. FINDING — website/src/components/TagManagerList.tsx:366 — the touch reveal is gated on [OPUS-REVIEWED] c5bde1c |
5f4cea5 to
4ae7468
Compare
|
|
|
|
|
|
Rebased: main moved in note: First Principles pointed at |
4ae7468 to
de3e7e1
Compare
|
self-added: yes
|
|
|
|
|
note: evidence for the UX review's gaps is now in the description. |
de3e7e1 to
d2e7db5
Compare
|
self-added: yes
|
|
self-added: yes
|
|
Read-only review note, not approving yet. The core change (dropping @custom-variant hover to restore Tailwind's (hover: hover) gate, plus [@media(hover:none)] touch states at 32 sites) reads sound: desktop hover compiles to the same declarations, focus-visible and group-focus-within are kept, busy/disabled dimming still wins, and the policy test scans src/ for hidden-until-hover markup with no touch state. Two things before merge: (1) it is 34 PNGs (~5 MB, up to 421 KB each) under temp-screenshots/touch-gated-hover/; a squash merge keeps every blob in main forever, so please drop them from the branch and attach them to the PR instead. (2) It also ships behaviour beyond the hover gate (pb-7 / pr-10 padding, static folder cluster on touch, single row menu on touch tablets, a new Duplicate menu item); disclosed, but a maintainer should confirm those belong in this PR. |
iamwhatever
left a comment
There was a problem hiding this comment.
Reviewed: removing the hover custom-variant restores Tailwind v4's @media (hover: hover) gate, so mouse-first devices (including Windows touch laptops) keep hover as before, and every control hidden until hover now has a [@media(hover:none)] visible state; a grep of website/src finds no uncovered site, and hoverVariantPolicy.test.ts compiles the theme and scans for new hover-only controls. The 68-file sweep is one mechanical change. Non-blocking: touch-first tablets with a trackpad lose hover feedback (fair trade-off); the guard's +/-3-line window cannot see a reveal assembled across files; isMobile={isMobile || isTouchDevice} (ChatSidebar.tsx:3668) makes the prop name misleading; please drop temp-screenshots/ at merge.
…irodotdev#14807 hover-policy scan did not parse, so the site left the scan and its DECORATIVE entry matched nothing. Accept arbitrary and stacked variant prefixes and point the entry at the new snippet. GitFork glyph; the session menu item kirodotdev#14807 added still used Copy and its test looked for "Duplicate". Use GitFork and test for "Fork chat".
…irodotdev#14807 hover-policy scan did not parse, so the site left the scan and its DECORATIVE entry matched nothing. Accept arbitrary and stacked variant prefixes and point the entry at the new snippet. GitFork glyph; the session menu item kirodotdev#14807 added still used Copy and its test looked for "Duplicate". Use GitFork and test for "Fork chat".
…14807 (#16223) hover-policy scan did not parse, so the site left the scan and its DECORATIVE entry matched nothing. Accept arbitrary and stacked variant prefixes and point the entry at the new snippet. GitFork glyph; the session menu item #14807 added still used Copy and its test looked for "Duplicate". Use GitFork and test for "Fork chat".
Problem / Motivation
Goal: One tap activates a control on an iPhone, and every hover-revealed control stays reachable on touch screens.
On iOS Safari and the home-screen PWA, many dashboard controls need two taps. The first tap only reveals the control. Examples are the sessions drawer folder menu, the history row delete button, the composer image remove button, notification dismiss buttons, tab close buttons and the widget toolbar.
Why it matters
Phone users hit this on the most common actions in the drawer and composer. It makes the dashboard feel broken on mobile, and a second tap sometimes lands on a different control after the layout shifts.
Not a goal
mouseentertimers (InstantTip). A separate change handles those.:hoverrules inindex.css. None of them reveal a control.What changed (motivation → approach → change)
hover:compiled to a bare:hover, so a tap fired ithover:and everygroup-hover:/peer-hover:apply only inside@media (hover: hover)(Tailwind's default)[@media(hover:none)]:opacity-*iOS sends a synthetic hover before a tap's click. When that hover makes hidden content visible, Safari treats the tap as a hover and never fires the click.
website/src/tailwind-theme.csshad redefinedhover:as&:hoverso that tapping would reveal hover-only controls, which is exactly the reveal that cancels the tap.The fix removes that override so hover styles never apply on a touch screen. Each of the 32 controls that relied on a tap to appear now carries its own
(hover: none)visible state, at the same opacity its hover state used. Every notification dismiss rests at the same 0.6 opacity on touch. Where a control dims while busy (disabled:or a pending mutation), the dim state still wins on touch, including at the widths where it is otherwise hidden until hover. An overlay control that is now always shown keeps room for itself, so it covers no text. A code-review-sage run card with a delete control keeps a strip of room below its last row on touch, where that control sits. A history row reserves space for its delete button. A session row on any touch screen, a wide tablet included, shows the single ⋯ menu phones already use instead of the three-button hover cluster, so the cluster never covers the row's time and pin. That menu now carries Duplicate, the one cluster action it lacked. A non-empty sessions-drawer folder row shows its menu and new-chat buttons inline on touch, the same shape an empty folder row already uses, so the folder count stays visible. The design-tweak row cluster, which collapses to zero size at rest, is always expanded on touch. The tag manager's delete and status buttons, which rest with a transparent glyph and turn muted on hover, take the muted colour on touch. A status button that is disabled stays transparent on touch, because its reason is only in a tooltip and tapping it would do nothing. In the artifacts table view, the folder row's cell spans the whole table, which scrolls sideways on a phone, so its menu sits inline after the count on touch instead ofml-autopast the viewport edge.website/docs/frontend-conventions.mdand the theme note inwebsite/src/index.cssdescribe the gatedhover:policy instead of the old ungated one.Hover-only decoration, such as a pencil glyph inside a visible title button or the file-change chip tooltip, no longer shows on touch. The daily token chart tooltip is the one exception. It is the only place a day's figures appear and the bar has no click action to lose, so it keeps an explicit ungated
[.group:hover_&]:blockand a tap still shows it.Inventory of every hidden-until-hover site in
website/src(tests excluded)pages/ChatSidebar.tsxboard folder header cluster, list folder row cluster, history row delete;components/ui.tsxIconButtonGroup reveal(session rows on touch tablets, widget toolbar);components/chat-input/FilePreviewStrip.tsximage remove;components/notifications/NotificationCard.tsxandNotificationFeed.tsxdismiss;components/SessionTabStrip.tsx,components/EmbedTabStrip.tsx,components/BottomTerminalPanel.tsx,pages/chat/SidePanel.tsxtab close;pages/chat/SessionTitleControl.tsxregenerate title;components/library/LibraryTable.tsx,pages/ArtifactsPage.tsxfolder menu;pages/ArtifactDetailPage.tsxdelete;pages/AppDetailPage.tsxcopy command;pages/ChannelPage.tsxreply (md:);components/RegistryManager.tsxopen / refresh / remove (sm:);pages/knowledge/SourcesList.tsxrename (sm:);pages/members/MembersPage.tsxstar (md:);pages/LocalStorageDebug.tsxdelete;components/TagManagerList.tsxstatus and delete (colour reveal);website/src/appssites:code-review-sage/components/LearningRail.tsxandRunCard.tsxdelete,design-tweak/DesignTweakPage.tsxrow actions and cluster,papyrus/FileTree.tsxdelete,personal-shopper/PreferencesTab.tsxactions andSitesTab.tsxremovepages/overview/TokenDailyChart.tsxdaily figures tooltiputils/touchActions.tsusers (message footers, code blocks, diffs, tables, Mermaid, pinned messages, file menu),RedactionCards.tsx,LaunchpadTile.tsx,MembersPage.tsxtitle edit,CrewAvatarButton.tsxApp.tsxshortcut chord hint; pencil / pen glyphs inSpecDetail.tsx,ArtifactDetailPage.tsx,SessionTitleControl.tsx; copy glyph inCopyBranchButton.tsx; external-link glyph inSecurityPanel.tsx; resize grip bar inChatInput.tsx;FileChangeChips.tsxtooltip;WelcomeView.tsxsuggestion text unclamp (one tap sends the full text to the composer)opacity-40..opacity-80→hover:opacity-100sites; unchanged on touch apart from not brighteningBackwards compatibility
Compatible: only CSS class output changes. On a hover-capable pointer every hover style compiles to the same declarations, now inside
@media (hover: hover), which matches on every mouse and trackpad device.Tests
website/src/test/hoverVariantPolicy.test.ts:tailwind-theme.cssand asserts thathover:,group-hover:, named groups,peer-hover:and colour hovers are emitted only inside@media (hover: hover), and that the theme does not redefine the variant.(hover: none)override sorts aftersm:opacity-0/md:opacity-0, and that(hover: none)plusdisabled:sorts after the plain touch override.src/for hidden-until-hover markup, including text clamped at rest and unclamped on hover (line-clamp-Nwithgroup-hover:line-clamp-none) and a glyph that is transparent at rest and coloured on hover (text-transparentwithgroup-hover:text-muted), and fails on any site with no(hover: none)state that is not listed as decorative. Every decorative entry must still match a live site.DisplayTab.tsxandNotificationItem.tsxare skipped as unmounted, and a test fails if any source file uses either one.IconButtonGroupto check twMerge keeps the class.Reverting the theme line or dropping one touch class fails the suite (checked locally).
website/src/test/SessionActionsMenu.duplicate.test.tsxchecks that the row's single menu shows Duplicate and calls the handler when the row passes one, and shows no Duplicate item otherwise.Manual verification
I booted a real gateway from this branch and from its base and captured both in Chromium. With an iPhone 13 viewport and touch emulation,
(hover: none)matches. The drawer folder menu's effective opacity at rest is 0.00 on the base and 1.00 here. With a desktop viewport and a mouse hover, it is 1.00 on both.iOS WebKit's tap handling cannot be emulated in a Linux browser, so the iOS claim rests on the mechanism above and the tests. An on-device check is welcome.
Screenshots / video
Phone (iPhone 13 viewport, touch emulation), drawer at rest, before (menu hidden) and after (menu and new-chat button inline and visible). This fork PR cannot use
--attach, so the captures are committed undertemp-screenshots/touch-gated-hover/:Phone, composer with an attached image: the remove badge is visible at rest, so one tap removes it.
Phone, Older Sessions list: each history row shows its delete button at rest, and the row reserves room for it, so the title and time are not covered.
Tablet (iPad Pro 11 landscape, touch): session rows show the single ⋯ menu with their times and pins uncovered, and the folder row's menu and new-chat buttons sit inline.
The rest of the inventory, one capture per surface. All came from a harness gateway running this branch's build, in Chromium with touch emulation, and
(hover: none)matched on every page. Data the test home lacks (notifications, review runs, knowledge sources, registries, design requests, shopper preferences, a widget turn) was supplied by mocking that one API response. Folders, tags, tabs and members come from the real seeded home. In every capture, the always-visible control covers no text.Phone, notifications page and the bell panel: each item's dismiss × shows at rest beside the time.
Phone, code-review-sage reviews: failed, Clean and banded run cards. The delete button sits in the strip the card reserves under its last row, clear of the error text, "Clean" and the band counts.
Session tabs on phone and tablet: inactive tabs show their close ×. The tablet capture also shows the title control's Auto-title button at rest.
Phone, artifacts: the folder card menu in gallery view, the folder row in table view, and the tag remove × on an artifact's detail page.
Phone, an inline widget in chat: the widget toolbar (star, download, open, expand) shows at rest.
Tablet, the controls that were hidden only from
sm:up: knowledge source rename, and registry open, refresh and remove.Tablet, design-tweak: the request row's chat and menu buttons stay expanded beside the queued chip. On a phone, this page's rail is wider than the viewport both before and after this change.
Phone, the table view's folder row: the ⋯ menu sits inline after the count. Before this head it rendered at x=926 on a 390-pixel viewport, off screen.
Phone, Developer storage: every key row shows its delete button at rest.
Phone, code-review-sage learning rail: non-default namespaces show their delete button beside uncovered pattern counts.
Phone, a channel message: the Reply button shows at rest.
Tablet, sidebar board view: each column's folder header keeps its menu and new-chat buttons visible beside the count.
Phone, the embedded chat's tab strip: the tab's close × shows at rest.
Tablet, personal-shopper sites: each site row shows its remove button at rest.
Phone, Papyrus file tree: the non-main file shows its delete button at rest.
Tablet, bottom terminal panel (cropped to the tab strip): the tab's close × shows at rest.
Tablet, design-tweak project picker open: each project shows its remove ×, clear of the name and the dev chip.
Phone, the tag manager: each tag's status bolt and delete × show at rest.
Phone, personal-shopper preferences and members: row actions show at rest.
Phone and tablet, a session row's ⋯ menu open: Duplicate sits with the other session actions, since this menu replaces the hover cluster on touch screens.
Phone, App detail for an app that needs a local install: the copy button sits in the room the command block reserves on its right, clear of the text. The install result is mocked, since the real flow needs a macOS client handshake.
Tablet, chat side panel: the inactive Pins tab shows its close ×.
pages/overview/DisplayTab.tsxandpages/chat/NotificationItem.tsxare left unchanged. No route or component uses either one (NotificationItemis only re-exported frompages/chat/index.ts, which nothing imports it from), so no user can reach their hover-only controls. The guard test skips both and fails as soon as any source file uses one.The TokenDailyChart tooltip keeps an ungated
:hover, so its touch behaviour is unchanged from main.Desktop with the pointer over the folder row (unchanged)
Related Issues
Fixes #14805
Pattern harvest
Rule candidate: review-prompt / test guard
Pattern: a control hidden with
opacity-0(orsm:/md:opacity-0,hidden) until a hover variant, with no(hover: none)state. The guard test in this PR is the rule.Checklist