Commit Graph

92 Commits

Author SHA1 Message Date
Cursor Agent cd367a5715
docs: sync W4/web status — secrets live, accept remaining
Align README, roadmap, web-upgrade, fcm-setup, tester-guide, mobile
README, and deploy-checklist with production :web: injection. Mark N4-3
server SA done; keep W4 accept (browser push-test) open.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-04 06:40:14 +00:00
Cursor Agent e595703c6c
docs: W4 web APP_ID live; browser token accept remaining
Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-04 05:01:51 +00:00
Cursor Agent 526bc5bf76
docs: mark W4 live-injected; note Web :web: APP_ID for accept
Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-04 04:53:45 +00:00
Cursor Agent fed6739a56
fix(web): keep Firebase build-args out of Docker RUN logs
Move SW render + flutter build into a stage script so secret values are
not expanded into Dockerfile RUN instructions. Document that APP_ID must
be a Web (:web:) app id and that secrets belong on the deploy host .env.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-04 04:53:39 +00:00
Cursor Agent 40c36a20c3
feat(web): W4 Web Push path via FCM dart-define + VAPID
Wire Firebase Web config and VAPID through build-args/dart-define,
populate firebase-messaging-sw.js at image build, and soft-fallback to
install: tokens when secrets are absent. Live accept still needs Master
.env FIREBASE_* values and a web rebuild.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-04 01:30:49 +00:00
Cursor Agent 4a38231656
feat(web): W5 PWA polish, W6 tester guide, W7 edge smoke
Align manifest/theme with AppTheme, harden nginx cache for SW entry,
add offline banner, expand tester-guide web tips, and ship
scripts/e2e_web_smoke.sh. W4 Web Push remains blocked on Master VAPID.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-04 01:19:32 +00:00
Cursor Agent b61b3bc0fb
feat(web): W3 browser Notification reminders for snooze
Schedule in-tab timers with the Notification API when permitted,
surface past-due snoozes on focus, and add a settings entry to request
permission. In-app badges remain the fallback. Mark N4-W3 done.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-04 01:18:13 +00:00
Cursor Agent ec5761d602
feat(web): W2 demo UX — split layout, WS status, tips
Add ≥900px list|chat master-detail, conversation WebSocket link
state in the chat chrome, dismissible web preview banner, and
stronger user-ID copy from list and settings. Mark N4-W2 done.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-04 01:14:16 +00:00
Cursor Agent 866f36e319
feat(web): W1 durable preview DB via SharedPreferences
Persist tone samples, KV, and snoozes across hard refresh on Flutter
web. Keep AppDatabase.memory ephemeral; document DataFlow copy and
mark N4-W1 done. Unit tests cover prefs round-trip and corrupt JSON.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-04 01:08:21 +00:00
Cursor Agent 7486e6e15e
docs: add web-upgrade plan (demo/preview, Push, PWA)
Land W0–W7 design for the Flutter web preview surface with
acceptance criteria, Master actions, and N4-W tracking. Cross-link
README, roadmap, deploy-checklist, fcm-setup, and mobile README.
Q9 remains out of scope; implementation waits per-Wi approval.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-04 00:49:59 +00:00
Claude 98f511eae5
docs(N4-15): roadmap [~]/[ ] 상태를 실제 코드 상태와 동기화
deploy-checklist.md N4-15 작업. 낡거나 모순된 기록 몇 개를 발견해 정정:
- §2.1 "푸시 알림 서비스 연동" [ ] — FCM 작업이 이미 §B/N4-1~4에서 상세 추적
  중인데 남아있던 중복 표기였음. 교차참조로 정리하고 [~]로 변경(서버 쪽은
  완료, 남은 건 Master의 Firebase 시크릿 배치·실기기 수신 확인뿐)
- §4 "앞으로의 개발 계획" 4번 — "남은 것"에 이미 완료된 "C 배포 준비"가
  그대로 남아있어서 제거
- §2.3 온보딩 뼈대 [~] — 관계 티어 선택 스텝(2.7-B)이 이미 추가된 걸 반영
- §2.5 "수동 QA" [ ] — N4-5~10(api-done, 화면 탭만 남음)과 N4-C6b/N4-11
  (이 세션엔 실기기가 없어 순수 로직만 검증됨)로 교차참조 추가

실제로 아직 Master 액션이나 Q9 확정을 기다리는 [~]/[ ] 항목(FCM 푸시,
멀티디바이스 동기화, 데이터 프라이버시, L2 카피/수신트리거)은 그대로
유지 — 진행 안 된 걸 완료로 바꾸지 않음.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 08:27:08 +00:00
Cursor Agent febf1fc637
feat(q8): invite login, settings hub, and logout
Confirm Q8 account/settings IA and ship the closed-beta gap:
- Extend POST /auth/login with display_name (required for DEMO-YKAVU)
- Entry screen tabs: signup vs already-registered login
- Settings hub with tone, autonomy, sessions, data-flow, logout
- Logout revokes current session and clears local token

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-03 07:46:06 +00:00
Claude a956db754b
Merge remote-tracking branch 'origin/main' 2026-08-03 07:40:48 +00:00
Claude c35fad2737
자연스러움 피드백 계측(N4-12) 구현: 초안 무수정 발송률 + 원탭 나답아요 평가
암묵 신호: Message.DraftEdited(nullable)를 트윈 승인-발송 경로에서 클라이언트가
보낸 original_draft_text와 실제 발송 텍스트를 diff해 계산(사람 메시지·구버전
클라는 nil, 추측하지 않음). 명시 신호: Message.NaturalnessRating(nullable) +
POST /messages/:id/feedback(트윈 메시지만, 재제출은 덮어씀)로 "이 답장
나답아요?" 원탭 👍/👎을 채팅방에 비침투적으로(모달 아님, 한 번 탭하면
다시 안 보임) 노출. /admin/metrics에 draft_unedited_rate·
naturalness_positive_rate 추가(분모 0 zero-guard), 대시보드 카드 2개 추가.

PoC 실행이나 결론이 아니라 캡처 장치일 뿐 — 실제 자연스러움 %는 N5 이후
실 베타 데이터로 확정한다. docs/roadmap.md·deploy-checklist.md N4-12 동기화.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 07:39:55 +00:00
Cursor Agent 53f219a268
docs: finish Q8/Q9 cross-links in AGENTS and PLANNING
Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-03 07:36:27 +00:00
Cursor Agent 17e7bc63b4
docs: specify account/settings IA and L2 meaning gaps (Q8/Q9)
Add decision-log Q8/Q9 as proposals, account-settings-ia.md for Phase 1
invite-only auth + logout/settings IA, and align PRD/tech-design/roadmap
so implementation waits for Master confirmation.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-03 07:35:43 +00:00
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
Claude a1415f5ce0
운영 대시보드 낡은 메모 정정 + 트윈 발송 차단 사유별 분해 추가
roadmap.md §2.6의 "모니터링 대시보드 UI·지연시간·오류율 아직 없음" 메모가
낡은 기록이었음을 재확인 -- GET /admin/dashboard(HTML)와 /admin/metrics의
생성 지연시간·오류율 계측은 이미 이전 Phase 1 B 커밋에서 구현돼 있었고,
같은 문서 §B 항목과도 모순되고 있었음. [~] -> [x]로 정정하고 실제 배경을
남김.

