* 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.
354 lines
11 KiB
TypeScript
354 lines
11 KiB
TypeScript
import { AnimatePresence, motion } from "framer-motion";
|
|
import {
|
|
CalendarClock,
|
|
CircleCheck,
|
|
CircleDot,
|
|
CircleHelp,
|
|
GitPullRequest,
|
|
History,
|
|
House,
|
|
PanelBottom,
|
|
PanelLeft,
|
|
Plus,
|
|
Puzzle,
|
|
Search,
|
|
Server,
|
|
Settings,
|
|
Settings2,
|
|
SquarePlus,
|
|
} from "lucide-react";
|
|
import type * as React from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import { SIDEBAR_W, TITLEBAR_H } from "./geometry";
|
|
import { PaseoMark } from "./icons";
|
|
import { FADE_IN, FADE_OUT } from "./motion";
|
|
import type { MockupStateId } from "./states";
|
|
|
|
const SIDEBAR_STYLE = { width: SIDEBAR_W };
|
|
const TITLEBAR_STYLE = { height: TITLEBAR_H };
|
|
const NAV_DEFAULT_LAYOUT = { height: 97 };
|
|
const NAV_EXTENDED_LAYOUT = { height: 127 };
|
|
|
|
// --- data -------------------------------------------------------------------
|
|
|
|
type Avatar =
|
|
| { kind: "paseo" }
|
|
| { kind: "blank-page" }
|
|
| { kind: "tile"; letter: string; tile: string };
|
|
|
|
interface WorkspaceRow {
|
|
id: string;
|
|
title: string;
|
|
avatar: Avatar;
|
|
time: string;
|
|
host?: string;
|
|
pr?: string;
|
|
passed?: boolean;
|
|
running?: boolean;
|
|
selected?: boolean;
|
|
}
|
|
|
|
const PASEO: Avatar = { kind: "paseo" };
|
|
const BLANK_PAGE: Avatar = { kind: "blank-page" };
|
|
|
|
const PINNED_ROWS: WorkspaceRow[] = [
|
|
{
|
|
id: "pin-skills-dotfiles",
|
|
title: "skills / dotfiles",
|
|
avatar: { kind: "tile", letter: "S", tile: "bg-mock-tile-red" },
|
|
time: "1h",
|
|
},
|
|
];
|
|
|
|
const WORKING_ROWS: WorkspaceRow[] = [
|
|
{
|
|
id: "safe-area",
|
|
title: "Fix commit safe area in emulators",
|
|
avatar: PASEO,
|
|
time: "4m",
|
|
running: true,
|
|
},
|
|
{
|
|
id: "blank-page-typing",
|
|
title: "Improve editor typing latency",
|
|
avatar: BLANK_PAGE,
|
|
time: "18m",
|
|
running: true,
|
|
},
|
|
];
|
|
|
|
const READY_TO_REVIEW_ROWS: WorkspaceRow[] = [
|
|
{
|
|
id: "lineage",
|
|
title: "Paseo homepage",
|
|
avatar: PASEO,
|
|
pr: "3981",
|
|
passed: true,
|
|
time: "now",
|
|
selected: true,
|
|
},
|
|
{
|
|
id: "blank-page-titles",
|
|
title: "Add automatic page titles",
|
|
avatar: BLANK_PAGE,
|
|
pr: "761",
|
|
passed: true,
|
|
time: "12m",
|
|
},
|
|
];
|
|
|
|
const DONE_ROWS: WorkspaceRow[] = [
|
|
{ id: "beta", title: "Release v0.7.0-beta.2", avatar: PASEO, time: "2h" },
|
|
{
|
|
id: "blank-page-focus",
|
|
title: "Preserve focus between pages",
|
|
avatar: BLANK_PAGE,
|
|
pr: "750",
|
|
passed: true,
|
|
time: "3h",
|
|
},
|
|
{
|
|
id: "perms",
|
|
title: "Design semantic permission sy…",
|
|
avatar: PASEO,
|
|
host: "my-server",
|
|
pr: "3981",
|
|
passed: true,
|
|
time: "7h",
|
|
},
|
|
{
|
|
id: "modules",
|
|
title: "Plan modules and abstractions",
|
|
avatar: PASEO,
|
|
pr: "3884",
|
|
passed: true,
|
|
time: "1d",
|
|
},
|
|
{ id: "resume", title: "Resume in-progress work", avatar: PASEO, time: "3d" },
|
|
{ id: "undef", title: "Undefined task", avatar: PASEO, time: "3d" },
|
|
{ id: "codex-issue", title: "Diagnose cloud/Codex issue re…", avatar: PASEO, time: "4d" },
|
|
{ id: "cws", title: "Diagnose create_workspace 37…", avatar: PASEO, time: "4d" },
|
|
{ id: "taps", title: "Diagnose tap interactions", avatar: PASEO, time: "4d" },
|
|
{ id: "clarify", title: "Clarify task requirements", avatar: PASEO, time: "5d" },
|
|
{ id: "abc", title: "Task for abcdefghi", avatar: PASEO, time: "5d" },
|
|
];
|
|
|
|
// --- pieces -----------------------------------------------------------------
|
|
|
|
// Icons passed as props are hoisted so they are not rebuilt on every render.
|
|
const NEW_WORKSPACE_ICON = <Plus size={14} />;
|
|
const HISTORY_ICON = <History size={14} />;
|
|
const SCHEDULES_ICON = <CalendarClock size={14} />;
|
|
const PLUGIN_ICON = <Puzzle size={14} />;
|
|
const WORKING_ICON = <CircleDot size={16} className="text-mock-dot-running" />;
|
|
const READY_TO_REVIEW_ICON = <CircleCheck size={16} className="text-mock-success" />;
|
|
const DONE_ICON = <CircleCheck size={16} className="text-mock-fg-xmuted" />;
|
|
|
|
function NavItem({
|
|
icon,
|
|
label,
|
|
active,
|
|
}: {
|
|
icon: React.ReactNode;
|
|
label: string;
|
|
active?: boolean;
|
|
}) {
|
|
return (
|
|
<div
|
|
className={`flex h-[30px] items-center gap-[10px] rounded-[7px] px-[10px] text-[12.5px] text-mock-fg ${
|
|
active ? "bg-mock-surface1" : ""
|
|
}`}
|
|
>
|
|
<span className="text-mock-fg-muted">{icon}</span>
|
|
{label}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
/** The rounded-square agent avatar, with a blue running dot on the corner. */
|
|
function AvatarIcon({ avatar }: { avatar: Avatar }) {
|
|
if (avatar.kind === "paseo") {
|
|
return (
|
|
<span className="flex size-[16px] items-center justify-center rounded-[5px] bg-black text-white">
|
|
<PaseoMark size={14} />
|
|
</span>
|
|
);
|
|
}
|
|
if (avatar.kind === "blank-page") {
|
|
return <img src="/blank-page.svg" alt="" className="size-[16px]" />;
|
|
}
|
|
return (
|
|
<span
|
|
className={`flex size-[16px] items-center justify-center rounded-[5px] text-[9px] font-semibold text-white ${avatar.tile}`}
|
|
>
|
|
{avatar.letter}
|
|
</span>
|
|
);
|
|
}
|
|
|
|
function RowAvatar({ avatar, running }: { avatar: Avatar; running?: boolean }) {
|
|
return (
|
|
<span className="relative block size-[16px] shrink-0">
|
|
<AvatarIcon avatar={avatar} />
|
|
{running ? (
|
|
<span className="absolute -right-[1px] -bottom-[1px] size-[6px] rounded-full bg-mock-dot-running ring-[1.5px] ring-mock-sidebar" />
|
|
) : null}
|
|
</span>
|
|
);
|
|
}
|
|
|
|
function RowMeta({ row }: { row: WorkspaceRow }) {
|
|
const { t } = useTranslation();
|
|
if (row.host || row.pr) {
|
|
return (
|
|
<span className="mt-[3px] flex items-center gap-[6px] text-[10.5px] leading-[13px] text-mock-fg-muted">
|
|
{row.host ? (
|
|
<span className="flex items-center gap-[4px] text-mock-host-teal">
|
|
<Server size={12} className="shrink-0" />
|
|
{row.host}
|
|
</span>
|
|
) : null}
|
|
{row.host && row.pr ? <span className="text-mock-fg-xmuted">·</span> : null}
|
|
{row.pr ? (
|
|
<span className="flex items-center gap-[4px]">
|
|
<GitPullRequest size={10} className="shrink-0" />
|
|
{row.pr}
|
|
</span>
|
|
) : null}
|
|
{row.passed ? (
|
|
<>
|
|
<span className="text-mock-fg-xmuted">·</span>
|
|
<span className="flex items-center gap-[4px] text-mock-success">
|
|
<CircleCheck size={11} className="shrink-0" />
|
|
{t("landing.mockup.app.checksPassedShort")}
|
|
</span>
|
|
</>
|
|
) : null}
|
|
</span>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function Row({ row, indented = false }: { row: WorkspaceRow; indented?: boolean }) {
|
|
return (
|
|
<motion.div
|
|
layout="position"
|
|
className={`flex gap-[8px] rounded-[8px] py-[7px] pr-[9px] ${
|
|
indented ? "pl-[21px]" : "pl-[9px]"
|
|
} ${row.selected ? "bg-mock-surface1" : ""}`}
|
|
>
|
|
<span className="pt-[1px]">
|
|
<RowAvatar avatar={row.avatar} running={row.running} />
|
|
</span>
|
|
<span className="min-w-0 flex-1">
|
|
<span className="flex items-baseline gap-[8px]">
|
|
<span className="min-w-0 flex-1 truncate text-[13px] leading-[17px] text-mock-fg">
|
|
{row.title}
|
|
</span>
|
|
<span className="shrink-0 text-[11px] text-mock-fg-xmuted">{row.time}</span>
|
|
</span>
|
|
<RowMeta row={row} />
|
|
</span>
|
|
</motion.div>
|
|
);
|
|
}
|
|
|
|
function GroupHeader({ icon, label }: { icon: React.ReactNode; label: string }) {
|
|
return (
|
|
<div className="mt-[10px] mb-[3px] flex items-center gap-[8px] px-[9px] py-[7px]">
|
|
<span className="flex size-[16px] shrink-0 items-center justify-center">{icon}</span>
|
|
<span className="text-[13px] leading-[17px] text-mock-fg-muted">{label}</span>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
// --- sidebar ----------------------------------------------------------------
|
|
|
|
export function Sidebar({ state }: { state: MockupStateId }) {
|
|
const { t } = useTranslation();
|
|
const extending = state === "extend";
|
|
|
|
return (
|
|
<div className="flex shrink-0 flex-col overflow-hidden bg-mock-sidebar" style={SIDEBAR_STYLE}>
|
|
{/* The sidebar is one full-height column with no header border of its own. */}
|
|
<div className="flex shrink-0 items-center gap-[8px] px-[18px]" style={TITLEBAR_STYLE}>
|
|
<div className="flex h-[24px] items-center gap-[7px]">
|
|
<i className="block size-[10px] rounded-full bg-[#ff5f57]" />
|
|
<i className="block size-[10px] rounded-full bg-[#febc2e]" />
|
|
<i className="block size-[10px] rounded-full bg-[#28c840]" />
|
|
</div>
|
|
<span className="flex size-[24px] shrink-0 items-center justify-center">
|
|
<PanelLeftGlyph />
|
|
</span>
|
|
</div>
|
|
|
|
<motion.div
|
|
initial={false}
|
|
animate={extending ? NAV_EXTENDED_LAYOUT : NAV_DEFAULT_LAYOUT}
|
|
className="overflow-hidden px-[8px] pt-[7px]"
|
|
>
|
|
<NavItem icon={NEW_WORKSPACE_ICON} label={t("landing.mockup.app.newWorkspace")} />
|
|
<NavItem icon={HISTORY_ICON} label={t("landing.mockup.app.history")} />
|
|
<NavItem icon={SCHEDULES_ICON} label={t("landing.mockup.app.schedules")} />
|
|
<motion.div initial={false} animate={extending ? FADE_IN : FADE_OUT}>
|
|
<NavItem icon={PLUGIN_ICON} label="Release Radar" active />
|
|
</motion.div>
|
|
</motion.div>
|
|
|
|
<div className="mt-[9px] h-px bg-mock-border" />
|
|
|
|
<div className="min-h-0 flex-1 overflow-hidden px-[8px]">
|
|
<div className="px-[9px] pt-[8px] text-[11px] text-mock-fg-muted">
|
|
{t("landing.mockup.app.pinned")}
|
|
</div>
|
|
{PINNED_ROWS.map((row) => (
|
|
<Row key={row.id} row={row} />
|
|
))}
|
|
|
|
<div className="mt-[16px] flex items-center justify-between px-[9px] pb-[2px]">
|
|
<span className="text-[11px] text-mock-fg-muted">Workspaces</span>
|
|
<span className="flex items-center gap-[13px] text-mock-fg-muted">
|
|
<Search size={11} className="text-mock-fg-muted" />
|
|
<Settings2 size={11} className="text-mock-fg-muted" />
|
|
</span>
|
|
</div>
|
|
|
|
<GroupHeader icon={READY_TO_REVIEW_ICON} label={t("landing.mockup.app.readyToReview")} />
|
|
{READY_TO_REVIEW_ROWS.map((row) => (
|
|
<Row key={row.id} row={row} indented />
|
|
))}
|
|
|
|
<GroupHeader icon={WORKING_ICON} label={t("landing.mockup.app.working")} />
|
|
<AnimatePresence initial={false} mode="popLayout">
|
|
{WORKING_ROWS.map((row) => (
|
|
<motion.div key={row.id} layout initial={FADE_OUT} animate={FADE_IN} exit={FADE_OUT}>
|
|
<Row row={row} indented />
|
|
</motion.div>
|
|
))}
|
|
</AnimatePresence>
|
|
|
|
<GroupHeader icon={DONE_ICON} label={t("landing.mockup.app.done")} />
|
|
{DONE_ROWS.map((row) => (
|
|
<Row key={row.id} row={row} indented />
|
|
))}
|
|
</div>
|
|
|
|
<div className="h-px shrink-0 bg-mock-border" />
|
|
<div className="flex h-[44px] shrink-0 items-center gap-[8px] px-[14px] text-[12.5px] text-mock-fg-muted">
|
|
<SquarePlus size={14} />
|
|
<span className="text-mock-fg">{t("landing.mockup.app.addProject")}</span>
|
|
<span className="flex-1" />
|
|
<PanelBottom size={14} />
|
|
<House size={14} />
|
|
<CircleHelp size={14} />
|
|
<Settings size={14} />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
function PanelLeftGlyph() {
|
|
return <PanelLeft size={15} strokeWidth={1.8} className="translate-y-px text-mock-fg-muted" />;
|
|
}
|