Skip to content

fix(frontend): canonicalize daemon identity paths#415

Open
anirudh5harma wants to merge 1 commit into
aoagents:mainfrom
anirudh5harma:fix/electron-daemon-path-identity
Open

fix(frontend): canonicalize daemon identity paths#415
anirudh5harma wants to merge 1 commit into
aoagents:mainfrom
anirudh5harma:fix/electron-daemon-path-identity

Conversation

@anirudh5harma

Copy link
Copy Markdown

Closes #414

Problem

The Electron supervisor can reject a healthy daemon from the same checkout when
macOS reports the checkout path with different casing. In that state the
renderer shows the empty project board even though /api/v1/projects and
/api/v1/sessions return real data.

Change

  • move daemon path identity checks into a shared path-identity helper
  • canonicalize paths with realpathSync.native() before comparing them
  • preserve Windows case-insensitive comparisons
  • canonicalize the nearest existing ancestor for not-yet-created child paths
  • cover same-path and child-path behavior with focused tests

Tests

cd frontend
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh"
nvm use 20

npm test -- --run src/shared/path-identity.test.ts src/shared/daemon-attach.test.ts
npm test

Results:

2 passed (2), 34 passed (34)
31 passed (31), 307 passed (307)

Verification

Verified against the live Electron renderer through the Chromium DevTools
protocol after restarting npm run dev:

  • window.ao.daemon.getStatus() reports state: "ready"
  • the board renders demo-repo
  • the board renders worker sessions demo-repo-1 and demo-repo-2

@anirudh5harma anirudh5harma force-pushed the fix/electron-daemon-path-identity branch 2 times, most recently from 43c7eaa to a4e0458 Compare June 25, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Electron app shows empty board when daemon checkout path casing differs

1 participant