# Phase 1 Communications — Week 3 (Chat UI) — Engineering Handoff for kimi-cli **Date:** 2026-06-16 **Branch:** `main` **Author:** Claude Code **Status:** READY TO DEPLOY — code complete, `npx tsc --noEmit` clean. NOT yet committed, NOT yet visually QA'd in a browser (built under a no-docker/no-dev-server constraint this session). **Do not deploy:** No new env vars required. No new npm packages. Drop-in to existing hermes-mcp image build. --- > ⚠️ **CRITICAL — DO NOT LEAVE DOCKER RUNNING** > > After building and pushing the image, **stop and remove all local Docker containers** before kubectl apply. > Docker left running has previously caused port conflicts with the production Kubernetes cluster, breaking live services. > > ```bash > docker stop $(docker ps -q) 2>/dev/null || true > docker rm $(docker ps -aq) 2>/dev/null || true > ``` > > Verify nothing is bound to the relevant ports before applying to k8s: > ```bash > ss -tlnp | grep -E ':(80|443|3000|8080)' > ``` > > Only proceed with `kubectl apply` once Docker containers are confirmed stopped. --- ## What was built Week 3 of the sprint plan: the chat UI, onboarding flow, and hardening on top of the Week 1+2 backend (already live — see `2026-06-15-phase1-communications-deploy-handoff.md`). This is the user-facing dashboard tab plus three small backend gaps closed along the way. ### Backend additions (closing gaps found vs. the engineering design doc) - `PUT /api/communications/drafts/:draft_id` — edit `draft_text`/`draft_metadata` directly without an AI call (manual edits + Instagram `image_url` attachment use this same endpoint; metadata is shallow-merged server-side so `image_url` doesn't clobber `hashtags`). - `GET /api/communications/status` / `PUT /api/communications/status` — exposes `approved_posts_count` and `autonomous_mode_enabled`; the PUT enforces the 10-approval gate server-side (defense in depth, not just a UI check). ### Frontend additions (vanilla JS dashboard, NOT React — the sprint plan mentions a "React SPA" but this repo's `product/app/` is plain HTML/CSS/JS with global-scope `