Commit e92caa3
feat(ux): 2026 overhaul — continuity, voice in/out, live preview, calmer palette
User feedback after first Project-mode run was blunt and right:
"too bright, messy, Windows 2001, CODEC doesn't speak, scary, not 2026."
This is a multi-front fix.
#1 — Conversational continuity (chat → running agent routing)
─────────────────────────────────────────────────────────────
Before: every Project-mode send drafted a fresh agent. Typing "how's
it going?" while one was running spawned a *second* project for that
question, exactly as the user reported in his screenshot.
Now:
• `_activeAgentId` binds a Project-mode chat thread to the first agent
drafted from it. Survives reloads via localStorage.
• Next sends route to POST /api/agents/{id}/messages (existing reply
queue) instead of drafting a new project.
• Pulsing chip above the composer: "Talking to agent_09aab9…" × exit
• Auto-clears when the bound agent reaches done/failed/aborted (poll
piggybacks on existing 5s status-pill tick).
• Brief 2s reply-poll surfaces the agent's response in-thread.
#2 — Auto-grant paths the user typed
────────────────────────────────────
Before: the CONSCRIPTED prompt mentioned ~/conscripted-2026/ four
times, agent still blocked on read_path_not_authorized.
Now: codec_agent_plan.merge_user_paths_into_manifest() runs after
draft_plan returns. Extracts ~/foo, $HOME/foo, /Users/<n>/foo from
the description, injects them into the manifest:
• write verbs (save/write/download/output/generate/export/log to)
within ±60 chars → write_paths (which also implies readable)
• otherwise → read_paths
• _PATH_BLOCKLIST_SUBSTRINGS drops ~/.ssh, ~/.aws, ~/.gnupg,
/etc, /var, /System, ~/.codec/secrets etc. — these stay
behind the approval wall regardless of what the user typed.
• Idempotent: re-merge adds 0.
Verified on the actual CONSCRIPTED description — 5 paths injected,
including the lookbook output dir and log path. ~/.ssh + ~/.aws
correctly excluded by blocklist. URLs ignored.
#3 — Voice in / Voice out (the "tongue")
─────────────────────────────────────────
Before: voiceReplyEnabled toggle existed in the side panel but was
never read. CODEC literally never spoke.
Now:
• addMessage('assistant', …) → if voiceReplyEnabled, plays Kokoro
via /api/tts. New Speak button per assistant message for manual
playback regardless of toggle.
• Speak toggle promoted into the composer mode-bar (was buried in
side panel) — same toggleVoiceReply() backend so state stays
in sync between both controls.
• Pilot tab gets its own 🎤 mic + 🔇/🔊 speak buttons. Voice input
via Web Speech API populates pilotTaskInput. Pilot speaks "Agent
started", "Run complete", "Replay completed N of M steps" via
pilotSay() → Kokoro.
• Per-run terminal-state transitions tracked in
_pilotLastSpokenStatus to avoid repeating completion announcements.
#4 — Live preview panel (see what the agent is doing)
──────────────────────────────────────────────────────
Before: while an agent was working, the user saw status pills and
nothing else. Had to leave CODEC and open the project folder in an
IDE to see what was happening.
Now:
• New GET /api/agents/{id}/files — walks project_dir up to 3 levels,
returns most-recently-modified files (mtime-sorted, capped at 2K
scanned, skips .git / node_modules / .venv etc.).
• Live-preview slide-out anchored under the activeAgentChip. Polls
every 5s while open. Shows rel path, size, "Ns/m/h ago" per file.
• "👁 preview" toggle on the chip; "📂 open folder" calls existing
open_folder endpoint to surface the dir in Finder.
• Toggle state persisted in localStorage.
#5 — 2026 palette (calmer, less "Windows 2001")
────────────────────────────────────────────────
The visible-on-bright-cream-light-mode pure orange (#E8711A) was
the loudest offender. Coupled with high-saturation green/yellow/
red/blue/purple node colors on the Cortex map, the whole thing
hit the "Windows XP control panel" register.
Now (all three product HTMLs):
• Dark mode accent: #E8711A → #d97757 (warmer coral, kept the
brand orange family, dropped saturation)
• Light mode accent: #E8711A → #b85a3a (was *jarring* on the
cream bg — light mode now has its own calmer accent)
• Light mode surfaces: #f7f5f2 → #faf8f5, borders softened
• Dark mode surfaces & borders: tightened to the zinc family
• Cortex node palette swap (111 occurrences via codepath replace):
#ffd740 → #fbbf24 #00e676 → #34d399 #448aff → #60a5fa
#b388ff → #a78bfa #ff9544 → #f59e0b #ff3d3d → #f87171
#34c759 → #22c55e #29b6f6 → #38bdf8 #E8711A → #d97757
Same hues, dropped saturation, modern Tailwind-500 family.
Brand recognition intact — just stops shouting.
Files
─────
codec_agent_plan.py +109 lines: path extraction + merge helper,
wired into create_agent
codec_chat.html +292 lines: continuity binding, reply-poll,
speak-on-assistant, Speak mode-btn,
live-preview panel, palette
codec_cortex.html ±222 lines: 111 color tone-downs, root palette
codec_tasks.html +85 lines: pilotMic/Speak/Say, palette, run
lifecycle TTS announcements
routes/agents.py +61 lines: /api/agents/{id}/files endpoint
Live-tested
───────────
• extract_user_paths on the actual CONSCRIPTED description: 5 paths
injected (3 read, 2 write), ~/.ssh + ~/.aws blocked, URLs ignored,
idempotent re-merge.
• /api/tts reachable, Kokoro :8085 healthy.
• /api/agents/{id}/files registered (auth-gated like /messages).
• All services online after restart, dashboard responds 200.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 9ed6dd8 commit e92caa3
5 files changed
Lines changed: 640 additions & 129 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
736 | 834 | | |
737 | 835 | | |
738 | 836 | | |
| |||
788 | 886 | | |
789 | 887 | | |
790 | 888 | | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
791 | 900 | | |
792 | 901 | | |
793 | 902 | | |
| |||
0 commit comments