실제로 오늘 추가한 것: RuntimeMetrics.TwinSendsBlocked를 사유별
(peer_veto/group_conversation/flood_blocked/flood_detected/
escalate_check_error/escalated/autonomy_l0/autonomy_l1_unapproved/
autonomy_l2_no_whitelist_match/autonomy_unknown_level)로 분해하는
TwinSendsBlockedByReason을 추가하고, /admin/metrics에
twin_sends_blocked_by_reason으로 노출(기존 twin_sends_blocked 총합은
유지). 이미 JSON에는 있었지만 화면엔 안 보이던 escalations_by_reason과
새 필드를 /admin/dashboard에 사유별 표로 렌더링.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 07:12:34 +00:00
Cursor Agent 97edabc47d
docs: clear stale Track C undeployed note
Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-03 06:41:02 +00:00
Cursor Agent f363e8e773
docs: mark Track C A–F production redeploy done (95422bb)
GitHub+Gitea main synced; msn.iykyka.com web/core/ai rebuilt.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-03 06:40:39 +00:00
Claude 95422bb012
답장 마감 알림(2.7-F) 구현: 온디바이스 스누즈 저장 + 인앱 배지 + 로컬 알림(부분 검증)
roadmap.md §2.7-F / deploy-checklist.md N4-C6a~c 대응. "이따 답장"을 누르면
대화방별 스누즈 시각을 순수 온디바이스 drift 테이블(ConversationSnoozes)에
저장하고(서버 전송 없음, 다른 사람에게 절대 보이지 않음), chat_screen.dart
앱바에서 빠른 선택(1시간 후/저녁에/내일)으로 걸고 해제할 수 있게 했다. 실제
답장을 보내면 자동으로 스누즈가 풀린다.

로컬 알림은 flutter_local_notifications+timezone을 실제로 붙여
zonedSchedule()/cancel()을 호출하지만, 이 샌드박스에는 실기기·에뮬레이터가
없어 알림이 실제로 울리는지는 검증하지 못했다 — 검증한 건 스케줄러 호출
인자(id/시각/페이로드)가 목(mock) 기준으로 맞는지뿐이다. 그 대신 항상 켜져
있는 인앱 대체 경로로 conversation_list_screen.dart 배지와 chat_screen.dart
배너가 마감 지난 스누즈를 보여주고 바로 해제할 수 있게 했다. 웹 빌드는
플러그인이 웹을 지원하지 않아 no-op 스텁으로 대체.

마감 판정(isSnoozePastDue)과 빠른 선택 시각 계산은 순수 함수로 분리해
고정 시각으로 단위 테스트했고, SnoozeController를 통해 스케줄러를 목으로
바꿔 넣어 호출 인자도 검증했다. 백엔드(core-backend/ai-service) 변경 없음.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 05:55:30 +00:00
Claude f9fba46889
관계 메모 실제 반영(2.7-E) 구현: draftRequest에 RelationshipNote 전달 + 프롬프트 주입
Contact.RelationshipNote는 CRUD는 이미 있었지만 draftRequest에 필드 자체가 없어
ai-service 프롬프트에 전혀 전달되지 않는 저장 전용 스텁이었다. 이번 변경으로 실제
초안 생성에 반영되게 만든다.

- core-backend/aiservice.go: draftRequest에 RelationshipNote string 필드 추가
  (relationship_tier 옆, omitempty, 빈 문자열 = 무영향)
- core-backend/persona.go: resolveRelationshipNote() 추가. 티어/자율성과 달리
  메모는 순전히 개인별이라 전역 기본 메모 개념이 없음 -- 그룹 대화나 매칭되는
  Contact가 없으면 빈 문자열로 귀결. resolveRelationshipTier/resolveAutonomyLevel/
  resolveRelationshipNote 셋이 복붙하던 "1:1 상대 Contact 찾기" 루프를
  findCounterpartContact() 공용 헬퍼로 추출해 중복 제거
- core-backend/main.go: POST /conversations/:id/draft 핸들러가 resolveRelationshipNote
  결과를 draftRequest에 실어 보내도록 연결
- ai-service/app/generation.py: system_prompt_for_tier()가 relationship_note를
  받아 "[관계 메모] {note} -- ..." 문단을 관계 티어 지침과 별도로 추가(빈 값이면
  기존과 동일). draft_reply()도 파라미터 통과만 함 -- 에스컬레이션/정체성 게이팅은
  전혀 영향 없음
