Skip to content

Add detail document and refresh branch with recent merges#18

Merged
NamecoinGithub merged 9 commits into
Mergingfrom
copilot/explore-codebase-fix-bugs-implement-todo
Jul 9, 2026
Merged

Add detail document and refresh branch with recent merges#18
NamecoinGithub merged 9 commits into
Mergingfrom
copilot/explore-codebase-fix-bugs-implement-todo

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown

The task required a detail document and an updated branch containing the recent merged work from PRs #15, #16, and #17. This PR keeps the combined scope in one branch while documenting and preserving the Core binary and Electron IPC hardening work.

  • Branch refresh

    • Merged origin/Merging into this branch.
    • Resolved conflicts across Core startup, Electron IPC, preload wiring, settings UI, and package metadata.
  • Detail document

    • Added docs/Detail_Document.md.
    • Captures scope, problem areas, implementation summary, and review focus for Core binary validation, process detection, IPC hardening, and settings UI behavior.
  • Core and IPC follow-ups

    • Tightened Windows Core process lookup to avoid shell command interpolation.
    • Preserved stricter menu, dialog, proxy, updater, file-server, keyboard, and Core IPC input validation.
    • Kept Core binary path normalization and process matching improvements aligned with the merged base.

Example of the safer Windows process lookup pattern:

const taskList = await execFile(
  'tasklist',
  ['/NH', '/v', '/fo', 'CSV'],
  { env: modEnv }
);

Copilot AI added 9 commits July 9, 2026 15:50
…debase-fix-bugs-implement-todo

# Conflicts:
#	README.md
#	package-lock.json
#	package.json
#	src/App/Settings/Core/EmbeddedCoreSettings.tsx
#	src/keyboard/VirtualKeyboard.tsx
#	src/keyboard/preload.js
#	src/main/core.js
#	src/main/keyboard.js
#	src/main/main.js
@NamecoinGithub
NamecoinGithub marked this pull request as ready for review July 9, 2026 16:37
Copilot AI review requested due to automatic review settings July 9, 2026 16:37
@NamecoinGithub
NamecoinGithub merged commit dbffacc into Merging Jul 9, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

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 refreshes the branch with recent merged work (PRs #15#17) and adds a detail document while preserving and extending Core binary validation/process detection and Electron IPC hardening.

Changes:

  • Added a detail document capturing scope, problem areas, and review focus for Core binary + IPC hardening.
  • Hardened privileged Electron IPC handlers via input allowlists/type checks (dialogs, menus, app paths, proxy requests, updater flags, etc.).
  • Refined Core binary path normalization and Core process lookup behavior; updated settings UI wiring for choosing a Core binary.

Reviewed changes

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

Show a summary per file
File Description
src/shared/lib/appMenu.ts Aligns menu role naming for the fullscreen toggle item.
src/main/main.js Adds IPC input validation/sanitizers and allowlists for privileged main-process handlers.
src/main/core.js Refactors Core binary path normalization/status reporting and tightens process detection logic (including safer Windows tasklist invocation).
src/App/Settings/Core/EmbeddedCoreSettings.tsx Refactors the Core Binary Path UI to a dedicated field component and updates how the form field is set from the file picker.
README.md Updates build prerequisites text to align Node/npm requirements and notes the Electron baseline.
package.json Tightens the npm engines requirement to a concrete minimum version.
package-lock.json Keeps lockfile engines metadata aligned with package.json.
docs/Detail_Document.md Adds a detail-level document describing the combined scope and review focus areas.
configs/webpack.config.renderer.prod.babel.js Adds the keyboard preload bundle entry to the renderer production build.

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

Comment thread src/main/main.js
Comment on lines +154 to +160
return filterList.map((filter) => ({
name: ensureString(filter?.name, 'Dialog filter name'),
extensions: ensureStringArray(
filter?.extensions,
'Dialog filter extensions'
),
}));
Comment thread src/main/main.js
Comment on lines +180 to +184
properties: (options.properties || []).filter((property) =>
allowedOpenDialogProperties.has(property)
),
filters: sanitizeDialogFilters(options.filters),
};
Comment thread src/main/main.js
Comment on lines 376 to 378
ipcMain.on('get-path', (event, name) => {
if (typeof name !== 'string' || !appPathNames.has(name)) {
log.warn('Rejected invalid get-path IPC request');
event.returnValue = undefined;
return;
}
event.returnValue = app.getPath(name);
event.returnValue = app.getPath(sanitizeAppPathName(name));
});
Comment on lines +100 to +113
const pickCoreBinary = async () => {
const filePaths = await ipcRenderer.invoke('show-open-dialog', {
title: __('Select Nexus Core binary'),
properties: ['openFile'],
filters:
process.platform === 'win32'
? [{ name: 'Windows executable', extensions: ['exe'] }]
: undefined,
});
} catch (err: unknown) {
openErrorDialog({
message: __('Failed to open file picker') + ': ' + getErrorMessage(err),
});
return;
}

if (paths && paths[0]) {
updateSettings({ embeddedCoreBinaryPath: paths[0] });
}
}
if (filePaths?.[0]) {
input.onChange(filePaths[0]);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants