Skip to content

Commit f72b4f4

Browse files
author
Vinicius Rocha
committed
fix: disable polling, restore CORS for port 2456 after PR JayantDevkar#55 merge
1 parent c04acd7 commit f72b4f4

6 files changed

Lines changed: 26 additions & 35 deletions

File tree

api/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ class Settings(BaseSettings):
8888
default=[
8989
"http://localhost:3000",
9090
"http://127.0.0.1:3000",
91+
"http://localhost:2456",
92+
"http://127.0.0.1:2456",
9193
"http://localhost:5173",
9294
"http://127.0.0.1:5173",
9395
"http://localhost:3001",

frontend/package-lock.json

Lines changed: 0 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/lib/components/LiveSessionsSection.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@
317317
fetchSessions();
318318
checkStuckSessions();
319319
// Poll every 3 seconds for live session status
320-
pollInterval = setInterval(fetchSessions, POLL_INTERVAL);
320+
// DISABLED: No polling - only historical sessions
321+
// pollInterval = setInterval(fetchSessions, POLL_INTERVAL);
321322
});
322323
323324
onDestroy(() => {

frontend/src/lib/components/LiveSessionsTerminal.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@
165165
checkStuckSessions();
166166
// Poll every 1 second for real-time status monitoring
167167
// TODO: Replace with SSE for true real-time
168-
pollInterval = setInterval(fetchSessions, 1000);
168+
// DISABLED: No polling - only historical sessions
169+
// pollInterval = setInterval(fetchSessions, 1000);
169170
});
170171
171172
onDestroy(() => {

frontend/src/lib/components/conversation/ConversationView.svelte

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -275,22 +275,23 @@
275275
});
276276
277277
// Polling watchdog: restart polling if it stopped while session is still live
278-
$effect(() => {
279-
if (!browser || !isCurrentlyLive) return;
280-
281-
// Check every 10 seconds if polling has stopped unexpectedly
282-
const watchdogInterval = setInterval(() => {
283-
// If session is live but no poll is scheduled or in progress, restart
284-
if (isCurrentlyLive && !pollTimeout && !isPolling) {
285-
console.log('[Polling Watchdog] Restarting stopped polling for live session');
286-
startPolling();
287-
}
288-
}, 10000);
289-
290-
return () => {
291-
clearInterval(watchdogInterval);
292-
};
293-
});
278+
// DISABLED: No live polling - only historical sessions
279+
// $effect(() => {
280+
// if (!browser || !isCurrentlyLive) return;
281+
282+
// // Check every 10 seconds if polling has stopped unexpectedly
283+
// const watchdogInterval = setInterval(() => {
284+
// // If session is live but no poll is scheduled or in progress, restart
285+
// if (isCurrentlyLive && !pollTimeout && !isPolling) {
286+
// console.log('[Polling Watchdog] Restarting stopped polling for live session');
287+
// startPolling();
288+
// }
289+
// }, 10000);
290+
291+
// return () => {
292+
// clearInterval(watchdogInterval);
293+
// };
294+
// });
294295
295296
function toggleTailing() {
296297
isTailing = !isTailing;

frontend/vite.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import tailwindcss from '@tailwindcss/vite';
44

55
export default defineConfig({
66
plugins: [sveltekit(), tailwindcss()],
7+
server: {
8+
port: 2456
9+
},
710
test: {
811
include: ['src/**/*.{test,spec}.{js,ts}'],
912
environment: 'jsdom',

0 commit comments

Comments
 (0)