Files
scoreko-electron-dev/docs/refactor/FINAL_SUMMARY.md
T
2026-05-31 14:50:32 +02:00

3.1 KiB

Final Cleanup Summary

Scope

Executed the final global cleanup pass using docs/refactor as the source of truth.

Source documents reviewed before code changes:

  • docs/refactor/ARCHITECTURE_AUDIT.md
  • docs/refactor/ARCHITECTURE_RULES.md
  • docs/refactor/TARGET_ARCHITECTURE.md
  • docs/refactor/MIGRATION_PLAN.md
  • docs/refactor/SESSION_HANDOFF.md
  • docs/refactor/PHASE_1_SUMMARY.md
  • docs/refactor/PHASE_1_FIX_SUMMARY.md
  • docs/refactor/PHASE_2_SUMMARY.md
  • docs/refactor/PHASE_3_SUMMARY.md
  • docs/refactor/PHASE_4_SUMMARY.md

Cleanup Completed

  • Removed the unused parseEnvInt helper and its tests.
  • Consolidated duplicated unknown parsing helpers into src/main/utils/unknown-values.ts.
  • Narrowed ApplicationController path typing to reuse ApplicationPaths.
  • Narrowed update config module boundaries so updater settings only accept the runtime config fields they need.
  • Narrowed the NodeCG process manager child-process contract to the actual process surface it uses.
  • Removed as unknown as ChildProcess casts from process-manager tests.
  • Fixed update dialog Spanish text encoding.
  • Added an explicit return type to the update dialog message-box helper.
  • Renamed legacy updater test files:
    • update-settings.test.ts -> update-config.test.ts
    • update-utils.test.ts -> update-schema.test.ts

Architecture Preserved

  • No UX changes.
  • No new features.
  • No renderer, preload, or IPC layer.
  • No NodeCG runtime model changes.
  • No Electron permission expansion.
  • No broad framework or new lifecycle layer.
  • BrowserWindow security posture remains explicit.
  • Update validation and download boundaries remain separated.
  • Managed runtime preservation of cfg, db, and logs remains unchanged.

Verification

Passed:

npm.cmd run typecheck
npm.cmd exec -- tsc --noEmit --noUnusedLocals --noUnusedParameters
npm.cmd test
npm.cmd run lint
npm.cmd run build
npm.cmd run doctor

Test result:

63 tests passing

Sanity searches passed for production/test source:

rg -n "parseEnvInt\(|ActualizaciÃ|estÃ|versiÃ|cerrarÃ|update-utils|update-settings|\bany\b|unknown as|as unknown|@ts-ignore|@ts-expect-error|eslint-disable|nodeIntegration:\s*true|webSecurity:\s*false" src scripts

Result:

  • No any in src or scripts.
  • No as unknown casts remain.
  • No legacy updater module names remain in src.
  • No Spanish mojibake remains in update dialog source.
  • No unsafe Electron settings were introduced.

IPC/preload sanity:

rg -n "ipcMain|ipcRenderer|contextBridge|preload" src scripts

Result:

  • Matches are limited to the regression test that guards the no-IPC/no-preload policy.

Build Notes

The first non-escalated npm.cmd run build attempt was blocked by sandbox permissions while creating generated parent-repo output at:

C:\Users\pcantos\Documents\scoreko-dev\shared\dist

The escalated rerun passed. The build emitted existing dependency/deprecation warnings during runtime dependency installation, but completed successfully and npm.cmd run doctor validated the prepared runtime.