- ai-service/app/main.py: DraftRequest에 relationship_note 필드 추가, /draft가
  draft_reply로 그대로 전달
- 테스트: core-backend Go 64개(신규 3개: 메모 전달/빈 값/그룹 스킵) 전부 통과,
  ai-service pytest 52개(신규 5개) 전부 통과, mobile flutter analyze/test 변경 없이
  그대로 6개 통과(이 기능은 새 UI가 필요 없음 -- 필드는 이미 있었음)
- docs/roadmap.md §2.7-E, docs/deploy-checklist.md N4-C5a/b/c 완료 처리 + NOW/
  바로 다음 5개 요약 갱신

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 05:37:33 +00:00
Claude b4a3b4a903
자율성 상대별 예외(2.7-D) 구현: 연락처별 AutonomyLevel 오버라이드 + 발송 게이트 교체
PRD.md §3.1 P0 "자율성 설정(L0~L2) | 전역 기본값 + 상대별 예외 설정" / §4 엣지케이스
대비 미구현 갭 해소. 관계별 페르소나(2.7-B)의 RelationshipTier 오버라이드 패턴을
그대로 미러링:

- core-backend/models.go: Contact.AutonomyLevel *AutonomyLevel 추가(nil = 전역
  기본값), validAutonomyLevel() 검증 헬퍼 추가(twin-settings PATCH의 인라인 검증도
  이 헬퍼로 통일)
- core-backend/autonomy_resolve.go: resolveAutonomyLevel() 신규 — 연락처 오버라이드
  (1:1 전용) → 전역 TwinSettings 기본값 → L0 순으로 해석. L1/L2가 아니라 L0으로
  폴백하는 이유는 이 코드베이스 전반의 안전 우선 기본값과 동일(불확실하면 항상 초안만
  생성, 사람이 직접 발송). 그룹 대화는 RelationshipTier와 동일하게 항상 전역 기본값만
  사용 — main.go의 그룹 대화 무조건 차단과 이중으로 안전
- core-backend/main.go: POST /conversations/:id/messages의 자율성 게이트가
  TwinSettings 전역값만 읽던 걸 resolveAutonomyLevel() 호출로 교체. peer-veto→그룹
  차단→도배 감지→에스컬레이션 순서와 각 하드게이트는 그대로 유지, "level" 계산
  방식만 바뀜
- core-backend/a1_a2_routes.go: createContactRequest/updateContactRequest에
  AutonomyLevel 필드 추가, contactJSON()에 포함, 생성/수정 핸들러가 RelationshipTier와
  동일한 전체 교체(full-replace) 시맨틱으로 처리(PATCH에서 필드 생략 시 nil로 리셋)
- core-backend/autonomy_resolve_test.go: 연락처 오버라이드 우선순위, 전역 기본값
  폴백, 그룹 대화는 오버라이드 무시, 잘못된 값 검증 거부, PATCH 전체 교체 리셋 커버
- mobile: models.dart에 Contact.autonomyLevel(nullable) 추가, api_client.dart
  createContact/updateContact에 선택적 autonomyLevel 파라미터 스레딩,
  contacts_screen.dart에 _AutonomyLevelPicker(_RelationshipTierPicker와 동일 구조)
  추가해 추가/수정 다이얼로그에 배치 + 연락처 목록 서브타이틀에 표시

ai-service는 변경 없음 — 자율성 레벨은 발송 게이트 로직일 뿐 초안 톤에 영향을
주지 않아 ai-service 프롬프트까지 전달될 필요가 없음.

테스트: go test ./... 61개 전부 PASS, flutter analyze/test 클린(기존 무관 info
린트 1건 제외).

