# Electron Update Center Implementation Plan > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. **Goal:** Replace the external Qt updater with an Electron-native update center that preserves the current Spark update behavior, data compatibility, and migration flow. **Architecture:** Build a dedicated `electron/main/backend/update-center/` subsystem for refresh, query, ignore-config compatibility, download/install execution, and IPC snapshots. Keep renderer concerns in a separate `src/modules/updateCenter.ts` store plus focused Vue components so the update center UI can match the existing store design without reusing the old thin APM-only modal. **Tech Stack:** Electron 40, Node.js `child_process`/`fs`/`path`, Vue 3 ` ``` ```vue ``` ```ts // src/App.vue (script snippet) import { onBeforeUnmount, onMounted } from "vue"; import UpdateCenterModal from "./components/UpdateCenterModal.vue"; import { createUpdateCenterStore } from "./modules/updateCenter"; const updateCenter = createUpdateCenterStore(); onMounted(() => { updateCenter.bind(); }); onBeforeUnmount(() => { updateCenter.unbind(); }); const handleUpdate = async () => { await updateCenter.open(); }; ``` ```vue ``` ```vue ``` ```vue ``` ```vue ``` ```vue ``` ```vue ``` - [ ] **Step 4: Run test to verify it passes** Run: `npm run test -- --run src/__tests__/unit/update-center/UpdateCenterModal.test.ts` Expected: PASS with 1 test passed. - [ ] **Step 5: Commit** ```bash git add src/components/UpdateCenterModal.vue src/components/update-center/UpdateCenterToolbar.vue src/components/update-center/UpdateCenterList.vue src/components/update-center/UpdateCenterItem.vue src/components/update-center/UpdateCenterMigrationConfirm.vue src/components/update-center/UpdateCenterCloseConfirm.vue src/components/update-center/UpdateCenterLogPanel.vue src/App.vue src/__tests__/unit/update-center/UpdateCenterModal.test.ts git rm src/components/UpdateAppsModal.vue git commit -m "feat(update-center): add integrated update center modal" ``` ### Task 7: Format, Verify, and Build the Integrated Update Center **Files:** - Modify: `electron/main/backend/update-center/query.ts` - Modify: `electron/main/backend/update-center/ignore-config.ts` - Modify: `electron/main/backend/update-center/queue.ts` - Modify: `electron/main/backend/update-center/download.ts` - Modify: `electron/main/backend/update-center/install.ts` - Modify: `electron/main/backend/update-center/service.ts` - Modify: `electron/main/backend/update-center/index.ts` - Modify: `src/components/UpdateCenterModal.vue` - Modify: `src/components/update-center/UpdateCenterToolbar.vue` - Modify: `src/components/update-center/UpdateCenterList.vue` - Modify: `src/components/update-center/UpdateCenterItem.vue` - Modify: `src/components/update-center/UpdateCenterMigrationConfirm.vue` - Modify: `src/components/update-center/UpdateCenterCloseConfirm.vue` - Modify: `src/components/update-center/UpdateCenterLogPanel.vue` - Modify: `src/modules/updateCenter.ts` - Modify: `src/App.vue` - [ ] **Step 1: Format the changed files** Run: `npm run format` Expected: Prettier rewrites the changed `src/` and `electron/` files without errors. - [ ] **Step 2: Run lint and the complete unit suite** Run: `npm run lint && npm run test -- --run` Expected: ESLint exits 0 and Vitest reports all unit tests passing, including the new `update-center` tests. - [ ] **Step 3: Run the production renderer build** Run: `npm run build:vite` Expected: `vue-tsc` and Vite finish successfully, producing updated `dist/` and `dist-electron/` assets without type errors. - [ ] **Step 4: Commit the final verified integration** ```bash git add electron/main/backend/update-center electron/main/index.ts electron/main/backend/install-manager.ts electron/preload/index.ts src/vite-env.d.ts src/global/typedefinition.ts src/modules/updateCenter.ts src/components/UpdateCenterModal.vue src/components/update-center src/App.vue src/__tests__/unit/update-center git commit -m "feat(update-center): embed spark updates into electron" ```