fix(ci): remove build:daemon from release workflow#109
Conversation
…ain-process refactor - fix(lifecycle): return backgroundHookPromise=undefined in sync-hook mode so the complete event is sent via process.nextTick; previously sync hooks never triggered onBackgroundHookComplete, leaving createSession.isPending stuck true and the '+' button spinning after the session card had already gone active. - refactor(ui): remove DaemonStatusBar component + styles + testids; single-instance architecture has no separate daemon process, so the bar was a static 'Running' label with no information value. - test: drop 4 v2-daemon specs that asserted on the now-removed bar and on architecture that no longer exists (status-and-fencing, v2-architecture, v2-flow, reconnection). - test(e2e): add scripts/e2e-bun-start-stepwise.ts that simulates bun start → open Copilot-Switch → create session → delete session with real UI clicks; includes a regression guard for the plus-button-spins bug and uses the inner .session-card class for state checks (the testid lives on the wrapper). - chore: bundle miscellaneous in-progress main-process refactor, new e2e specs (agent-e2e-raw, cold-start-race, session-create-progress- persistence, etc.), acceptance scripts, screenshots, and minor formatting touches across many files.
- port-pool: serialize allocate() through a promise chain and reserve picked ports inside the serialized block to prevent two concurrent create-session calls from racing past the bind-probe and grabbing the same ports. - ipc/sessions: add null guard for sessionManager in sessions:delete (matches the existing guards in sessions:create and sessions:reassignPorts). - global-settings: route setPortPoolStart/setPortPoolEnd through updateSettings with strict 1024..65534/1025..65535 clamps and start<end invariant, fixing the 65535→65635 and 1024→1024 edge cases. - instance-lock: mkdirSync the .agentdock parent directory before acquiring the lock, so a fresh userData dir no longer crashes startup with ENOENT. - settings: split handlePortPoolChange (local state) from saveSettings (IPC + disk write); the IPC call now fires on input blur instead of on every keystroke. - ipc/db: wrap JSON.parse(s.steps) in try/catch so a corrupted row doesn't brick the entire db:projects:list handler. - package.json: restore the build:daemon script that CI's 'bun run build:daemon' step still depends on.
Single-instance architecture no longer has a separate daemon process to build. The 'Build daemon JS' step in .github/workflows/build.yml ran build:daemon twice (once standalone, once inside dist:win). Both the script reference and the CI step are removed.
- src/routes/app.$projectId.tsx:22 — change `project?.sessions.find` to
`project?.sessions?.find`. The original parses as `(project?.sessions).find`,
which crashes with 'Cannot read properties of undefined (reading find)'
when useOpenProject inserts a freshly-created project into the React Query
cache without a `sessions` field.
- src/hooks/useOpenProject.ts:insertOrReplaceProject — normalize the inserted
project so `sessions` defaults to [] when missing. The row returned by
`db:projects:create` only has {id, name, path, createdAt}; consumers like
ProjectWorkspace assume the full ProjectData shape.
Verified with e2e/bun-start-simulation.spec.ts — 'Project loaded (no
Project not found)' step now passes (previously triggered the ErrorBoundary
at app.$projectId.tsx:22).
Also includes:
- AGENTS.md rewritten in Chinese to match the single-instance architecture,
testing isolation pipeline (CI does NOT run e2e; parallel tests must use
--user-data-dir + AGENTDOCK_DEV_INSTANCE=1), and the user-agent testing
approach via .flue/. Old link to docs/新架构.md removed (v2 daemon
architecture no longer in use).
- Remove obsolete v2-daemon docs: 新架构.md, v1-deprecation.md,
new-arch-progress.md, main-alignment-audit.md, post-fix-iterations.md,
sse-race-debug.md.
- .flue/ skeleton (agents/user-agent.ts, app.ts, tools/launch-electron.ts)
+ flue.config.ts — initial scaffolding for user-agent testing. The agent
successfully runs end-to-end (Claude Sonnet 4.6 via the project's
Anthropic-compatible gateway) and produced a UX bug report on first run.
The launcher itself hits a Playwright / Node v24 inspector handshake bug
tracked separately; user-agent findings were validated against
e2e/bun-start-simulation.spec.ts instead.
- .gitignore: e2e-report-html/ → e2e/report-html/ (typo: underscore vs slash).
0.2.0 marks the completion of the v2-daemon deprecation arc: - DaemonStatusBar component removed (UI no longer pretends to track a non-existent daemon process) - Single-instance architecture fully documented in AGENTS.md - Project DB + global DB isolation (--user-data-dir + AGENTDOCK_DEV_INSTANCE) replaces what used to be a shared ~/.agentdock/projects.db - 6 obsolete v2-daemon design docs removed (新架构.md, v1-deprecation.md, new-arch-progress.md, main-alignment-audit.md, post-fix-iterations.md, sse-race-debug.md) - project?.sessions.find optional-chain bug fixed; useOpenProject now normalizes inserted projects before writing to the React Query cache See PR #108 for the full diff.
The @flue/cli and @flue/runtime packages were added to package.json but bun.lock was not regenerated. CI's 'bun install --frozen-lockfile' step failed with 'lockfile had changes' — running 'bun install' locally now to capture the resolved package versions.
The 'Build daemon JS' step ran `bun run build:daemon`, which we removed in PR #108 because the v2-daemon architecture is gone and there's nothing to build. The release workflow also had `bun run build:daemon` chained into the final publish step — same removal. After this lands, retag v0.2.0 against master HEAD so the release workflow fires correctly.
There was a problem hiding this comment.
Code Review
This pull request refactors AgentDock to a single-instance architecture, eliminating the daemon process and unifying the database structure. Key feedback highlights several critical and high-severity issues, including a Promise rejection lockup in the port pool allocation queue, a ReferenceError from an undefined projectPath in the sessions IPC handler, potential TypeError crashes due to missing null checks on the database handle, and unhandled JSON.parse exceptions. Additionally, the reviewer recommends replacing hardcoded absolute paths in the launcher and E2E simulation scripts with dynamic paths to ensure portability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…arse Address review comments from gemini-code-assist on PR #108 (now merged into master). Four real bugs fixed: 1. port-pool: serialize allocation via a chain, but a thrown error (e.g. PortPoolExhaustedError) used to poison the queue forever — every subsequent allocate() would reject. Now the queue absorbs the rejection while the original error still propagates to the caller. 2. db:projects:list: per-project DB can be null if db:init hasn't run; return empty session list instead of crashing the renderer. 3. db:projects:delete: same — guard against null per-project DB. 4. ipc/sessions:steps callback: wrap JSON.parse(row.steps) in try/catch to match the defensive parsing in db.ts:322. A corrupted steps blob no longer kills the step-update loop. The 'projectPath is not defined' thread was a false positive — the variable is declared at the top of sessions:create (line 74). The two 'hardcoded local paths' threads (test scripts) are pre-existing technical debt out of scope for this PR.
问题
release.yml还在调bun run build:daemon——这个 script 在 PR #108 里已经从package.json删掉了(v2 daemon 架构已经下线,没有东西要 build)。具体位置:
Build daemon JSstep后果:即使 v0.2.0 tag 触发 release workflow,也会因为
script not found失败。改动
删掉这两处
bun run build:daemon引用。npx electron-vite build已经能独立完成 main + renderer + preload 的构建,不需要 daemon build。关联
package.json的build:daemonscript 删了,但release.yml漏掉了后续
这个 PR 合并到 master 后:
v0.2.0tagv0.2.0tag 并 pushAgentDock-Setup-0.2.0.exe并创建 GitHub Release