Skip to content

Companion MV3 Plan - Roadmap #1152

Open
@whizzzkid

Description

@whizzzkid

Introduction

The original issue is more than four years old, the community has been seeing the MV3 Saga unravel, but the reality in 2023 is we need to tackle this head-on to provide a path forward for users that rely on companion on such browsers.

🧪 Beta Testers Needed

Read Discuss Post: https://discuss.ipfs.tech/t/announcing-ipfs-companion-mv3-rc-beta/16442
Beta Webstore Link: here
Report Beta Bugs: here

The Problem

MV3 in itself is not the issue, it's an innocent change going forward. The problem lies with the webRequest API and going forward:

The non-blocking implementation of the webRequest API, which allows extensions to observe network requests, but not modify, redirect, or block them (and thus doesn't prevent Chrome from continuing to process the request) will not be discouraged. As an alternative, we plan to provide a declarativeNetRequest API.

The Proposed Solution

The idea in simpler terms is to branch the builds such that we can produce a build for clients that support blocking webRequest API and the ones that do not (e.g. Firefox will support blocking webRequest even with the MV3 change)

This boils down two having two implementations of the webRequest:

  • Blocking WebRequest Build
  • Non-Blocking WebRequest Build

Identifying the nature of webRequest from code will be hard, but can be spiked out to validate if this is something we can deduce in code, otherwise we can split the build process such that we build artifacts based on what variation of webRequest API client supports.

The Non-Blocking WebRequest will ship with extra feature, which would:

  1. observe the webRequest URLs.
  2. Implement a LFU-Cache to update the list of URLs serviceable by companion.
  3. Use declarativeNetRequest API to update the URLs to be blocked up to the permissible limit.
  4. There exists a sample implementation using declarativeNetRequest API.
  5. Redirect requests as companion would normally do.

Known Risks

  • It is understood that there would be cases where the URLs will be serviceable by companion but not blocked, but would eventually be blocked and served by configured node.
  • LFU cache can be biased during a heavy browsing session which could make some URLs sticky. LRU cache is not an option as that would evict staple URLs if not used regularly. A good approach could be a hard-coded TTL to evict caches to manage the bias.

Metrics Collection

  • Optionally we can collect top N hosts from the LFU to ship by default with the companion releases. This could cover a huge base and give companion a head start, this will later auto-optimize based on the usage patterns.

Related Issues and PRs:

Deadline

ETA: 2023-06-30

Dev Plan

Tasks

Preview Give feedback
  1. P0 area/MV3 exp/expert
    whizzzkid
  2. 3 of 3
    P0 area/MV3 area/chromium area/firefox effort/hours kind/architecture
    whizzzkid
  3. 0 of 4
    P0 area/MV3 area/chromium area/firefox effort/days exp/expert status/blocked topic/ci
    whizzzkid
  4. status/in-progress
    whizzzkid
  5. 2 of 2
    P0 area/MV3 area/chromium area/firefox effort/days exp/expert kind/maintenance
    whizzzkid
  6. P1 area/MV3 kind/enhancement
    whizzzkid
  7. area/chromium starmaps status/in-progress
    whizzzkid
  8. 4 of 5
    P1 area/MV3 effort/days
    whizzzkid
  9. 4 of 4
    P1 area/MV3 effort/days
    whizzzkid
  10. 2 of 2
    whizzzkid
  11. P3 area/MV3
    whizzzkid
  12. 3 of 3
    whizzzkid
  13. 2 of 2
  14. 4 of 4
    P0 area/MV3
    whizzzkid

Bugs

Tasks

Preview Give feedback
  1. area/MV3 kind/bug mv3-beta-bugs
    whizzzkid
  2. area/MV3 kind/bug mv3-beta-bugs
    whizzzkid
  3. area/MV3 kind/bug mv3-beta-bugs
  4. area/MV3 kind/bug mv3-beta-bugs
    whizzzkid
  5. area/MV3 kind/bug mv3-beta-bugs
    whizzzkid
  6. area/MV3 area/brave kind/bug mv3-beta-bugs
    whizzzkid
  7. area/MV3 mv3-beta-bugs
    whizzzkid
  8. area/MV3 kind/bug mv3-beta-bugs
    whizzzkid
  9. area/MV3 kind/enhancement
    whizzzkid
  10. area/MV3 kind/bug mv3-beta-bugs
    whizzzkid
  11. area/MV3 kind/bug mv3-beta-bugs
    whizzzkid
  12. P0 kind/bug mv3-beta-bugs
    whizzzkid
  13. P0 kind/bug mv3-beta-bugs
    whizzzkid
  14. kind/bug mv3-beta-bugs
    whizzzkid
  15. mv3-beta-bugs
    whizzzkid
  16. 5 of 5
    mv3-beta-bugs
    whizzzkid
  17. mv3-beta-bugs
    whizzzkid
  18. mv3-beta-bugs
    whizzzkid
  19. area/MV3 kind/bug mv3-beta-bugs
    whizzzkid

Release Plan

Tasks

Preview Give feedback

Post MV3 Tasks

Tasks

Preview Give feedback
  1. 0 of 2
    whizzzkid
  2. area/MV3 kind/discussion mv3-beta-bugs
  3. area/MV3 kind/discussion mv3-beta-bugs

Reviewers

Metadata

Metadata

Assignees

Labels

EpicP0Critical: Tackled by core team ASAParea/MV3Issues related to Manifest V3 versionarea/chromiumIssues related to Chromium-based browsersarea/firefoxIssues related to Mozilla Firefoxeffort/weeksEstimated to take multiple weeksexp/expertHaving worked on the specific codebase is importantkind/architectureCore architecture of projectkind/maintenanceWork required to avoid breaking changes or harm to project's status quostatus/readyReady to be worked

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions