From f117f7fb6239a983b226eb17d21475af32a002b7 Mon Sep 17 00:00:00 2001 From: peppa-bot Date: Thu, 26 Nov 2026 20:52:14 +0000 Subject: [PATCH] =?UTF-8?q?PEP-274:=20=C2=AB=D0=93=D0=BE=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=D0=B8=D0=BC=20=D1=81=D1=81=D1=8B=D0=BB=D0=BA=D1=83=C2=BB=20?= =?UTF-8?q?=D1=81=D0=BE=20=D1=81=D1=80=D0=BE=D0=BA=D0=BE=D0=BC,=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=B5=20=D1=87=D0=B0=D1=82=D0=B0=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=82=D0=B5=D0=BB=D0=B5=D1=84=D0=BE=D0=BD=D0=B5,=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BA=D0=B8=20=D0=B2=D0=BA?= =?UTF-8?q?=D0=BB=D0=B0=D0=B4=D0=BE=D0=BA?= 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)/chats/[chat]/page.tsx | 24 ++++++--- apps/web/app/(app)/feedback/page.tsx | 16 ++++-- apps/web/app/(app)/help/connect/page.tsx | 10 +++- apps/web/app/(app)/help/page.tsx | 7 +++ apps/web/app/(app)/help/shortcuts/page.tsx | 10 +++- apps/web/app/(app)/journal/page.tsx | 10 +++- .../web/app/(app)/observability/[id]/page.tsx | 7 +++ apps/web/app/(app)/p/[key]/page.tsx | 9 ++++ .../app/(app)/p/[key]/plan/[epic]/page.tsx | 7 +++ apps/web/app/(app)/page.tsx | 7 +++ apps/web/app/(app)/projects/new/page.tsx | 7 +++ apps/web/app/(app)/projects/page.tsx | 7 +++ apps/web/app/(app)/runners/page.tsx | 7 +++ apps/web/app/(app)/sessions/page.tsx | 7 +++ apps/web/app/(app)/settings/page.tsx | 7 +++ apps/web/app/(app)/t/[key]/page.tsx | 6 +++ apps/web/app/(app)/users/merge/page.tsx | 10 +++- apps/web/app/(app)/users/page.tsx | 10 +++- apps/web/app/(app)/welcome/page.tsx | 7 +++ apps/web/app/login/page.tsx | 10 +++- apps/web/app/mcp-guide/page.tsx | 10 +++- apps/web/app/oauth/authorize/page.tsx | 10 +++- apps/web/components/AttachField.tsx | 4 +- apps/web/components/Dictate.tsx | 2 +- apps/web/components/DictateButton.tsx | 3 +- apps/web/components/FeedbackButton.tsx | 52 +++++++++++++++++- apps/web/components/ProductCard.tsx | 22 +++++++- apps/web/components/ProgressOverview.tsx | 4 +- apps/web/lib/title.ts | 26 +++++++++ .../changes/pep-274-ux-small-fixes/design.md | 29 ++++++++++ .../pep-274-ux-small-fixes/proposal.md | 28 ++++++++++ .../specs/product-link/spec.md | 27 ++++++++++ .../specs/project-chats/spec.md | 22 ++++++++ .../specs/web-workspace/spec.md | 20 +++++++ .../changes/pep-274-ux-small-fixes/tasks.md | 17 ++++++ packages/core/src/product-link.ts | 4 +- packages/core/src/product.ts | 27 +++++++++- packages/core/src/progress.ts | 7 ++- packages/shared/src/i18n/en/project.ts | 9 ++++ packages/shared/src/i18n/kk/project.ts | 9 ++++ packages/testkit/test/page-titles.test.ts | 54 +++++++++++++++++++ packages/testkit/test/product.test.ts | 42 ++++++++++++++- 42 files changed, 578 insertions(+), 35 deletions(-) create mode 100644 apps/web/lib/title.ts create mode 100644 openspec/changes/pep-274-ux-small-fixes/design.md create mode 100644 openspec/changes/pep-274-ux-small-fixes/proposal.md create mode 100644 openspec/changes/pep-274-ux-small-fixes/specs/product-link/spec.md create mode 100644 openspec/changes/pep-274-ux-small-fixes/specs/project-chats/spec.md create mode 100644 openspec/changes/pep-274-ux-small-fixes/specs/web-workspace/spec.md create mode 100644 openspec/changes/pep-274-ux-small-fixes/tasks.md create mode 100644 packages/testkit/test/page-titles.test.ts diff --git a/apps/web/app/(app)/chats/[chat]/page.tsx b/apps/web/app/(app)/chats/[chat]/page.tsx index c867f609..b3488d44 100644 --- a/apps/web/app/(app)/chats/[chat]/page.tsx +++ b/apps/web/app/(app)/chats/[chat]/page.tsx @@ -21,12 +21,13 @@ import { AttachField } from "@/components/AttachField"; import { Workspace } from "@/components/Workspace"; import { Button } from "@/components/ui/button"; import { Textarea } from "@/components/ui/input"; -import { requireUser, words } from "@/lib/auth"; +import { currentUser, requireUser, words } from "@/lib/auth"; import { db } from "@/lib/db"; import { getT } from "@/lib/i18n"; import { cn } from "@/lib/utils"; import { cleanText, messageLink, STUCK_NOTICE } from "@/lib/chat-text"; import { chatOfferAction, linkChatAction, postChatAction, unlinkChatAction } from "../actions"; +import { pageTitle } from "@/lib/title"; type Params = { error?: string; thread?: string; link?: string; q?: string; list?: string }; @@ -34,6 +35,16 @@ const CHANNEL = "channel"; /** PEP-106: `?thread=feed` — the agents' events; no `thread` — the people's discussion. */ const FEED = "feed"; +// PEP-274: «Чат KEY — FORGE» (the chat list of the viewer — no names of chats they cannot see). +export async function generateMetadata({ params }: { params: Promise<{ chat: string }> }) { + const t = await getT(); + const user = await currentUser(); + const slug = (await params).chat; + const chat = user ? (await listChats(db, user)).find((c) => c.slug.toLowerCase() === slug.toLowerCase()) : null; + if (!chat) return pageTitle(t, t("Чаты")); + return pageTitle(t, chat.kind === "master" ? t("Все события") : t("Чат {key}", { key: chat.slug.toUpperCase() })); +} + /** «Чаты» (PEP-62): the master chat and project chats with threads; a linked Telegram group mirrors them. */ export default async function ChatPage({ params, searchParams }: { params: Promise<{ chat: string }>; searchParams: Promise }) { const user = await requireUser(); @@ -338,11 +349,12 @@ export default async function ChatPage({ params, searchParams }: { params: Promi {writable && (
-
-