From 5df52468c3fdac17156a8093435fb12446c3fc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=81=D0=B5=D0=BB=D1=8C?= Date: Fri, 13 Nov 2026 23:21:32 +0500 Subject: [PATCH] =?UTF-8?q?UI:=20project=20tabs=20(=D0=94=D0=BE=D1=81?= =?UTF-8?q?=D0=BA=D0=B0=20=C2=B7=20=D0=A0=D0=B5=D0=BB=D0=B8=D0=B7=D1=8B=20?= =?UTF-8?q?=C2=B7=20=D0=91=D0=B0=D0=B3=D0=B8=20=C2=B7=20=D0=A1=D0=B5=D1=81?= =?UTF-8?q?=D1=81=D0=B8=D0=B8),=20=C2=AB+=20=D0=A1=D1=82=D0=BE=D1=80=D0=B8?= =?UTF-8?q?=C2=BB=20dialog,=20goals=20into=20=E2=8B=AF=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- apps/web/app/(app)/p/[key]/page.tsx | 241 ++++++++++++++----------- apps/web/components/SettingsDialog.tsx | 20 +- 2 files changed, 151 insertions(+), 110 deletions(-) diff --git a/apps/web/app/(app)/p/[key]/page.tsx b/apps/web/app/(app)/p/[key]/page.tsx index 1f808ac7..a4125674 100644 --- a/apps/web/app/(app)/p/[key]/page.tsx +++ b/apps/web/app/(app)/p/[key]/page.tsx @@ -1,19 +1,20 @@ import { notFound } from "next/navigation"; -import { ExternalLink, Plus, Rocket, Target } from "lucide-react"; +import { ExternalLink, Plus, Rocket } from "lucide-react"; import { columnOf, currentReleases, describeRepo, isPlatform, listReleases, bugsinkWebhookBase, platformReleaseCandidate, type Release } from "@peppa/runner"; import { getIncidentSettings, listErrorSources, listIncidents, listMembers, repoAudience, repoVisibilityLabel } from "@peppa/core"; import { AutoRefresh } from "@/components/AutoRefresh"; import { PanelSection } from "@/components/ActivityAside"; import { Board, type Card } from "@/components/Board"; import { Hidden, SessionCard } from "@/components/cards"; -import { Disclosure, Empty, Flash, Key, Notice, PageHeader, Section } from "@/components/common"; +import { Empty, Flash, Key, Notice, PageHeader, Section } from "@/components/common"; import { IncidentsSection } from "@/components/Incidents"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; -import { Input, Textarea } from "@/components/ui/input"; +import { Input, NativeSelect, Textarea } from "@/components/ui/input"; import { SettingsDialog } from "@/components/SettingsDialog"; import { Workspace } from "@/components/Workspace"; import { requireUser } from "@/lib/auth"; +import { cn } from "@/lib/utils"; import { db } from "@/lib/db"; import { board, projectForUserByKey, projectSessions } from "@/lib/queries"; import { addGoal, addProjectMember, addTask, deployProdAction, grantRepoAccessToMembers, removeProjectMember } from "../../actions"; @@ -26,6 +27,13 @@ const RELEASE_STATUS: Record @@ -46,10 +54,11 @@ function EnvLine({ name, r }: { name: string; r: Release | null | undefined }) { ); } -export default async function ProjectPage({ params, searchParams }: { params: Promise<{ key: string }>; searchParams: Promise<{ error?: string; created?: string }> }) { +export default async function ProjectPage({ params, searchParams }: { params: Promise<{ key: string }>; searchParams: Promise<{ error?: string; created?: string; tab?: string }> }) { const user = await requireUser(); const { key } = await params; - const { error, created } = await searchParams; + const { error, created, tab: tabParam } = await searchParams; + const tab = TABS.find((t) => t.id === tabParam)?.id ?? "board"; const p = await projectForUserByKey(user.id, key).catch(() => null); if (!p) notFound(); const [{ goals, tasks }, sessions, team, repo, incidentSettings, sources, incidents, releases, current] = await Promise.all([ @@ -71,8 +80,7 @@ export default async function ProjectPage({ params, searchParams }: { params: Pr repo.collaborators !== null && login.toLowerCase() !== p.giteaOwner.toLowerCase() && !collaborators.has(login.toLowerCase()); const missingAccess = team.members.some((m) => noRepoAccess(m.login)); const isOwner = p.ownerId === user.id; - const back = `/p/${p.key}`; - const groups = [...goals.map((g) => ({ goal: g })), { goal: null }]; + const back = tab === "board" ? `/p/${p.key}` : `/p/${p.key}?tab=${tab}`; const goalTitle = new Map(goals.map((g) => [g.id, g.title])); const cards: Card[] = tasks.map((t) => ({ key: `${p.key}-${t.number}`, @@ -159,9 +167,39 @@ export default async function ProjectPage({ params, searchParams }: { params: Pr )} {isOwner &&

Участник видит доску и входящие, двигает карточки и отвечает агентам; получает доступ на запись к репозиторию.

} + + +
    + {goals.map((g) => ( +
  • ◎ {g.title}
  • + ))} +
+
+ + +