feat(sprint6b): блоки D+F — pending_guard, guard-индикаторы в UI, race-condition fix

- _eval_pending_guard() — вычисляет активный guard при незаполненных слотах
- pending_guard добавлен в ThreadStateInfo (ответы /chat и /threads/:id)
- ValidationEventInfo получил guard_name / missing_slots / guard_description
- Sandbox: amber-блок «guard активен», подсветка в validation-событиях
- openThread() защищён от race condition: if (activeThreadId !== id) return
  (исключает отрисовку устаревшего треда после переключения на новый)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
AR 15 M4
2026-04-26 19:36:15 +05:00
parent c3b874dc37
commit d7ded5c9f1
4 changed files with 61 additions and 2 deletions
+4
View File
@@ -115,6 +115,7 @@ class ThreadStateInfo(BaseModel):
suspended_intent: str | None = None
resumable_step_code: str | None = None
resumable_slots: dict = Field(default_factory=dict)
pending_guard: dict | None = None
class BounceInfo(BaseModel):
@@ -129,6 +130,9 @@ class ValidationEventInfo(BaseModel):
current_step: str
requested_step: str
reason: str
guard_name: str | None = None
missing_slots: list[str] = Field(default_factory=list)
guard_description: str = ""
class ThreadDetailResponse(BaseModel):