mirror of
https://github.com/Pandipipas/scoreko-electron-dev.git
synced 2026-06-05 21:22:07 +00:00
feat: Implement update management refactor with new dialog and settings handling
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
# Phase 3 Summary
|
||||
|
||||
## Scope
|
||||
|
||||
Executed the UI and settings cleanup phase only for the Electron package.
|
||||
|
||||
Documentation used as source of truth:
|
||||
|
||||
- `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`
|
||||
|
||||
## Changes Made
|
||||
|
||||
- Split update dialog UI out of `src/main/updates/update-manager.ts` into `src/main/updates/update-dialogs.ts`.
|
||||
- Split update settings loading and file-config normalization into `src/main/updates/update-settings.ts`.
|
||||
- Split installer download behavior into `src/main/updates/update-download.ts`.
|
||||
- Kept `src/main/updates/update-manager.ts` focused on orchestration:
|
||||
- load settings
|
||||
- fetch latest release
|
||||
- ask the user what to do
|
||||
- download installer
|
||||
- run install handoff
|
||||
- Added defensive update config parsing from `unknown` JSON without introducing `any`.
|
||||
- Added settings tests covering:
|
||||
- runtime config disabling updates
|
||||
- runtime config overriding file settings
|
||||
- malformed update config normalization
|
||||
- invalid JSON fallback and logging
|
||||
- Fixed the existing Spanish mojibake in update dialogs touched by this phase.
|
||||
|
||||
## Intentionally Not Changed
|
||||
|
||||
- No UX flow changes.
|
||||
- No new features.
|
||||
- No custom renderer was added.
|
||||
- No preload was added.
|
||||
- No IPC was added.
|
||||
- No parent bundle source was modified.
|
||||
- No generated `dist` or `lib` source was edited manually.
|
||||
- No forms or controls were changed in the NodeCG dashboard.
|
||||
|
||||
## Verification
|
||||
|
||||
Commands run successfully:
|
||||
|
||||
```text
|
||||
npm run typecheck
|
||||
npm test
|
||||
npm run lint
|
||||
```
|
||||
|
||||
Current test result:
|
||||
|
||||
```text
|
||||
59 tests passing
|
||||
```
|
||||
|
||||
Sanity searches:
|
||||
|
||||
```text
|
||||
rg -n "\bany\b" src/main src/tests
|
||||
rg -n "ActualizaciÃ|estÃ|versiÃ|cerrarÃ" src/main src/tests
|
||||
rg -n "ipcMain|ipcRenderer|contextBridge|preload|nodeIntegration:\s*true|webSecurity:\s*false" src/main src/tests
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
- No `any` was introduced.
|
||||
- No touched Spanish update-dialog text remains mojibaked.
|
||||
- No production IPC or preload surface exists.
|
||||
- No unsafe Electron window settings were introduced.
|
||||
- Remaining IPC/preload matches are limited to the regression test that guards the zero-surface policy.
|
||||
|
||||
## UI Verification
|
||||
|
||||
The Electron launch path prepared a temporary managed runtime, but the NodeCG child did not expose port `9090` within the verification window. To verify the served UI without touching the user's real runtime data, NodeCG was launched from a temporary Electron `userData` directory:
|
||||
|
||||
```text
|
||||
SCOREKO_APP_USER_DATA_DIRECTORY=scoreko-codex-ui-check
|
||||
SCOREKO_UPDATES_ENABLED=false
|
||||
ELECTRON_LOAD_DELAY_MS=0
|
||||
```
|
||||
|
||||
The temporary NodeCG runtime served:
|
||||
|
||||
```text
|
||||
http://127.0.0.1:9090 -> 200 OK
|
||||
```
|
||||
|
||||
Browser verification loaded:
|
||||
|
||||
```text
|
||||
http://localhost:9090/bundles/scoreko-dev/dashboard/scoreko-dev/main.html?standalone=true#/
|
||||
```
|
||||
|
||||
Observed UI signals:
|
||||
|
||||
- Page title: `Dashboard`
|
||||
- Scoreko sidebar rendered.
|
||||
- Main navigation rendered.
|
||||
- `Settings` navigation entry rendered.
|
||||
- Dashboard form controls rendered.
|
||||
|
||||
The temporary NodeCG process was stopped after verification.
|
||||
Reference in New Issue
Block a user