Skip to content

feat: Implement Synchronized Stopwatch Feature#140

Open
cahaseler wants to merge 4 commits intomainfrom
timer
Open

feat: Implement Synchronized Stopwatch Feature#140
cahaseler wants to merge 4 commits intomainfrom
timer

Conversation

@cahaseler
Copy link
Owner

@cahaseler cahaseler commented Apr 30, 2025

Synchronized Stopwatch Feature

Summary:
This pull request introduces a real-time synchronized stopwatch feature scoped per assessment, controllable by authorized facilitators or admins. It includes backend API routes using Server-Sent Events (SSE) for communication and an in-memory state store, along with various frontend components.

Key Changes:

Backend (API routes /api/stopwatch/*, utility web/app/utils/stopwatchState.ts):
Implemented SSE stream (/stream) for broadcasting state updates.
Created control endpoint (/control) for start/pause/reset/add_time actions with authorization.
Uses an in-memory Map (stopwatchState.ts) for state management per assessmentId.
Employs globalThis for state consistency in development.

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 1, 2025

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.

1 participant