docs/roadmap.md §2.7-D, docs/deploy-checklist.md N4-C4a/b/c를 done으로 갱신하고
NOW/바로 다음 5개 요약도 동기화.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 05:30:42 +00:00
Claude 4182eba9a6
docs: PRD 2차 갭 분석 체크리스트 추가 (2.7-D~F / N4-C4~C6)
roadmap.md §2.7-A~C(단톡 따라잡기·관계별 페르소나·스팸 감지) 완료 후 PRD.md 재대조로
발견한 잔여 갭 3건을 체크리스트로 등록. 우선순위: D(자율성 상대별 예외, P0 명시 항목인데
오버라이드 메커니즘 자체가 없음) → E(관계 메모 반영, 필드/UI는 있으나 프롬프트 주입 안 됨) →
F(답장 마감 알림, P1이자 완전 미구현). deploy-checklist.md에도 동일 항목을 N4-C4/C5/C6로
동기화.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 05:23:03 +00:00
Claude a8c7b98922
스팸/도배 감지 최소 버전(2.7-C) 구현: 대화방 단위 자동 응대 일시중단 + 재개
PRD.md §4 엣지케이스가 "안전 관련이라 v1 최소 버전 필요"로 명시한 항목(P0)인데
관련 로직이 0건이었던 마지막 콘텐츠 갭(roadmap.md §2.7-C, deploy-checklist.md
N4-C3a/b)을 채운다. Track C(콘텐츠 갭) A/B/C 전체 완료.

- core-backend/flood_detect.go(신규): floodMessageThreshold=5건 /
  floodWindow=2분 상수 + floodDetected()/floodReason(). 안전을 위해 반드시
  있어야 하는 기술적 최소값이라 명시적으로 placeholder로 남기고 구현했다 —
  roadmap.md §3의 "PoC 결과가 있어야 정할 수 있는 것"(자율성 기본값 등 UX
  기본값)과는 성격이 다름. 카운트는 대화방 내 sender_id != 소유자인 메시지만
  집계(트윈 자동발송·소유자 본인 발송은 소유자 ID로 남으므로 자동 제외).
- core-backend/main.go: POST /conversations/:id/messages 하드게이트에
  peer-veto → 그룹 대화 차단 다음, 에스컬레이션 체크 이전 지점으로 추가 —
  트윈 자동발송 시도가 전부 지나가는 동일한 우회 불가 지점. 이미
  TwinDisabledByFlood가 켜져 있으면 재계산 없이 즉시 차단(중복 로그/쿼리
  방지). 새로 임계치를 넘기면 대화방을 영구 차단하고 EscalationLog 기록 +
  notifyUser 푸시.
- core-backend/models.go: Conversation.TwinDisabledByFlood 필드 추가.
  TwinDisabledByPeer(거부권, 사람의 일방적 선택 — v1엔 되돌리기 API 없음)와
  달리 이건 시스템이 자동으로 취하는 조치라서 AGENTS.md "every automatic
  action needs post-hoc notification + one-tap undo"가 그대로 적용됨 —
  POST /conversations/:id/flood-reset로 되돌릴 수 있게 별도 필드로 분리.
- core-backend/a1_a2_routes.go: GET /conversations 응답에
  twin_disabled_by_flood 추가(twin_disabled_by_peer와 동일한 자리).
- core-backend/flood_detect_test.go(신규): 임계치 경계값(정확히 N건은
  통과, N+1건은 차단), 사람 발송은 게이트 안 걸림, 윈도우 밖 과거 메시지는
  집계 제외, flood-reset으로 재개, 존재하지 않는 대화방 404 — 5개 테스트.
- mobile/lib/models/models.dart, services/api_client.dart: 모델·API
  클라이언트에 twinDisabledByFlood/resetFlood() 추가.
- mobile/lib/screens/conversation_list_screen.dart: 대화 목록에 도배 차단
  배지(거부권과 같은 자리, 다른 아이콘/문구).
- mobile/lib/screens/chat_screen.dart: 채팅방을 열면(목록에서 넘어온 초기
  상태) 또는 발송 시도가 다시 차단되면 배너에 "자동응대 재개" 버튼을 보여줌
  — one-tap undo. 새 알림 메커니즘을 만들지 않고 기존 EscalationLog/
  InboxScreen을 그대로 재사용.
