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>
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>
useSessionStore is the single source of truth for session id/status,
the objective draft/confirmation flags and the chat history. Status
is never computed client-side - it always comes straight from what
window.api.sessions.* actually returned, per the PipelineStepper rule
in docs/Max_Composants_Frontend.md.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>