Shubham-Padkonde

#55416: fix: preserve fractional window opacity

Merged
Created: Oct 28, 2026, 7:41:26 AM
Merged: Oct 29, 2026, 6:48:06 PM
7 comments
Target: main

Description of Change

Fixes #55370.

window.open feature parsing currently truncates fractional opacity values with parseInt: opacity=0.75 becomes 0, making the resulting window invisible. Parse opacity with parseFloat while retaining integer parsing for position and size features.

Added coverage for opacity values 0, 0.1, 0.75 and 1, and a mixed feature string that verifies width, height, left and top still become integers.

Validation on Windows with Node 24.22.1: all 11 tests in spec/parse-features-string.spec.ts pass using a temporary Node-pool Vitest configuration that runs the TypeScript source directly. Three of those tests fail on the unchanged source. Oxfmt and Oxlint pass for both changed files, and git diff --check passes. A full Electron build, native BrowserWindow integration test and npm test have not run locally.

AI assistance: OpenAI Codex assisted with implementation and tests. I reviewed the final diff before submission. The commit includes Assisted-By: OpenAI Codex and a verified signature.

Checklist

Release Notes

Notes: Fixed fractional opacity being truncated in window.open feature strings.

Backports

45-x-y
In-flight
PR Number
#55499
Waiting to be merged
46-x-y
In-flight
PR Number
#55498
Waiting to be merged

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron