Repository navigation
Description
Before submitting
- I searched open and closed issues/PRs; this is a scoped implementation child of [Feature] Resolve BrowserWindow options from same-scope constants and setWindowOpenHandler overrides #3536, tracked in [Tracker] Browser / Electron / JavaScript analysis: correctness, performance and capability completion #4027.
- I understand the contribution scope and fail-closed integration rule.
- No credentials or private samples are included.
Area
Evidence, artifacts, or reconstruction
Current limitation
At 8ab5024397ddbd3b37ab68a13cabedc2eb7ce7dd, inspectBrowserWindow accepts only inline object syntax. A same-scope const options = {webPreferences: {nodeIntegration: true, contextIsolation: false}}; new BrowserWindow(options) remains dynamic. This is source-derived on current main; #3536 reports earlier executed CLI reproductions and the actual Joplin 3.7.21 ElectronAppWrapper.js case.
Desired outcome and success criteria
Resolve unambiguous same-scope const option/preference object initializers through the existing lexical and alias-aware mutation owner. Preserve shadowing, unknown computed overrides, reassignment, mutation, escape, cycles and use-before-initialization as uncertainty. Preserve exact source Evidence and original constructor identity. Do not execute target code, infer Electron defaults, or add tools. Keep equivalent inline inputs unchanged.
This slice excludes setWindowOpenHandler override records/parent relations; #3536 remains open for that independent contract change.
Expected interaction with targets
Read existing files as inert source.
Verification available so far
Source inspection plus prior public-app report in #3536. Current-runtime reproduction and performance measurements are pending.
Verification details
Use the unchanged official Joplin 3.7.21 ASAR and exact source selection, compare current-main vs candidate CLI/MCP and retained facts, and record token/context, elapsed/CPU and process-family memory costs. Add deterministic negative source cases at the producing boundary. No runtime Electron behavior is claimed by static reconstruction.
Alternatives considered
Manual source reading preserves facts but leaves the shared graph and summary incomplete. A separate resolver duplicating lexical/mutation interpretation would create maintenance and correctness risks.
Activity