Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

feat(settings): manage projects in a list + inspector

vastsa42b1ee3cf71d
diff --git a/apps/desktop/src/features/projects/ProjectArchiveIndex.tsx b/apps/desktop/src/features/projects/ProjectArchiveIndex.tsx
new file mode 100644
index 000000000..ef71d06b8
--- /dev/null
+++ b/apps/desktop/src/features/projects/ProjectArchiveIndex.tsx
@@ -0,0 +1,139 @@
+import { useTranslation } from "react-i18next";
+import { cx } from "../../components/ui";
+import { IconFolder, IconStar } from "../../components/icons";
+import { projectColor } from "../../lib/recent-projects";
+import { normalizeProjectPath } from "../../lib/sidebar-session-groups";
+import {
+ formatUpdated,
+ GROUP_LABEL_KEYS,
+ type GroupId,
+ type ProjectIndexItem,
+} from "../../lib/project-archive";
+
+export function projectRowId(path: string) {
+ return `projects-row-${path.replace(/[^a-zA-Z0-9]+/g, "-")}`;
+}
+
+function rowStatus(args: {
+ project: ProjectIndexItem;
+ workspacePath?: string | null;
+ openProjectPaths: readonly string[];
+}): "active" | "open" | "archived" | null {
+ const { project, workspacePath, openProjectPaths } = args;
+ if (project.archived === true) return "archived";
+ if (normalizeProjectPath(workspacePath) === normalizeProjectPath(project.path)) {
+ return "active";
+ }
+ if (
+ openProjectPaths.some(
+ (path) => normalizeProjectPath(path) === normalizeProjectPath(project.path),
+ )
+ ) {
+ return "open";
+ }
+ return null;
+}
+
+export function ProjectArchiveIndex({
+ groups,
+ selectedPath,
+ workspacePath,
+ openProjectPaths,
+ locale,
+ sessionCounts,
+ onSelect,
+ onActivate,
+}: {
+ groups: { id: GroupId; rows: ProjectIndexItem[] }[];
+ selectedPath: string | null;
+ workspacePath?: string | null;
+ openProjectPaths: readonly string[];
+ locale?: string;
+ sessionCounts: Map<string, number>;
+ onSelect: (path: string) => void;
+ onActivate: (path: string) => void;
+}) {
+ const { t } = useTranslation();
+ return (
+ <div className="projects-index">
+ {groups.map((group) => (
+ <section
+ key={group.id}
+ className="projects-group"
+ aria-labelledby={`projects-group-${group.id}`}
+ >
+ <div className="projects-group-head">
+ <h3 className="projects-group-label" id={`projects-group-${group.id}`}>
+ {t(GROUP_LABEL_KEYS[group.id])}
+ </h3>
+ <span className="projects-group-count">{group.rows.length}</span>
+ </div>
+ <div className="projects-group-rows" role="list">
+ {group.rows.map((project) => {
+ const selected = selectedPath === project.path;
+ const status = rowStatus({
+ project,
+ workspacePath,
+ openProjectPaths,
+ });
+ const color = project.color || projectColor(project.path);
+ const totalSessions = sessionCounts.get(project.path) ?? 0;
+ return (
+ <div
+ key={project.path}
+ id={projectRowId(project.path)}
+ role="listitem"
+ aria-selected={selected}
+ className={cx(
+ "projects-row-block",
+ selected && "selected",
+ status === "active" && "active",
+ status === "archived" && "archived",
+ )}
+ >
+ <button
+ type="button"
+ className="projects-row"
+ title={project.path}
+ aria-label={t("project.selectProject", { name: project.name })}
+ aria-current={selected ? "true" : undefined}
+ onClick={() => onSelect(project.path)}
+ onDoubleClick={() => onActivate(project.path)}
+ >
+ <span className="projects-glyph" style={{ background: color }}>
+ {project.pinned ? (
+ <IconStar size={15} fill="currentColor" aria-hidden />
+ ) : (
+ <IconFolder size={15} aria-hidden />
+ )}
+ </span>
+ <span className="projects-name-copy">
+ <span className="projects-name-title">
+ <span className="projects-name-text">{project.name}</span>
+ {status === "active" ? (
+ <span className="projects-tag is-active">{t("project.active")}</span>
+ ) : status === "open" ? (
+ <span className="projects-tag">{t("project.openTag")}</span>
+ ) : status === "archived" ? (
+ <span className="projects-tag is-archived">{t("project.archivedTag")}</span>
+ ) : null}
+ </span>
+ <span className="projects-name-meta">
+ <span className="projects-name-sessions">
+ {t("project.sessionsCount", { count: totalSessions })}
+ </span>
+ </span>
+ </span>
+ <span className="projects-updated">
+ {formatUpdated(project.openedAt, locale, t("project.updatedNever"))}
+ </span>
+ </button>
+ </div>
+ );
+ })}
+ </div>
+ </section>
+ ))}
+ </div>
+ );
+}
diff --git a/apps/desktop/src/lib/project-archive.ts b/apps/desktop/src/lib/project-archive.ts
new file mode 100644
index 000000000..042afb802
--- /dev/null
+++ b/apps/desktop/src/lib/project-archive.ts
@@ -0,0 +1,387 @@
+import type { ProjectMeta } from "./sidebar-preferences.ts";
+import { normalizeProjectPath } from "./sidebar-preferences.ts";
+import { projectColor, type RecentProject } from "./recent-projects.ts";
+
+export const INITIAL_VISIBLE_SESSION_COUNT = 8;
+
+export type SortMode = "recent" | "name";
+
+/**
+ * Section order for the always-visible index. Archived records are grouped last
+ * rather than hidden, so the archive never needs a visibility toggle (D133).
+ */
+export type GroupId = "pinned" | "projects" | "archived";
+
+export const GROUP_ORDER: GroupId[] = ["pinned", "projects", "archived"];
+
+export const GROUP_LABEL_KEYS: Record<GroupId, string> = {
+ pinned: "project.groupPinned",
+ projects: "project.groupProjects",
+ archived: "project.groupArchived",
+};
+
+export type ProjectRoot = {
+ path: string;
+ name: string;
+ position: number;
+};
+
+export type ProjectIndexItem = RecentProject & {
+ groupId: string;
+ roots: ProjectRoot[];
+ legacy: boolean;
+ archived?: boolean;
+};
+
+export type DurableProjectGroup = {
+ id: string;
+ name: string;
+ primaryPath: string;
+ roots: ProjectRoot[];
+ lastOpenedAt: number;
+ pinned: boolean;
+ legacy?: boolean;
+};
+
+export type SessionIndexRecord = {
+ id: string;
+ title: string;
+ projectPath?: string | null;
+ createdAt: string;
+ updatedAt: string;
+};
+
+export type SessionProjectSeed = {
+ path: string;
+ name: string;
+ updatedAt: number;
+};
+
+export type WorkspaceSeed = {
+ path: string;
+ name?: string;
+ branch?: string | null;
+};
+
+export function shortenPath(path: string) {
+ return path.replace(/^\/(?:Users|home)\/[^/]+/, "~");
+}
+
+export function sessionTimestamp(value: string): number {
+ const timestamp = Date.parse(value);
+ return Number.isFinite(timestamp) ? timestamp : 0;
+}
+
+export function formatUpdated(ts?: number, locale?: string, neverLabel = "—") {
+ if (!ts) return neverLabel;
+ try {
+ const elapsed = Date.now() - ts;
+ const minutes = Math.round(elapsed / 60_000);
+ if (minutes < 60 * 24 * 7) {
+ const rtf = new Intl.RelativeTimeFormat(locale || undefined, {
+ numeric: "auto",
+ });
+ if (minutes < 60) return rtf.format(-Math.max(minutes, 0), "minute");
+ if (minutes < 60 * 24) return rtf.format(-Math.round(minutes / 60), "hour");
+ return rtf.format(-Math.round(minutes / (60 * 24)), "day");
+ }
+ const sameYear = new Date(ts).getFullYear() === new Date().getFullYear();
+ return new Intl.DateTimeFormat(locale || undefined, {
+ month: "short",
+ day: "numeric",
+ year: sameYear ? undefined : "numeric",
+ }).format(new Date(ts));
+ } catch {
+ return neverLabel;
+ }
+}
+
+export function sessionMatchesQuery(
+ session: Pick<SessionIndexRecord, "id" | "title">,
+ query: string,
+) {
+ const normalizedQuery = query.trim().toLocaleLowerCase();
+ return (
+ !normalizedQuery ||
+ session.title.toLocaleLowerCase().includes(normalizedQuery) ||
+ session.id.toLocaleLowerCase().includes(normalizedQuery)
+ );
+}
+
+export function sessionMatchesIndexProject(
+ session: Pick<SessionIndexRecord, "projectPath">,
+ project: Pick<ProjectIndexItem, "roots" | "path">,
+) {
+ const sessionPath = normalizeProjectPath(session.projectPath);
+ return Boolean(
+ sessionPath &&
+ project.roots.some((root) => normalizeProjectPath(root.path) === sessionPath),
+ );
+}
+
+export function projectMatchesQuery(project: ProjectIndexItem, query: string) {
+ const normalizedQuery = query.trim().toLocaleLowerCase();
+ if (!normalizedQuery) return true;
+ return (
+ project.name.toLocaleLowerCase().includes(normalizedQuery) ||
+ project.path.toLocaleLowerCase().includes(normalizedQuery) ||
+ (project.branch || "").toLocaleLowerCase().includes(normalizedQuery)
+ );
+}
+
+export function projectBucket(project: ProjectIndexItem): GroupId {
+ if (project.archived === true) return "archived";
+ if (project.pinned) return "pinned";
+ return "projects";
+}
+
+export function compareProjects(
+ a: ProjectIndexItem,
+ b: ProjectIndexItem,
+ sort: SortMode,
+ locale?: string,
+) {
+ if (sort === "name") {
+ return (
+ a.name.localeCompare(b.name, locale || undefined) || a.path.localeCompare(b.path)
+ );
+ }
+ return b.openedAt - a.openedAt || a.path.localeCompare(b.path);
+}
+
+export function groupArchiveRows(
+ filtered: readonly ProjectIndexItem[],
+ sort: SortMode,
+ locale?: string,
+) {
+ const buckets: Record<GroupId, ProjectIndexItem[]> = {
+ pinned: [],
+ projects: [],
+ archived: [],
+ };
+ for (const project of filtered) buckets[projectBucket(project)].push(project);
+ for (const id of GROUP_ORDER) {
+ buckets[id].sort((a, b) => compareProjects(a, b, sort, locale));
+ }
+ return GROUP_ORDER.map((id) => ({ id, rows: buckets[id] })).filter(
+ (group) => group.rows.length > 0,
+ );
+}
+
+export function countProjectSessions(
+ items: readonly ProjectIndexItem[],
+ sessions: readonly SessionIndexRecord[],
+) {
+ const counts = new Map<string, number>();
+ for (const project of items) {
+ let matched = 0;
+ for (const session of sessions) {
+ if (sessionMatchesIndexProject(session, project)) matched += 1;
+ }
+ counts.set(project.path, matched);
+ }
+ return counts;
+}
+
+export function filterArchiveItems(
+ items: readonly ProjectIndexItem[],
+ sessions: readonly SessionIndexRecord[],
+ query: string,
+) {
+ const q = query.trim();
+ if (!q) return [...items];
+ return items.filter(
+ (project) =>
+ projectMatchesQuery(project, q) ||
+ sessions.some(
+ (session) =>
+ sessionMatchesIndexProject(session, project) && sessionMatchesQuery(session, q),
+ ),
+ );
+}
+
+export function relatedProjectSessions(
+ sessions: readonly SessionIndexRecord[],
+ project: Pick<ProjectIndexItem, "roots" | "path">,
+) {
+ return sessions
+ .filter((session) => sessionMatchesIndexProject(session, project))
+ .sort(
+ (a, b) =>
+ sessionTimestamp(b.updatedAt) - sessionTimestamp(a.updatedAt) ||
+ sessionTimestamp(b.createdAt) - sessionTimestamp(a.createdAt) ||
+ a.title.localeCompare(b.title) ||
+ a.id.localeCompare(b.id),
+ );
+}
+
+export function displayedProjectSessions(
+ sessions: readonly SessionIndexRecord[],
+ project: ProjectIndexItem,
+ query: string,
+) {
+ const related = relatedProjectSessions(sessions, project);
+ const matching = related.filter((session) => sessionMatchesQuery(session, query));
+ const sessionSearchMatch = !projectMatchesQuery(project, query) && matching.length > 0;
+ return {
+ related,
+ displayed: sessionSearchMatch ? matching : related,
+ sessionSearchMatch,
+ };
+}
+
+/**
+ * Keep the current row when it still matches. Otherwise prefer the live
+ * workspace, then the first visible row. An empty index has no selection.
+ */
+export function resolveSelectedPath(args: {
+ selectedPath: string | null;
+ filtered: readonly ProjectIndexItem[];
+ preferredPath?: string | null;
+}) {
+ const { selectedPath, filtered, preferredPath } = args;
+ if (filtered.length === 0) return null;
+ if (selectedPath && filtered.some((project) => project.path === selectedPath)) {
+ return selectedPath;
+ }
+ const preferred = normalizeProjectPath(preferredPath);
+ if (preferred) {
+ const match = filtered.find(
+ (project) => normalizeProjectPath(project.path) === preferred,
+ );
+ if (match) return match.path;
+ }
+ return filtered[0]?.path ?? null;
+}
+
+export function neighborPath(
+ filtered: readonly ProjectIndexItem[],
+ selectedPath: string | null,
+ delta: number,
+) {
+ if (filtered.length === 0) return null;
+ const index = filtered.findIndex((project) => project.path === selectedPath);
+ const from = index >= 0 ? index : delta > 0 ? -1 : 0;
+ const next = Math.min(filtered.length - 1, Math.max(0, from + delta));
+ return filtered[next]?.path ?? null;
+}
+
+export function buildProjectIndex(args: {
+ durableProjects: readonly DurableProjectGroup[];
+ recents: readonly RecentProject[];
+ sessionProjects: readonly SessionProjectSeed[];
+ workspace?: WorkspaceSeed | null;
+ projectMeta: Record<string, ProjectMeta>;
+}): ProjectIndexItem[] {
+ const { durableProjects, recents, sessionProjects, workspace, projectMeta } = args;
+ const byPath = new Map<string, ProjectIndexItem>();
+ const addGroup = (group: DurableProjectGroup, openedAt = group.lastOpenedAt) => {
+ const key = normalizeProjectPath(group.primaryPath);
+ if (!key) return;
+ const existing = byPath.get(key);
+ byPath.set(key, {
+ path: group.primaryPath,
+ name: group.name,
+ openedAt: Math.max(existing?.openedAt ?? 0, openedAt),
+ pinned: group.pinned,
+ color: existing?.color ?? projectColor(group.primaryPath),
+ groupId: group.id,
+ roots: group.roots,
+ legacy: group.legacy === true,
+ });
+ };
+ const groupForPath = (path: string) => {
+ const key = normalizeProjectPath(path);
+ return durableProjects.find((group) =>
+ group.roots.some((root) => normalizeProjectPath(root.path) === key),
+ );
+ };
+
+ for (const group of durableProjects) addGroup(group);
+
+ for (const project of recents) {
+ const group = groupForPath(project.path);
+ if (group) {
+ addGroup(group, project.openedAt);
+ continue;
+ }
+ const key = normalizeProjectPath(project.path);
+ if (!key) continue;
+ const existing = byPath.get(key);
+ byPath.set(key, {
+ path: existing?.path ?? project.path,
+ name: existing?.name ?? project.name,
+ branch: existing?.branch ?? project.branch,
+ openedAt: Math.max(existing?.openedAt ?? 0, project.openedAt),
+ pinned: project.pinned ?? existing?.pinned,
+ color: existing?.color ?? project.color ?? projectColor(project.path),
+ groupId: existing?.groupId ?? `legacy:${key}`,
+ roots: existing?.roots ?? [{ path: project.path, name: project.name, position: 0 }],
+ legacy: existing?.legacy ?? true,
+ });
+ }
+
+ for (const project of sessionProjects) {
+ const group = groupForPath(project.path);
+ if (group) {
+ addGroup(group, project.updatedAt);
+ continue;
+ }
+ const key = normalizeProjectPath(project.path);
+ if (!key) continue;
+ const existing = byPath.get(key);
+ byPath.set(key, {
+ path: existing?.path ?? project.path,
+ name: existing?.name ?? project.name,
+ branch: existing?.branch,
+ openedAt: Math.max(existing?.openedAt ?? 0, project.updatedAt),
+ pinned: existing?.pinned,
+ color: existing?.color ?? projectColor(project.path),
+ groupId: existing?.groupId ?? `legacy:${key}`,
+ roots: existing?.roots ?? [{ path: project.path, name: project.name, position: 0 }],
+ legacy: existing?.legacy ?? true,
+ });
+ }
+
+ if (workspace?.path) {
+ const group = groupForPath(workspace.path);
+ if (group) addGroup(group, Date.now());
+ else {
+ const key = normalizeProjectPath(workspace.path);
+ if (key) {
+ const existing = byPath.get(key);
+ byPath.set(key, {
+ path: workspace.path,
+ name: workspace.name || existing?.name || workspace.path,
+ branch: workspace.branch || existing?.branch,
+ openedAt: Math.max(existing?.openedAt ?? 0, Date.now()),
+ pinned: existing?.pinned,
+ color: existing?.color ?? projectColor(workspace.path),
+ groupId: existing?.groupId ?? `legacy:${key}`,
+ roots:
+ existing?.roots ?? [
+ { path: workspace.path, name: workspace.name || workspace.path, position: 0 },
+ ],
+ legacy: existing?.legacy ?? true,
+ });
+ }
+ }
+ }
+
+ return [...byPath.values()]
+ .map((project) => {
+ const meta = projectMeta[normalizeProjectPath(project.path) || project.path] ?? {};
+ return {
+ ...project,
+ name: meta.name ?? project.name,
+ pinned: meta.pinned ?? project.pinned,
+ archived: meta.archived === true,
+ };
+ })
+ .sort(
+ (a, b) =>
+ Number(!!b.pinned) - Number(!!a.pinned) ||
+ b.openedAt - a.openedAt ||
+ a.path.localeCompare(b.path),
+ );
+}
diff --git a/apps/desktop/src/pages/ProjectsPage.tsx b/apps/desktop/src/pages/ProjectsPage.tsx
index 566dd1c1f..5a58e065e 100644
--- a/apps/desktop/src/pages/ProjectsPage.tsx
+++ b/apps/desktop/src/pages/ProjectsPage.tsx
@@ -1,16 +1,14 @@
-import { useEffect, useMemo, useRef, useState } from "react";
+import { useEffect, useMemo, useRef, useState, type KeyboardEvent } from "react";
import { useTranslation } from "react-i18next";
import type { ProjectGroupRecord, SessionSummary } from "@pi-desktop/shared";
import { ErrorCodes } from "@pi-desktop/shared";
import { useAppStore } from "../stores/app-store";
import { api } from "../lib/api";
-import { Button, Tooltip, TooltipButton, cx } from "../components/ui";
+import { Button, TooltipButton, cx } from "../components/ui";
import {
IconArchive,
IconArchiveRestore,
IconChat,
- IconChevronDown,
- IconChevronRight,
IconFileText,
IconFolder,
IconMore,
@@ -23,15 +21,9 @@ import {
IconTrash,
IconX,
} from "../components/icons";
-import {
- loadRecentProjects,
- projectColor,
- type RecentProject,
-} from "../lib/recent-projects";
+import { loadRecentProjects, projectColor, type RecentProject } from "../lib/recent-projects";
import { collectSessionProjects } from "../lib/session-projects";
-import {
- normalizeProjectPath,
-} from "../lib/sidebar-session-groups";
+import { normalizeProjectPath } from "../lib/sidebar-session-groups";
import { ProjectInstructionsDialog } from "../components/ProjectInstructionsDialog";
import { ProjectMemoryDialog } from "../components/ProjectMemoryDialog";
import { ProjectEditDialog } from "../components/ProjectEditDialog";
@@ -39,83 +31,23 @@ import { ProjectDeleteDialog } from "../components/ProjectDeleteDialog";
import { SessionRenameDialog } from "../components/SessionRenameDialog";
import { useArmedDelete } from "../hooks/use-armed-delete";
import { AnchoredMenu } from "../components/settings/AnchoredMenu";
-
-const INITIAL_VISIBLE_SESSION_COUNT = 8;
-
-type SortMode = "recent" | "name";
-
-type ProjectIndexItem = RecentProject & {
- groupId: string;
- roots: ProjectGroupRecord["roots"];
- legacy: boolean;
-};
-
-function sessionMatchesIndexProject(
- session: SessionSummary,
- project: Pick<ProjectIndexItem, "roots" | "path">,
-) {
- const sessionPath = normalizeProjectPath(session.projectPath);
- return Boolean(
- sessionPath &&
- project.roots.some((root) => normalizeProjectPath(root.path) === sessionPath),
- );
-}
-
-/**
- * Section order for the always-visible index. Archived records are grouped last
- * rather than hidden, so the archive never needs a visibility toggle (D133).
- */
-type GroupId = "pinned" | "projects" | "archived";
-
-const GROUP_ORDER: GroupId[] = ["pinned", "projects", "archived"];
-
-const GROUP_LABEL_KEYS: Record<GroupId, string> = {
- pinned: "project.groupPinned",
- projects: "project.groupProjects",
- archived: "project.groupArchived",
-};
-
-function formatUpdated(ts?: number, locale?: string, neverLabel = "—") {
- if (!ts) return neverLabel;
- try {
- const elapsed = Date.now() - ts;
- const minutes = Math.round(elapsed / 60_000);
- if (minutes < 60 * 24 * 7) {
- const rtf = new Intl.RelativeTimeFormat(locale || undefined, {
- numeric: "auto",
- });
- if (minutes < 60) return rtf.format(-Math.max(minutes, 0), "minute");
- if (minutes < 60 * 24) return rtf.format(-Math.round(minutes / 60), "hour");
- return rtf.format(-Math.round(minutes / (60 * 24)), "day");
- }
- const sameYear = new Date(ts).getFullYear() === new Date().getFullYear();
- return new Intl.DateTimeFormat(locale || undefined, {
- month: "short",
- day: "numeric",
- year: sameYear ? undefined : "numeric",
- }).format(new Date(ts));
- } catch {
- return neverLabel;
- }
-}
-
-function shortenPath(path: string) {
- return path.replace(/^\/(?:Users|home)\/[^/]+/, "~");
-}
-
-function sessionTimestamp(value: string): number {
- const timestamp = Date.parse(value);
- return Number.isFinite(timestamp) ? timestamp : 0;
-}
-
-function sessionMatchesQuery(session: SessionSummary, query: string) {
- const normalizedQuery = query.trim().toLocaleLowerCase();
- return (
- !normalizedQuery ||
- session.title.toLocaleLowerCase().includes(normalizedQuery) ||
- session.id.toLocaleLowerCase().includes(normalizedQuery)
- );
-}
+import {
+ INITIAL_VISIBLE_SESSION_COUNT,
+ buildProjectIndex,
+ countProjectSessions,
+ displayedProjectSessions,
+ filterArchiveItems,
+ formatUpdated,
+ groupArchiveRows,
+ neighborPath,
+ resolveSelectedPath,
+ sessionMatchesIndexProject,
+ sessionTimestamp,
+ shortenPath,
+ type ProjectIndexItem,
+ type SortMode,
+} from "../lib/project-archive";
+import { ProjectArchiveIndex, projectRowId } from "../features/projects/ProjectArchiveIndex";
export function ProjectsPage() {
const { t, i18n } = useTranslation();
@@ -143,7 +75,7 @@ export function ProjectsPage() {
const [durableProjects, setDurableProjects] = useState<ProjectGroupRecord[]>([]);
const [query, setQuery] = useState("");
const [sort, setSort] = useState<SortMode>("recent");
- const [expanded, setExpanded] = useState<Record<string, boolean>>({});
+ const [selectedPath, setSelectedPath] = useState<string | null>(null);
const [visibleSessionCounts, setVisibleSessionCounts] = useState<Record<string, number>>({});
const [menuFor, setMenuFor] = useState<string | null>(null);
// Which row menu item is armed for its second, confirming click.
@@ -193,164 +125,48 @@ export function ProjectsPage() {
};
}, [sessions]);
- const items = useMemo(() => {
- const byPath = new Map<string, ProjectIndexItem>();
- const addGroup = (group: ProjectGroupRecord, openedAt = group.lastOpenedAt) => {
- const key = normalizeProjectPath(group.primaryPath);
- if (!key) return;
- const existing = byPath.get(key);
- byPath.set(key, {
- path: group.primaryPath,
- name: group.name,
- openedAt: Math.max(existing?.openedAt ?? 0, openedAt),
- pinned: group.pinned,
- color: existing?.color ?? projectColor(group.primaryPath),
- groupId: group.id,
- roots: group.roots,
- legacy: group.legacy === true,
- });
- };
- for (const group of durableProjects) addGroup(group);
-
- const groupForPath = (path: string) => {
- const key = normalizeProjectPath(path);
- return durableProjects.find((group) =>
- group.roots.some((root) => normalizeProjectPath(root.path) === key),
- );
- };
-
- for (const project of recents) {
- const group = groupForPath(project.path);
- if (group) {
- addGroup(group, project.openedAt);
- continue;
- }
- const key = normalizeProjectPath(project.path);
- if (!key) continue;
- const existing = byPath.get(key);
- byPath.set(key, {
- path: existing?.path ?? project.path,
- name: existing?.name ?? project.name,
- branch: existing?.branch ?? project.branch,
- openedAt: Math.max(existing?.openedAt ?? 0, project.openedAt),
- pinned: project.pinned ?? existing?.pinned,
- color: existing?.color ?? project.color ?? projectColor(project.path),
- groupId: existing?.groupId ?? `legacy:${key}`,
- roots: existing?.roots ?? [{ path: project.path, name: project.name, position: 0 }],
- legacy: existing?.legacy ?? true,
- });
- }
- for (const project of collectSessionProjects(sessions)) {
- const group = groupForPath(project.path);
- if (group) {
- addGroup(group, project.updatedAt);
- continue;
- }
- const key = normalizeProjectPath(project.path);
- if (!key) continue;
- const existing = byPath.get(key);
- byPath.set(key, {
- path: existing?.path ?? project.path,
- name: existing?.name ?? project.name,
- branch: existing?.branch,
- openedAt: Math.max(existing?.openedAt ?? 0, project.updatedAt),
- pinned: existing?.pinned,
- color: existing?.color ?? projectColor(project.path),
- groupId: existing?.groupId ?? `legacy:${key}`,
- roots: existing?.roots ?? [{ path: project.path, name: project.name, position: 0 }],
- legacy: existing?.legacy ?? true,
- });
- }
- if (workspace?.path) {
- const group = groupForPath(workspace.path);
- if (group) addGroup(group, Date.now());
- else {
- const key = normalizeProjectPath(workspace.path);
- if (key) {
- const existing = byPath.get(key);
- byPath.set(key, {
- path: workspace.path,
- name: workspace.name || existing?.name || workspace.path,
- branch: workspace.branch || existing?.branch,
- openedAt: Math.max(existing?.openedAt ?? 0, Date.now()),
- pinned: existing?.pinned,
- color: existing?.color ?? projectColor(workspace.path),
- groupId: existing?.groupId ?? `legacy:${key}`,
- roots: existing?.roots ?? [{ path: workspace.path, name: workspace.name || workspace.path, position: 0 }],
- legacy: existing?.legacy ?? true,
- });
- }
- }
- }
- return [...byPath.values()]
- .map((project) => {
- const meta = projectMeta[normalizeProjectPath(project.path) || project.path] ?? {};
- return {
- ...project,
- name: meta.name ?? project.name,
- pinned: meta.pinned ?? project.pinned,
- archived: meta.archived === true,
- };
- })
- .sort(
- (a, b) =>
- Number(!!b.pinned) - Number(!!a.pinned) ||
- b.openedAt - a.openedAt ||
- a.path.localeCompare(b.path),
- );
- }, [durableProjects, recents, sessions, workspace, projectMeta]);
+ const items = useMemo(
+ () =>
+ buildProjectIndex({
+ durableProjects,
+ recents,
+ sessionProjects: collectSessionProjects(sessions),
+ workspace,
+ projectMeta,
+ }),
+ [durableProjects, recents, sessions, workspace, projectMeta],
+ );
- const filtered = useMemo(() => {
- const q = query.trim().toLowerCase();
- if (!q) return items;
- return items.filter(
- (p) =>
- p.name.toLowerCase().includes(q) ||
- p.path.toLowerCase().includes(q) ||
- (p.branch || "").toLowerCase().includes(q) ||
- sessions.some(
- (session) =>
- sessionMatchesIndexProject(session, p) && sessionMatchesQuery(session, q),
- ),
- );
- }, [items, query, sessions]);
+ const filtered = useMemo(
+ () => filterArchiveItems(items, sessions, query),
+ [items, query, sessions],
+ );
const locale = i18n.resolvedLanguage || i18n.language;
// One pass derives the summary counters and the rendered sections together, so
// the header totals can never disagree with the list below them.
- const { groups, sessionCounts } = useMemo(() => {
- const buckets: Record<GroupId, typeof filtered> = {
- pinned: [],
- projects: [],
- archived: [],
- };
- const counts = new Map<string, number>();
- for (const project of items) {
- let matched = 0;
- for (const session of sessions) {
- if (sessionMatchesIndexProject(session, project)) matched += 1;
- }
- counts.set(project.path, matched);
- }
- for (const project of filtered) {
- const bucket: GroupId =
- project.archived === true ? "archived" : project.pinned ? "pinned" : "projects";
- buckets[bucket].push(project);
- }
- const byRecency = (a: (typeof filtered)[number], b: (typeof filtered)[number]) =>
- b.openedAt - a.openedAt || a.path.localeCompare(b.path);
- const byName = (a: (typeof filtered)[number], b: (typeof filtered)[number]) =>
- a.name.localeCompare(b.name, locale || undefined) ||
- a.path.localeCompare(b.path);
- for (const id of GROUP_ORDER) buckets[id].sort(sort === "name" ? byName : byRecency);
- return {
- groups: GROUP_ORDER.map((id) => ({ id, rows: buckets[id] })).filter(
- (group) => group.rows.length > 0,
- ),
- sessionCounts: counts,
- };
- }, [filtered, items, locale, sessions, sort]);
+ const { groups, sessionCounts } = useMemo(
+ () => ({
+ groups: groupArchiveRows(filtered, sort, locale),
+ sessionCounts: countProjectSessions(items, sessions),
+ }),
+ [filtered, items, locale, sessions, sort],
+ );
+
+ useEffect(() => {
+ const next = resolveSelectedPath({
+ selectedPath,
+ filtered,
+ preferredPath: workspace?.path,
+ });
+ if (next !== selectedPath) setSelectedPath(next);
+ }, [filtered, selectedPath, workspace?.path]);
+
+ const project = filtered.find((item) => item.path === selectedPath) ?? null;
+ const selectedSessions = project
+ ? displayedProjectSessions(sessions, project, query)
+ : { related: [] as SessionSummary[], displayed: [] as SessionSummary[], sessionSearchMatch: false };
const activate = async (path: string): Promise<boolean> => {
try {
@@ -497,6 +313,42 @@ export function ProjectsPage() {
void openProject().then(() => setRecents(loadRecentProjects()));
const searching = query.trim().length > 0;
+ const displayedSessions = selectedSessions.displayed;
+ const visibleCount =
+ (project ? visibleSessionCounts[project.path] : undefined) ??
+ INITIAL_VISIBLE_SESSION_COUNT;
+ const visibleSessions = displayedSessions.slice(0, visibleCount);
+ const hiddenSessionCount = displayedSessions.length - visibleSessions.length;
+ const totalSessions = project
+ ? (sessionCounts.get(project.path) ?? selectedSessions.related.length)
+ : 0;
+ const menuOpen = Boolean(project && menuFor === project.path);
+ const selectedActive =
+ project != null &&
+ normalizeProjectPath(workspace?.path) === normalizeProjectPath(project.path);
+ const selectedRetained =
+ project != null &&
+ openProjectPaths.some(
+ (path) => normalizeProjectPath(path) === normalizeProjectPath(project.path),
+ );
+ const selectedArchived = project?.archived === true;
+ const selectedColor = project
+ ? project.color || projectColor(project.path)
+ : undefined;
+
+ const onIndexKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
+ event.preventDefault();
+ const next = neighborPath(filtered, selectedPath, event.key === "ArrowDown" ? 1 : -1);
+ if (next) setSelectedPath(next);
+ return;
+ }
+ if (event.key === "Enter" && selectedPath) {
+ event.preventDefault();
+ void activate(selectedPath);
+ }
+ };
+
return (
<div className="settings-stack settings-project-archive">
<div className="projects-intro">
@@ -598,412 +450,345 @@ export function ProjectsPage() {
)}
</div>
) : (
- <div className="settings-panel projects-list">
- {groups.map((group) => (
- <section key={group.id} className="projects-group" aria-labelledby={`projects-group-${group.id}`}>
- <div className="projects-group-head">
- <h3 className="projects-group-label" id={`projects-group-${group.id}`}>
- {t(GROUP_LABEL_KEYS[group.id])}
- </h3>
- <span className="projects-group-count">{group.rows.length}</span>
- </div>
- <div className="projects-group-rows" role="list">
- {group.rows.map((project) => {
- const active =
- normalizeProjectPath(workspace?.path) ===
- normalizeProjectPath(project.path);
- const archived = project.archived === true;
- const retained = openProjectPaths.some(
- (path) =>
- normalizeProjectPath(path) === normalizeProjectPath(project.path),
- );
- const color = project.color || projectColor(project.path);
- const projectMatchesQuery =
- !query.trim() ||
- project.name.toLocaleLowerCase().includes(query.trim().toLocaleLowerCase()) ||
- project.path.toLocaleLowerCase().includes(query.trim().toLocaleLowerCase()) ||
- (project.branch || "")
- .toLocaleLowerCase()
- .includes(query.trim().toLocaleLowerCase());
- const related = sessions
- .filter((session) => sessionMatchesIndexProject(session, project))
- .sort(
- (a, b) =>
- sessionTimestamp(b.updatedAt) - sessionTimestamp(a.updatedAt) ||
- sessionTimestamp(b.createdAt) - sessionTimestamp(a.createdAt) ||
- a.title.localeCompare(b.title) ||
- a.id.localeCompare(b.id),
- );
- const matchingSessions = related.filter((session) =>
- sessionMatchesQuery(session, query),
- );
- const sessionSearchMatch = !projectMatchesQuery && matchingSessions.length > 0;
- const isOpen = !!expanded[project.path] || sessionSearchMatch;
- const displayedSessions = sessionSearchMatch ? matchingSessions : related;
- const visibleCount =
- visibleSessionCounts[project.path] ?? INITIAL_VISIBLE_SESSION_COUNT;
- const visibleSessions = displayedSessions.slice(0, visibleCount);
- const hiddenSessionCount = displayedSessions.length - visibleSessions.length;
- const totalSessions = sessionCounts.get(project.path) ?? related.length;
- const menuOpen = menuFor === project.path;
- return (
- <div
- key={project.path}
- role="listitem"
- className={cx(
- "projects-row-block",
- active && "active",
- archived && "archived",
- isOpen && "expanded",
- menuOpen && "menu-open",
+ <div
+ className="projects-workbench"
+ tabIndex={0}
+ onKeyDown={onIndexKeyDown}
+ >
+ <div className="projects-index-pane">
+ <ProjectArchiveIndex
+ groups={groups}
+ selectedPath={selectedPath}
+ workspacePath={workspace?.path}
+ openProjectPaths={openProjectPaths}
+ locale={locale}
+ sessionCounts={sessionCounts}
+ onSelect={(path) => {
+ setSelectedPath(path);
+ setMenuFor(null);
+ }}
+ onActivate={(path) => void activate(path)}
+ />
+ </div>
+ <div
+ className="settings-panel projects-inspector"
+ role="region"
+ aria-labelledby={project ? projectRowId(project.path) : undefined}
+ >
+ {project ? (
+ <>
+ <div className="projects-inspector-head">
+ <span className="projects-glyph is-large" style={{ background: selectedColor }}>
+ {project.pinned ? (
+ <IconStar size={16} fill="currentColor" aria-hidden />
+ ) : (
+ <IconFolder size={16} aria-hidden />
)}
- >
- <div className="projects-row">
+ </span>
+ <div className="projects-inspector-ident">
+ <div className="projects-inspector-title">
+ <h3 className="projects-inspector-name">{project.name}</h3>
+ {selectedActive ? (
+ <span className="projects-tag is-active">{t("project.active")}</span>
+ ) : selectedRetained ? (
+ <span className="projects-tag">{t("project.openTag")}</span>
+ ) : null}
+ {project.pinned ? (
+ <span
+ className="projects-tag is-pin"
+ title={t("project.pinnedTag")}
+ aria-label={t("project.pinnedTag")}
+ >
+ <IconPin size={10} />
+ </span>
+ ) : null}
+ {selectedArchived ? (
+ <span className="projects-tag is-archived">{t("project.archivedTag")}</span>
+ ) : null}
+ </div>
+ <div className="projects-inspector-meta">
+ <span className="projects-name-path" title={project.path}>
+ {shortenPath(project.path)}
+ </span>
+ {project.branch ? (
+ <>
+ <span className="projects-meta-dot" aria-hidden>
+ ·
+ </span>
+ <span className="projects-name-branch">{project.branch}</span>
+ </>
+ ) : null}
+ </div>
+ </div>
+ <div className="projects-inspector-actions">
+ {selectedActive ? null : (
+ <Button size="sm" variant="primary" onClick={() => void activate(project.path)}>
+ {t("project.open")}
+ </Button>
+ )}
+ <TooltipButton
+ type="button"
+ className="projects-icon-btn"
+ tooltip={t("project.newTask")}
+ ariaLabel={t("project.newTask")}
+ onClick={() => void startTask(project.path)}
+ >
+ <IconPlus size={15} />
+ </TooltipButton>
+ <AnchoredMenu
+ className="projects-menu-wrap"
+ open={menuOpen}
+ onClose={() => setMenuFor(null)}
+ menuClassName="projects-menu"
+ label={t("project.openActions", { name: project.name })}
+ role="menu"
+ align="end"
+ trigger={(ref) => (
+ <TooltipButton
+ ref={ref}
+ type="button"
+ className="projects-icon-btn"
+ tooltip={t("project.openActions", { name: project.name })}
+ ariaLabel={t("project.openActions", { name: project.name })}
+ aria-haspopup="menu"
+ aria-expanded={menuOpen}
+ onClick={() =>
+ setMenuFor((cur) => (cur === project.path ? null : project.path))
+ }
+ >
+ <IconMore size={16} />
+ </TooltipButton>
+ )}
+ >
<button
type="button"
- className="projects-expand"
- aria-label={t(
- isOpen ? "project.collapseDetails" : "project.expandDetails",
- { name: project.name },
- )}
- aria-expanded={isOpen}
- onClick={() =>
- setExpanded((prev) => ({
- ...prev,
- [project.path]: !prev[project.path],
- }))
- }
+ role="menuitem"
+ onClick={() => {
+ setMenuFor(null);
+ void startTask(project.path);
+ }}
>
- {isOpen ? <IconChevronDown size={14} /> : <IconChevronRight size={14} />}
+ <IconChat size={14} />
+ {t("project.newTask")}
</button>
<button
type="button"
- className="projects-name-btn"
- onClick={() => void activate(project.path)}
- title={project.path}
+ role="menuitem"
+ onClick={() => {
+ setMenuFor(null);
+ setInstructionsFor({
+ name: project.name,
+ path: project.path,
+ groupId: project.groupId,
+ legacy: project.legacy,
+ });
+ }}
>
- <span className="projects-glyph" style={{ background: color }}>
- {project.pinned ? (
- <IconStar size={15} fill="currentColor" aria-hidden />
- ) : (
- <IconFolder size={15} aria-hidden />
- )}
- </span>
- <span className="projects-name-copy">
- <span className="projects-name-title">
- <span className="projects-name-text">{project.name}</span>
- {active ? (
- <span className="projects-tag is-active">
- {t("project.active")}
- </span>
- ) : retained ? (
- <span className="projects-tag">{t("project.openTag")}</span>
- ) : null}
- {project.pinned ? (
- <span
- className="projects-tag is-pin"
- title={t("project.pinnedTag")}
- aria-label={t("project.pinnedTag")}
- >
- <IconPin size={10} />
- </span>
- ) : null}
- {archived ? (
- <span className="projects-tag is-archived">
- {t("project.archivedTag")}
- </span>
- ) : null}
- </span>
- <span className="projects-name-meta">
- <span className="projects-name-path">
- {shortenPath(project.path)}
- </span>
- {project.branch ? (
- <>
- <span className="projects-meta-dot" aria-hidden>
- ·
- </span>
- <span className="projects-name-branch">{project.branch}</span>
- </>
- ) : null}
- <span className="projects-meta-dot" aria-hidden>
- ·
- </span>
- <span className="projects-name-sessions">
- {t("project.sessionsCount", { count: totalSessions })}
- </span>
- </span>
- </span>
+ <IconFileText size={14} />
+ {t("project.editInstructions")}
</button>
- <span className="projects-updated">
- {formatUpdated(project.openedAt, locale, t("project.updatedNever"))}
- </span>
- <div className="projects-row-actions">
- <TooltipButton
+ <button
+ type="button"
+ role="menuitem"
+ onClick={() => {
+ setMenuFor(null);
+ setMemoryFor({
+ name: project.name,
+ path: project.path,
+ groupId: project.groupId,
+ legacy: project.legacy,
+ });
+ }}
+ >
+ <IconSparkles size={14} />
+ {t("project.editMemory")}
+ </button>
+ <button
+ type="button"
+ role="menuitem"
+ data-action="edit-project"
+ onClick={() => {
+ setMenuFor(null);
+ setEditProjectFor({
+ path: project.path,
+ name: project.name,
+ groupId: project.groupId,
+ roots: project.roots,
+ legacy: project.legacy,
+ });
+ }}
+ >
+ <IconPencil size={14} />
+ {t("project.edit", { defaultValue: "Edit project" })}
+ </button>
+ <div className="projects-menu-sep" role="separator" />
+ <button
+ type="button"
+ role="menuitem"
+ onClick={() => {
+ toggleProjectPinned(project.path, !project.pinned);
+ setMenuFor(null);
+ }}
+ >
+ <IconPin size={14} />
+ {project.pinned ? t("project.unpin") : t("project.pin")}
+ </button>
+ <button
+ type="button"
+ role="menuitem"
+ onClick={() => void toggleProjectArchive(project)}
+ >
+ {selectedArchived ? (
+ <IconArchiveRestore size={14} />
+ ) : (
+ <IconArchive size={14} />
+ )}
+ {selectedArchived ? t("project.restore") : t("project.archive")}
+ </button>
+ <button
+ type="button"
+ role="menuitem"
+ className={cx(
+ "danger",
+ armedDelete === projectDeleteKey(project.path) && "is-armed",
+ )}
+ data-action="delete-project"
+ data-armed={
+ armedDelete === projectDeleteKey(project.path) ? "true" : undefined
+ }
+ onClick={() => void requestDeleteProject(project, totalSessions)}
+ >
+ <IconTrash size={14} />
+ {armedDelete === projectDeleteKey(project.path)
+ ? t("project.deleteMenuConfirm")
+ : t("project.delete")}
+ </button>
+ {selectedRetained ? (
+ <button
type="button"
- className="projects-icon-btn"
- tooltip={t("project.newTask")}
- ariaLabel={t("project.newTask")}
- onClick={() => void startTask(project.path)}
- >
- <IconPlus size={15} />
- </TooltipButton>
- <AnchoredMenu
- className="projects-menu-wrap"
- open={menuOpen}
- onClose={() => setMenuFor(null)}
- menuClassName="projects-menu"
- label={t("project.openActions", { name: project.name })}
- role="menu"
- align="end"
- trigger={(ref) => (
- <TooltipButton
- ref={ref}
- type="button"
- className="projects-icon-btn"
- tooltip={t("project.openActions", { name: project.name })}
- ariaLabel={t("project.openActions", { name: project.name })}
- aria-haspopup="menu"
- aria-expanded={menuOpen}
- onClick={() =>
- setMenuFor((cur) =>
- cur === project.path ? null : project.path,
- )
- }
- >
- <IconMore size={16} />
- </TooltipButton>
- )}
+ role="menuitem"
+ className="danger"
+ onClick={() => {
+ setMenuFor(null);
+ void closeProjectFromIndex(project.path);
+ }}
>
- <button
- type="button"
- role="menuitem"
- onClick={() => {
- setMenuFor(null);
- void startTask(project.path);
- }}
- >
- <IconChat size={14} />
- {t("project.newTask")}
- </button>
- <button
- type="button"
- role="menuitem"
- onClick={() => {
- setMenuFor(null);
- setInstructionsFor({
- name: project.name,
- path: project.path,
- groupId: project.groupId,
- legacy: project.legacy,
- });
- }}
- >
- <IconFileText size={14} />
- {t("project.editInstructions")}
- </button>
- <button
- type="button"
- role="menuitem"
- onClick={() => {
- setMenuFor(null);
- setMemoryFor({
- name: project.name,
- path: project.path,
- groupId: project.groupId,
- legacy: project.legacy,
- });
- }}
- >
- <IconSparkles size={14} />
- {t("project.editMemory")}
- </button>
- <button
- type="button"
- role="menuitem"
- data-action="edit-project"
- onClick={() => {
- setMenuFor(null);
- setEditProjectFor({
- path: project.path,
- name: project.name,
- groupId: project.groupId,
- roots: project.roots,
- legacy: project.legacy,
- });
- }}
- >
- <IconPencil size={14} />
- {t("project.edit", { defaultValue: "Edit project" })}
- </button>
- <div className="projects-menu-sep" role="separator" />
- <button
- type="button"
- role="menuitem"
- onClick={() => {
- toggleProjectPinned(project.path, !project.pinned);
- setMenuFor(null);
- }}
- >
- <IconPin size={14} />
- {project.pinned ? t("project.unpin") : t("project.pin")}
- </button>
- <button
- type="button"
- role="menuitem"
- onClick={() => void toggleProjectArchive(project)}
- >
- {archived ? (
- <IconArchiveRestore size={14} />
- ) : (
- <IconArchive size={14} />
- )}
- {archived ? t("project.restore") : t("project.archive")}
- </button>
- <button
- type="button"
- role="menuitem"
- className={cx(
- "danger",
- armedDelete === projectDeleteKey(project.path) && "is-armed",
- )}
- data-action="delete-project"
- data-armed={
- armedDelete === projectDeleteKey(project.path) ? "true" : undefined
- }
- onClick={() => void requestDeleteProject(project, totalSessions)}
- >
- <IconTrash size={14} />
- {armedDelete === projectDeleteKey(project.path)
- ? t("project.deleteMenuConfirm")
- : t("project.delete")}
- </button>
- {retained ? (
- <button
- type="button"
- role="menuitem"
- className="danger"
- onClick={() => {
- setMenuFor(null);
- void closeProjectFromIndex(project.path);
- }}
- >
- <IconX size={14} />
- {t("project.close")}
- </button>
- ) : null}
- </AnchoredMenu>
- </div>
- </div>
- {isOpen ? (
- <div className="projects-row-detail">
+ <IconX size={14} />
+ {t("project.close")}
+ </button>
+ ) : null}
+ </AnchoredMenu>
+ </div>
+ </div>
+
+ <div
+ className="projects-detail-roots"
+ aria-label={t("project.foldersLabel", { defaultValue: "Project folders" })}
+ >
+ {project.roots.map((root) => (
+ <span className="projects-detail-root" key={root.path} title={root.path}>
+ <IconFolder size={12} aria-hidden />
+ <span>{shortenPath(root.path)}</span>
+ </span>
+ ))}
+ </div>
+
+ <div className="projects-detail-header">
+ <div className="projects-detail-label">
+ {t("project.sessionsCount", { count: displayedSessions.length })}
+ </div>
+ <Button
+ size="sm"
+ variant="ghost"
+ className="projects-detail-new"
+ onClick={() => void startTask(project.path)}
+ >
+ <IconPlus size={13} />
+ {t("project.newTask")}
+ </Button>
+ </div>
+ {displayedSessions.length === 0 ? (
+ <div className="projects-detail-empty">{t("project.noSessions")}</div>
+ ) : (
+ <div className="projects-detail-tasks">
+ {visibleSessions.map((s) => {
+ const title = s.title || s.id;
+ return (
<div
- className="projects-detail-roots"
- aria-label={t("project.foldersLabel", { defaultValue: "Project folders" })}
+ key={s.id}
+ className="projects-detail-task-row"
+ onContextMenu={(event) => {
+ event.preventDefault();
+ setRenameFor(s);
+ }}
>
- {project.roots.map((root) => (
- <span className="projects-detail-root" key={root.path} title={root.path}>
- <IconFolder size={12} aria-hidden />
- <span>{shortenPath(root.path)}</span>
+ <button
+ type="button"
+ className="projects-detail-task"
+ onClick={() => void openProjectSession(project.path, s.id)}
+ title={title}
+ >
+ <IconChat size={13} className="projects-detail-task-icon" />
+ <span className="projects-detail-task-title">{title}</span>
+ <span className="projects-detail-task-updated">
+ {formatUpdated(
+ sessionTimestamp(s.updatedAt),
+ locale,
+ t("project.updatedNever"),
+ )}
</span>
- ))}
- </div>
- <div className="projects-detail-header">
- <div className="projects-detail-label">
- {t("project.sessionsCount", { count: displayedSessions.length })}
- </div>
- <Button
- size="sm"
- variant="ghost"
- className="projects-detail-new"
- onClick={() => void startTask(project.path)}
+ </button>
+ <TooltipButton
+ type="button"
+ className="projects-detail-task-rename"
+ tooltip={t("session.renameAction", { title })}
+ ariaLabel={t("session.renameAction", { title })}
+ onClick={() => setRenameFor(s)}
>
- <IconPlus size={13} />
- {t("project.newTask")}
- </Button>
+ <IconPencil size={13} aria-hidden />
+ </TooltipButton>
</div>
- {displayedSessions.length === 0 ? (
- <div className="projects-detail-empty">{t("project.noSessions")}</div>
- ) : (
- <div className="projects-detail-tasks">
- {visibleSessions.map((s) => {
- const title = s.title || s.id;
- return (
- <div
- key={s.id}
- className="projects-detail-task-row"
- onContextMenu={(event) => {
- event.preventDefault();
- setRenameFor(s);
- }}
- >
- <button
- type="button"
- className="projects-detail-task"
- onClick={() => void openProjectSession(project.path, s.id)}
- title={title}
- >
- <IconChat size={13} className="projects-detail-task-icon" />
- <span className="projects-detail-task-title">{title}</span>
- <span className="projects-detail-task-updated">
- {formatUpdated(
- sessionTimestamp(s.updatedAt),
- locale,
- t("project.updatedNever"),
- )}
- </span>
- </button>
- <TooltipButton
- type="button"
- className="projects-detail-task-rename"
- tooltip={t("session.renameAction", { title })}
- ariaLabel={t("session.renameAction", { title })}
- onClick={() => setRenameFor(s)}
- >
- <IconPencil size={13} aria-hidden />
- </TooltipButton>
- </div>
- );
- })}
- </div>
- )}
- {hiddenSessionCount > 0 ? (
- <Button
- size="sm"
- variant="ghost"
- className="projects-detail-more"
- onClick={() =>
- setVisibleSessionCounts((prev) => ({
- ...prev,
- [project.path]: visibleCount + INITIAL_VISIBLE_SESSION_COUNT,
- }))
- }
- >
- {t("project.showMoreSessions", { count: hiddenSessionCount })}
- </Button>
- ) : displayedSessions.length > INITIAL_VISIBLE_SESSION_COUNT ? (
- <Button
- size="sm"
- variant="ghost"
- className="projects-detail-more"
- onClick={() =>
- setVisibleSessionCounts((prev) => ({
- ...prev,
- [project.path]: INITIAL_VISIBLE_SESSION_COUNT,
- }))
- }
- >
- {t("project.showFewerSessions")}
- </Button>
- ) : null}
- </div>
- ) : null}
+ );
+ })}
</div>
- );
- })}
+ )}
+ {hiddenSessionCount > 0 ? (
+ <Button
+ size="sm"
+ variant="ghost"
+ className="projects-detail-more"
+ onClick={() =>
+ setVisibleSessionCounts((prev) => ({
+ ...prev,
+ [project.path]: visibleCount + INITIAL_VISIBLE_SESSION_COUNT,
+ }))
+ }
+ >
+ {t("project.showMoreSessions", { count: hiddenSessionCount })}
+ </Button>
+ ) : displayedSessions.length > INITIAL_VISIBLE_SESSION_COUNT ? (
+ <Button
+ size="sm"
+ variant="ghost"
+ className="projects-detail-more"
+ onClick={() =>
+ setVisibleSessionCounts((prev) => ({
+ ...prev,
+ [project.path]: INITIAL_VISIBLE_SESSION_COUNT,
+ }))
+ }
+ >
+ {t("project.showFewerSessions")}
+ </Button>
+ ) : null}
+ </>
+ ) : (
+ <div className="projects-inspector-empty">
+ <div className="projects-empty-title">{t("project.inspectorEmptyTitle")}</div>
+ <div className="projects-empty-body">{t("project.inspectorEmptyBody")}</div>
</div>
- </section>
- ))}
+ )}
+ </div>
</div>
)}
{instructionsFor ? (
diff --git a/apps/desktop/src/styles/projects.css b/apps/desktop/src/styles/projects.css
index 660088eb7..be5879b48 100644
--- a/apps/desktop/src/styles/projects.css
+++ b/apps/desktop/src/styles/projects.css
@@ -1,8 +1,8 @@
/*
Settings → Project archive — one quiet description line, one toolbar (sort,
- search, add project), and one elevated panel whose pinned / projects /
- archived groups are in-panel header strips carrying their own counts, plus
- the project rows and their expanded detail pane.
+ search, add project), and a list + inspector workbench. Pinned / projects /
+ archived stay grouped in the index; folders, chats, and actions live in the
+ inspector so a long index stays scannable (D455).
*/
/* ---------- Settings → Project archive ---------- */
@@ -11,7 +11,7 @@
}
/* One quiet description line, same as `.agent-capability-intro` on the sibling
- capability pages. The panel below carries the per-group counts. */
+ capability pages. The workbench below carries the per-group counts. */
.projects-intro {
display: flex;
max-width: 92ch;
@@ -200,6 +200,14 @@
white-space: nowrap;
}
+:lang(zh-CN) .projects-group-label,
+:lang(zh-TW) .projects-group-label,
+:lang(zh-CN) .projects-detail-label,
+:lang(zh-TW) .projects-detail-label {
+ letter-spacing: var(--tracking-normal);
+ text-transform: none;
+}
+
.projects-group-count {
flex: 0 0 auto;
border-radius: var(--radius-full);
@@ -211,27 +219,31 @@
line-height: var(--leading-normal);
}
-/*
- The index is a stack of groups, each a label above soft tile rows with a
- small gap between them (D297) — the same language as the Extensions page.
- The shared `.settings-panel` frame is neutralised here so nothing clips the
- row menus and no ring wraps the stack.
-*/
-.projects-list {
+.projects-workbench {
+ display: grid;
+ grid-template-columns: minmax(240px, 0.92fr) minmax(280px, 1.15fr);
+ gap: 14px;
+ align-items: start;
+ min-width: 0;
+}
+
+.projects-workbench:focus-visible {
+ outline: none;
+ box-shadow: 0 0 0 2px color-mix(in oklab, var(--ds-accent) 80%, transparent);
+}
+
+.projects-index-pane,
+.projects-index {
display: flex;
min-width: 0;
flex-direction: column;
- gap: 20px;
- overflow: visible;
- background: transparent;
- box-shadow: none;
+ gap: 16px;
+}
+
+.projects-index {
+ outline: none;
}
-/*
- Each group is a labelled section wrapping its own `role="list"`, so the label
- stays out of the list's required-children contract while the rows keep their
- group name in the accessibility tree.
-*/
.projects-group,
.projects-group-rows {
min-width: 0;
@@ -247,20 +259,26 @@
position: relative;
border-radius: var(--radius-md-plus);
background: var(--ds-tile);
- transition: background var(--motion-duration-fast) var(--motion-ease-out);
+ transition:
+ background var(--motion-duration-fast) var(--motion-ease-out),
+ box-shadow var(--motion-duration-fast) var(--motion-ease-out);
}
.projects-row-block:hover,
-.projects-row-block:focus-within,
-.projects-row-block.menu-open {
+.projects-row-block:focus-within {
background: var(--ds-tile-hover);
}
-/* The open project is the deepest tile; no accent bar. */
+/* The open project is the deepest tile; selection uses a quiet accent ring. */
.projects-row-block.active {
background: var(--ds-tile-deep);
}
+.projects-row-block.selected {
+ background: var(--ds-tile-deep);
+ box-shadow: 0 0 0 1px color-mix(in oklab, var(--ds-accent) 34%, transparent);
+}
+
/* Archived rows stay listed; the section label carries the state, so the row is
only softened rather than dimmed to the edge of legibility. */
.projects-row-block.archived .projects-glyph {
@@ -273,12 +291,21 @@
.projects-row {
display: flex;
+ width: 100%;
align-items: center;
- gap: 6px;
- padding: 9px 14px 9px 8px;
+ gap: 10px;
+ min-width: 0;
+ padding: 8px 12px;
+ text-align: left;
+ border-radius: var(--radius-md-plus);
+ cursor: pointer;
+}
+
+.projects-row:focus-visible {
+ outline: none;
+ box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--ds-accent) 80%, transparent);
}
-.projects-expand,
.projects-icon-btn {
display: inline-flex;
align-items: center;
@@ -288,49 +315,17 @@
border-radius: var(--radius-2xs);
color: var(--ds-text-faint);
flex: 0 0 auto;
+ cursor: pointer;
transition:
background var(--motion-duration-fast) var(--motion-ease-out),
- color var(--motion-duration-fast) var(--motion-ease-out),
- opacity var(--motion-duration-fast) var(--motion-ease-out);
+ color var(--motion-duration-fast) var(--motion-ease-out);
}
-.projects-expand:hover,
.projects-icon-btn:hover {
background: color-mix(in oklab, var(--ds-text-primary) 8%, transparent);
color: var(--ds-text-primary);
}
-.projects-expand[aria-expanded="true"] {
- color: var(--ds-text-secondary);
-}
-
-/* Row actions stay quiet until the row is hovered, focused, or has its menu open. */
-.projects-row-actions {
- display: flex;
- align-items: center;
- gap: 2px;
- flex: 0 0 auto;
- opacity: 0;
- transition: opacity var(--motion-duration-fast) var(--motion-ease-out);
-}
-
-.projects-row-block:hover .projects-row-actions,
-.projects-row-block:focus-within .projects-row-actions,
-.projects-row-block.menu-open .projects-row-actions {
- opacity: 1;
-}
-
-.projects-name-btn {
- display: flex;
- flex: 1;
- align-items: center;
- gap: 11px;
- min-width: 0;
- text-align: left;
- border-radius: var(--radius-md);
- padding: 4px 6px;
-}
-
.projects-glyph {
display: inline-flex;
width: 28px;
@@ -342,11 +337,17 @@
flex: 0 0 auto;
}
+.projects-glyph.is-large {
+ width: 36px;
+ height: 36px;
+}
+
.projects-name-copy {
min-width: 0;
display: flex;
+ flex: 1;
flex-direction: column;
- gap: 3px;
+ gap: 2px;
}
.projects-name-title {
@@ -355,7 +356,7 @@
gap: 6px;
min-width: 0;
color: var(--ds-text-primary);
- font-size: var(--text-md-plus);
+ font-size: var(--text-md);
font-weight: var(--font-weight-medium-plus);
line-height: var(--leading-tight);
}
@@ -436,6 +437,78 @@
white-space: nowrap;
}
+.projects-inspector {
+ position: sticky;
+ top: 8px;
+ display: flex;
+ min-width: 0;
+ flex-direction: column;
+ gap: 10px;
+ padding: 16px;
+}
+
+.projects-inspector-head {
+ display: flex;
+ align-items: flex-start;
+ gap: 12px;
+ min-width: 0;
+}
+
+.projects-inspector-ident {
+ min-width: 0;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+}
+
+.projects-inspector-title {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 6px;
+ min-width: 0;
+}
+
+.projects-inspector-name {
+ margin: 0;
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ color: var(--ds-text-primary);
+ font-size: var(--text-md-plus);
+ font-weight: var(--font-weight-medium-plus);
+ line-height: var(--leading-tight);
+}
+
+.projects-inspector-meta {
+ display: flex;
+ align-items: center;
+ gap: 5px;
+ min-width: 0;
+ color: var(--ds-text-muted);
+ font-size: var(--text-xs-plus);
+}
+
+.projects-inspector-actions {
+ display: flex;
+ flex: 0 0 auto;
+ align-items: center;
+ gap: 4px;
+}
+
+.projects-inspector-empty {
+ display: flex;
+ min-height: 180px;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: 6px;
+ padding: 24px 12px;
+ text-align: center;
+}
+
.projects-menu-wrap {
position: relative;
}
@@ -491,6 +564,7 @@
padding: 7px 10px;
color: var(--ds-text-primary);
font-size: var(--text-sm-plus);
+ cursor: pointer;
transition: background var(--motion-duration-fast) var(--motion-ease-out);
}
@@ -522,21 +596,10 @@
height: 6px;
}
-/*
- Left padding keeps the session list under the project name column, not under
- the glyph. The pane is a sibling of `.projects-row`, so the offset is measured
- from the row block's own edge and nothing is subtracted: row padding 8 +
- expand 26 + row gap 6 + name-button padding 6 + glyph 28 + name gap 11 = 85.
-*/
-.projects-row-detail {
- padding: 0 14px 14px 85px;
-}
-
.projects-detail-roots {
display: flex;
flex-wrap: wrap;
gap: 6px 12px;
- margin-bottom: 8px;
}
.projects-detail-root {
@@ -560,7 +623,7 @@
justify-content: space-between;
gap: 12px;
min-height: 26px;
- margin-bottom: 2px;
+ margin-top: 4px;
}
.projects-detail-label {
@@ -611,6 +674,7 @@
padding: 7px 8px;
color: var(--ds-text-secondary);
font-size: var(--text-sm-plus);
+ cursor: pointer;
transition:
background var(--motion-duration-fast) var(--motion-ease-out),
color var(--motion-duration-fast) var(--motion-ease-out);
@@ -657,6 +721,7 @@
border-radius: var(--radius-2xs);
color: var(--ds-text-muted);
opacity: 0;
+ cursor: pointer;
transition:
background var(--motion-duration-fast) var(--motion-ease-out),
color var(--motion-duration-fast) var(--motion-ease-out),
@@ -717,7 +782,7 @@
margin-top: 3px;
}
-/* Narrow content panes stack the toolbar instead of wrapping it mid-row. */
+/* Narrow content panes stack the toolbar and the workbench. */
@media (max-width: 720px) {
.projects-toolbar {
align-items: stretch;
@@ -744,6 +809,24 @@
.projects-toolbar-actions {
margin-left: 0;
}
+
+ .projects-workbench {
+ grid-template-columns: 1fr;
+ }
+
+ .projects-inspector {
+ position: static;
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .projects-row-block,
+ .projects-icon-btn,
+ .projects-search-wrap,
+ .projects-detail-task,
+ .projects-detail-task-rename {
+ transition: none;
+ }
}
/*
diff --git a/apps/desktop/test/project-archive.test.mjs b/apps/desktop/test/project-archive.test.mjs
new file mode 100644
index 000000000..68f68bc3c
--- /dev/null
+++ b/apps/desktop/test/project-archive.test.mjs
@@ -0,0 +1,151 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+import {
+ INITIAL_VISIBLE_SESSION_COUNT,
+ buildProjectIndex,
+ displayedProjectSessions,
+ filterArchiveItems,
+ groupArchiveRows,
+ neighborPath,
+ projectBucket,
+ projectMatchesQuery,
+ resolveSelectedPath,
+ sessionMatchesIndexProject,
+ sessionMatchesQuery,
+ sessionTimestamp,
+ shortenPath,
+} from "../src/lib/project-archive.ts";
+
+test("the archive never hides archived rows behind a filter", () => {
+ const grouped = groupArchiveRows(
+ [
+ {
+ path: "/a",
+ name: "A",
+ openedAt: 3,
+ groupId: "a",
+ roots: [{ path: "/a", name: "A", position: 0 }],
+ legacy: false,
+ pinned: true,
+ },
+ {
+ path: "/b",
+ name: "B",
+ openedAt: 2,
+ groupId: "b",
+ roots: [{ path: "/b", name: "B", position: 0 }],
+ legacy: false,
+ },
+ {
+ path: "/c",
+ name: "C",
+ openedAt: 1,
+ groupId: "c",
+ roots: [{ path: "/c", name: "C", position: 0 }],
+ legacy: false,
+ archived: true,
+ },
+ ],
+ "recent",
+ );
+ assert.deepEqual(
+ grouped.map((group) => [group.id, group.rows.map((row) => row.path)]),
+ [
+ ["pinned", ["/a"]],
+ ["projects", ["/b"]],
+ ["archived", ["/c"]],
+ ],
+ );
+ assert.equal(projectBucket({ archived: true, pinned: true, path: "/c", name: "C", openedAt: 0, groupId: "c", roots: [], legacy: false }), "archived");
+});
+
+test("search keeps a project when a session title matches", () => {
+ const items = [
+ {
+ path: "/repo",
+ name: "repo",
+ openedAt: 1,
+ groupId: "g",
+ roots: [{ path: "/repo", name: "repo", position: 0 }],
+ legacy: false,
+ },
+ {
+ path: "/other",
+ name: "other",
+ openedAt: 2,
+ groupId: "o",
+ roots: [{ path: "/other", name: "other", position: 0 }],
+ legacy: false,
+ },
+ ];
+ const sessions = [
+ {
+ id: "s1",
+ title: "Fix notarization",
+ projectPath: "/repo",
+ createdAt: "2026-01-01T00:00:00.000Z",
+ updatedAt: "2026-01-02T00:00:00.000Z",
+ },
+ ];
+ const filtered = filterArchiveItems(items, sessions, "notarization");
+ assert.deepEqual(
+ filtered.map((item) => item.path),
+ ["/repo"],
+ );
+ assert.equal(projectMatchesQuery(items[0], "notarization"), false);
+ assert.equal(sessionMatchesQuery(sessions[0], "notarization"), true);
+ assert.equal(sessionMatchesIndexProject(sessions[0], items[0]), true);
+ const shown = displayedProjectSessions(sessions, items[0], "notarization");
+ assert.equal(shown.sessionSearchMatch, true);
+ assert.equal(shown.displayed[0]?.id, "s1");
+});
+
+test("selection stays on the current row, then the live workspace, then the first match", () => {
+ const rows = [
+ { path: "/a", name: "A", openedAt: 1, groupId: "a", roots: [], legacy: false },
+ { path: "/b", name: "B", openedAt: 2, groupId: "b", roots: [], legacy: false },
+ ];
+ assert.equal(resolveSelectedPath({ selectedPath: "/b", filtered: rows }), "/b");
+ assert.equal(
+ resolveSelectedPath({ selectedPath: "/gone", filtered: rows, preferredPath: "/a" }),
+ "/a",
+ );
+ assert.equal(resolveSelectedPath({ selectedPath: null, filtered: rows }), "/a");
+ assert.equal(resolveSelectedPath({ selectedPath: "/a", filtered: [] }), null);
+ assert.equal(neighborPath(rows, "/a", 1), "/b");
+ assert.equal(neighborPath(rows, "/b", 1), "/b");
+ assert.equal(neighborPath(rows, "/b", -1), "/a");
+});
+
+test("the index merges durable groups ahead of recents and session seeds", () => {
+ const items = buildProjectIndex({
+ durableProjects: [
+ {
+ id: "g1",
+ name: "Desktop",
+ primaryPath: "/Users/lan/PI-Desktop",
+ roots: [
+ { path: "/Users/lan/PI-Desktop", name: "PI-Desktop", position: 0 },
+ { path: "/Users/lan/docs", name: "docs", position: 1 },
+ ],
+ lastOpenedAt: 10,
+ pinned: false,
+ },
+ ],
+ recents: [{ path: "/Users/lan/PI-Desktop", name: "old", openedAt: 50 }],
+ sessionProjects: [{ path: "/tmp/scratch", name: "scratch", updatedAt: 20 }],
+ workspace: { path: "/Users/lan/PI-Desktop", name: "Desktop" },
+ projectMeta: {
+ "/Users/lan/PI-Desktop": { pinned: true },
+ "/tmp/scratch": { archived: true },
+ },
+ });
+ assert.equal(items[0]?.groupId, "g1");
+ assert.equal(items[0]?.pinned, true);
+ assert.equal(items[0]?.name, "Desktop");
+ assert.equal(items[0]?.roots.length, 2);
+ assert.equal(items[1]?.archived, true);
+ assert.equal(shortenPath("/Users/lan/PI-Desktop"), "~/PI-Desktop");
+ assert.equal(INITIAL_VISIBLE_SESSION_COUNT, 8);
+ assert.ok(sessionTimestamp("2026-01-02T00:00:00.000Z") > 0);
+});
diff --git a/apps/desktop/test/settings-project-archive.test.mjs b/apps/desktop/test/settings-project-archive.test.mjs
index 422bd86f9..02b613ba6 100644
--- a/apps/desktop/test/settings-project-archive.test.mjs
+++ b/apps/desktop/test/settings-project-archive.test.mjs
@@ -9,6 +9,14 @@ const projectsPageSource = await readFile(
new URL("../src/pages/ProjectsPage.tsx", import.meta.url),
"utf8",
);
+const projectsIndexSource = await readFile(
+ new URL("../src/features/projects/ProjectArchiveIndex.tsx", import.meta.url),
+ "utf8",
+);
+const projectArchiveSource = await readFile(
+ new URL("../src/lib/project-archive.ts", import.meta.url),
+ "utf8",
+);
const settingsSearchSource = await readFile(
new URL("../src/lib/settings-search.ts", import.meta.url),
"utf8",
@@ -19,12 +27,11 @@ const searchDialogSource = await readFile(
);
const appSource = await readAppSource();
const projectsStyleSource = await loadStyles();
-// The archive partial on its own: `loadStyles` inlines the whole cascade, so
-// assertions that a rule is *gone* have to look at the file that owned it.
const projectsPartialSource = await readFile(
new URL("../src/styles/projects.css", import.meta.url),
"utf8",
);
+const archiveUiSource = `${projectsPageSource}\n${projectsIndexSource}\n${projectArchiveSource}`;
test("settings owns the project archive destination", () => {
assert.match(settingsSearchSource, /id: "projects"/);
@@ -39,19 +46,20 @@ test("settings owns the project archive destination", () => {
});
test("project archive includes archived projects without a visibility toggle", () => {
- assert.doesNotMatch(
- projectsPageSource,
- /filter\(\(project\).*project\.archived/s,
- );
- assert.doesNotMatch(projectsPageSource, /setSessionArchiveVisibility/);
+ assert.doesNotMatch(projectArchiveSource, /setSessionArchiveVisibility/);
+ assert.match(projectArchiveSource, /Archived records are grouped last/);
assert.match(projectsPageSource, /setSettingsTab\("projects"\)/);
+ assert.match(projectArchiveSource, /if \(project\.archived === true\) return "archived"/);
});
test("project archive makes project sessions searchable and progressively visible", () => {
- assert.match(projectsPageSource, /sessionMatchesQuery/);
- assert.match(projectsPageSource, /sessionTimestamp\(b\.updatedAt\) - sessionTimestamp\(a\.updatedAt\)/);
- assert.doesNotMatch(projectsPageSource, /\.slice\(0, 4\)/);
- assert.match(projectsPageSource, /INITIAL_VISIBLE_SESSION_COUNT = 8/);
+ assert.match(archiveUiSource, /sessionMatchesQuery/);
+ assert.match(
+ projectArchiveSource,
+ /sessionTimestamp\(b\.updatedAt\) - sessionTimestamp\(a\.updatedAt\)/,
+ );
+ assert.doesNotMatch(archiveUiSource, /\.slice\(0, 4\)/);
+ assert.match(projectArchiveSource, /INITIAL_VISIBLE_SESSION_COUNT = 8/);
assert.match(projectsPageSource, /project\.sessionsCount/);
assert.match(projectsPageSource, /project\.showMoreSessions/);
assert.match(projectsPageSource, /project\.showFewerSessions/);
@@ -63,16 +71,12 @@ test("project archive is no longer a standalone app page", () => {
assert.doesNotMatch(appSource, /page === "projects"/);
});
-test("project archive renders the intro, toolbar, and grouped index", () => {
- // One quiet description line and no counter run: the per-group counts in the
- // panel are the only totals the destination shows.
+test("project archive renders the intro, toolbar, and list-inspector workbench", () => {
assert.match(projectsPageSource, /projects-intro-desc/);
assert.match(projectsPageSource, /project\.archiveSubtitle/);
- // The counter run is gone, so its markup and its four label keys are retired.
assert.doesNotMatch(projectsPageSource, /projects-intro-stat/);
assert.doesNotMatch(projectsPageSource, /project\.stat[A-Z]/);
- // Toolbar: clearable search with a live match count plus a sort control.
assert.match(projectsPageSource, /projects-search-clear/);
assert.match(projectsPageSource, /project\.clearSearch/);
assert.match(projectsPageSource, /projects-result-count[^]*aria-live="polite"/);
@@ -82,34 +86,31 @@ test("project archive renders the intro, toolbar, and grouped index", () => {
assert.match(projectsPageSource, /project\.sortRecent/);
assert.match(projectsPageSource, /project\.sortName/);
- // Grouped index: archived records are a trailing section, not a filter.
assert.match(
- projectsPageSource,
+ projectArchiveSource,
/GROUP_ORDER: GroupId\[\] = \["pinned", "projects", "archived"\]/,
);
- assert.match(projectsPageSource, /pinned: "project\.groupPinned"/);
- assert.match(projectsPageSource, /projects: "project\.groupProjects"/);
- assert.match(projectsPageSource, /archived: "project\.groupArchived"/);
- assert.match(projectsPageSource, /projects-group-count/);
+ assert.match(projectArchiveSource, /pinned: "project\.groupPinned"/);
+ assert.match(projectArchiveSource, /projects: "project\.groupProjects"/);
+ assert.match(projectArchiveSource, /archived: "project\.groupArchived"/);
+ assert.match(projectsIndexSource, /projects-group-count/);
assert.match(projectsPageSource, /projects-empty/);
- // One workbench: the groups are strips inside a single elevated panel.
- assert.equal(
- projectsPageSource.match(/settings-panel projects-list/g)?.length,
- 1,
- );
- // Each group keeps its name in the accessibility tree and owns the list role,
- // so the strip never becomes a non-listitem child of a list.
- assert.match(projectsPageSource, /aria-labelledby=\{`projects-group-\$\{group\.id\}`\}/);
- assert.match(projectsPageSource, /<h3 className="projects-group-label"/);
- assert.match(projectsPageSource, /className="projects-group-rows" role="list"/);
- assert.doesNotMatch(projectsPageSource, /projects-group-head" role="presentation"/);
+ assert.equal(projectsPageSource.match(/projects-workbench/g)?.length, 1);
+ assert.match(projectsPageSource, /projects-inspector/);
+ assert.match(projectsIndexSource, /aria-labelledby=\{`projects-group-\$\{group\.id\}`\}/);
+ assert.match(projectsIndexSource, /<h3 className="projects-group-label"/);
+ assert.match(projectsIndexSource, /className="projects-group-rows" role="list"/);
+ assert.doesNotMatch(archiveUiSource, /projects-group-head" role="presentation"/);
+ assert.doesNotMatch(archiveUiSource, /projects-expand/);
+ assert.match(projectsIndexSource, /onDoubleClick=\{\(\) => onActivate\(project\.path\)\}/);
+ assert.match(projectsPageSource, /onActivate=\{\(path\) => void activate\(path\)\}/);
});
test("pinned projects use a distinct star glyph", () => {
- assert.match(projectsPageSource, /IconStar/);
+ assert.match(projectsIndexSource, /IconStar/);
assert.match(
- projectsPageSource,
+ projectsIndexSource,
/projects-glyph[^]*project\.pinned \? \([\s\S]*<IconStar size=\{15\} fill="currentColor" aria-hidden \/>[\s\S]*<IconFolder size=\{15\} aria-hidden \/>/,
);
});
@@ -125,10 +126,11 @@ test("project archive styles group archived rows instead of hiding them", () =>
assert.match(projectsStyleSource, /\.projects-intro-desc\s*\{/);
assert.match(projectsStyleSource, /\.projects-sort-btn\.active\s*\{/);
assert.match(projectsStyleSource, /\.projects-group-head\s*\{/);
+ assert.match(projectsPartialSource, /\.projects-workbench\s*\{/);
+ assert.match(projectsPartialSource, /\.projects-inspector\s*\{/);
assert.doesNotMatch(projectsStyleSource, /\.projects-row-block\.archived\s*\{\s*display:\s*none/);
assert.doesNotMatch(projectsStyleSource, /\.projects-row-block\.archived\s*\{\s*opacity/);
- // The decorative hero card is gone: no hero rules and no gradient fill.
assert.doesNotMatch(projectsPartialSource, /projects-hero/);
assert.doesNotMatch(projectsPartialSource, /projects-stat/);
assert.doesNotMatch(projectsPartialSource, /linear-gradient/);
diff --git a/docs/adr/0294-project-archive-list-inspector.md b/docs/adr/0294-project-archive-list-inspector.md
new file mode 100644
index 000000000..5b791d0ed
--- /dev/null
+++ b/docs/adr/0294-project-archive-list-inspector.md
@@ -0,0 +1,62 @@
+# ADR 0294: Project archive is a list + inspector workbench
+
+- Status: Accepted
+- Date: 2026-09-20
+- Decision: D455
+- Amends: D267 / D168 (row anatomy and inline expansion)
+- Related: D133 (archive always visible), D257 (capability workbench),
+ [04-ux/06-settings-ia.md](../spec/04-ux/06-settings-ia.md),
+ [06-delivery/04-e2e-test-plan.md](../spec/06-delivery/04-e2e-test-plan.md)
+ (E2E-038)
+
+## Context
+
+D267 collapsed Project archive to one workbench: a quiet intro, one toolbar,
+and one panel whose Pinned / All projects / Archived groups were in-panel
+strips. Each row still carried a disclosure control, two lines of metadata,
+state tags, a hover action pair, and an inline session list. Adding more
+projects made the destination hard to scan: expanding one row pushed the rest
+of the index, and clicking a name activated the project and left Settings.
+
+The durable index is a management surface. Selecting a project to inspect it
+must not leave the page.
+
+## Decision
+
+1. **Keep the intro and toolbar.** One description line, Recent/Name sort,
+ search with a live match count, and Add project. No hero, gradient, or
+ page-level counters (D267).
+2. **Replace the single expanding list with a list + inspector.** The index
+ keeps Pinned / All projects / Archived as labelled regions with per-section
+ counts. Compact rows show the color glyph (Star when pinned, Folder
+ otherwise), name, one status tag (Active / Open / Archived), session count,
+ and relative time. Empty groups are omitted.
+3. **Click selects; activation is explicit.** A click (or ArrowUp/ArrowDown)
+ selects the row and keeps Settings open. Double-click, Enter, or the
+ inspector Open action activates the project and returns to chat. Archive and
+ close still keep Project archive open.
+4. **The inspector owns management.** Folders, chats (latest first, batches of
+ eight), New task, and the existing menu (instructions, memory, edit, pin,
+ archive/restore, two-step delete, close) live beside the index. Below 720px
+ the inspector stacks under the index. Archived records stay grouped and
+ visible; there is still no visibility toggle (D133).
+5. **Search still matches session titles.** A session-title hit keeps the
+ owning project in the index, selects it, and lists the matching chats in
+ the inspector.
+6. **Presentation only.** No IPC, storage, host protocol, or activation
+ semantics change beyond the click-vs-activate split on this destination.
+
+## Consequences
+
+- Managing many projects no longer requires expanding rows in the index.
+- A single click no longer leaves Settings, which is the management path; the
+ chat path is Open / double-click / Enter / opening a session.
+- Source-contract tests for the archive destination now cover the workbench
+ and the extracted `project-archive` helpers.
+
+## Alternatives
+
+- Keep inline expansion and add a density toggle. Rejected: the row still
+ dumps every action onto the index.
+- Hide archived records behind a filter. Rejected: D133 forbids a visibility
+ toggle on this destination.
diff --git a/docs/adr/README.md b/docs/adr/README.md
index e037741a5..b1f43915c 100644
--- a/docs/adr/README.md
+++ b/docs/adr/README.md
@@ -320,4 +320,5 @@ Each ADR includes:
| 0291 | [Remove the speech settings UI](0291-remove-speech-settings-ui.md) | Accepted (amends ADR 0281) |
| 0292 | [SSH bootstrap for remote hosts](0292-ssh-remote-host-bootstrap.md) | Accepted for implementation (D453; ADR 0205 R2b, extends ADR 0286) |
| 0293 | [SSH password authentication for the remote-host bootstrap](0293-ssh-password-authentication.md) | Accepted (D454; amends ADR 0292) |
+| 0294 | [Project archive is a list + inspector workbench](0294-project-archive-list-inspector.md) | Accepted (D455; amends D267 / D168) |
| turn-process-and-thinking-display | [Turn process and thinking presentation](turn-process-and-thinking-display.md) | Accepted |
diff --git a/docs/spec/04-ux/06-settings-ia.md b/docs/spec/04-ux/06-settings-ia.md
index 450c6ad6f..707eaf168 100644
--- a/docs/spec/04-ux/06-settings-ia.md
+++ b/docs/spec/04-ux/06-settings-ia.md
@@ -565,8 +565,8 @@ system while preserving their different data ownership:
- Reuses the durable Projects index as a settings-scale management surface
- Always includes archived records; archived rows are grouped, never hidden, so
the destination still has no visibility toggle
-- Supports project search, add, activate, project-session expansion, pin,
- archive/restore, and close
+- Supports project search, add, select, activate, pin, archive/restore, and
+ close
- A successful session import bound to an archived project restores that
project's renderer presentation state after the session refresh, making the
imported session visible in the default sidebar. Ordinary refreshes and
@@ -576,44 +576,47 @@ system while preserving their different data ownership:
is the primary root of one logical project, and the remaining folders are
retained as roots of that same project rather than separate project tabs.
Chats, project instructions, and project memory are shared by the group.
-- The destination is one workbench, not a stack of bands (D267, revising D168):
- a quiet intro line above a single toolbar above a single elevated panel. It
+- The destination is one workbench (D267), revised by D455 into a list +
+ inspector. A quiet intro line sits above one toolbar above the workbench. It
reuses the same composition, control height, and row rhythm as the agent
capability pages (D257) and adds no page-specific chrome.
1. **Intro line** — one quiet description line, the same shape as the
capability pages' intro. The destination shows no page-level totals: there
is no hero block, decorative gradient, counter banner, or inline counter
- run. The per-group counts on the panel's header strips are the only totals,
+ run. The per-group counts on the index header strips are the only totals,
so a number is never repeated in two places
2. **Toolbar** — one row carrying the Recent/Name sort as the shared
segmented control, the search field with a clear affordance and a match
count while searching, and the primary Add project action right-aligned
- 3. **Panel** — one settings panel holds every group. The always-visible
- sections run Pinned, All projects, Archived as non-interactive in-panel
+ 3. **Workbench** — a compact index beside an inspector. The always-visible
+ index sections run Pinned, All projects, Archived as non-interactive
header strips, each carrying its label and row count. Every section is a
labelled region wrapping its own list, so the strip is never a non-list
child of a list and each row keeps its group name in the accessibility
- tree; rows follow with hairline separators. Empty sections are omitted,
- and an index with no rows renders one quiet in-panel empty state instead
- of the panel groups
-- Row anatomy: disclosure control, color glyph, project name with state tags
- (Active, Open, pinned tag, Archived), one meta line carrying the shortened
- monospace path, branch, and session count, a relative last-active time, and a
- hover/focus-revealed action pair (New task, row menu). The colored glyph uses
- Folder for ordinary projects and a filled Star for pinned projects, while the
- pinned tag remains as the localized text cue.
-- The row menu groups create/edit actions above pin, archive/restore, and the
- destructive Close action, and closes on Escape or any outside press
-- The row menu includes Project memory. Its editor is a compact viewport-level
- dialog with a list of editable memory cards. Each card supports an optional
- title, multiline content, and removal; the dialog also supports adding
- entries, shows an empty state, and keeps Cancel/Save actions. Saved entries
- are scoped to that project's path and are available in later chats for the
- project.
+ tree. Empty sections are omitted, and an index with no rows renders one
+ quiet empty state instead of the workbench. Below 720px the inspector
+ stacks under the index
+- Compact row anatomy: color glyph, project name with one status tag (Active,
+ Open, or Archived), session count, and a relative last-active time. The
+ colored glyph uses Folder for ordinary projects and a filled Star for pinned
+ projects. A click selects the row and keeps Settings open; double-click or
+ Enter activates the project and returns to chat
+- The inspector shows the selected project's name and tags (Active, Open,
+ pinned, Archived), shortened monospace path and branch, Open and New task
+ actions, folders, and chats. The inspector menu groups create/edit actions
+ above pin, archive/restore, and the destructive Close action, and closes on
+ Escape or any outside press
+- The inspector menu includes Project memory. Its editor is a compact
+ viewport-level dialog with a list of editable memory cards. Each card
+ supports an optional title, multiline content, and removal; the dialog also
+ supports adding entries, shows an empty state, and keeps Cancel/Save
+ actions. Saved entries are scoped to that project's path and are available
+ in later chats for the project.
- Project search also matches session titles. Matching a session retains and
- expands its owning project; expanded sessions are ordered by latest activity,
- show a count and relative update time, and reveal additional rows in batches
- of eight rather than silently truncating the history
+ selects its owning project; the inspector lists matching sessions ordered by
+ latest activity, shows a count and relative update time, and reveals
+ additional rows in batches of eight rather than silently truncating the
+ history
- Activating a project or project session returns to chat; archive and close
actions keep Project archive open even when the active workspace changes
@@ -695,9 +698,10 @@ system while preserving their different data ownership:
12. Project archive always exposes archived records and can restore them without
duplicating the index in the app shell
13. Project archive renders one quiet description line — no hero, banner, or
- page-level counter run — above one search + sort toolbar and one panel
- containing the Pinned / All projects / Archived group strips; each strip's
- count agrees with its rendered rows, sorting reorders rows inside every
+ page-level counter run — above one search + sort toolbar and a list +
+ inspector workbench whose index holds the Pinned / All projects / Archived
+ group strips; each strip's count agrees with its rendered rows, a click
+ selects a row without leaving Settings, sorting reorders rows inside every
section without hiding any, and clearing the search restores the complete
index
14. Info renders disabled, checking, up-to-date, available, downloading,
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 13a0b7159..a202a9287 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -1983,12 +1983,12 @@ identify the platform validation still needed.
#### E2E-038: Settings owns the project archive destination
- **Preconditions**: App running with at least one configured provider, one supported local session store, one retained project, and one archived project.
-- **Steps**: 1) Open Settings. 2) Inspect the complete settings rail. 3) Open Basics and change the theme in its Appearance card using the searchable theme picker. 4) Open 全局 AI and inspect the Permissions and Defaults cards, including the Command shell row; confirm Context management has no settings card. 5) Open Shortcuts and inspect the Keyboard shortcuts card. 6) Open Instructions and save global instructions. 7) Open Model configuration and inspect the provider studio. 8) Open Import, Project archive, and Info in order. 9) Search Settings for "project" or "archive". 10) In Project archive, compare each group strip's count with its rendered rows. 11) Switch the sort control from Recent to Name. 12) Search for a known session title, inspect its expanded project row, then reveal more than eight sessions; clear the search with the clear affordance. 13) Open a row menu, dismiss it with Escape and with an outside press. 14) Restore the archived project, then activate it. 15) Return to the app shell and open Plugins.
-- **Expected**: The rail contains exactly Basics, 全局 AI/AI, Shortcuts, Instructions, Model configuration, Import, Project archive, and Info in that order, each with its semantic Lucide icon (Sliders / Sparkles / Keyboard / FileText / Bot / Download / Archive / Info). The flat directory is visually grouped under four muted, non-interactive headings — Personal / 个人 for Basics, AI, and Shortcuts; Agent / 智能体 for Instructions and Model configuration; Workspace / 工作区 for Import and Project archive; About / 关于 for Info — with whitespace and no divider lines between groups; searching keeps the destination results flat and hides empty groups together with their headings. Appearance remains in Basics, while Permissions, Defaults, and the Command shell row live under 全局 AI; an available selected shell is represented by the selector without a duplicate Configured status, while default, fallback, and no-effective-shell states remain explicit; Context management has no settings card; Keyboard shortcuts and global instructions have their own destinations; Developer lives under Info; Project archive shows active, closed, and archived durable rows without a visibility toggle, grouping them under the always-visible Pinned / All projects / Archived strips (D168/D267) with per-section counts inside one panel. The destination renders no hero block and no page-level counter run: the intro is one quiet description line, and each group strip's count agrees with its rendered rows; sorting by Name reorders rows inside every section without hiding any; search matches project fields and session titles and reports a match count, a session-title result expands its owning project, lists sessions by latest activity with relative update times, and reveals history in batches of eight; clearing the search restores the complete index. The row menu closes on Escape and on an outside press. Bootstrap completion and background refreshes do not return Settings or Extensions to the chat home; the destination changes only after an explicit navigation action. Restore keeps the archive open and activation returns to chat with the restored project retained in the sidebar; the home sidebar and global page results have no standalone Projects destination; Settings search finds Project archive; Plugins remains an independent app-shell destination.
+- **Steps**: 1) Open Settings. 2) Inspect the complete settings rail. 3) Open Basics and change the theme in its Appearance card using the searchable theme picker. 4) Open 全局 AI and inspect the Permissions and Defaults cards, including the Command shell row; confirm Context management has no settings card. 5) Open Shortcuts and inspect the Keyboard shortcuts card. 6) Open Instructions and save global instructions. 7) Open Model configuration and inspect the provider studio. 8) Open Import, Project archive, and Info in order. 9) Search Settings for "project" or "archive". 10) In Project archive, compare each group strip's count with its rendered rows. 11) Switch the sort control from Recent to Name. 12) Search for a known session title, confirm the owning project is selected and its inspector lists matching sessions, then reveal more than eight sessions; clear the search with the clear affordance. 13) Open the inspector menu, dismiss it with Escape and with an outside press. 14) Restore the archived project, then activate it. 15) Return to the app shell and open Plugins.
+- **Expected**: The rail contains exactly Basics, 全局 AI/AI, Shortcuts, Instructions, Model configuration, Import, Project archive, and Info in that order, each with its semantic Lucide icon (Sliders / Sparkles / Keyboard / FileText / Bot / Download / Archive / Info). The flat directory is visually grouped under four muted, non-interactive headings — Personal / 个人 for Basics, AI, and Shortcuts; Agent / 智能体 for Instructions and Model configuration; Workspace / 工作区 for Import and Project archive; About / 关于 for Info — with whitespace and no divider lines between groups; searching keeps the destination results flat and hides empty groups together with their headings. Appearance remains in Basics, while Permissions, Defaults, and the Command shell row live under 全局 AI; an available selected shell is represented by the selector without a duplicate Configured status, while default, fallback, and no-effective-shell states remain explicit; Context management has no settings card; Keyboard shortcuts and global instructions have their own destinations; Developer lives under Info; Project archive shows active, closed, and archived durable rows without a visibility toggle, grouping them under the always-visible Pinned / All projects / Archived strips (D168/D267/D455) with per-section counts in a list + inspector workbench. The destination renders no hero block and no page-level counter run: the intro is one quiet description line, and each group strip's count agrees with its rendered rows; a click selects a row without leaving Settings; sorting by Name reorders rows inside every section without hiding any; search matches project fields and session titles and reports a match count, a session-title result selects its owning project, lists sessions in the inspector by latest activity with relative update times, and reveals history in batches of eight; clearing the search restores the complete index. The inspector menu closes on Escape and on an outside press. Bootstrap completion and background refreshes do not return Settings or Extensions to the chat home; the destination changes only after an explicit navigation action. Restore keeps the archive open and activation returns to chat with the restored project retained in the sidebar; the home sidebar and global page results have no standalone Projects destination; Settings search finds Project archive; Plugins remains an independent app-shell destination.
- **Specs linked**: `04-ux/06-settings-ia.md`, `04-ux/01-ui-ia.md`, `03-runtime/11-provider-model-system.md`
- **Acceptance**: B (model configuration), F (session import)
- **Milestone**: M4
-- **Status**: Unit-covered (`settings-project-archive.test.mjs`, `sidebar-navigation.test.mjs`); rendered scenario Draft
+- **Status**: Unit-covered (`settings-project-archive.test.mjs`, `project-archive.test.mjs`, `sidebar-navigation.test.mjs`); rendered scenario Draft
#### E2E-091: Appearance card selects searchable theme and language pickers
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index 15ac16907..48e973a53 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -169,7 +169,8 @@ Gold source: local Codex electron captures; latest row wins where rows conflict.
| D131 | Empty home without suggestion cards | *(starter-grid clause amended by D205, then superseded by D206)* **The empty chat home temporarily rendered only the hero, optional first-run checklist, and composer; the original four Explore / Build / Review / Fix cards, their colored glyphs, and their prompt-prefill actions were removed. This superseded D049/D067 and the original card-specific clauses of D111 while retaining its single scrollable flow layout.** | The direct composer remained the primary task entry; removing the original decorative starter row addressed noisy card treatment. D205 briefly reintroduced a quieter, non-submitting developer grid before D206 returned the empty state to direct entry. |
| D133 | Project index moves to Settings archive | *(five-destination count/order superseded by D166; flat-list presentation superseded by D168)* **The home sidebar no longer has a standalone Projects destination. Settings adds Project archive (zh-CN: 项目归档) after Import and before Info, bringing the compact directory to Basics / Model configuration / Import / Project archive / Info. The archive reuses the durable Projects index and always includes archived records, with search, add, activate, task expansion, pin, archive/restore, and close actions. Project and session groups remain in the home sidebar for active work. Global search exposes the archive as a Settings result, not a standalone page. This supersedes the standalone-destination clauses of D042/D066 and D090's four-destination limit without changing project storage or activation semantics.** | Active project work already lives in retained sidebar groups; moving historical project management into Settings reduces primary navigation while keeping recovery and archive controls discoverable. |
| D168 | Project archive presentation redesign | *(band layout and per-section panels superseded by D267)* **Project archive renders three stacked bands: an overview banner (intent sentence, primary Add project, and four derived counters for projects, open, archived, sessions), a toolbar (search with clear affordance and live match count, plus a Recent/Name sort segmented control), and a grouped index whose always-visible sections run Pinned / All projects / Archived with per-section counts, one settings panel per section, and hairline row separators. Rows carry a disclosure control, glyph, name with Active/Open/pinned/Archived tags, one meta line (shortened monospace path, branch, session count), relative last-active time, and hover/focus-revealed New task plus row menu; the menu groups create/edit above pin, archive/restore, and destructive Close, and dismisses on Escape or outside press. Archived rows are grouped and softened, never hidden or filtered, so D133's no-visibility-toggle rule still holds. This supersedes D133's flat-list presentation without changing project storage, search matching, session batching, or activation semantics.** | The flat single-list archive gave equal weight to pinned, working, and archived records and hid its disclosure and row actions behind hover, so scanning a long durable index meant reading every row. Grouping with derived counters and an explicit sort makes state legible at a glance while keeping archived history permanently reachable. |
-| D267 | Project archive is one workbench, not three bands | **Revise D168's band layout: Settings → Project archive renders the D257 one-workbench composition — a quiet intro line carrying only the page description, one toolbar (Recent/Name sort on the shared `settings-segment` primitive, search with clear affordance and live match count, primary Add project), and one settings panel whose always-visible Pinned / All projects / Archived groups are non-interactive in-panel header strips with per-section counts instead of one panel per section. The decorative gradient hero band is removed together with the four page-level overview counters it carried, retiring the `project.statProjects`, `project.statOpen`, `project.statArchived`, and `project.statSessions` keys; the per-group counts on the panel's header strips are now the only totals. The external uppercase section labels are removed as well; row geometry matches the capability rows (32px controls, 14px list gap, 28px row glyph). Beyond dropping the four retired counter keys this is presentation only: D168's row anatomy, row menu grouping, search matching, session batching, activation semantics, and accessibility semantics are unchanged, and no ADR is required.** | D168's overview banner used a decorative gradient and `--text-xl` counter tiles, which the design system forbids, and its per-section panels repeated the same elevated frame three times. Demoting the counters to an inline run kept the clutter without earning it: every total they showed is already legible from the per-group strip counts, so restating them above the toolbar duplicated numbers and gave the destination a header no sibling page has. Dropping them leaves the durable index looking and behaving like the agent capability pages. |
+| D267 | Project archive is one workbench, not three bands | *(row anatomy and inline expansion superseded by D455)* **Revise D168's band layout: Settings → Project archive renders the D257 one-workbench composition — a quiet intro line carrying only the page description, one toolbar (Recent/Name sort on the shared `settings-segment` primitive, search with clear affordance and live match count, primary Add project), and one settings panel whose always-visible Pinned / All projects / Archived groups are non-interactive in-panel header strips with per-section counts instead of one panel per section. The decorative gradient hero band is removed together with the four page-level overview counters it carried, retiring the `project.statProjects`, `project.statOpen`, `project.statArchived`, and `project.statSessions` keys; the per-group counts on the panel's header strips are now the only totals. The external uppercase section labels are removed as well; row geometry matches the capability rows (32px controls, 14px list gap, 28px row glyph). Beyond dropping the four retired counter keys this is presentation only: D168's row anatomy, row menu grouping, search matching, session batching, activation semantics, and accessibility semantics are unchanged, and no ADR is required.** | D168's overview banner used a decorative gradient and `--text-xl` counter tiles, which the design system forbids, and its per-section panels repeated the same elevated frame three times. Demoting the counters to an inline run kept the clutter without earning it: every total they showed is already legible from the per-group strip counts, so restating them above the toolbar duplicated numbers and gave the destination a header no sibling page has. Dropping them leaves the durable index looking and behaving like the agent capability pages. |
+| D455 | Project archive is a list + inspector | **Revise D267's expanding rows: Settings → Project archive keeps the quiet intro and toolbar, then a two-pane workbench. The index remains Pinned / All projects / Archived with per-section counts and no visibility toggle (D133). Compact rows show glyph, name, one status tag, session count, and relative time. A click selects and stays in Settings; double-click, Enter, or the inspector Open action activates and returns to chat. Folders, chats (batches of eight), and the row menu live in the inspector, sticky beside the index and stacked below 720px. Search still matches session titles and selects the owning project. Presentation only: no IPC, storage, or host change. See ADR 0294 and E2E-038.** | Inline expansion and per-row menus made a long durable index hard to scan, and clicking a name left Settings instead of managing the project. |
## E. M5 hardening decisions (0.4.0)
@@ -6195,3 +6196,16 @@ that was sitting at the bottom — including after the turn had finished.
`05-security/02-remote-control-security.md` §3.4 and gate 21,
`02-architecture/05-remote-agent-control.md` §5.2,
E2E-REMOTE-HOST-ssh-password-authentication.
+
+## 2026-09-20 — Project archive is a list + inspector (D455)
+
+- Decision D455 revises D267's expanding rows for Settings → Project archive.
+ The quiet intro and toolbar stay; the single expanding list becomes a compact
+ index beside an inspector (ADR 0294).
+- Clicking a row selects it and keeps Settings open. Double-click, Enter, or
+ the inspector Open action activates the project and returns to chat. Archive
+ and close still keep the destination open (D133 / D267).
+- Folders, chats (latest first, batches of eight), and the existing menu live
+ in the inspector. Archived records stay grouped and visible.
+- Presentation only: no IPC, storage, or host protocol change. See
+ `04-ux/06-settings-ia.md` and E2E-038.
diff --git a/docs/zh-CN/adr/index.md b/docs/zh-CN/adr/index.md
index e6ff6a33d..206150023 100644
--- a/docs/zh-CN/adr/index.md
+++ b/docs/zh-CN/adr/index.md
@@ -299,6 +299,7 @@ ADR 记录那些不应被静默改变的架构选择。中文入口与英文索
| 0290 | [恢复可拖拽侧边栏宽度,过窄时收起](/adr/0290-resizable-sidebar-collapse-threshold) | 已接受(D451;修订 ADR 0141 / ADR 0238) |
| 0291 | [移除设置页面的语音界面](/adr/0291-remove-speech-settings-ui) | 已接受(修订 ADR 0281) |
| 0292 | [远端主机的 SSH 引导](/adr/0292-ssh-remote-host-bootstrap) | 已接受实施(D453;ADR 0205 R2b,扩展 ADR 0286) |
+| 0294 | [项目存档改为列表 + 检查器](/adr/0294-project-archive-list-inspector) | 已接受(D455;修订 D267 / D168) |
## 什么时候看 ADR
diff --git a/docs/zh-CN/spec/04-ux/06-settings-ia.md b/docs/zh-CN/spec/04-ux/06-settings-ia.md
index 05dd4d951..aa68782f7 100644
--- a/docs/zh-CN/spec/04-ux/06-settings-ia.md
+++ b/docs/zh-CN/spec/04-ux/06-settings-ia.md
@@ -242,38 +242,31 @@ Token 用量**不是设置目的地**(D335 / ADR 0173)。已完成回合历
- 重用持久项目索引作为设置规模管理界面
- 始终包含存档记录;归档行被分组,从不隐藏,所以
目的地仍然没有可见性切换
-- 支持项目搜索、添加、激活、项目会话扩展、固定、
- archive/restore,然后关闭
-- 该目的地是一个工作台,而不是三个堆叠带(D267,修订 D168):
- 一条安静的引导行位于单个工具栏之上,工具栏位于单个高架面板之上。
+- 支持项目搜索、添加、选中、激活、置顶、归档/恢复和关闭
+- 该目的地是一个工作台(D267),由 D455 修订为「列表 + 检查器」。
+ 一条安静的引导行位于单个工具栏之上,工具栏位于工作台之上。
它复用与智能体能力页面(D257)相同的构成、控件高度和行节奏,
不引入页面专属装饰。
1. **引导行** — 一条安静的说明行,形态与能力页面的引导区相同。
该目的地不展示页面级总计:没有英雄区块、装饰渐变、计数器横幅或
- 内联计数器串。面板标题条上的分组计数是唯一的总计,
+ 内联计数器串。索引标题条上的分组计数是唯一的总计,
因此同一个数字绝不会在两处重复出现
2. **工具栏** — 一行承载使用共享分段控件的“最近/名称”排序、
带清除可供性并在搜索时显示匹配计数的搜索字段,以及右对齐的
主要“添加项目”操作
- 3. **面板** — 一个设置面板容纳所有分组。始终可见的部分按“固定”、
- “所有项目”、“已存档”的顺序呈现为面板内的非交互标题条,
- 每条带有其标签和行数。每个部分都是包裹自身列表的带标签区域,
- 因此标题条绝不会成为列表的非列表项子元素,且每一行都在无障碍树中
- 保留其分组名称;行随后呈现并带有细线分隔符。空部分被省略,
- 完全没有行的索引在面板内呈现一个安静的空状态,而不是分组条
-- 行剖析:披露控制、颜色字形、带有状态标签的项目名称
- (活动、开放、固定标签、已存档),一条元线携带缩短的
- 等宽路径、分支和会话计数、相对上次活动时间以及
- hover/focus-revealed 操作对(新任务,行菜单)。普通项目使用文件夹
- 字形,置顶项目使用实心星标字形;标题旁仍保留本地化的置顶标签作为文字提示。
-- 行菜单对引脚上方的 create/edit 操作、archive/restore 和
- 破坏性的关闭动作,并在 Escape 或任何外部压力下关闭
-- 项目搜索还匹配会话标题。匹配的会话会保留并
- 展开其所属项目;展开的会话按最新活动排序,
- 显示计数和相对更新时间,并批量显示其他行
- 八个而不是默默地截断历史
-- 激活项目或项目会话返回聊天;存档并关闭
- 即使活动工作空间发生变化,操作也会使项目存档保持打开状态
+ 3. **工作台** — 精简索引配检查器。始终可见的索引部分按“固定”、
+ “所有项目”、“已存档”呈现为非交互标题条,每条带有标签和行数。
+ 每个部分都是包裹自身列表的带标签区域。空部分被省略;
+ 完全没有行时呈现安静空状态。窄于 720px 时检查器叠在索引下方
+- 精简行:颜色字形、项目名和一个状态标签(当前 / 已打开 / 已归档)、
+ 会话计数、相对上次活动时间。普通项目用文件夹字形,置顶项目用实心星标。
+ 单击选中并留在设置页;双击或 Enter 激活项目并返回聊天
+- 检查器展示选中项目的名称与标签、缩短的等宽路径和分支、打开/新任务,
+ 以及文件夹和对话。检查器菜单将创建/编辑放在置顶、归档/恢复和关闭之上,
+ 并在 Escape 或外部点击时关闭
+- 项目搜索还匹配会话标题。匹配的会话会保留并选中所属项目;
+ 检查器按最新活动列出匹配会话,以 8 条一批显示,而不是截断历史
+- 激活项目或项目会话返回聊天;归档和关闭仍使项目归档页保持打开
### 信息
- app/host/protocol版本+开放日志
@@ -343,9 +336,9 @@ Token 用量**不是设置目的地**(D335 / ADR 0173)。已完成回合历
12. 项目归档始终公开归档记录,并且可以在无需修复的情况下恢复它们
在应用程序 shell 中复制索引
13. 项目存档呈现一条安静的说明行 —— 没有英雄区块、横幅或页面级
- 计数器串 —— 其下方是一个搜索+排序工具栏,以及一个包含
- 固定/所有项目/存档分组条的面板;每个分组条的计数与其呈现的行数一致,
- 排序对每个部分内的行进行重新排序,而无需隐藏任何内容,
+ 计数器串 —— 其下方是一个搜索+排序工具栏,以及带有
+ 固定/所有项目/存档分组条的列表+检查器工作台;每个分组条的计数与其呈现的行数一致,
+ 单击选中行且不离开设置页,排序对每个部分内的行重新排序而不隐藏任何内容,
清除搜索即可恢复完整索引
14.信息呈现禁用、检查、最新、可用、下载、
已下载,并且错误更新状态而不添加其他目标
diff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.md
index 11bf563ab..1d43d60dd 100644
--- a/docs/zh-CN/spec/08-meta/decisions-log.md
+++ b/docs/zh-CN/spec/08-meta/decisions-log.md
@@ -172,7 +172,8 @@
| D131 | 空荡荡的家,没有建议卡 | *(starter-grid 条款由 D205 修改,然后由 D206 取代)* **空的聊天主页暂时仅呈现英雄、可选的首次运行清单和输入框;原来的四张探索/构建/审查/修复卡、它们的彩色字形以及它们的提示预填充操作被删除。这取代了 D049/D067 和 D111 的原始卡特定条款,同时保留其单一可滚动流布局。** | 直接输入框仍然是主要任务条目;去掉了原来的装饰起始行,解决了噪音卡的处理。在 D206 将空状态返回到直接进入之前,D205 短暂地重新引入了一个更安静、非提交的开发者网格。 |
| D133 | 项目索引移至设置存档 | *(五个目的地 count/order 被 D166 取代;平面列表演示被 D168 取代)* **主页侧边栏不再具有独立的项目目的地。设置在导入之后、信息之前添加项目归档(zh-CN: 项目归档),将压缩目录带到基础/模型配置/导入/项目归档/信息。存档重用持久的项目索引,并且始终包含存档记录,包括搜索、添加、激活、任务扩展、固定、archive/restore 和关闭操作。项目和会话组仍保留在主侧边栏中以进行积极的工作。全局搜索将存档公开为“设置”结果,而不是独立页面。这取代了 D042/D066 的独立目标子句和 D090 的四个目标限制,而不更改项目存储或激活语义。** | 活跃的项目工作已经存在于保留的侧边栏组中;将历史项目管理移至“设置”可减少主要导航,同时保持恢复和存档控件可发现。 |
| D168 | 项目档案演示重新设计 | *(堆叠带布局与每部分面板被 D267 取代)* **项目存档呈现三个堆叠带:一个概述横幅(意图句、主要添加项目以及用于项目、打开、存档、会话的四个派生计数器)、一个工具栏(具有清晰的可见性和实时匹配计数的搜索,以及 Recent/Name 排序分段控件),以及一个分组索引,其始终可见的部分运行“固定/所有项目/存档”,每个部分计数、每个部分一个设置面板和细线行分隔符。行包含公开控件、字形、带有 Active/Open/pinned/Archived 标签的名称、一条元行(缩短的等宽路径、分支、会话计数)、相对最后活动时间和 hover/focus-revealed 新任务加行菜单;菜单将 create/edit 置于引脚上方、archive/restore 和破坏性关闭中,并在 Escape 或外部按下时关闭。存档的行被分组和软化,从不隐藏或过滤,因此 D133 的不可见性切换规则仍然有效。这取代了 D133 的平面列表演示,而无需更改项目存储、搜索匹配、会话批处理或激活语义。** | 平面单列表存档对固定、工作和存档记录给予同等重视,并将其披露和行操作隐藏在悬停后面,因此扫描长期持久索引意味着读取每一行。使用派生计数器进行分组并进行显式排序,使状态一目了然,同时保持存档历史记录永久可访问。 |
-| D267 | 项目存档是一个工作台,而不是三个堆叠带 | **修订 D168 的堆叠带布局:设置 → 项目存档改为呈现 D257 的一个工作台构成 —— 一条仅承载页面说明的安静引导行、一个工具栏(使用共享 `settings-segment` 基元的“最近/名称”排序、带清除可供性与实时匹配计数的搜索、主要“添加项目”),以及一个设置面板,其始终可见的固定/所有项目/存档分组是面板内带每部分计数的非交互标题条,而不是每部分一个面板。装饰渐变英雄带被移除,它承载的四个页面级概览计数器也一并移除,并停用 `project.statProjects`、`project.statOpen`、`project.statArchived` 和 `project.statSessions` 键;面板标题条上的分组计数现在是唯一的总计。外部大写部分标签也被移除;行几何与能力页面行一致(32px 控件、14px 列表间距、28px 行字形)。除停用上述四个计数器键外,其余仅为演示层变更:D168 的行剖析、行菜单分组、搜索匹配、会话批处理、激活语义和无障碍语义均不变,且不需要新的 ADR。** | D168 的概述横幅使用了装饰渐变和 `--text-xl` 计数器格,而设计系统明确禁止两者,且其每部分面板把同一个高架框重复了三次。把计数器降级为内联串只是保留了杂乱而没有换来价值:它们展示的每个总计都已能从分组条计数中读出,因此在工具栏上方重述这些数字既重复了数字,也让该目的地拥有了兄弟页面都没有的页头。移除它们后,持久索引在外观和行为上都与智能体能力页面一致。 |
+| D267 | 项目存档是一个工作台,而不是三个堆叠带 | *(行剖析与行内展开被 D455 取代)* **修订 D168 的堆叠带布局:设置 → 项目存档改为呈现 D257 的一个工作台构成 —— 一条仅承载页面说明的安静引导行、一个工具栏(使用共享 `settings-segment` 基元的“最近/名称”排序、带清除可供性与实时匹配计数的搜索、主要“添加项目”),以及一个设置面板,其始终可见的固定/所有项目/存档分组是面板内带每部分计数的非交互标题条,而不是每部分一个面板。装饰渐变英雄带被移除,它承载的四个页面级概览计数器也一并移除,并停用 `project.statProjects`、`project.statOpen`、`project.statArchived` 和 `project.statSessions` 键;面板标题条上的分组计数现在是唯一的总计。外部大写部分标签也被移除;行几何与能力页面行一致(32px 控件、14px 列表间距、28px 行字形)。除停用上述四个计数器键外,其余仅为演示层变更:D168 的行剖析、行菜单分组、搜索匹配、会话批处理、激活语义和无障碍语义均不变,且不需要新的 ADR。** | D168 的概述横幅使用了装饰渐变和 `--text-xl` 计数器格,而设计系统明确禁止两者,且其每部分面板把同一个高架框重复了三次。把计数器降级为内联串只是保留了杂乱而没有换来价值:它们展示的每个总计都已能从分组条计数中读出,因此在工具栏上方重述这些数字既重复了数字,也让该目的地拥有了兄弟页面都没有的页头。移除它们后,持久索引在外观和行为上都与智能体能力页面一致。 |
+| D455 | 项目存档改为列表 + 检查器 | **修订 D267 的展开行:设置 → 项目存档保留安静引导行和工具栏,随后是双栏工作台。索引仍按已置顶 / 全部项目 / 已归档分组并显示计数,且没有可见性开关(D133)。精简行显示字形、名称、一个状态标签、会话计数和相对时间。单击选中并留在设置页;双击、Enter 或检查器的打开操作激活项目并返回聊天。文件夹、对话(每批 8 条)和行菜单放在检查器中,宽屏时贴在索引旁,窄于 720px 时叠在下方。搜索仍匹配会话标题并选中所属项目。仅演示层:无 IPC、存储或宿主改动。见 ADR 0294 与 E2E-038。** | 行内展开和行菜单让长索引难以扫读,单击名称还会离开设置页,不利于管理。 |
## E.M5 强化决策 (0.4.0)
@@ -4449,3 +4450,10 @@ that amendment are retired by ADR 0268; the upstream work-panel lifecycle stays.
- 已配对主机的记录改存 SSH 描述符(`metadata.transport = "ssh"`)而非 URL,因为本地转发端口在每次启动间并不稳定;隧道管理器在每次启动时重新建立 `ssh -N -L`,并收编(adopt)引导自己打开的存活转发,使配对只建立一条隧道。描述符在每次读取注册表时都会重新校验,格式不合规时降级为「非 SSH 主机」,而不会用垃圾参数去 spawn `ssh`。
- `pi-desktop/remoteHost/bootstrap` 加入 `list` / `pair` / `remove`,`connection/pair` 交换被抽成单一的 `exchangePairingToken`,粘贴 URL 与 SSH 引导两条路径共用。
- 本次不做:终端工作面板客户端(Stage 5)、反向工具中继(Stage 6)、resync 看门狗、非 Linux 与 Windows 远端目标,以及经 SSH 通道下发 provider 配置 —— 刚引导好的主机在配置 provider 之前,`turn/start` 仍以 `MODEL_NOT_CONFIGURED` 关闭。见 ADR 0292、`06-delivery/07-remote-control-rollout.md` §7 与 `05-security/02-remote-control-security.md` §3.4。
+
+## 2026-09-20 —— 项目存档改为列表 + 检查器(D455)
+
+- 决策 D455 修订 D267 的展开行:设置 → 项目存档保留安静引导行和工具栏,把单一展开列表改成精简索引加检查器(ADR 0294)。
+- 单击行会选中并留在设置页。双击、Enter 或检查器的打开操作激活项目并返回聊天。归档和关闭仍使该目的地保持打开(D133 / D267)。
+- 文件夹、对话(按最新活动、每批 8 条)和原有菜单放在检查器中。归档记录仍分组可见。
+- 仅演示层:无 IPC、存储或宿主协议改动。见 `04-ux/06-settings-ia.md` 与 E2E-038。
diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.ts
index 3f1927625..27c28fa70 100644
--- a/packages/i18n/src/locales/de/index.ts
+++ b/packages/i18n/src/locales/de/index.ts
@@ -1260,8 +1260,9 @@ sklm: {
"noSessions": "Keine Sitzungen in diesem Projekt",
"showMoreSessions": "{{count}} weitere anzeigen",
"showFewerSessions": "Weniger Sitzungen anzeigen",
- "expandDetails": "{{name}} erweitern",
- "collapseDetails": "{{name}} ausblenden",
+ "selectProject": "{{name}} auswählen",
+ "inspectorEmptyTitle": "Projekt auswählen",
+ "inspectorEmptyBody": "Ordner, Chats und Archiv hier verwalten.",
"openActions": "Aktionen für {{name}} öffnen",
"reorder": "Reihenfolge von {{name}} ändern",
"editTitle": "Projekt bearbeiten",
diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.ts
index 6ee0344c0..2134fbd8d 100644
--- a/packages/i18n/src/locales/en/index.ts
+++ b/packages/i18n/src/locales/en/index.ts
@@ -1281,8 +1281,9 @@ sklm: {
noSessions: "No sessions in this project",
showMoreSessions: "Show {{count}} more",
showFewerSessions: "Show fewer sessions",
- expandDetails: "Expand {{name}}",
- collapseDetails: "Collapse {{name}}",
+ selectProject: "Select {{name}}",
+ inspectorEmptyTitle: "Select a project",
+ inspectorEmptyBody: "Pick one to manage folders, chats, and archive.",
openActions: "Open actions for {{name}}",
reorder: "Reorder {{name}}",
editTitle: "Edit project",
diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.ts
index 494a237bf..df756ed09 100644
--- a/packages/i18n/src/locales/es/index.ts
+++ b/packages/i18n/src/locales/es/index.ts
@@ -1260,8 +1260,9 @@ sklm: {
"noSessions": "No hay sesiones en este proyecto",
"showMoreSessions": "Mostrar {{count}} más",
"showFewerSessions": "Mostrar menos sesiones",
- "expandDetails": "Expandir {{name}}",
- "collapseDetails": "Contraer {{name}}",
+ "selectProject": "Seleccionar {{name}}",
+ "inspectorEmptyTitle": "Selecciona un proyecto",
+ "inspectorEmptyBody": "Gestiona carpetas, chats y el archivo.",
"openActions": "Abrir acciones para {{name}}",
"reorder": "Reordenar {{name}}",
"editTitle": "Editar proyecto",
diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.ts
index 5a4505e66..da0e45b81 100644
--- a/packages/i18n/src/locales/fr/index.ts
+++ b/packages/i18n/src/locales/fr/index.ts
@@ -1260,8 +1260,9 @@ sklm: {
"noSessions": "Aucune session dans ce projet",
"showMoreSessions": "Afficher {{count}} plus",
"showFewerSessions": "Afficher moins de sessions",
- "expandDetails": "Développer {{name}}",
- "collapseDetails": "Réduire {{name}}",
+ "selectProject": "Sélectionner {{name}}",
+ "inspectorEmptyTitle": "Sélectionnez un projet",
+ "inspectorEmptyBody": "Gérez les dossiers, les discussions et l’archive.",
"openActions": "Ouvrir les actions pour {{name}}",
"reorder": "Réorganiser {{name}}",
"editTitle": "Modifier le projet",
diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.ts
index 2545ec222..5c4972b48 100644
--- a/packages/i18n/src/locales/ko/index.ts
+++ b/packages/i18n/src/locales/ko/index.ts
@@ -1280,8 +1280,9 @@ sklm: {
noSessions: "이 프로젝트에 세션 없음",
showMoreSessions: "{{count}}개 더 표시",
showFewerSessions: "세션 간략히 표시",
- expandDetails: "{{name}} 펼치기",
- collapseDetails: "{{name}} 접기",
+ selectProject: "{{name}} 선택",
+ inspectorEmptyTitle: "프로젝트를 선택하세요",
+ inspectorEmptyBody: "폴더, 대화, 보관 상태를 관리합니다.",
openActions: "{{name}} 작업 열기",
reorder: "{{name}} 순서 변경",
editTitle: "프로젝트 편집",
diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.ts
index a307e7758..7f1656222 100644
--- a/packages/i18n/src/locales/tr/index.ts
+++ b/packages/i18n/src/locales/tr/index.ts
@@ -1280,8 +1280,9 @@ sklm: {
noSessions: "Bu projede oturum yok",
showMoreSessions: "{{count}} tane daha göster",
showFewerSessions: "Daha az oturum göster",
- expandDetails: "{{name}} öğesini genişlet",
- collapseDetails: "{{name}} öğesini daralt",
+ selectProject: "{{name}} öğesini seç",
+ inspectorEmptyTitle: "Bir proje seçin",
+ inspectorEmptyBody: "Klasörleri, sohbetleri ve arşivi yönetin.",
openActions: "{{name}} eylemlerini aç",
reorder: "{{name}} sırasını değiştir",
editTitle: "Projeyi düzenle",
diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.ts
index 46715a566..c1af4dbd0 100644
--- a/packages/i18n/src/locales/zh-CN/index.ts
+++ b/packages/i18n/src/locales/zh-CN/index.ts
@@ -1263,8 +1263,9 @@ sklm: {
noSessions: "此项目暂无会话",
showMoreSessions: "再显示 {{count}} 个",
showFewerSessions: "收起部分会话",
- expandDetails: "展开“{{name}}”",
- collapseDetails: "收起“{{name}}”",
+ selectProject: "选择 {{name}}",
+ inspectorEmptyTitle: "选择一个项目",
+ inspectorEmptyBody: "查看文件夹与对话,并管理置顶和归档。",
openActions: "打开“{{name}}”的操作菜单",
reorder: "调整“{{name}}”顺序",
editTitle: "编辑项目",
diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.ts
index 21e9f4c74..30416065d 100644
--- a/packages/i18n/src/locales/zh-TW/index.ts
+++ b/packages/i18n/src/locales/zh-TW/index.ts
@@ -1263,8 +1263,9 @@ sklm: {
noSessions: "此專案暫無會話",
showMoreSessions: "再顯示 {{count}} 個",
showFewerSessions: "收起部分會話",
- expandDetails: "展開“{{name}}”",
- collapseDetails: "收起“{{name}}”",
+ selectProject: "選擇 {{name}}",
+ inspectorEmptyTitle: "選擇一個專案",
+ inspectorEmptyBody: "查看資料夾與對話,並管理置頂和封存。",
openActions: "開啟“{{name}}”的操作選單",
reorder: "調整「{{name}}」順序",
editTitle: "編輯專案",
diff --git a/packages/i18n/test/catalogs.test.mjs b/packages/i18n/test/catalogs.test.mjs
index 80da70466..fae193577 100644
--- a/packages/i18n/test/catalogs.test.mjs
+++ b/packages/i18n/test/catalogs.test.mjs
@@ -138,7 +138,7 @@ test("import, project, and temporary-session copy is catalog-backed", () => {
"settings.importGroupByPath",
"settings.importNoProject",
"settings.importSourceClaudeCode",
- "project.expandDetails",
+ "project.selectProject",
"project.openActions",
"project.sessions",
]) {