- mobile/test/models_test.dart: twin_disabled_by_flood 파싱 테스트 추가.
- docs/roadmap.md §2.7-C, docs/deploy-checklist.md N4-C3a/b·Track C 요약·
  "바로 다음 5개"를 완료로 갱신.

테스트: go test ./... 51/51, python3 -m pytest tests/ -q 47/47,
flutter analyze 클린 + flutter test 5/5 모두 통과.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 05:12:29 +00:00
Claude 73dfa2c33c
Merge remote-tracking branch 'origin/main'
# Conflicts:
#	docs/deploy-checklist.md
2026-08-03 05:00:58 +00:00
Claude 5733ec4399
관계별 페르소나(2.7-B) 구현: 관계 티어 필드 + 온보딩/연락처 UI + 톤 프롬프트 분기
PRD.md §2.1-②·§3.1 P0 갭 우선순위 #2. close/formal 2종 관계 티어를 추가하고,
초안 생성 시 상대별 톤을 다르게 낸다.

- core-backend: TwinSettings.RelationshipTier(전역 기본값, 안전 우선 formal
  기본), Contact.RelationshipTier(1:1 연락처별 오버라이드, nullable).
  persona.go의 resolveRelationshipTier()가 연락처 오버라이드 → 전역 기본값 →
  formal 순으로 해석하고, 그룹 대화는 상대가 여럿이라 항상 전역 기본값만 사용.
  POST /conversations/:id/draft는 기존에 인증을 요구하지 않던 동작을 깨지
  않도록 currentUser(..., false)로 선택적 인증 처리 후 티어를 주입.
- 안전 관련 부수 수정: 그룹 대화에서는 전역 자율성 레벨(L1/L2)과 무관하게
  와카뷰 자동 발송을 무조건 차단(단톡 따라잡기는 L0 고정이 맞음).
- ai-service: RELATIONSHIP_TIER_INSTRUCTIONS + system_prompt_for_tier()로
  Gemini system_instruction에 관계 톤 지침을 주입. 에스컬레이션/정체성 게이팅
  로직은 티어와 무관하게 그대로 유지.
- mobile: 온보딩(말투 샘플 다음 단계)과 자율성 설정 화면에 전역 기본값
  SegmentedButton, 연락처 추가/수정 다이얼로그에 _RelationshipTierPicker로
  상대별 오버라이드 추가.
- 테스트: core-backend persona_test.go 6개(해석 순서·그룹 예외·비인증
  기본값 포함), ai-service 6개(system_prompt_for_tier + draft_reply 경로)
  전부 추가, 기존 스위트 모두 통과(go test, pytest 47/47, flutter analyze/test).
  실제 Flutter 빌드 + Playwright로 온보딩→연락처 오버라이드→목록 표시까지
  전체 라운드트립 시각 검증 완료.
- docs: roadmap.md §2.7-B, deploy-checklist.md N4-C2a~d 완료 처리. 다음
  우선순위는 Track C3(스팸/도배 감지 최소 버전).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 04:59:34 +00:00
Cursor Agent 9d2e7ec621
docs: mark iMessage theme and C1 production deploy done
Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-03 04:32:18 +00:00
Cursor Agent 1897dde10e
feat(ui): iMessage-inspired light default + soft charcoal dark
Default ThemeMode.light with white messenger stage, blue mine bubbles,
and gray peer bubbles. Dark theme uses elevated charcoal instead of
pure black; composer and CTAs follow common messenger patterns.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-03 04:29:15 +00:00
Claude 0d848bcb9a
Merge remote-tracking branch 'origin/main'
# Conflicts:
#	docs/deploy-checklist.md
2026-08-03 03:18:13 +00:00
Claude 64323b824e
feat: implement 단톡 따라잡기 (group catch-up summary) — roadmap.md §2.7-A
Closes the biggest content gap found against PRD.md §3.1 P0: group chat
catch-up was one of only two v1 MVP scenarios and had zero implementation.

