Verify real app restart and stopped-service restoration

This commit is contained in:
鲨鱼辣椒 committed 2026-10-14 11:20:33 +08:00
1 parent 0f26b6d072
commit f78575792c
2 files changed
+12 -6

No files matched your search

@@ -28,13 +28,15 @@
- Implemented project work-entry persistence, deterministic Vite/static startup, content/project matching before address reuse, bounded legacy browser-receipt recovery without Pi startup, and explicit assistant opt-in with domain-specific error copy.
- Preserve manual opens across slow health probes/local startup; serialize project checks and metadata writes; retain successful newly started server addresses when project selection changes; stop only unused app-owned children superseded by another server.
- Imported only already-activated product/README deltas from sidebar source commits 8cd7b597 and 14fcea389, preserving the currently effective lower-footer placement. Peer source records stay read-only. This is preservation of the latest trial baseline, not an additional sidebar redesign.
- Final full-build/Electron/window/trial verification pending.
- Exact production build and isolated real Electron full-restart/stopped-service/native-render acceptance passed. Current temporary-app activation and actual Alice acceptance pending.
## Verification
- 134 focused tests in 6 files passed after root integration; includes real Vite/static launch, resolved base configuration, fresh store reload, imported-folder metadata creation, content/port ownership, explicit helper selection, project switching and slow manual supersession.
- Standard typecheck, changed-file ESLint, git diff --check passed. Independent review reproduced races and a Vite base issue before correction; final root tests cover those corrections.
- Final exact committed full build, full unit suite and Electron restart/stopped-service acceptance pending. Earlier isolated Electron attempts exposed test fixture setup and imported metadata gaps, which were corrected; no passing native acceptance is claimed yet.
- Final exact production build from product commit 0f26b6d passed. Isolated Electron acceptance 1/1 passed: real Main quit/relaunch, persisted URL reuse, controlled original service stop, real app-owned static restart and native HTML rendering, with unchanged conversation list and no model session. Fixture guest account uses actual native presentation route rather than fabricating cloud login; actual guarded Code UI is verified on the existing trial below.
- Full normal unit suite: 297 files passed, 3333 tests passed/3 skipped; 8 failures in 3 unrelated existing setup/cloud-knowledge/design-image-preview files. Exact previous-renderer baseline comparison is running to establish inherited failures; pressure suite runs separately because the normal script stops at failed first phase.
- Early isolated Electron attempts exposed imported metadata creation and fixture activity/viewport setup gaps, which were corrected. No real account, model, game source or cloud state was mutated by tests.
## Follow-ups
+8 -4
View File
@@ -54,10 +54,14 @@ test('existing work survives a full app restart and restarts a stopped service w
expect(started).toMatchObject({ status: 'ready', browser: { state: 'attached' } });
expect(await (await fetch(started.browser!.url)).text()).toBe(html);
expect(await hostRequest(page, listPath)).toEqual(before);
await page.evaluate(() => { window.location.hash = '/chat'; });
await page.getByRole('tab', { name: '作品', exact: true }).click();
await expect(page.getByRole('button', { name: '刷新网页', exact: true })).toBeEnabled();
await expect(page.getByText('作品还没有打开', { exact: true })).toHaveCount(0);
// Use the real native presentation route; this fixture has no authenticated
// cloud account and must not fabricate one to enter the guarded Code UI.
await hostRequest(page, '/api/agent-browser/present', { project_id: project.id, visible: true,
bounds: { x: 20, y: 70, width: 420, height: 300 } });
expect(await restarted.evaluate(async ({ webContents }, expectedUrl) => {
const contents = webContents.getAllWebContents().find((item) => item.getURL() === expectedUrl);
return await contents?.executeJavaScript('document.querySelector("h1")?.textContent');
}, started.browser!.url)).toBe('My existing game');
await page.screenshot({ path: test.info().outputPath('restored-work-without-model.png') });
} finally {
if (!serverClosed) await new Promise<void>((resolve) => server.close(() => resolve()));