AlignmentResearch / KataGoVisualizer

MIT License
3 stars 1 forks source link

Deep-links ignored #112

Open AdamGleave opened 1 month ago

AdamGleave commented 1 month ago

The anchor identifier is ignored when loading a URL. For example, load https://goattack.far.ai/adversarial-training#cyclic_fine_tune_vs_b60_s7702m_v4096 and observe that one is at the top of the page. Click "Fine-tuned cyclic-adversary vs. 4096-visit b60-s7702m" in the TOC to skip to that section and note the ID is the same.

This seems to be a problem for links within the site if to a different page, e.g. clicking " more than 97% of the time at superhuman settings" at https://deploy-preview-99--goattack.netlify.app/ does not skip to relevant section.

tomtseng commented 1 month ago

hmm https://goattack.far.ai/adversarial-training#cyclic_fine_tune_vs_b60_s7702m_v4096 works for me on Firefox and Chrome

AdamGleave commented 1 month ago

Just tested and it works fine on Firefox & Safari on my Mac, but continue to run into the issue in Chrome 124.0.6367.208 (Official Build) (arm64).

To test it's not just a quirk of my setup, I tried browserstack.com and was able to replicate it on their Chrome 124 & 125 on Windows 11. See below that it's still at top of page rather than scrolling down despite the deep link:

bs_win11_Chrome_124 0 bs_win11_Chrome_125 0

tomtseng commented 1 month ago

weird, the deep link also works for me on browserstack.com

AdamGleave commented 1 month ago

weird, the deep link also works for me on browserstack.com

Huh that's very odd, do you have a screenshot you can share? Might help track down the discrepancy.

tomtseng commented 3 weeks ago

Nevermind, I was on macOS + Chrome 125 on browser stack, but the deep links also don't work for me on browserstack windows + chrome 125. Not sure how I will debug this though since I can't repro locally

AdamGleave commented 3 weeks ago

Nevermind, I was on macOS + Chrome 125 on browser stack, but the deep links also don't work for me on browserstack windows + chrome 125. Not sure how I will debug this though since I can't repro locally

I think we have a Windows laptop floating around the Lab somewhere you could borrow, though this seems quite a frustrating workflow.

I can reproduce it on MacOS + Chrome 125.0.6422.114 (Official Build) (arm64) on my laptop -- very odd that it seems to not reproduce on BrowserStack's Mac (and yours?)

tomtseng commented 3 weeks ago

I can reproduce with Chrome on my machine now.

It's some kind of issue with CSS rule scroll-behavior: smooth interacting with the table of contents, not sure what yet. But it wasn't appearing in Chrome for me because I had a macOS accessibility option enabled that says I prefer reduced motion, which triggers a @media (prefers-reduced-motion: reduce) { scroll-behavior: auto !important; } CSS rule on our website and disables smooth scrolling. After disabling the accessibility option I can repro the issue locally

AdamGleave commented 3 weeks ago

Well done tracking that down & reproducing!