Files
paseo/packages/website/src/components/mockup/mobile/chat.tsx
T
Mohamed Boudra bd15e40e94 Serve paseo.sh in Simplified Chinese (#7373)
* feat(website): serve paseo.sh in Simplified Chinese

Every page of the website now has a Simplified Chinese version under
/zh-CN: the interface, docs, blog posts, comparison pages, legal pages,
all changelog releases and the homepage mockup. English URLs are unchanged.

The URL alone decides the language. There is no browser-language redirect
and no stored preference, because either would have to redirect the
unprefixed English URLs that people share and search engines index.
Internal links carry the page's language instead, and hreflang alternates
point Chinese search results at /zh-CN.

Translated headings pin the English anchor with {#id}, so section links
work in both languages. content-translations.test.ts fails when a page
has no translation or a translation's headings drift from the English.
Changelog releases and plugin listings without a translation render
whole in English under a notice, so a release never waits on one.

Plugin manifests and the registry gain optional translations and
OVERVIEW.zh-CN.md fields; older clients and registries ignore them.

* feat(website): replace the native language select with an EN/ZH menu

The header showed an OS-native select whose popup did not match the site.
The trigger now shows the language abbreviated (EN, ZH) and opens a menu in
the app's dropdown style that names each language in itself, with its name
in the page language underneath. Rows are real links to the same page in
that language; arrows, Escape, outside presses and taps behave as a menu
button, and the menu keeps itself on screen when a narrow header pushes the
trigger toward an edge.

Also drops the stray space after the full-width comma in the Chinese
homepage subtitle.

* docs(website): translate main's new docs and 0.12.0 release notes

Main added Keep run workspaces to the schedules docs, rewrote plugin icons
around inline SVG, and promoted 0.12.0 with new entries. Bring the Chinese
pages and changelog in line so no section falls back to English.

* fix(server): leave plugin listing translations to the registry

The daemon rejected manifests whose translations the registry would refuse,
so a plugin main installs could fail to load here. Paseo never reads
translations; the registry validates them at publish. Docs now say which
checks are automated at publish and which are human review.

* docs(plugins): describe the registry's final overview translation discovery

* style(server): format manifest test

* test(app): measure sidebar rows one at a time

After a reload the developer error toast appears while expectVerticalOrder
measures every row at once. Each concurrent boundingBox runs the toast
locator handler, and only one of them resumes, so the poll timed out on
every attempt since #7424. Measuring sequentially keeps one action in flight.

* test(app): return sidebar row measuring to main

#7480 hides the developer toast instead of running a locator handler, so
measuring the rows concurrently no longer races it. Reverts 41ac23016.

* test(app): wait for the compact shell before opening compact Changes

The shell survives the breakpoint, so right after the resize the wide
Explorer could still be visible: the test skipped the Explorer toggle and
the tab then disappeared, or toggled at the wrong time. Wait for the
compact-shell marker, as the composer helpers do since #7424.

* docs(website): translate main's plugin file panel docs

* test(app): edit the code font size after the font family remount

A committed appearance change remounts the settings screen through
AppearanceStyleBoundary, and the new form starts from the stored size.
Filling the size before that remount lost the edit in CI.

* docs(website): translate main's client/ui import docs

Follows #7474: one /client/ui entry, StreamedText instead of useRevealedText,
SettingsGroup dropped from the settings table, and the new
'UI imports in v0.13' migration section.

* test(app): wait for the previous layout's file panel picker to leave

After a resize the old layout's picker animates out while the new one is
already mounted, so the Use button matched two elements and the strict
locator failed. Wait for the shell's layout and a single picker first.
2026-10-21 13:13:03 +07:00

162 lines
5.8 KiB
TypeScript

// Mobile agent chat — the counterpart of the desktop chat pane, drawn at phone
// width. Maps to the "agent chat" reference screenshot: header, collapsed slash
// command, muted tool-call rows, an assistant turn, the diff-stat pill, and the
// composer. Presentational only; colors come from the `--color-mock-*` tokens.
import {
AudioLines,
ChevronDown,
Copy,
LoaderCircle,
Menu,
Mic,
MoreHorizontal,
PanelRight,
Play,
Plus,
Server,
Split,
SquareTerminal,
} from "lucide-react";
import type * as React from "react";
import { useTranslation } from "react-i18next";
import { CodexIcon } from "../icons";
const TOOL_ROWS = [
"sed -n '321,680p' docs/release.md",
'"for p in highlight relay protocol client plu…',
"npx eas workflow:view 01a0493d-01cd-77…",
"gh release view v0.7.0-beta.2 --json name…",
"gh run list --commit 4e60c2880b4c9ebd…",
"docker buildx imagetools inspect ghcr.io/g…",
];
function Header() {
return (
<div className="flex shrink-0 items-center gap-[14px] px-[18px] pt-[6px] pb-[12px]">
<Menu size={22} className="shrink-0 text-mock-fg" strokeWidth={1.9} />
<span className="min-w-0 flex-1">
<span className="block text-[18px] font-semibold leading-[21px] text-mock-fg">Paseo</span>
<span className="mt-[2px] flex items-center gap-[5px] text-[13px] leading-[16px] text-mock-fg-muted">
<span className="shrink-0">paseo ·</span>
<Server size={12} className="shrink-0" />
<span className="truncate">Mohameds-MacBook-Pro.l…</span>
</span>
</span>
<span className="flex shrink-0 items-center gap-[17px] text-mock-fg-muted">
<MoreHorizontal size={20} />
<Play size={19} strokeWidth={1.8} />
<PanelRight size={19} strokeWidth={1.8} />
</span>
</div>
);
}
function SlashRow() {
return (
<div className="flex shrink-0 items-center gap-[11px] border-y border-mock-border px-[18px] py-[13px]">
<CodexIcon size={19} className="shrink-0 text-mock-fg" />
<span className="flex-1 text-[17px] text-mock-fg">/release-beta</span>
<ChevronDown size={19} className="shrink-0 text-mock-fg-muted" />
</div>
);
}
function ToolRow({ command }: { command: string }) {
return (
<div className="flex items-center gap-[13px] py-[7px] text-mock-fg-muted">
<SquareTerminal size={19} className="shrink-0" strokeWidth={1.7} />
<span className="shrink-0 text-[16px]">Shell</span>
<span className="min-w-0 flex-1 truncate text-[16px]">{command}</span>
</div>
);
}
function InlineCode({ children }: { children: React.ReactNode }) {
return (
<code className="rounded-[4px] bg-mock-surface2 px-[5px] py-[1px] font-mono text-[13.5px] text-mock-fg">
{children}
</code>
);
}
function Bullet({ children }: { children: React.ReactNode }) {
return (
<div className="flex gap-[12px] text-[16.5px] leading-[24px] text-mock-fg">
<span className="text-mock-fg-muted">•</span>
<span className="min-w-0 flex-1">{children}</span>
</div>
);
}
function Transcript() {
return (
<div className="px-[18px]">
{TOOL_ROWS.map((command) => (
<ToolRow key={command} command={command} />
))}
<div className="my-[14px] h-px bg-mock-border" />
<p className="text-[16.5px] leading-[24px] text-mock-fg">Still in progress:</p>
<div className="mt-[14px] space-y-[7px]">
<Bullet>npm tags and release notes are correct</Bullet>
<Bullet>
Docker beta image is published; <InlineCode>latest</InlineCode> remains unchanged
</Bullet>
<Bullet>iOS build succeeded; TestFlight distribution/Beta App Review is running</Bullet>
<Bullet>Desktop and Android assets are still building</Bullet>
</div>
<p className="mt-[14px] text-[16.5px] leading-[24px] text-mock-fg">
The heartbeat remains active.
</p>
<div className="flex items-center gap-[20px] pt-[16px] text-mock-fg-muted">
<Copy size={18} strokeWidth={1.8} />
<Split size={18} strokeWidth={1.8} />
</div>
</div>
);
}
function Composer() {
const { t } = useTranslation();
return (
<div className="shrink-0 px-[18px] pt-[10px] pb-[30px]">
<div className="mb-[16px]">
<span className="inline-flex items-center gap-[6px] rounded-full border border-mock-border-accent px-[13px] py-[6px] text-[15px] tabular-nums">
<span className="text-mock-success">+2,173</span>
<span className="text-mock-danger">-54</span>
</span>
</div>
<div className="rounded-[22px] border border-mock-border-accent bg-mock-surface1 px-[17px] pt-[15px] pb-[13px]">
<span className="block text-[16px] text-mock-fg-xmuted">
{t("landing.mockup.app.mobileComposerPlaceholder")}
</span>
<div className="flex items-center gap-[13px] pt-[26px]">
<Plus size={20} className="shrink-0 text-mock-fg-muted" strokeWidth={1.9} />
<span className="flex shrink-0 items-center gap-[5px]">
<CodexIcon size={19} className="shrink-0 text-mock-fg" />
<span className="whitespace-nowrap text-[16px] text-mock-fg">GPT-5.6-Sol</span>
<span className="whitespace-nowrap text-[16px] text-mock-fg-muted">Medium</span>
</span>
<span className="flex-1" />
<LoaderCircle size={19} className="shrink-0 text-mock-fg-muted" strokeWidth={1.8} />
<Mic size={19} className="shrink-0 text-mock-fg-muted" strokeWidth={1.8} />
<AudioLines size={19} className="shrink-0 text-mock-fg-muted" strokeWidth={1.8} />
</div>
</div>
</div>
);
}
export function MobileChat() {
return (
<>
<Header />
<SlashRow />
<div className="min-h-0 flex-1 overflow-hidden pt-[6px]">
<Transcript />
</div>
<Composer />
</>
);
}