Skip to content

Features are inited twice #9935

Description

@fregante

Description

Just noticed: all features are inited twice everywhere.

First load:

  1. sync run
  2. soft-nav:react-done

Successive loads

  1. turbo:render
  2. soft-nav:react-done

Caused by:

The fact that we're not suddenly getting duplicate content everywhere shows that our deduplication logic and policy is doing a decent job 🙌

} while (await oneEvent(document, ['turbo:render', 'soft-nav:react-done']));

I think the solution would be to uniquely identify page loads in that loop. I'm not sure if URL-based deduplication is enough, maybe it is. e.g.

if URL === lastURL, skip, else set lastURL = URL

How to replicate the issue + URL

  1. Enable Show the features enabled on each page in the console
  2. filter archive-forks-link since it's enabled on all repo pages
  3. see it appear twice every time

Extension version

26.78.3

Browser(s) used

safari

Token ⚠️

  • I set a token in the options page. I understand that some features require a token to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions