Skip to content

fix(sync): PUT broadcast + Electron duplicate browser + probePort mode#16

Merged
PresenceWith merged 1 commit intodevelopfrom
fix/electron-web-sync
Mar 14, 2026
Merged

fix(sync): PUT broadcast + Electron duplicate browser + probePort mode#16
PresenceWith merged 1 commit intodevelopfrom
fix/electron-web-sync

Conversation

@PresenceWith
Copy link
Copy Markdown
Owner

Summary

  • I-002: PUT /api/sync 후 WebSocket 브로드캐스트 추가 — 멀티 탭/윈도우에서 편집이 다른 클라이언트에 반영되지 않던 버그 수정
  • I-003: Electron 모드에서 vync open 호출 시 불필요하게 시스템 브라우저가 열리던 버그 수정
  • I-004: probePort() 복구 시 PID 파일 mode를 항상 'daemon'으로 덮어쓰던 버그 수정

Changes

File Change
tools/server/server.ts PUT 핸들러에 registry.broadcastToFile() 추가 (+4 LOC)
tools/cli/open.ts vyncOpen()에 electron mode 체크 + probePort() mode 보존 (+6 LOC)
tools/server/__tests__/put-broadcast.test.ts 신규 테스트 2개 (PUT→WS broadcast, file isolation)
docs/ISSUES.md I-002, I-003, I-004 등록 (resolved)
docs/PLAN.md 현재 상태 갱신
docs/ARCHITECTURE.md §2.2 데이터 흐름에 PUT 후 WS 브로드캐스트 추가

Test plan

  • npx vitest run — 95개 테스트 전체 PASS (신규 2개 포함)
  • 동기화 E2E: 두 브라우저 탭에서 편집 → 양방향 반영 확인
  • Electron 모드: vync open <file2> → 브라우저 안 열리고 Electron 탭만 추가
  • Daemon 모드: Electron 없이 vync open → 브라우저 정상 열림

🤖 Generated with Claude Code

- PUT /api/sync now broadcasts file-changed to all WS clients (I-002)
- Skip browser open when server is in electron mode (I-003)
- Preserve existing PID file mode in probePort() recovery (I-004)
- Add put-broadcast tests (2 tests, 95 total)
- Update docs: PLAN.md status, ARCHITECTURE.md data flow, ISSUES.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@PresenceWith PresenceWith merged commit 61db127 into develop Mar 14, 2026
1 check passed
@PresenceWith PresenceWith deleted the fix/electron-web-sync branch March 14, 2026 06:41
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.

1 participant