Skip to content

feat: redesign and PTT#3

Merged
dvald merged 2 commits intodevfrom
feat/redesign
Mar 22, 2026
Merged

feat: redesign and PTT#3
dvald merged 2 commits intodevfrom
feat/redesign

Conversation

@dvald
Copy link
Copy Markdown
Owner

@dvald dvald commented Mar 22, 2026

Session experience redesign + PTT fix + emotion system

Full visual redesign

Landing page (index.vue)

  • New "séance" atmosphere with mystic design: fog gradients, grain overlay, ambient orbs
  • Spirit cards with glassmorphism for character selection
  • Dedicated CSS effects in seance-effects.css (+190 lines): fog animations, glow, ectoplasm, slow pulse

Session page (session.vue)

  • Layout switched from landing to seance — inherits shared SeanceHeader (gold logo, "Archive Verified" badge)
  • Removed duplicate inline header
  • Monolithic session.vue broken into dedicated components

New components

  • SeanceHeader.vue — Fixed shared header between landing and session (logo + navigation)
  • SessionPortrait.vue — Persona portrait with audio-reactive circular glow (ectoplasm blobs driven by frequency data)
  • SessionControls.vue — Session controls (mic, stop, PTT) with fixed layout that doesn't shift on state changes
  • SessionEndedOverlay.vue — End-of-session modal with transcript, featured quote, and share buttons
  • SessionTranscriptOverlay.vue — Real-time transcript overlay
  • ShareButtons.vue — Social media share buttons

New layout

  • seance.vue — Layout wrapper with CookieControl + SeanceHeader

Emotion color system with real differentiation

Emotion colors completely redesigned — previously everything was indistinguishable gold/amber variations:

Emotion Color Visual
angry #d94a2b Fiery red-orange
serious #c05a3a Deep red-amber
excited #f5c842 Vivid yellow
surprised #f0e060 Lemon flash
sad #6a7a8a Cold steel blue-grey
thoughtful #8aaa9a Sage green-grey
melancholy #7a6a4a Dark somber brown
whispers #9a8a6a Dim warm grey
laughing #f2c36b Warm gold (brand)

Variable intensity per emotion: angry (×1.8), excited (×1.5), serious (×1.5) amplify blob size and brightness. Whispers (×0.6), pause (×0.4) dim them down.

Push-to-Talk — Complete rewrite

  • Removed ScriptProcessorNode: was capturing silence (0.0000 amplitude) because a second AudioContext couldn't access the mediaStream already consumed by VAD
  • New VAD-based approach: PTT uses the same audio pipeline as auto mode. While button is held, VAD segments accumulate. On release, all segments are merged and sent as a single WAV
  • Flush mechanism: on button release, waits for VAD's natural onSpeechEnd with a 3-second fallback that force-pauses VAD before giving up
  • pttWaitingForSpeechEnd: keeps accumulation window open after button release so late VAD segments aren't lost
  • redemptionMs: 150: lowered from 700ms default so VAD fires onSpeechEnd faster after natural silence gaps

Backend

  • WebSocket: Monitor.info logs for audio-chunk and speech-end reception (previously debug-only, invisible in production)
  • STT diagnostics: WAV header validation logging (RIFF signature, sample rate, bits per sample) before sending to ElevenLabs
  • Privacy: removed writeFileSync calls that were saving user audio to disk. User transcript content is no longer logged (only length)
  • maxPayload: WebSocket server set to 10MB to handle large audio chunks
  • Personas API: new imageUrl field in personas endpoint

i18n

  • New translations in en.json and es.json for all session texts, controls, overlays, and states

Files changed (14 modified + 7 new)

New:

  • frontend/components/seance/SeanceHeader.vue
  • frontend/components/session/SessionControls.vue
  • frontend/components/session/SessionEndedOverlay.vue
  • frontend/components/session/SessionPortrait.vue
  • frontend/components/session/SessionTranscriptOverlay.vue
  • frontend/layouts/seance.vue
  • backend/src/controllers/api/api-session.ts

Modified:

  • frontend/pages/session.vue — Full refactor (+497 changes)
  • frontend/pages/index.vue — New landing design
  • frontend/assets/css/seance-effects.css — Visual effects (+190 lines)
  • frontend/composables/useVoiceInput.ts — PTT rewrite
  • frontend/composables/useOrchestratorSocket.ts — WS logging
  • backend/src/services/conversation-engine-service.ts — STT + privacy
  • backend/src/controllers/websocket/websocket.ts — maxPayload + logging
  • backend/src/config/personas.ts — imageUrl
  • backend/src/controllers/api/api-personas.ts — imageUrl in response
  • frontend/i18n/locales/en.json + es.json — Session translations
  • frontend/api/definitions.ts + mobile + test bindings — Updated API

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements a “séance” themed redesign for the landing + session experiences, rewrites push-to-talk to share the VAD pipeline, and extends the personas/session APIs to support richer UI (portrait + quotes) and a generated “featured quote” on session end.

Changes:

  • Refactors session.vue into a new seance layout and new UI components (portrait, controls, overlays).
  • Reworks PTT to accumulate VAD segments and send a single WAV on release.
  • Adds personas fields (image/quote) and a new session API endpoint for quote generation; updates generated API bindings.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
