Skip to content

Nothing works until you refresh the page (Ajax issue) #5719

Description

@fregante

Please ensure:

  • The bug is caused by Refined GitHub. It doesn't happen if I disable the extension.
  • The bug happens after clearing extension cache. The "Clear cache" button below can also be found at the bottom of the options page.

Example URLs

Everywhere

Extension version

22.5.22

Browser(s) used

Safari

Description

I keep noticing more and more features are missing until I refresh the page. Example:

  1. Visit https://github.com/refined-github/refined-github
  2. Open a folder
  3. Notice lack of ci-link, rgh-linkify-features, quick-file-edit, clean-repo-tabs, etc
Screen.Recording.mov

Interestingly I found the New Issue textareas to not turn into rich text editors sometimes (GitHub issue)

before

Include in this issue:

  • Screenshots/video/gif demonstrating the bug, if it’s visual
  • Console errors, if any

Activity

  1. added
    Please! ♥︎
    on Jun 24, 2022
  2. pinned this issue on Jun 24, 2022
  3. changed the title [-]A lot of features only work after a reload (Ajax issue)[/-] [+]Nothing works until you refresh the page (Ajax issue)[/+] on Jun 24, 2022
  4. fregante commented on Jun 24, 2022

    @fregante
    MemberAuthor

    I'm pretty sure they changed the ajaxed event because log-features doesn't show absolutely any features after navigation. We need to release a new version 😂

  5. fregante commented on Jun 24, 2022

    @fregante
    MemberAuthor

    Indeed new event names:

    turbo:before-cache
    turbo:before-fetch-request
    turbo:before-fetch-response
    turbo:before-render
    turbo:before-stream-render
    turbo:before-visit
    turbo:click
    turbo:frame-load
    turbo:frame-render
    turbo:load
    turbo:reload
    turbo:render
    turbo:submit-end
    turbo:submit-start
    turbo:visit
    

    Some are triggered on document.documentElement.

    Gotta figure out what the old events map to:

    pjax:start  <- fundamental
    pjax:end <- fundamental
    pjax:complete <- file-finder-buffer only
    pjax:error <- stop-pjax-loading-with-esc only
    

    https://github.com/defunkt/jquery-pjax#events

    I think they're using this now:

    https://turbo.hotwired.dev/reference/events

  6. self-assigned this
    on Jun 24, 2022
  7. unpinned this issue on Jun 25, 2022
  8. yakov116 commented on Jun 28, 2022

    @yakov116
    Member

    This issue is back.

  9. fregante commented on Jun 29, 2022

    @fregante
    MemberAuthor

    I saw this issue in Chrome, but it's not for everything, just for CSS-in-JS features like clean-pinned-issues. This is because turbo is cleaning the classes on body.

    An easy fix would be to just add the classes to document.documentElement instead, making sure we don't have any body.rgh-whatever-class selectors anywhere.

    Screen Shot 13

  10. pinned this issue on Jun 29, 2022
  11. gamemaker1 commented on Jun 30, 2022

    @gamemaker1
    Contributor

    I'm seeing #5738 in the useful-not-found-page too: https://github.com/Verifiable-Presentation/impl/blob/main/modules/registry/source/handlers/presentation.ts.

    It acts very weird - sometimes on first load the visualized path is seen only once, and then if you reload it it shows up twice, and vice versa.

  12. fregante commented on Jun 30, 2022

    @fregante
    MemberAuthor

    Reported in #5733, fixed in #5742, a new release is coming today, I'm looking into #5751 right now

  13. gamemaker1 commented on Jun 30, 2022

    @gamemaker1
    Contributor

    Oops I somehow missed #5733, sorry about that. Thanks for the quick fixes!

  14. unpinned this issue on Jul 2, 2022
  15. ian-h-chamberlain commented on Jul 26, 2022

    @ian-h-chamberlain
    Contributor

    Is this possibly the same cause of custom CSS not applying until after a refresh? Example steps:

    Should I file a new issue for that, or is it just a lingering side effect of the same issue that happened here?

  16. fregante commented on Jul 27, 2022

    @fregante
    MemberAuthor

    The CSS you add to the preferences is applied on the next full page load (or refresh), it’s not “live” like it would with a dedicated extension (like Stylus). That’s working as intended

  17. fregante commented on Jul 27, 2022

    @fregante
    MemberAuthor

    hmmm you might be onto something, I'm having issues with this in 22.7.1 on Safari. I opened #5857. Thanks for the report!

  18. 13steinj commented on Aug 15, 2023

    @13steinj

    Just a heads up, having the same issue on a GitHub Enterprise 3.5.4; maybe related to #4695. Though this may be because the extension assumes newer selectors that old versions of Github don't have.

    I'm well aware that 3.5.4 is now EOL, but this was broken even when it wasn't.
    My org is expected to update to 3.7 shortly, and then asap to 3.9 & 3.10. I'll report back if this is broken on a 3.7 instance; but I'll probably have to heavily redact any screencaptures.

    Probably related note; if I turn on debugging features on, I see this warning on every load:

    Refined GitHub has been loaded twice. This may be because:
    
    • You loaded the developer version, or
    • The extension just updated
    
    If you see this at every load, please open an issue mentioning the browser you're using and the URL where this appears.
    

    This does not occur on the main www.github.com

  19. fregante commented on Aug 15, 2023

    @fregante
    MemberAuthor

    DO NOT post on old issues. This is clear in the banner. Your comment is unrelated too.

  20. locked and limited conversation to collaborators on Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Please! ♥︎acceptedbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions