diff --git a/apps/web/app/(app)/p/[key]/page.tsx b/apps/web/app/(app)/p/[key]/page.tsx
index ac962dc3..50f4c153 100644
--- a/apps/web/app/(app)/p/[key]/page.tsx
+++ b/apps/web/app/(app)/p/[key]/page.tsx
@@ -80,10 +80,10 @@ function EnvLine({ name, r, t }: { name: string; r: Release | null | undefined;
);
}
-export default async function ProjectPage({ params, searchParams }: { params: Promise<{ key: string }>; searchParams: Promise<{ error?: string; created?: string; tab?: string; epic?: string; weeks?: string; actor?: string; channel?: string; edit?: string; saved?: string }> }) {
+export default async function ProjectPage({ params, searchParams }: { params: Promise<{ key: string }>; searchParams: Promise<{ error?: string; created?: string; checked?: string; tab?: string; epic?: string; weeks?: string; actor?: string; channel?: string; edit?: string; saved?: string }> }) {
const user = await requireUser();
const { key } = await params;
- const { error, created, tab: tabParam, epic: epicParam, weeks, actor, channel, edit, saved } = await searchParams;
+ const { error, created, checked, tab: tabParam, epic: epicParam, weeks, actor, channel, edit, saved } = await searchParams;
const t = await getT();
// PEP-119: «Продакт» sees the board, epics and bugs; the developer's tabs belong to «Инженер».
const w = await words();
@@ -526,9 +526,9 @@ export default async function ProjectPage({ params, searchParams }: { params: Pr
{mayChoose && (ownLogins.length > 0 || (agentWarning && !connected)) && (
-
{t("Агенты не запустятся:")} {t.text(agentWarning)}. {pool ? (superadmin ? {t("Подписки")} → : {t("Смените подписку в «⋯ Настройки проекта → Подписки» или попросите суперадмина проверить её.")}) : null} diff --git a/apps/web/components/SubscriptionSetup.tsx b/apps/web/components/SubscriptionSetup.tsx index 2c386da1..c339319e 100644 --- a/apps/web/components/SubscriptionSetup.tsx +++ b/apps/web/components/SubscriptionSetup.tsx @@ -6,6 +6,7 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { getT } from "@/lib/i18n"; import { CopyCode } from "@/components/CopyCode"; +import { AutoRefresh } from "@/components/AutoRefresh"; const step = "flex gap-2.5"; const num = "grid size-5.5 shrink-0 place-items-center rounded-full bg-primary/15 text-xs font-semibold text-primary"; @@ -14,14 +15,27 @@ const num = "grid size-5.5 shrink-0 place-items-center rounded-full bg-primary/1 * PEP-82: connecting the owner's own subscription without a terminal, in plain steps, right on * the project page — «Подключить Claude» / «Подключить ChatGPT», then the link and the code. */ -export async function SubscriptionSetup({ projectId, back, logins, shared = false, requested = false, direct = false, failed = [] }: { projectId: number; back: string; logins: OwnLogin[]; shared?: boolean; /** The owner already asked for the factory's subscription. */ requested?: boolean; /** A superadmin switches without a request. */ direct?: boolean; /** PEP-128: earlier sign-ins that did not finish. */ failed?: Array<{ provider: string; timedOut: boolean }> }) { +export async function SubscriptionSetup({ projectId, back, logins, shared = false, requested = false, direct = false, failed = [], checked = false, extra = false }: { projectId: number; back: string; logins: OwnLogin[]; /** PEP-148: the person pressed «проверить» and the sign-in is still not confirmed. */ checked?: boolean; /** PEP-148: the project already works on a subscription — this one is an extra. */ extra?: boolean; shared?: boolean; /** The owner already asked for the factory's subscription. */ requested?: boolean; /** A superadmin switches without a request. */ direct?: boolean; /** PEP-128: earlier sign-ins that did not finish. */ failed?: Array<{ provider: string; timedOut: boolean }> }) { const t = await getT(); if (logins.length) { return (
{t("Агенты уже работают на подключённой подписке. Вторая нужна только про запас — если она не нужна, нажмите «Отменить» внизу.")}
} + {/* PEP-148: the page asks ChatGPT itself every few seconds — the person does not have to press anything. */} + {l.provider !== "claude" &&+ {t("ChatGPT пока не подтвердил вход.")}{" "} + {t("Проверьте, что на странице ChatGPT вы вставили код и увидели сообщение о выполненном входе. Если после входа открылся обычный чат — вернитесь к шагу 2 и нажмите кнопку ещё раз. Эта страница проверяет сама каждые несколько секунд.")} +
+ )} {l.provider === "claude" && (