PEP-225: обновление без связи ждёт канал; AGENTS.md, tasks.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
peppa-bot 2026-11-20 21:37:49 +05:00
parent b4252cfe60
commit 8bb7c687a8
4 changed files with 17 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -162,6 +162,7 @@ export function Board({ cards: server, back }: { cards: Card[]; back: string })
return (
<section
key={c.id}
data-column={c.id}
aria-label={t(c.title)}
className={cn("flex min-h-32 flex-col gap-2 rounded-lg border bg-muted/40 p-2", over === c.id && "border-dashed border-primary bg-primary/5", collapsed && "min-h-0")}
onDragOver={(e) => {

View File

@ -4,7 +4,7 @@ import { useRouter } from "next/navigation";
import { useEffect, useRef } from "react";
import { cn } from "@/lib/utils";
import { useT } from "@/components/I18n";
import { applyIslands, useLive, useLiveMode, type LiveEvent, type LiveMode } from "@/lib/live";
import { applyIslands, liveClient, useLive, useLiveMode, type LiveEvent, type LiveMode } from "@/lib/live";
import { m } from "@peppa/shared/i18n";
const LABEL: Record<LiveMode, string> = {
@ -71,7 +71,8 @@ export function LiveRefresh({
const s = state.current;
s.timer = null;
if (!s.pending) return;
if (busy() || document.visibilityState !== "visible") {
// Offline a re-render fails into a full navigation to the browser's error page: wait for the channel.
if (busy() || document.visibilityState !== "visible" || !navigator.onLine || liveClient().mode !== "live") {
s.timer = setTimeout(flush, 2000);
return;
}

View File

@ -1,17 +1,17 @@
## 1. Сервер
- [ ] 1.1 Хаб: новые области (`attention`, `version`, `observe`, `subs`, `login:`, `me`), `parts` и строки задач в `change`, версия `v` и `since`, поставщики данных от веба
- [ ] 1.2 `runner/live-ws.ts`: протокол, права, лимиты, пинг, терминал через сокет
- [ ] 1.3 `apps/web/server.ts` + регистрация канала в `instrumentation.ts`, проверка cookie без `next/headers`
- [ ] 1.4 Запуск: `package.json`, `install-launchd.sh`, `live-deploy.sh` (переустановка агента веба)
- [x] 1.1 Хаб: новые области (`attention`, `version`, `observe`, `subs`, `login:`, `me`), `parts` и строки задач в `change`, версия `v` и `since`, поставщики данных от веба
- [x] 1.2 `runner/live-ws.ts`: протокол, права, лимиты, пинг, терминал через сокет
- [x] 1.3 `apps/web/server.ts` + регистрация канала в `instrumentation.ts`, проверка cookie без `next/headers`
- [x] 1.4 Запуск: `package.json`, `install-launchd.sh`, `live-deploy.sh` (переустановка агента веба)
## 2. Клиент
- [ ] 2.1 `lib/live.ts`: одно соединение, подписки со счётчиком, переподключение, догон, SSE-запасной путь, скрытая вкладка
- [ ] 2.2 `LiveRefresh` на канале: острова, пропуск рендера, индикатор
- [ ] 2.3 Доска и шапка задачи — точечно; чаты — только свой чат
- [ ] 2.4 `AttentionBadge`, `VersionWatch`, `AgentSteps`, `RunnerTerminal` на канале
- [ ] 2.5 Убрать `AutoRefresh` и опросы: observability, подписки, `SubscriptionSetup`, `OpenBotButton`
- [x] 2.1 `lib/live.ts`: одно соединение, подписки со счётчиком, переподключение, догон, SSE-запасной путь, скрытая вкладка
- [x] 2.2 `LiveRefresh` на канале: острова, пропуск рендера, индикатор
- [x] 2.3 Доска и шапка задачи — точечно; чаты — только свой чат
- [x] 2.4 `AttentionBadge`, `VersionWatch`, `AgentSteps`, `RunnerTerminal` на канале
- [x] 2.5 Убрать `AutoRefresh` и опросы: observability, подписки, `SubscriptionSetup`, `OpenBotButton`
## 3. Проверка
- [ ] 3.1 Тесты: права, своя/чужая область, догон, терминал через сокет, лимиты
- [ ] 3.2 Замер 50 вкладок (`scripts/bench-live.ts`), цифры в PR
- [ ] 3.3 typecheck, lint, тесты; браузер (в том числе узкий экран и обрыв связи)
- [x] 3.1 Тесты: права, своя/чужая область, догон, терминал через сокет, лимиты
- [x] 3.2 Замер 50 вкладок (`scripts/bench-live.ts`), цифры в PR
- [x] 3.3 typecheck, lint, тесты; браузер (в том числе узкий экран и обрыв связи)