Repository navigation
feat(chat): preview the chat in the real sources from the panel - #335
Merged
Merged
Conversation
Widgets › Chat gets «Simular mensajes en Meld»: every real chat source (default, variants, custom overlay slots) plays the panel preview's sample messages for 120 s, then restores its real messages. Ephemeral server state (src/chat-preview.mjs) broadcast as the chatPreview event, also on connect; nothing is written to the chat, history or metrics. POST/GET /api/chat/preview and MCP vista_previa_chat.
# Conflicts: # docs/estado.md # public/widgets/chat.html # test/groups.json
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #334. Widgets › Chat gets «Simular mensajes en Meld»: every real chat source (default chat, variants and custom overlay slots) plays the same sample messages as the panel preview for 120 s, with a countdown in the button, then shows its real messages again.
src/chat-preview.mjs: ephemeral state (never persisted) with an auto-off timer, broadcast as the new ephemeral eventchatPreview{ on, until }to widget and panel clients, and sent on connect so a source loaded mid-preview joins it.POST /api/chat/preview{ on, seconds? }(1–600, default 120) andGET /api/chat/preview; invalid requests return 400 and change nothing./api/chat/simulateis not reused because it writes the chat history.public/widgets/chat.html: runtime switch between the real chat and the demo stream; keeps a buffer of real messages (also those received during the preview) to restore them.ChatWidget.tsx;live.tsregisterschatPreview.vista_previa_chat; README anddocs/estado.md.Validation
test/chat-preview.test.mjs(defaults, SSE frames, late source joins, auto-off, invalid requests unchanged, no chat history) andtest/chat-preview-browser.test.mjs(a real source plays the demo and restores its real messages; the panel button starts and stops it with the countdown) — RED before, GREEN after.test/events-contract.test.mjs, alltest/chat*.test.mjs,routes-chat(route list updated).interview-rounds-browser, passes alone (flaky under load, unrelated).Linked issue
Closes #334