web-application/frontend/pages/session.vue Seance UI refactor + sources drawer + new components wiring
web-application/frontend/pages/index.vue New landing page design + persona grid rework
web-application/frontend/layouts/seance.vue New shared seance layout (header + cookie control)
web-application/frontend/i18n/locales/en.json Adds/removes translation keys for new UI copy
web-application/frontend/i18n/locales/es.json Adds/removes Spanish translations for new UI copy
web-application/frontend/composables/useVoiceInput.ts PTT rewrite to use VAD accumulation/flush
web-application/frontend/composables/useOrchestratorSocket.ts Adds WS send/receive logging
web-application/frontend/components/session/SessionTranscriptOverlay.vue New transcript overlay component
web-application/frontend/components/session/SessionPortrait.vue New audio-reactive portrait/glow component
web-application/frontend/components/session/SessionEndedOverlay.vue New end-of-session overlay + quote generation call
web-application/frontend/components/session/SessionControls.vue New stable controls bar + PTT interaction
web-application/frontend/components/seance/SeanceHeader.vue New shared header for seance layout
web-application/frontend/assets/css/seance-effects.css Adds atmospheric CSS effects + shared glassmorphism styles
web-application/frontend/api/definitions.ts Generated API types updated (persona image/quote fields)
web-application/backend/test/mocha/test-tools/api-bindings/definitions.ts Test API bindings updated to match new persona fields
web-application/backend/src/services/conversation-engine-service.ts Adds production-visible logging + transcript privacy adjustments
web-application/backend/src/controllers/websocket/websocket.ts Adds WS logging and message size diagnostics
web-application/backend/src/controllers/api/api-session.ts New session endpoint for generating a featured quote
web-application/backend/src/controllers/api/api-personas.ts Personas API response extended with image/quote fields
web-application/backend/src/config/personas.ts Persona config extended with image/quote fields
mobile-application/src/api/definitions.ts Mobile generated API types updated (persona image/quote fields)

Comment on lines +572 to +589
console.log("[SESSION] onPushStart called, micMode:", micMode.value, "isListening:", _isListening.value);
console.log("[SESSION] startManualRecording is:", typeof startManualRecording);
try {
startManualRecording();
console.log("[SESSION] startManualRecording returned OK");
} catch (err) {
console.error("[SESSION] startManualRecording THREW:", err);
}
}

function onPushEnd() {
stopManualRecording();
console.log("[SESSION] onPushEnd called");
try {
stopManualRecording();
console.log("[SESSION] stopManualRecording returned OK");
} catch (err) {
console.error("[SESSION] stopManualRecording THREW:", err);
}
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove or guard the debug console logging added to the push-to-talk handlers (console.log/console.error). Leaving these in production will spam the browser console and can leak implementation details; if you still need them, wrap behind a dev flag (e.g. import.meta.env.DEV).

Copilot uses AI. Check for mistakes.
function send(message: any) {
wsSend(JSON.stringify(message));
const json = JSON.stringify(message);
console.log("[WS] send:", message.type, "payload size:", json.length, "ws status:", status.value);
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid unconditional console logging for all WS traffic (both received events and send payload sizes). This will be very noisy in production; either remove it or gate it behind a dev-only flag.

Suggested change
console.log("[WS] send:", message.type, "payload size:", json.length, "ws status:", status.value);
if (import.meta.env.DEV) {
console.log("[WS] send:", message.type, "payload size:", json.length, "ws status:", status.value);
}

Copilot uses AI. Check for mistakes.
Comment on lines +220 to +233
console.log("[PTT] pointerdown fired, pttActive:", pttActive);
if (pttActive) return;
pttActive = true;
console.log("[PTT] emitting push-start");
emit("push-start");
window.addEventListener("pointerup", onPttUp, { once: true });
window.addEventListener("pointercancel", onPttUp, { once: true });
}

function onPttUp() {
console.log("[PTT] pointerup/cancel fired, pttActive:", pttActive);
if (!pttActive) return;
pttActive = false;
console.log("[PTT] emitting push-end");
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PTT control currently logs multiple debug statements to console on pointerdown/up. Please remove these (or gate them behind a dev-only flag) to avoid noisy production logs.

Suggested change
console.log("[PTT] pointerdown fired, pttActive:", pttActive);
if (pttActive) return;
pttActive = true;
console.log("[PTT] emitting push-start");
emit("push-start");
window.addEventListener("pointerup", onPttUp, { once: true });
window.addEventListener("pointercancel", onPttUp, { once: true });
}
function onPttUp() {
console.log("[PTT] pointerup/cancel fired, pttActive:", pttActive);
if (!pttActive) return;
pttActive = false;
console.log("[PTT] emitting push-end");
if (pttActive) return;
pttActive = true;
emit("push-start");
window.addEventListener("pointerup", onPttUp, { once: true });
window.addEventListener("pointercancel", onPttUp, { once: true });
}
function onPttUp() {
if (!pttActive) return;
pttActive = false;

Copilot uses AI. Check for mistakes.
@dvald dvald merged commit 8520661 into dev Mar 22, 2026
@dvald dvald deleted the feat/redesign branch March 22, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants