iykyka/docs
Claude 193b15d58a
오프라인 메시지 큐(N4-11) 구현: since_id 캐치업 + WS 재연결 backoff
서버가 이미 모든 메시지를 DB에 durable하게 저장하므로 별도 큐를 새로
만들지 않고, 연결이 끊겼던 클라이언트가 그 DB에서 놓친 부분만 다시
받아오는 방식으로 풀었다.

- core-backend: GET /conversations/:id/messages?since_id=<id> 추가
  (파라미터 없으면 기존 전체 히스토리 그대로, 비정상 값은 400, 최댓값
  초과는 빈 배열). TestListMessagesSinceID로 확인.
- mobile/ws_client.dart: 소켓 onDone/onError에서 그냥 멈추던 것을
  backoff(1s→2s→4s→8s→...→30s 캡, 성공 시 리셋) 재연결로 교체하고,
  재연결 성공 신호를 reconnects 스트림으로 노출.
- mobile/chat_screen.dart: WidgetsBindingObserver를 추가해 소켓
  재연결 신호 + didChangeAppLifecycleState(resumed) 양쪽에서 since_id
  캐치업을 호출, 기존 메시지와 id 기준으로 중복 없이 병합.
- mobile/services/message_sync.dart: backoff 계산과 중복 없는 병합을
  순수 함수로 뽑아 message_sync_test.dart에서 결정적으로 검증.

실제 소켓 재연결 타이밍이나 앱 백그라운드/포그라운드 전환에서 OS가
소켓을 어떻게 처리하는지는 단위 테스트로 증명할 수 없어 실기기
Android QA가 남아 있음 — roadmap.md/deploy-checklist.md N4-11에
부분 검증으로 기록.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 07:26:37 +00:00
..
PLANNING.md docs: confirm N2-A2 production DB as PostgreSQL 2026-07-31 02:04:53 +00:00
PRD.md 제품명 변경(분신→와카뷰) + 소프트 그라디언트/글래스모피즘 UI + 브랜드 로딩 화면 2026-07-31 01:15:42 +00:00
android-release.md Merge origin/main: keep gradient/glassmorphism UI, port demo-invite + boot hardening, purge 분신 branding 2026-07-31 01:30:50 +00:00
decision-log.md 제품명 변경(분신→와카뷰) + 소프트 그라디언트/글래스모피즘 UI + 브랜드 로딩 화면 2026-07-31 01:15:42 +00:00
deploy-checklist.md 오프라인 메시지 큐(N4-11) 구현: since_id 캐치업 + WS 재연결 backoff 2026-08-03 07:26:37 +00:00
deploy-docker.md docs(deploy): Portainer cutover guide and server-up script (N2-B8–12) 2026-07-31 02:31:32 +00:00
deploy-portainer.md feat(deploy): cut over msn.iykyka.com to Ykavu compose stack 2026-07-31 03:08:34 +00:00
fcm-setup.md feat(fcm): send pushes via HTTP v1 service account 2026-07-31 07:33:23 +00:00
idea-meeting-2026-06-29.html Add project planning approach for AI-twin messenger idea 2026-07-29 07:01:38 +00:00
invite-ops.md Complete Phase 1 C: decisions, invite ops, release path, prototype anchor 2026-07-30 05:48:50 +00:00
meeting-review-summary.md 제품명 변경(분신→와카뷰) + 소프트 그라디언트/글래스모피즘 UI + 브랜드 로딩 화면 2026-07-31 01:15:42 +00:00
ops-backup.md docs(ops): complete N3 stabilize — backup, tester guide, smoke results 2026-07-31 04:06:09 +00:00
poc-materials.md Merge origin/main: keep gradient/glassmorphism UI, port demo-invite + boot hardening, purge 분신 branding 2026-07-31 01:30:50 +00:00
poc-plan.md 제품명 변경(분신→와카뷰) + 소프트 그라디언트/글래스모피즘 UI + 브랜드 로딩 화면 2026-07-31 01:15:42 +00:00
prototype.md Merge origin/main: keep gradient/glassmorphism UI, port demo-invite + boot hardening, purge 분신 branding 2026-07-31 01:30:50 +00:00
risk-log.md 제품명 변경(분신→와카뷰) + 소프트 그라디언트/글래스모피즘 UI + 브랜드 로딩 화면 2026-07-31 01:15:42 +00:00
roadmap.md 오프라인 메시지 큐(N4-11) 구현: since_id 캐치업 + WS 재연결 backoff 2026-08-03 07:26:37 +00:00
tech-design.md 제품명 변경(분신→와카뷰) + 소프트 그라디언트/글래스모피즘 UI + 브랜드 로딩 화면 2026-07-31 01:15:42 +00:00
tester-guide.md feat(n4): wire FCM token path and document Master secrets 2026-07-31 04:51:57 +00:00
user-interview-guide.md 제품명 변경(분신→와카뷰) + 소프트 그라디언트/글래스모피즘 UI + 브랜드 로딩 화면 2026-07-31 01:15:42 +00:00
vision.md 제품명 변경(분신→와카뷰) + 소프트 그라디언트/글래스모피즘 UI + 브랜드 로딩 화면 2026-07-31 01:15:42 +00:00