#55416: fix: preserve fractional window opacity
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
- I have built and tested this change (focused source tests passed; full Electron build not run)
- I have filled out the PR description
- I have reviewed and verified the changes
-
npm testpasses (not run locally) - tests are changed or added
- PR release notes describe the change in a way relevant to app developers.
Release Notes
Notes: Fixed fractional opacity being truncated in window.open feature strings.
Backports
Semver Impact
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