Skip to content

Fix IPv6 link-local range check (fe80::/10) and li>button layout conflict#80

Merged
ormidales merged 2 commits into1.0.4from
copilot/sub-pr-79
Mar 5, 2026
Merged

Fix IPv6 link-local range check (fe80::/10) and li>button layout conflict#80
ormidales merged 2 commits into1.0.4from
copilot/sub-pr-79

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 5, 2026

Two bugs from the PR review: IPv6 link-local detection only covered fe80::/16 instead of the full /10 block, and li > button inherited width: 100% from the global button rule, collapsing the domain span into ellipsis.

background.js — correct link-local range

startsWith("fe80:") only matches fe80::/16; the actual link-local block is fe80::/10 (fe80febf). Replaced with a hextet integer comparison:

// before
return bare === "::1" || bare.startsWith("fe80:") || ...;

// after
const firstHextet = bare.split(":")[0];
let isLinkLocal = false;
if (firstHextet && firstHextet.startsWith("fe")) {
  const hextetValue = parseInt(firstHextet, 16);
  if (!Number.isNaN(hextetValue) && hextetValue >= 0xfe80 && hextetValue <= 0xfebf) {
    isLinkLocal = true;
  }
}

Addresses were in fe81febf being incorrectly treated as routable and having Accept-Language spoofing applied.

popup.css — isolate remove button sizing

li > button { flex-shrink: 0 } combined with the global button { width: 100% } caused the remove button to hold 100% flex-basis and refuse to shrink, starving the domain <span>. Added width: auto; margin: 0 to break the inheritance for in-list buttons only.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate changes from branch 1.0.4 to main Fix IPv6 link-local range check (fe80::/10) and li>button layout conflict Mar 5, 2026
@ormidales ormidales added this to the v1.0.4 milestone Mar 5, 2026
@ormidales ormidales marked this pull request as ready for review March 5, 2026 10:11
Copilot AI review requested due to automatic review settings March 5, 2026 10:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes two user-facing issues in the browser extension: (1) correctly classifying IPv6 link-local hosts as non-routable so Accept-Language spoofing is not applied, and (2) preventing list-item “remove” buttons in the popup from inheriting full-width sizing that collapses the domain label.

Changes:

  • Update IPv6 link-local detection to cover the full fe80::/10 range (fe80febf) via first-hextet parsing.
  • Override global button { width: 100% } styling for li > button to avoid flex layout starvation of the domain <span>.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
background.js Fixes IPv6 link-local range check so non-routable hosts are correctly excluded from header spoofing.
popup.css Ensures in-list buttons size to content (not 100% width), preserving domain text visibility in the popup list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ormidales ormidales merged commit aba8821 into 1.0.4 Mar 5, 2026
4 checks passed
@ormidales ormidales deleted the copilot/sub-pr-79 branch March 5, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants