~ knotless Search/
↑↓ move↵ open⇧↵ all results

grain.social/grain

photography-focused photo sharing platform

grain.social
1 collaborator
0
2

next.grain.social: a click on a list row sometimes opens nothing

Closed
Closed chadtmiller.com opened this issue 1 comment

What happened

On next.grain.social, signed in, a click on a row of a profile's Followers list sometimes did nothing; a second click opened the profile. Seen on other views too ("sometimes I have to click twice on stuff before it navigates"). The row shows its hover highlight, so the pointer is over it.

How to see it

Not reproduced yet. Signed out, on https://next.grain.social/profile/chadtmiller.com/followers in headless Chromium at 1440×900, every single click on a row opened its profile, including:

  • right after the page loaded (0–3.5 s after domcontentloaded, with 170 ms latency and 3 Mbps simulated, cache off): the server's full-row <a class="open"> takes it before hydration, and the app's after;
  • right after going back to the list (0–2 s), with the recent-screen refresh running;
  • after scrolling 1,500–9,000 px (no row on screen was left idle by the list's windowing);
  • with the mouse held 80–90 ms between down and up.

What is still open:

  • Signed in only. Signed-in pages are not cached at Cloudflare and answer in ~1 s from the US, so any window between a click and the screen changing is wider. The followers view itself has nothing signed-in-only.
  • After a deploy. Shell.svelte's beforeNavigate cancels a move once SvelteKit's version check says a new build is out and loads the page anew (location.href). Many deploys went out the day this was seen.
  • A DOM swap under the pointer. A click whose mousedown and mouseup land on different nodes (a tree swapped in by a refresh between them) fires no click. Not seen in the tests above.

When it happens again, note: how soon after loading, going back or scrolling; whether nothing changed at all, something flickered, or it went but slowly; and where on the row the click was.

What you expected

One click on a row opens what it links to.

Where

next.grain.social (HUD hud-next at 7016200, the SvelteKit app from feature/hud), web, Chrome on macOS, signed in.

Found and fixed in HUD 21ca387 (Grain pull 3n2tp5iyeld7a, merged into feature/hud): loading /profile/<handle> put that profile on top of Home, since the route opens under the first tab, and each tab kept the screens left on it. So the first click on Home showed Home's leftover screen and only the second reached the feed. A tab now always goes to its root in one click, your own profile opens the Profile tab (on load too), opening the screen you're on pushes nothing, and back replaces the entry where the screen under isn't the previous one. Covered by the shell's SSR/history tests; clicked through signed out in Chromium at desktop and phone widths. Reopen if it happens again signed in.