From d403965f4936a4f97b438b7c008ec96835b89f19 Mon Sep 17 00:00:00 2001
From: GGlamer <52128225+Gamer201760@users.noreply.github.com>
Date: Sun, 27 Sep 2026 22:30:18 +0300
Subject: [PATCH] =?UTF-8?q?fix:=20=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82?=
=?UTF-8?q?=D0=B8=D0=B2=D1=8B=20=D0=BD=D0=B5=D0=B0=D0=BA=D1=82=D0=B8=D0=B2?=
=?UTF-8?q?=D0=BD=D1=8B=20=D0=BD=D0=B0=20=D0=BF=D0=B0=D1=83=D0=B7=D0=B5,?=
=?UTF-8?q?=20=D0=BE=D1=82=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=BD=D1=8B=D0=B5?=
=?UTF-8?q?=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BD=D0=B5=20=D1=83?=
=?UTF-8?q?=D1=85=D0=BE=D0=B4=D1=8F=D1=82=20=D0=B2=20=D0=B7=D0=B0=D0=BA?=
=?UTF-8?q?=D1=80=D1=8B=D1=82=D0=BE=D0=B5=20=D0=B7=D0=B0=D0=BD=D1=8F=D1=82?=
=?UTF-8?q?=D0=B8=D0=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/features/call/useCall.ts | 7 +++++++
frontend/src/pages/instructor/Instructor.tsx | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/frontend/src/features/call/useCall.ts b/frontend/src/features/call/useCall.ts
index c61caae..be4a2e9 100644
--- a/frontend/src/features/call/useCall.ts
+++ b/frontend/src/features/call/useCall.ts
@@ -60,6 +60,7 @@ export function useCall(sessionId: string | null) {
const patchTimer = useRef | null>(null);
const textMode = useRef(false);
const pausedRef = useRef(false);
+ const endedRef = useRef(false);
const append = useCallback((line: Line) => {
setLines((prev) => {
@@ -70,6 +71,7 @@ export function useCall(sessionId: string | null) {
useEffect(() => {
if (!sessionId) return;
+ endedRef.current = false;
const ch = callChannel(sessionId, {
onStatus: (next) => {
setStatus(next);
@@ -133,6 +135,7 @@ export function useCall(sessionId: string | null) {
setTimers(event.timers);
break;
case "call.ended":
+ endedRef.current = true;
setPhase("ended");
audio.current?.ambience.stop();
if (textMode.current) { setCardSubmitted(true); break; }
@@ -154,6 +157,10 @@ export function useCall(sessionId: string | null) {
setCallerSpeaking(false);
if (patchTimer.current) clearTimeout(patchTimer.current);
patchTimer.current = null;
+ } else if (endedRef.current) {
+ // Занятие завершили прямо на паузе: сервер снимает её после
+ // `call.ended`, и отложенные правки уже не войдут в оценку.
+ outbox.current = {};
} else {
// При переподключении сервер первым присылает состояние паузы.
// Только после этого повторяем правки, ожидающие подтверждения.
diff --git a/frontend/src/pages/instructor/Instructor.tsx b/frontend/src/pages/instructor/Instructor.tsx
index 0dc44c0..52e0f6f 100644
--- a/frontend/src/pages/instructor/Instructor.tsx
+++ b/frontend/src/pages/instructor/Instructor.tsx
@@ -708,7 +708,7 @@ export function Instructor() {
)}
{sessionId && session.title && !session.ended && (
- exercise === "call" &&
+ exercise === "call" &&
)}
{links && startPendingId && (
Создаём занятие. Ссылки появятся автоматически после подключения.