Backend (core-backend):
- ConversationParticipant.LastReadMessageID read marker.
- POST /conversations/:id/read advances the caller's marker (never backward).
- GET /conversations/:id/summary builds context from messages since that
  marker and calls ai-service's new POST /summarize; returns unread_count
  and needs_reply.
- GET /conversations now reports unread_count per room.
- Safety: group conversations now unconditionally block twin-authored
  sends (POST /conversations/:id/messages), regardless of the sender's
  global autonomy level. PRD.md §2.3-③ requires this scenario stay L0-fixed
  with no auto-send; autonomy level is a per-user global setting today, so
  this closes the only path a global L2 whitelist match could otherwise
  auto-send into a group.

AI service (ai-service): new summarize.py module (same Gemini-call shape as
generation.py's draft_reply, no escalation/identity gating since nothing
generated here is ever sent) + POST /summarize.

Mobile: "새 대화" dialog now supports adding/removing multiple peer fields
(2+ peers -> is_group:true automatically); unread badge on conversation
rows; ChatScreen takes isGroup and renders its L1 panel as L0-locked for
groups; new "안 본 동안 요약" AppBar action opens a dialog with the summary
and, when a reply looks needed, a button that feeds straight into the
existing draft-request flow.

Verified with a real Flutter build against a live core-backend + ai-service
instance (Playwright driving 3 demo accounts through group creation, unread
badges, and the summary dialog) — this caught a real ordering bug: marking
the read marker on chat *open* meant the summary was always empty by the
time you could tap it, since opening the room already advanced the marker
past everything you'd come to catch up on. Fixed by marking read on screen
*exit* (dispose) instead, so the marker reflects what was unread that whole
visit and updates once you leave.

go test / pytest / flutter analyze+test all pass.
2026-08-03 03:16:54 +00:00
Cursor Agent 0aae8fb578
docs: mark Soft Neutral production web deploy done
msn.iykyka.com rebuilt from e05a0f0 after dual-push to Gitea.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-03 02:45:07 +00:00
Claude be9d5be7fe
Merge remote-tracking branch 'origin/main'
# Conflicts:
#	docs/deploy-checklist.md
2026-08-03 02:22:45 +00:00
Claude 497c0ab537
docs: add PRD content-gap checklist (단톡 따라잡기, 페르소나, 스팸 감지)
PRD.md §3.1 lists 10 P0 features for v1; cross-checking the actual code
against that table found three that are fully unimplemented despite being
required scope, not deferred PoC defaults:

- 단톡 따라잡기 (group catch-up summary) — one of only two v1 MVP
  scenarios, currently 0%: no summary endpoint, no AI-service logic, no
  client UI, and the "new conversation" dialog can't even create a group
  (server already supports is_group + multiple user_ids).
- 관계별 페르소나 (relationship-tier tone, min. 2 tiers) — TwinSettings
  only has AutonomyLevel, no tier concept anywhere.
- 스팸/도배 감지 — PRD explicitly calls this out as needing a v1-minimum
  version for safety, not deferred; nothing implemented.

Added as roadmap.md §2.7 (workstream breakdown, priority A→B→C) and
deploy-checklist.md N4 Track C (mirrors Track A/B's format), cross-linked.
Explicitly scoped out image/file sending, read receipts, and typing
indicators as a separate "not proposed, PRD scope change needed" note,
since AGENTS.md requires calling out in-scope vs future-phase ideas.
2026-08-03 02:20:27 +00:00
Cursor Agent e05a0f07ce
docs: note Soft Neutral main merge; prod web rebuild pending SSH
GitHub main is at 553cb62; gitea dual-push and msn.iykyka.com web rebuild
still need host credentials in this environment.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-08-03 02:11:35 +00:00
Cursor Agent ca4aeb059d
feat(ui): Quiet Ink redesign — teal accent, light/dark
Replace aurora-glass purple with a calm messenger system: off-white/
charcoal canvas, Plus Jakarta Sans, solid teal CTAs, and quieter
panels across signup, chats, contacts, inbox, and settings.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 09:01:57 +00:00
Claude f470dd473c
docs: log the aurora-glass UI redesign in deploy-checklist.md
Keeps deploy-checklist.md's DONE list in sync with the actual UI redesign
work per AGENTS.md's "Phase 1 앱 빌드 작업 규칙". Also flags that this
pushed to GitHub main but has not been redeployed to the live
msn.iykyka.com production host, since this session has no access to that
host (deploy runs via scripts/server-up.sh on the iykyka box itself).
2026-07-31 09:01:12 +00:00
Cursor Agent ef73b93d83
feat(fcm): send pushes via HTTP v1 service account
Prefer FCM_SERVICE_ACCOUNT_FILE/JSON over legacy FCM_SERVER_KEY,
mount secrets/ into core-backend, and document Master JSON placement.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 07:33:23 +00:00
Cursor Agent 82a5809d4e
feat(n4): wire FCM token path and document Master secrets
Add PushTokenService with Firebase Messaging fallback to install
placeholders, conditional google-services Gradle plugin, fcm-setup.md,
and mark Android UI checklist api-done via prod e2e 16/16.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 04:51:57 +00:00
Cursor Agent fea1b555b4
docs: mark Track B production deploy done
N4-B4 verified: /demo returns pairing_steps on msn.iykyka.com.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 04:46:07 +00:00
Cursor Agent c7029ab2cd
feat: finish Track A polish and Track B demo pairing content
Add PATCH contact for missing peer IDs, contacts banner and edit UI,
enrich /demo with pairing steps, and update tester/signup guidance.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 04:43:25 +00:00
Cursor Agent fdd02d8252
docs: mark Track A production web rebuild done
N4-A5 verified on msn.iykyka.com after deploying 3d00b00.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 04:38:39 +00:00
Cursor Agent 3d00b00de7
feat(mobile): Track A messenger UX — ID chip, contacts chat, L0 draft
Show/copy numeric user ID, require peer ID for contacts, start chat in one tap,
clarify empty states, and route L0 twin drafts into the human composer.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 04:36:41 +00:00
Cursor Agent d614d9e5c4
docs: record Gemini key live on msn.iykyka.com (draft status=ok)
Server ai-service recreated with GEMINI_API_KEY; live draft smoke passed.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 04:19:44 +00:00
Cursor Agent 9065479e87
docs(ops): complete N3 stabilize — backup, tester guide, smoke results
Record invite/metrics/dashboard/draft(no_key) checks, pg_dump restore
rehearsal, and tester-facing guide for msn.iykyka.com.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 04:06:09 +00:00
Cursor Agent d60da60981
feat(deploy): cut over msn.iykyka.com to Ykavu compose stack
Attach web to nginx-proxy_default; record live cutover (NPM host #7,
old MSN stopped) and mark N2-B8–B12 done.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 03:08:34 +00:00
Cursor Agent 0a33ff3bcc
docs: mark N2-B8–B12 blocked pending SSH/Portainer access
Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 02:31:49 +00:00
Cursor Agent b38839666c
docs(deploy): Portainer cutover guide and server-up script (N2-B8–12)
msn.iykyka.com still serves legacy Express; agent lacks SSH/Portainer
credentials so cutover is documented and marked blocked pending access.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 02:31:32 +00:00
Cursor Agent 4a39bc7b7d
feat(deploy): Docker Compose stack for msn.iykyka.com (N2-B)
Add Postgres + internal AI + core-backend + Flutter web (nginx API/WS
proxy). Document Portainer usage and env template; mark N2-B1–B7 done.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 02:26:40 +00:00
Cursor Agent c7e70ac18b
docs: mark N1 smoke done (E2E 16/16, DEMO-YKAVU)
Record local smoke results after restarting core-backend on current main.
Document msn.iykyka.com CORS/API change list for N1-6; next is N2-B Docker.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 02:13:51 +00:00