Skip to content

Migration de la branche 1.0.4 vers la branche main#79

Merged
ormidales merged 20 commits intomainfrom
1.0.4
Mar 5, 2026
Merged

Migration de la branche 1.0.4 vers la branche main#79
ormidales merged 20 commits intomainfrom
1.0.4

Conversation

@ormidales
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI and others added 17 commits March 5, 2026 08:15
Add CSS rules to popup.css so that long domain names are truncated
with an ellipsis and the Supprimer button always remains visible.

- li > span: white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0
- li > button: flex-shrink: 0

Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
…tions

fix(popup): truncate long domain names with ellipsis in exceptions list
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
…tion

Fix IPv6 zone identifier validation in IPV6_REGEX
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
fix: restore keyboard focus after clearing whitelist
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
…ge-header

fix: skip Accept-Language injection for non-routable/local hosts
When onHeadersReceived cannot parse the Location header URL, cancel the
request unless the initial host is in the exceptions list, instead of
silently allowing the redirect through.

Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
…g-error

fix(background): fail-closed on unparseable redirect Location header
@ormidales ormidales added this to the v1.0.4 milestone Mar 5, 2026
@ormidales ormidales self-assigned this Mar 5, 2026
@ormidales ormidales marked this pull request as ready for review March 5, 2026 09:57
Copilot AI review requested due to automatic review settings March 5, 2026 09:57
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

Migration des changements de la branche 1.0.4 vers main, avec des ajustements de compatibilité réseau et d’accessibilité/UI pour l’extension (détection IPv6 avec zone ID, gestion d’Accept-Language, et ergonomie du popup).

Changes:

  • Extension de IPV6_REGEX pour accepter les IPv6 avec zone ID (%eth0 / %25en0).
  • Ajout d’un filtrage “non routable/local” pour éviter de modifier Accept-Language sur localhost/.local et IP privées/link-local.
  • Améliorations UI/UX du popup : gestion du focus après vidage + style d’affichage (ellipsis) des domaines.

Reviewed changes

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

File Description
utils.js Mise à jour de la regex IPv6 pour supporter les zone identifiers.
background.js Ajout d’un helper isNonRoutableHost et logique associée dans le pipeline webRequest + durcissement fail-closed sur erreurs de parsing redirect.
popup.js Ajout d’une logique de focus après clearDomains pour améliorer l’accessibilité clavier.
popup.css Ajustements flex/ellipsis pour éviter que les domaines débordent visuellement.

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

Comment thread background.js Outdated

if (IPV6_REGEX.test(h)) {
const bare = h.replace(/^\[|\]$/g, "").split("%")[0].toLowerCase();
return bare === "::1" || bare.startsWith("fe80:") || bare.startsWith("fc") || bare.startsWith("fd");
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

In isNonRoutableHost, the IPv6 link-local check only matches fe80::/16 via bare.startsWith("fe80:"), but link-local is fe80::/10 (covers fe80 through febf). As written, addresses like fe9f::1 would be treated as routable and have Accept-Language spoofing applied. Consider updating the predicate to cover fe8*, fe9*, fea*, feb* (e.g., regex on the first hextet) rather than only fe80:.

Suggested change
return bare === "::1" || bare.startsWith("fe80:") || bare.startsWith("fc") || bare.startsWith("fd");
const firstHextet = bare.split(":")[0];
const isLoopback = bare === "::1";
let isLinkLocal = false;
if (firstHextet && firstHextet.length === 4 && firstHextet.startsWith("fe")) {
const hextetValue = parseInt(firstHextet, 16);
if (!Number.isNaN(hextetValue) && hextetValue >= 0xfe80 && hextetValue <= 0xfebf) {
isLinkLocal = true;
}
}
const isUla = bare.startsWith("fc") || bare.startsWith("fd");
return isLoopback || isLinkLocal || isUla;

Copilot uses AI. Check for mistakes.
Comment thread popup.css
}

li > button {
flex-shrink: 0;
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

li > button { flex-shrink: 0; } interacts badly with the global button { width: 100%; }: the remove button inside list items will keep a 100% flex-basis and refuse to shrink, causing the domain <span> to collapse/ellipsis incorrectly (often disappearing). Override the list button sizing (e.g., width: auto and reset margins) or scope the global 100% width rule to only the primary action buttons.

Suggested change
flex-shrink: 0;
flex-shrink: 0;
width: auto;
margin: 0;

Copilot uses AI. Check for mistakes.
@ormidales
Copy link
Copy Markdown
Owner Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 5, 2026

@ormidales I've opened a new pull request, #80, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits March 5, 2026 10:06
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
Fix IPv6 link-local range check (fe80::/10) and li>button layout conflict
@ormidales ormidales merged commit 00eeebb into main Mar 5, 2026
@ormidales ormidales deleted the 1.0.4 branch March 5, 2026 10:21
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