mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-08-25 08:12:05 +00:00
## Summary - Follow up #578 by consolidating desktop persistence, restore reconciliation, lifecycle coordination, and regression coverage. - Preserve active drafts and attachments, request-scoped workspace ownership, deletion tombstones, renderer authority, and bounded shutdown behavior. - Fix the reported macOS cleanup failure with targeted BSD process queries and random-token-guarded process-group cleanup, without an unverified PID fallback. ## Platform hardening - Ignore development renderer origins in packaged Electron builds. - Preserve staged Tauri navigation authority and handle confirmed Windows session-end shutdown on the UI thread. - Bound workspace launch preflight, runtime startup, and health readiness. - Retain cleanup ownership after unexpected leaders exit and verify portable POSIX descendants by immutable identity or inherited launch token. - Add real Darwin-only process-group integration tests for macOS CI. ## Scope - 96 files changed. - 6,295 additions and 12,167 deletions, a net reduction of 5,872 lines from the merged implementation. - Consolidated duplicated tests while retaining focused race, durability, cleanup, and platform contracts. ## Validation - pm run typecheck - pm run typecheck --workspace @neuralnomads/codenomad - Electron native suite: 60 passed - Tauri suite: 49 passed - Focused server lifecycle/identity suite: 31 passed, 2 Darwin-only skipped on Windows - Focused UI restore/codec/reconciliation suite: 36 passed - Broader server suite: 59 passed, 3 platform skips - Broader UI suite: 97 passed, 1 skip; 2 Node 25 solid-toast loader failures reproduced on the merged baseline - git diff --check - Final limited gatekeeper: PASS for server/macOS, UI restore, and Electron/Tauri
25 lines
804 B
TypeScript
25 lines
804 B
TypeScript
import assert from "node:assert/strict"
|
|
import test from "node:test"
|
|
import { resolveConfiguredRendererOrigins } from "./renderer-origin"
|
|
|
|
test("packaged renderer origins exclude development server environment URLs", () => {
|
|
assert.deepEqual(
|
|
resolveConfiguredRendererOrigins(
|
|
"https://127.0.0.1:43123/workspace",
|
|
true,
|
|
["http://localhost:3000/app", "http://127.0.0.1:5173/loading.html"],
|
|
),
|
|
["https://127.0.0.1:43123"],
|
|
)
|
|
})
|
|
|
|
test("development renderer origins include configured development servers", () => {
|
|
assert.deepEqual(
|
|
resolveConfiguredRendererOrigins(
|
|
"http://127.0.0.1:43123/workspace",
|
|
false,
|
|
["http://localhost:3000/app", "http://localhost:3000/loading.html"],
|
|
),
|
|
["http://127.0.0.1:43123", "http://localhost:3000"],
|
|
)
|
|
})
|