From 2766cbfd0b4ab5e6ca0895ce68fccf5f44c28c34 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Sat, 14 Feb 2026 13:26:27 -0600 Subject: [PATCH] perf: Use tail-only replay by default for faster terminal loading - Change default to tailOnly=true (was false) - Reduce chunks from 500 to 200 - Applies to both FloatingTerminal and TerminalPage --- frontend/src/components/FloatingTerminal.vue | 4 ++-- frontend/src/pages/TerminalPage.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/FloatingTerminal.vue b/frontend/src/components/FloatingTerminal.vue index 9f92fff..305baed 100644 --- a/frontend/src/components/FloatingTerminal.vue +++ b/frontend/src/components/FloatingTerminal.vue @@ -547,9 +547,9 @@ function scrollTerminal(direction: 'up' | 'down' | 'end') { else renderer.scrollToBottom() } -function requestReplay(tailOnly = false) { +function requestReplay(tailOnly = true) { if (socket?.readyState === WebSocket.OPEN) { - socket.send(JSON.stringify({ type: 'request-replay', tailOnly, chunks: 500 })) + socket.send(JSON.stringify({ type: 'request-replay', tailOnly, chunks: 200 })) } } diff --git a/frontend/src/pages/TerminalPage.vue b/frontend/src/pages/TerminalPage.vue index 0102b82..7828c08 100644 --- a/frontend/src/pages/TerminalPage.vue +++ b/frontend/src/pages/TerminalPage.vue @@ -85,7 +85,7 @@ async function connect() { isResumedSession.value = !msg.isNew if (msg.hasHistory) { - socket?.send(JSON.stringify({ type: 'request-replay', tailOnly: false })) + socket?.send(JSON.stringify({ type: 'request-replay', tailOnly: true, chunks: 200 })) } else if (!msg.isNew) { renderer.writeln('\x1b[36m[Reconnected to existing session]\x1b[0m') }