From 4591575b8183a791cabae490990ff994da3b1fa7 Mon Sep 17 00:00:00 2001 From: Mickael Farina Date: Sun, 3 May 2026 14:48:52 +0200 Subject: [PATCH] =?UTF-8?q?fix(pwa):=20move=20Project=20mode=20to=20codec?= =?UTF-8?q?=5Fchat.html=20(correct=20page)=20=E2=80=94=20revert=20from=20d?= =?UTF-8?q?ashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Layout fix per user feedback: PR #24 placed the Project chip on the Flash chat composer in codec_dashboard.html. Wrong page — that's the floating mini-chat. The Chat / Think / Agents mode selector lives on the main Chat page (codec_chat.html) and Project belongs there. Changes: 1. codec_dashboard.html: revert all PR #24 additions (chip dropdown, status pills, sendCmd Project branch, polling). Dashboard back to pre-PR-24 state. 2. codec_chat.html — Project mode added next to Agents: - New Project button in #modeToggle, no emoji, target-icon SVG - setMode('project'): toggles button, hides crewSelect, swaps placeholder to "Drop your project here — describe what you want CODEC to build...", inserts on-screen instructions panel above the messages area with examples - sendMessage() Project branch: POST /api/agents (Step 8 dispatch), renders agent_id + Approve/Reject/View plan buttons inline in the chat thread - approveAgentInChat / rejectAgentInChat / viewAgentPlan handlers for the inline buttons (calls Step 8 endpoints, refreshes pills) - viewAgentPlan inlines the plan + permission manifest as an assistant message so user can review before approving - Status pills above input area: polls /api/agents every 5s, shows running/paused/blocked/awaiting_approval/draft_pending agents with inline approve/pause/resume/abort actions - 401/403 silently hides pills (no auth = no UI by design) No emojis on the new Project chip per user request — text-only "Project" matches the Chat / Think / Agents pattern. Reuses existing escHtml + showToast + scrollBottom + addMessage + chatHist + isProcessing + sendBtn pattern. No new CSS classes, just inline styles matching existing var(--accent) / var(--border) tokens. No Python changes — backend (Step 8 + 9 + 10 endpoints) all shipped. --- codec_chat.html | 191 ++++++++++++++++++++++++++++++++++++++++++- codec_dashboard.html | 135 ------------------------------ 2 files changed, 188 insertions(+), 138 deletions(-) diff --git a/codec_chat.html b/codec_chat.html index 1e3ebc1..ee43318 100644 --- a/codec_chat.html +++ b/codec_chat.html @@ -338,6 +338,7 @@

CODEC

Think +