Two pieces of direct user feedback, addressed together since they touch
the same files:
1. ObjectiveValidationCard now lives in its own dedicated, movable
window (objectiveWindow.ts / ObjectiveWindowRoot.tsx), independent
of the text input window. Confirming an objective must never depend
on opening that window, including when the whole exchange happens
by voice. Both sendTextTurn and voice-turn open/feed this window
through the same shared handleRouteMessageResult code path, so text
and voice behave identically - no more special-casing one channel.
2. The "chat window" was never meant to be a chat: it's an alternate
text entry point for the exact same voice pipeline. Removed the
message history/ChatBubble display and the old
sessions:route-message + voice-turn-synced plumbing that existed to
sync a conversation transcript across windows. Replaced with a new
text-turn IPC handler mirroring voice-turn (routeMessage ->
handleRouteMessageResult -> synthesizeSpeech) minus the STT step;
the reply is relayed to the avatar window via the existing
proactive-speech channel and spoken aloud, never displayed. The
input window shrinks accordingly (560px -> 100px tall) and no
longer auto-opens when a session starts, since there is nothing to
show there anymore - it only opens on explicit user request.
useProactiveSpeech now accepts an onStateChange callback so the avatar
status indicator correctly flips back to idle once a text-turn reply
finishes playing (it previously only ever got set to 'speaking', never
reset - a latent gap this reuse surfaced).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A learn-intent conversation driven entirely by voice never reached
ObjectiveValidationCard: the chat window's Zustand store lives in its
own isolated renderer process and only ever updated from its own
direct sessions:route-message calls, never from voice-turn results
handled in the main process. A user doing everything by voice could
never see or confirm their objective.
The main process now opens the chat window and broadcasts the voice
turn (reply/ready/draft) to it whenever intent is 'learn'; the chat
window's store applies it the same way it applies its own responses.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace the chat window's unconditional create-session-then-send flow
with a single call to the new POST /sessions/messages endpoint: a
plain "salut ça va ?" no longer starts a fake training session, since
the backend's intent router decides that now.
Add sessions.routeMessage to the IPC/preload surface and the sessions
HTTP client. useSessionStore.sendMessage only sets sessionId/status
(fetched fresh via sessions:get) when the backend actually reports
type: "learn". The stepper-window-open + status-broadcast trigger in
main/index.ts moves from sessions:create's handler to
sessions:route-message's, since session creation now happens inside
the backend's routing logic rather than via an explicit prior call.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- ChatPanel now fills its own window instead of being absolutely
positioned over the avatar; its interactive regions (messages,
input bar, objective card) opt out of the window's drag region so
they stay clickable/selectable while the rest of the panel can be
used to move the window.
- New StepperView: the #stepper window's root component, relays
"session-status-changed" from the main process into its own
Zustand store instance (new setStatus action) since this window has
no direct access to the chat window's state.
- App.tsx no longer renders ChatPanel/PipelineStepper at all (they
live in separate windows now) or resizes itself - it only toggles
the chat window via IPC and keeps a local optimistic flag for the
context menu's checkmark, resynced if the window is closed
externally.
- Fixed AvatarStatusIndicator's position: .avatar-status-anchor used
to be computed from the in-window chat panel's height
(bottom: calc(2% + 64vh + ...)), which misplaced it once that panel
stopped living in this window. It now mirrors .thinking's simple
fixed anchor above the avatar's head.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Per user feedback after visually testing the app: the chat and the
pipeline stepper were a single combined panel, which the user wanted
split. Rename SessionPanel to ChatPanel (chat history + objective
validation + input bar only, no stepper), rendered only while a new
chatOpen flag is true - toggled via the context menu's "Ecrire un
message" item, not shown automatically on login.
The PipelineStepper now lives directly in App.tsx and only mounts once
useSessionStore.sessionId is set (i.e. the user has actually started a
training session, not just logged in). It's anchored to the right edge
of the window, vertically centered, instead of stacked above the
avatar: the window itself grows from 420 to 620px wide via the new
set-pipeline-panel-visible IPC call whenever a session becomes active,
and shrinks back when it doesn't. A new .avatar-stage wrapper keeps the
avatar/chat panel's own layout anchored to a fixed 420px column so it
doesn't re-center across the wider window.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>