Skip to content

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

feat(sidebar): mark projects with running work on the group header

v_wyxgwangea34df008bb0
diff --git a/apps/desktop/src/components/ProjectRunIndicator.tsx b/apps/desktop/src/components/ProjectRunIndicator.tsx
new file mode 100644
index 000000000..3beba70ba
--- /dev/null
+++ b/apps/desktop/src/components/ProjectRunIndicator.tsx
@@ -0,0 +1,92 @@
+import { useTranslation } from "react-i18next";
+import type { ProjectRunSummary } from "../lib/sidebar-project-runs";
+import { projectRunSummaryIsLive } from "../lib/sidebar-project-runs";
+
+/**
+ * The two project-level "work is running under here" affordances (D-sidebar).
+ *
+ * Both live on the project group *header*, not on the session rows: a
+ * collapsed group folds its body to `0fr` and marks it `inert`, so a
+ * row-level status dot disappears exactly when the answer is most useful.
+ * The header stays visible in both states.
+ *
+ * Colour carries the meaning and both come from theme tokens
+ * (`--ds-warning` for running, `--ds-purple` for a pending permission), so
+ * light, dark, and contributed themes all recolor them. Motion is purely
+ * decorative and is dropped under `prefers-reduced-motion`; the static
+ * shape must stay legible on its own (see `.project-run-*` in the stylesheet).
+ */
+
+function runLabel(
+ t: (key: string, options?: Record<string, unknown>) => string,
+ summary: ProjectRunSummary,
+): string {
+ const parts: string[] = [];
+ if (summary.running > 0) parts.push(t("nav.projectRunningCount", { count: summary.running }));
+ if (summary.waiting > 0) parts.push(t("nav.projectWaitingCount", { count: summary.waiting }));
+ return parts.join(" · ");
+}
+
+/**
+ * Badge (A): a count capsule after the project name. Running is the primary
+ * figure; a permission wait is a second, purple capsule so the two never
+ * collapse into one ambiguous number.
+ */
+export function ProjectRunBadge({ summary }: { summary: ProjectRunSummary }) {
+ const { t } = useTranslation();
+ if (!projectRunSummaryIsLive(summary)) return null;
+ const label = runLabel(t, summary);
+ return (
+ <span className="project-run-badges">
+ {summary.running > 0 ? (
+ <span className="project-run-badge running" aria-label={label} title={label}>
+ <span className="project-run-badge-dot" aria-hidden />
+ {summary.running}
+ </span>
+ ) : null}
+ {summary.waiting > 0 ? (
+ <span className="project-run-badge waiting" aria-label={label} title={label}>
+ <span className="project-run-badge-dot" aria-hidden />
+ {summary.waiting}
+ </span>
+ ) : null}
+ </span>
+ );
+}
+
+/**
+ * Activity rail (B): a 2px track down the group's left edge with a comet
+ * pulse travelling along it. Rendered as a sibling of the header inside the
+ * group so it spans the opened body too, and pinned to the header height
+ * while the group is collapsed.
+ */
+export function ProjectRunRail({ summary }: { summary: ProjectRunSummary }) {
+ const { t } = useTranslation();
+ if (!projectRunSummaryIsLive(summary)) return null;
+ const label = runLabel(t, summary);
+ return (
+ <span className="project-run-rail" aria-label={label} role="img">
+ <span className="project-run-rail-pulse" aria-hidden />
+ </span>
+ );
+}
+
+/**
+ * The "n" figure that accompanies the rail: a coloured pip per kind, so the
+ * colour ties the number to its meaning instead of leaving a bare count.
+ */
+export function ProjectRunCount({ summary }: { summary: ProjectRunSummary }) {
+ const { t } = useTranslation();
+ if (!projectRunSummaryIsLive(summary)) return null;
+ const label = runLabel(t, summary);
+ return (
+ <span className="project-run-count" aria-label={label} title={label}>
+ {summary.running > 0 ? (
+ <span className="project-run-pip running">{summary.running}</span>
+ ) : null}
+ {summary.waiting > 0 ? (
+ <span className="project-run-pip waiting">{summary.waiting}</span>
+ ) : null}
+ </span>
+ );
+}
diff --git a/apps/desktop/src/components/Sidebar.tsx b/apps/desktop/src/components/Sidebar.tsx
index da63090e9..ec815e8fa 100644
--- a/apps/desktop/src/components/Sidebar.tsx
+++ b/apps/desktop/src/components/Sidebar.tsx
@@ -54,6 +54,16 @@ import {
sidebarSessionStatus,
type SidebarSessionStatus,
} from "../lib/sidebar-session-status";
+import {
+ projectRunSummaryIsLive,
+ resolveSidebarRunningAffordances,
+ summarizeProjectRuns,
+} from "../lib/sidebar-project-runs";
+import {
+ ProjectRunBadge,
+ ProjectRunCount,
+ ProjectRunRail,
+} from "./ProjectRunIndicator";
import { ErrorCodes, formatSessionLink } from "@pi-desktop/shared";
import type { SessionSummary } from "@pi-desktop/shared";
import type {
@@ -261,6 +271,10 @@ export function Sidebar({
const canNavBack = useAppStore((s) => s.canNavBack);
const page = useAppStore((s) => s.page);
const settings = useAppStore((s) => s.settings);
+ // Project headers must answer "is anything running under here?" while the
+ // group is collapsed, so both affordances are resolved once per render
+ // rather than re-derived per row.
+ const runningAffordances = resolveSidebarRunningAffordances(settings);
const prefetchSession = useAppStore((s) => s.prefetchSession);
const selectSession = useAppStore((s) => s.selectSession);
const newSession = useAppStore((s) => s.newSession);
@@ -1879,6 +1893,17 @@ export function Sidebar({
sessionsExpanded,
);
+ // The live counts cover every session in the group, including pinned and
+ // folded ones, because the header answers for the whole project.
+ const runSummary = summarizeProjectRuns(
+ entry.sessions,
+ runningSessions,
+ pendingPermissions,
+ );
+ const runIsLive = projectRunSummaryIsLive(runSummary);
+ const showRunBadge = runningAffordances.badge && runIsLive;
+ const showRunRail = runningAffordances.rail && runIsLive;
+
const renderTimeGroupedSessions = (sessions: SessionSummary[]) => {
const result: React.ReactNode[] = [];
for (const { group, sessions: groupSessions } of groupSidebarSessionsByTime(sessions)) {
@@ -1916,7 +1941,7 @@ export function Sidebar({
return (
<section
key={entry.key}
- className={`sidebar-session-group project-group ${entry.meta.archived ? "archived" : ""} ${dropProjectKey === entry.key ? "is-drop-target" : ""} ${draggingProjectKey === entry.key ? "is-dragging" : ""} ${dropIndicator?.key === entry.key ? (dropIndicator.insertAfter ? "is-drop-after" : "is-drop-before") : ""}`}
+ className={`sidebar-session-group project-group ${entry.meta.archived ? "archived" : ""} ${runIsLive ? "has-running-sessions" : ""} ${showRunRail ? "has-run-rail" : ""} ${collapsedProject ? "is-collapsed" : ""} ${dropProjectKey === entry.key ? "is-drop-target" : ""} ${draggingProjectKey === entry.key ? "is-dragging" : ""} ${dropIndicator?.key === entry.key ? (dropIndicator.insertAfter ? "is-drop-after" : "is-drop-before") : ""}`}
aria-labelledby={projectId}
data-sidebar-project-group={entry.key}
data-current-workspace={entry.active ? "true" : undefined}
@@ -1934,6 +1959,7 @@ export function Sidebar({
onProjectDropTargetDrop(event, entry);
}}
>
+ {showRunRail ? <ProjectRunRail summary={runSummary} /> : null}
<div
className="sidebar-session-group-header"
onClick={(event) => {
@@ -2007,6 +2033,8 @@ export function Sidebar({
<IconFolder size={13} aria-hidden />
)}
<span>{entry.name}</span>
+ {showRunBadge ? <ProjectRunBadge summary={runSummary} /> : null}
+ {showRunRail ? <ProjectRunCount summary={runSummary} /> : null}
{entry.active ? <span className="sidebar-project-active-dot" aria-label={t("project.active", { defaultValue: "Active" })} /> : null}
</TooltipButton>
<span id={`${projectId}-path-description`} className="sr-only">
diff --git a/apps/desktop/src/components/remote/RemoteProjectGroups.tsx b/apps/desktop/src/components/remote/RemoteProjectGroups.tsx
index 204ce4604..c7f75e741 100644
--- a/apps/desktop/src/components/remote/RemoteProjectGroups.tsx
+++ b/apps/desktop/src/components/remote/RemoteProjectGroups.tsx
@@ -2,7 +2,13 @@ import { useState, type ReactNode } from "react";
import { useTranslation } from "react-i18next";
import type { SessionSummary } from "@pi-desktop/shared";
import type { RemoteProjectEntry, RemoteProjectGroup } from "../../lib/remote-project-catalog";
+import {
+ projectRunSummaryIsLive,
+ resolveSidebarRunningAffordances,
+ summarizeProjectRuns,
+} from "../../lib/sidebar-project-runs";
import { useAppStore } from "../../stores/app-store";
+import { ProjectRunBadge, ProjectRunCount, ProjectRunRail } from "../ProjectRunIndicator";
import { IconFolder, IconNewProject } from "../icons";
import { Button, TooltipButton } from "../ui";
@@ -12,6 +18,12 @@ export function RemoteProjectGroups({ groups, renderSessions }: {
}) {
const { t } = useTranslation();
const [busy, setBusy] = useState<string | null>(null);
+ const settings = useAppStore((state) => state.settings);
+ // Remote groups carry the same running affordances as local projects, so a
+ // collapsed host group does not hide live work either.
+ const runAffordances = resolveSidebarRunningAffordances(settings);
+ const runningSessions = useAppStore((state) => state.runningSessions);
+ const pendingPermissions = useAppStore((state) => state.pendingPermissions);
const open = async (project: RemoteProjectEntry) => {
if (busy) return;
setBusy(project.key);
@@ -19,15 +31,27 @@ export function RemoteProjectGroups({ groups, renderSessions }: {
catch (error) { useAppStore.getState().showToast(error instanceof Error ? error.message : String(error), { variant: "error" }); }
finally { setBusy(null); }
};
- return <>{groups.map(({ project, sessions }) => <section className="sidebar-session-group" key={project.key}>
- <div className="sidebar-session-group-header">
- <Button variant="ghost" className="sidebar-session-group-title" disabled={busy !== null}
- title={`${project.hostLabel} · ${project.label}`} onClick={() => void open(project)}>
- <IconFolder size={13} aria-hidden /><span>{project.label} · {project.hostLabel}</span>
- </Button>
- <TooltipButton tooltip={t("nav.newTask")} ariaLabel={`${t("nav.newTask")}: ${project.label} · ${project.hostLabel}`}
- disabled={busy !== null} onClick={() => void open(project)}><IconNewProject size={14} /></TooltipButton>
- </div>
- {renderSessions(sessions)}
- </section>)}</>;
+ return <>{groups.map(({ project, sessions }) => {
+ const runSummary = summarizeProjectRuns(sessions, runningSessions, pendingPermissions);
+ const runIsLive = projectRunSummaryIsLive(runSummary);
+ const showRunBadge = runAffordances.badge && runIsLive;
+ const showRunRail = runAffordances.rail && runIsLive;
+ return <section
+ className={`sidebar-session-group project-group ${runIsLive ? "has-running-sessions" : ""} ${showRunRail ? "has-run-rail" : ""}`}
+ key={project.key}
+ >
+ {showRunRail ? <ProjectRunRail summary={runSummary} /> : null}
+ <div className="sidebar-session-group-header">
+ <Button variant="ghost" className="sidebar-session-group-title" disabled={busy !== null}
+ title={`${project.hostLabel} · ${project.label}`} onClick={() => void open(project)}>
+ <IconFolder size={13} aria-hidden /><span>{project.label} · {project.hostLabel}</span>
+ {showRunBadge ? <ProjectRunBadge summary={runSummary} /> : null}
+ {showRunRail ? <ProjectRunCount summary={runSummary} /> : null}
+ </Button>
+ <TooltipButton tooltip={t("nav.newTask")} ariaLabel={`${t("nav.newTask")}: ${project.label} · ${project.hostLabel}`}
+ disabled={busy !== null} onClick={() => void open(project)}><IconNewProject size={14} /></TooltipButton>
+ </div>
+ {renderSessions(sessions)}
+ </section>;
+ })}</>;
}
diff --git a/apps/desktop/src/features/settings/SettingsPage.tsx b/apps/desktop/src/features/settings/SettingsPage.tsx
index b226e2e6b..26c6ee6b0 100644
--- a/apps/desktop/src/features/settings/SettingsPage.tsx
+++ b/apps/desktop/src/features/settings/SettingsPage.tsx
@@ -415,6 +415,46 @@ export function SettingsPage() {
<FontSizeRow settings={settings} saveSettings={saveSettings} />
</SettingsCard>
+ <SettingsCard title={t("settings.sidebar")}>
+ <SettingsRow
+ title={t("settings.sidebarRunningIndicators")}
+ description={t("settings.sidebarRunningIndicatorsDesc")}
+ >
+ <SettingsToggle
+ checked={settings.sidebarRunningIndicators !== false}
+ label={t("settings.sidebarRunningIndicators")}
+ onChange={() => void saveSettings({
+ sidebarRunningIndicators: settings.sidebarRunningIndicators === false,
+ })}
+ />
+ </SettingsRow>
+ {/*
+ The two sub-switches are gated by the master switch. They keep
+ their stored value while disabled, so turning the master back
+ on restores the previous choice instead of resetting it.
+ */}
+ <SettingsRow title={t("settings.sidebarRunningBadge")}>
+ <SettingsToggle
+ checked={settings.sidebarRunningBadge !== false}
+ label={t("settings.sidebarRunningBadge")}
+ disabled={settings.sidebarRunningIndicators === false}
+ onChange={() => void saveSettings({
+ sidebarRunningBadge: settings.sidebarRunningBadge === false,
+ })}
+ />
+ </SettingsRow>
+ <SettingsRow title={t("settings.sidebarRunningRail")}>
+ <SettingsToggle
+ checked={settings.sidebarRunningRail !== false}
+ label={t("settings.sidebarRunningRail")}
+ disabled={settings.sidebarRunningIndicators === false}
+ onChange={() => void saveSettings({
+ sidebarRunningRail: settings.sidebarRunningRail === false,
+ })}
+ />
+ </SettingsRow>
+ </SettingsCard>
+
<NetworkProxySection settings={settings} saveSettings={saveSettings} />
<StorageSettingsSection />
diff --git a/apps/desktop/src/lib/api.ts b/apps/desktop/src/lib/api.ts
index 55d90cc11..a01f68476 100644
--- a/apps/desktop/src/lib/api.ts
+++ b/apps/desktop/src/lib/api.ts
@@ -463,6 +463,9 @@ export function validateSettingsWrite(settings: AppSettings): AppSettings {
infiniteProviderRetry?: unknown;
jevEnabled?: unknown;
smoothStreaming?: unknown;
+ sidebarRunningIndicators?: unknown;
+ sidebarRunningBadge?: unknown;
+ sidebarRunningRail?: unknown;
updatePreference?: unknown;
lastNotifiedUpdateVersion?: unknown;
networkProxy?: unknown;
@@ -525,6 +528,20 @@ export function validateSettingsWrite(settings: AppSettings): AppSettings {
errorCode: "INVALID_PARAMS",
});
}
+ for (const key of [
+ "sidebarRunningIndicators",
+ "sidebarRunningBadge",
+ "sidebarRunningRail",
+ ] as const) {
+ if (
+ Object.prototype.hasOwnProperty.call(value, key) &&
+ typeof value[key] !== "boolean"
+ ) {
+ throw Object.assign(new Error(`${key} is invalid`), {
+ errorCode: "INVALID_PARAMS",
+ });
+ }
+ }
if (
Object.prototype.hasOwnProperty.call(value, "updatePreference") &&
value.updatePreference !== "automatic" &&
diff --git a/apps/desktop/src/lib/settings-search.ts b/apps/desktop/src/lib/settings-search.ts
index 106358e27..e65e0f11a 100644
--- a/apps/desktop/src/lib/settings-search.ts
+++ b/apps/desktop/src/lib/settings-search.ts
@@ -89,6 +89,11 @@ export const SETTINGS_NAV: SettingsNavEntry[] = [
"settings.networkRelaxedModeStrictDesc",
"settings.preventScreenSleep",
"settings.preventScreenSleepDesc",
+ "settings.sidebar",
+ "settings.sidebarRunningIndicators",
+ "settings.sidebarRunningIndicatorsDesc",
+ "settings.sidebarRunningBadge",
+ "settings.sidebarRunningRail",
],
},
{
diff --git a/apps/desktop/src/lib/sidebar-project-runs.ts b/apps/desktop/src/lib/sidebar-project-runs.ts
new file mode 100644
index 000000000..3913bf48b
--- /dev/null
+++ b/apps/desktop/src/lib/sidebar-project-runs.ts
@@ -0,0 +1,94 @@
+/**
+ * Sidebar project "running" affordance resolution.
+ *
+ * A project group header must answer "is anything under me actually
+ * running?" while the group is collapsed, so the signal cannot live only on
+ * the session rows: `.sidebar-session-group-body.project.collapsed` folds to
+ * `0fr` and goes `inert`, which hides every row-level status dot.
+ *
+ * This module owns the two decisions that rendering must not re-derive:
+ * which projects have live work, and whether a given affordance is on.
+ * Both are pure so they are testable without a renderer.
+ */
+
+/** Live counts for one project group, local or remote. */
+export type ProjectRunSummary = {
+ /** Sessions with an in-flight turn. */
+ running: number;
+ /** Sessions blocked on a permission prompt. */
+ waiting: number;
+ /** Sessions shown under this project (used for the `n / total` read). */
+ total: number;
+};
+
+export const EMPTY_PROJECT_RUN_SUMMARY: ProjectRunSummary = {
+ running: 0,
+ waiting: 0,
+ total: 0,
+};
+
+/** Minimal session shape needed to classify one row. */
+export type ProjectRunSession = { id: string };
+
+/**
+ * The two sidebar affordances, each gated by the master switch. Absent
+ * settings mean "on" so an existing install keeps the affordances without a
+ * migration, and turning the master switch off disables both regardless of
+ * how the sub-switches are stored.
+ */
+export type SidebarRunningAffordances = {
+ badge: boolean;
+ rail: boolean;
+};
+
+export function resolveSidebarRunningAffordances(
+ settings?:
+ | {
+ sidebarRunningIndicators?: boolean;
+ sidebarRunningBadge?: boolean;
+ sidebarRunningRail?: boolean;
+ }
+ | null,
+): SidebarRunningAffordances {
+ const master = settings?.sidebarRunningIndicators !== false;
+ return {
+ badge: master && settings?.sidebarRunningBadge !== false,
+ rail: master && settings?.sidebarRunningRail !== false,
+ };
+}
+
+/**
+ * Classify one project's sessions. `runningSessions` and `pendingPermissions`
+ * are keyed by session id, matching the store's shape.
+ */
+export function summarizeProjectRuns(
+ sessions: readonly ProjectRunSession[],
+ runningSessions: Record<string, boolean | undefined>,
+ pendingPermissions: Record<string, readonly unknown[] | undefined>,
+): ProjectRunSummary {
+ let running = 0;
+ let waiting = 0;
+ for (const session of sessions) {
+ if ((pendingPermissions[session.id]?.length ?? 0) > 0) {
+ waiting += 1;
+ } else if (runningSessions[session.id]) {
+ running += 1;
+ }
+ }
+ return { running, waiting, total: sessions.length };
+}
+
+/** True when the group deserves an affordance at all. */
+export function projectRunSummaryIsLive(summary: ProjectRunSummary): boolean {
+ return summary.running > 0 || summary.waiting > 0;
+}
+
+/** Total live sessions across every group; drives the section-level summary. */
+export function totalRunningProjects(
+ summaries: readonly ProjectRunSummary[],
+): number {
+ return summaries.reduce(
+ (count, summary) => count + (projectRunSummaryIsLive(summary) ? 1 : 0),
+ 0,
+ );
+}
diff --git a/apps/desktop/src/styles/sidebar-threads.css b/apps/desktop/src/styles/sidebar-threads.css
index 42e5646bb..92cf79bb7 100644
--- a/apps/desktop/src/styles/sidebar-threads.css
+++ b/apps/desktop/src/styles/sidebar-threads.css
@@ -333,3 +333,174 @@
}
+
+/* ============================================================
+ Project-level running affordances: count badge + activity rail.
+
+ Both hang off the project group *header* rather than the session rows.
+ `.sidebar-session-group-body.project.collapsed` folds to `0fr` and is
+ `inert`, so a row-level status dot vanishes exactly when the question
+ "is anything running under here?" matters most; the header survives both
+ states.
+
+ Every colour resolves through a `--ds-*` surface token, so light, dark,
+ and contributed themes recolor them; nothing here pins a literal. Motion
+ is decorative only — the static shapes stay legible without it (see the
+ reduced-motion block at the end).
+ ============================================================ */
+
+.project-run-badges {
+ display: inline-flex;
+ align-items: center;
+ gap: 4px;
+ flex: 0 0 auto;
+}
+
+.project-run-badge {
+ display: inline-flex;
+ height: 17px;
+ flex: 0 0 auto;
+ align-items: center;
+ gap: 4px;
+ padding: 0 6px;
+ border-radius: var(--radius-full);
+ background: color-mix(in oklab, var(--ds-warning) 18%, transparent);
+ /* The figure stays neutral ink: the dot and the tint carry the meaning, so
+ the count keeps its contrast in every theme instead of riding on a
+ semantic colour that is tuned for a dot, not for 11px text. */
+ color: var(--ds-text-primary);
+ font-size: var(--text-xs);
+ font-weight: var(--font-weight-semibold);
+ font-variant-numeric: tabular-nums;
+}
+
+.project-run-badge.waiting {
+ background: color-mix(in oklab, var(--ds-purple) 18%, transparent);
+}
+
+.project-run-badge-dot {
+ width: 6px;
+ height: 6px;
+ flex: 0 0 auto;
+ border-radius: var(--radius-round);
+ background: var(--ds-warning);
+ animation: project-run-breathe 1.6s ease-in-out infinite;
+}
+
+.project-run-badge.waiting .project-run-badge-dot {
+ background: var(--ds-purple);
+ animation: none;
+}
+
+/* A collapsed group is the case this badge exists for, so it keeps a
+ slightly stronger tint once the session rows are gone. */
+.project-group.is-collapsed .project-run-badge {
+ background: color-mix(in oklab, var(--ds-warning) 26%, transparent);
+}
+
+.project-group.is-collapsed .project-run-badge.waiting {
+ background: color-mix(in oklab, var(--ds-purple) 26%, transparent);
+}
+
+/*
+ The rail spans the group box, so it covers the opened session list and
+ shrinks to just the header when the group is collapsed — the same element
+ answers in both states without a special case.
+*/
+.project-run-rail {
+ position: absolute;
+ top: 1px;
+ bottom: 1px;
+ left: 0;
+ width: 2px;
+ overflow: hidden;
+ border-radius: var(--radius-full);
+ background: color-mix(in oklab, var(--ds-warning) 28%, transparent);
+ pointer-events: none;
+}
+
+.project-run-rail-pulse {
+ position: absolute;
+ left: 0;
+ width: 100%;
+ height: 55%;
+ border-radius: inherit;
+ background: linear-gradient(
+ 180deg,
+ transparent 0%,
+ color-mix(in oklab, var(--ds-warning) 85%, transparent) 45%,
+ var(--ds-warning) 60%,
+ transparent 100%
+ );
+ animation: project-run-comet 2.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
+}
+
+/* The numeric readout that stands in for the badge when the badge is off. */
+.project-run-count {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ flex: 0 0 auto;
+ font-size: var(--text-xs);
+ font-weight: var(--font-weight-semibold);
+ font-variant-numeric: tabular-nums;
+}
+
+.project-run-pip {
+ display: inline-flex;
+ align-items: center;
+ gap: 3px;
+ color: var(--ds-text-secondary);
+}
+
+.project-run-pip::before {
+ width: 6px;
+ height: 6px;
+ flex: 0 0 auto;
+ border-radius: var(--radius-round);
+ background: var(--ds-warning);
+ content: "";
+}
+
+.project-run-pip.waiting::before {
+ background: var(--ds-purple);
+}
+
+/* Two adjacent pips would otherwise read as one two-digit number. */
+.project-run-pip + .project-run-pip {
+ padding-left: 6px;
+ border-left: 1px solid var(--ds-border-default);
+}
+
+@keyframes project-run-breathe {
+ 0%,
+ 100% {
+ opacity: 1;
+ transform: scale(1);
+ }
+ 50% {
+ opacity: 0.82;
+ transform: scale(0.86);
+ }
+}
+
+@keyframes project-run-comet {
+ 0% {
+ transform: translateY(-120%);
+ }
+ 100% {
+ transform: translateY(200%);
+ }
+}
+
+/*
+ Motion is decoration, never the message: with the animation removed the
+ pulse stays parked at the top of the track as a solid bright segment, so
+ the rail still reads as "live" for users who prefer reduced motion.
+*/
+@media (prefers-reduced-motion: reduce) {
+ .project-run-badge-dot,
+ .project-run-rail-pulse {
+ animation: none;
+ }
+}
diff --git a/apps/desktop/test/sidebar-project-runs.test.mjs b/apps/desktop/test/sidebar-project-runs.test.mjs
new file mode 100644
index 000000000..f0330139d
--- /dev/null
+++ b/apps/desktop/test/sidebar-project-runs.test.mjs
@@ -0,0 +1,132 @@
+import assert from "node:assert/strict";
+import { register } from "node:module";
+import { dirname, join } from "node:path";
+import { readFile } from "node:fs/promises";
+import test from "node:test";
+import { fileURLToPath, pathToFileURL } from "node:url";
+
+const here = dirname(fileURLToPath(import.meta.url));
+register(pathToFileURL(join(here, "helpers/ts-import-hooks.mjs")));
+const {
+ projectRunSummaryIsLive,
+ resolveSidebarRunningAffordances,
+ summarizeProjectRuns,
+ totalRunningProjects,
+} = await import("../src/lib/sidebar-project-runs.ts");
+
+const sessions = (...ids) => ids.map((id) => ({ id }));
+
+test("counts running and permission-blocked sessions separately", () => {
+ const summary = summarizeProjectRuns(
+ sessions("a", "b", "c", "d"),
+ { a: true, b: true, d: true },
+ { c: [{}] },
+ );
+ // `d` runs but its permission list is absent, so it is not a wait.
+ assert.deepEqual(summary, { running: 3, waiting: 1, total: 4 });
+});
+
+test("a session waiting for permission is not also counted as running", () => {
+ // The store can hold both flags; the row shows the permission dot, so the
+ // group must not double-count the same session.
+ const summary = summarizeProjectRuns(sessions("a"), { a: true }, { a: [{}] });
+ assert.deepEqual(summary, { running: 0, waiting: 1, total: 1 });
+});
+
+test("an empty project is not live", () => {
+ const summary = summarizeProjectRuns([], {}, {});
+ assert.deepEqual(summary, { running: 0, waiting: 0, total: 0 });
+ assert.equal(projectRunSummaryIsLive(summary), false);
+});
+
+test("totalRunningProjects counts groups with live work, not sessions", () => {
+ const running = summarizeProjectRuns(sessions("a", "b"), { a: true, b: true }, {});
+ const waiting = summarizeProjectRuns(sessions("c"), {}, { c: [{}] });
+ const idle = summarizeProjectRuns(sessions("d"), {}, {});
+ assert.equal(totalRunningProjects([running, waiting, idle]), 2);
+});
+
+test("affordances default on so an existing install needs no migration", () => {
+ assert.deepEqual(resolveSidebarRunningAffordances(undefined), {
+ badge: true,
+ rail: true,
+ });
+ assert.deepEqual(resolveSidebarRunningAffordances({}), { badge: true, rail: true });
+ assert.deepEqual(resolveSidebarRunningAffordances(null), { badge: true, rail: true });
+});
+
+test("the master switch gates both sub-switches", () => {
+ // Sub-switches left on, master off: everything is off.
+ assert.deepEqual(
+ resolveSidebarRunningAffordances({
+ sidebarRunningIndicators: false,
+ sidebarRunningBadge: true,
+ sidebarRunningRail: true,
+ }),
+ { badge: false, rail: false },
+ );
+});
+
+test("each sub-switch turns off independently while the master stays on", () => {
+ assert.deepEqual(
+ resolveSidebarRunningAffordances({
+ sidebarRunningIndicators: true,
+ sidebarRunningBadge: false,
+ sidebarRunningRail: true,
+ }),
+ { badge: false, rail: true },
+ );
+ assert.deepEqual(
+ resolveSidebarRunningAffordances({
+ sidebarRunningIndicators: true,
+ sidebarRunningBadge: true,
+ sidebarRunningRail: false,
+ }),
+ { badge: true, rail: false },
+ );
+});
+
+test("the sidebar renders both affordances from the resolved switches", async () => {
+ const sidebar = await readFile(
+ new URL("../src/components/Sidebar.tsx", import.meta.url),
+ "utf8",
+ );
+ // The header, not the session rows, owns the affordances: the collapsed
+ // group body is `inert`, so a row-level marker disappears exactly when the
+ // answer matters. Guard the wiring that keeps them on the header.
+ assert.match(
+ sidebar,
+ /const runningAffordances = resolveSidebarRunningAffordances\(settings\)/,
+ );
+ assert.match(sidebar, /const runSummary = summarizeProjectRuns\(/);
+ assert.match(sidebar, /showRunBadge \? <ProjectRunBadge summary=\{runSummary\} \/>/);
+ assert.match(sidebar, /showRunRail \? <ProjectRunRail summary=\{runSummary\} \/>/);
+ assert.match(sidebar, /\{entry\.name\}<\/span>[\s\S]{0,220}ProjectRunBadge/);
+});
+
+test("remote project groups carry the same affordances", async () => {
+ const remote = await readFile(
+ new URL("../src/components/remote/RemoteProjectGroups.tsx", import.meta.url),
+ "utf8",
+ );
+ assert.match(remote, /summarizeProjectRuns\(sessions, runningSessions, pendingPermissions\)/);
+ assert.match(remote, /showRunRail \? <ProjectRunRail summary=\{runSummary\} \/>/);
+ assert.match(remote, /showRunBadge \? <ProjectRunBadge summary=\{runSummary\} \/>/);
+});
+
+test("both affordance colours resolve through theme tokens", async () => {
+ const css = await readFile(
+ new URL("../src/styles/sidebar-threads.css", import.meta.url),
+ "utf8",
+ );
+ const block = css.slice(css.indexOf(".project-run-badges"));
+ assert.ok(block.length > 0, "the affordance stylesheet block must exist");
+ // A literal colour here would be pinned out of every contributed theme.
+ assert.doesNotMatch(block, /#[0-9a-fA-F]{3,8}\b/);
+ assert.doesNotMatch(block, /\b(?:rgb|hsl)a?\(/);
+ assert.doesNotMatch(block, /var\(--(?:gray|accent|color)-/);
+ assert.match(block, /--ds-warning/);
+ assert.match(block, /--ds-purple/);
+ // Motion is decoration only: it must be dropped under reduced motion.
+ assert.match(block, /@media \(prefers-reduced-motion: reduce\)/);
+});
diff --git a/docs/spec/04-ux/01-ui-ia.md b/docs/spec/04-ux/01-ui-ia.md
index 438f881aa..6a9d6c230 100644
--- a/docs/spec/04-ux/01-ui-ia.md
+++ b/docs/spec/04-ux/01-ui-ia.md
@@ -224,6 +224,24 @@ destination, chat as the home surface, tools and permissions inline.
dense tree rather than detached cards. Hovering or focusing the project title
reveals the full project path. Pressing the title and moving 8px reorders
the group.
+- **Running activity**: a project group whose sessions have live work marks
+ that fact on its *header*, because a collapsed group folds its body to a
+ zero-height `inert` region and would otherwise hide every row-level status
+ dot exactly when the answer is most useful. Two independent affordances
+ share one amber `--ds-warning` vocabulary (a pending permission keeps the
+ purple `--ds-purple` used by the conversation row):
+ - a **count badge** after the project name, showing running and
+ permission-waiting counts as separate capsules so the two figures are
+ never read as one number;
+ - an **activity rail**: a 2px track down the group's left edge with a
+ travelling pulse, spanning the opened conversation list and shrinking to
+ the header while the group is collapsed, plus a matching count.
+ Remote host groups carry the same pair. Settings → General → Sidebar owns
+ one master switch (`AppSettings.sidebarRunningIndicators`) gating two
+ sub-switches (`sidebarRunningBadge`, `sidebarRunningRail`); absent values
+ mean on, so existing installs keep the affordances without a migration.
+ Motion is decoration only: `prefers-reduced-motion` keeps both static
+ shapes legible with the animation removed.
- **Project actions**: open folder reveals the primary project directory; Edit
project changes the host-owned logical group name and adjusts eligible
non-primary roots (keeping renderer metadata in sync); pin/unpin changes
diff --git a/docs/spec/04-ux/06-settings-ia.md b/docs/spec/04-ux/06-settings-ia.md
index 14e104c82..04da01524 100644
--- a/docs/spec/04-ux/06-settings-ia.md
+++ b/docs/spec/04-ux/06-settings-ia.md
@@ -174,6 +174,14 @@ Settings is a **full-window page** that replaces the app sidebar + main chrome (
`AppSettings.keepAwakeWhileRunning` and `AppSettings.preventScreenSleep`,
take effect immediately, restore on startup, and release their own blocker
when disabled or during shutdown. Manual sleep and lid close follow the OS.
+- **Sidebar** card: one master switch for project running activity
+ (`AppSettings.sidebarRunningIndicators`) plus independently gated
+ **Count badge** and **Activity rail** switches
+ (`sidebarRunningBadge`, `sidebarRunningRail`). Absent values mean on. The
+ sub-switches are disabled while the master switch is off and keep their
+ stored value, so re-enabling the master restores the previous choice
+ instead of resetting it. The affordances themselves are described in
+ [01-ui-ia.md §3.2](01-ui-ia.md#32-sidebar-project-groups).
- **Network** card:
- **Proxy**: a segmented control — System, Direct, Custom. System is the
default and lets Chromium follow the OS proxy; Direct disables the proxy;
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index a5c74d143..c895d6180 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -18050,3 +18050,40 @@ host-created files. The full app's file-preview viewer is covered separately.
`apps/desktop/test/app-store-sidebar.test.mjs` and
`apps/desktop/test/project-create-dialog.test.mjs`; full UI scenario remains
Draft and is run only when explicitly requested in a capable environment.
+
+### E2E-266: Project headers show running activity while collapsed
+
+- **Preconditions**: At least two local project groups with sessions, one of
+ them with a running turn (and optionally a session waiting for a
+ permission prompt), plus a connected remote host group with a running
+ session. Settings → General → Sidebar switches are at their defaults.
+- **Steps**:
+ 1. Start a turn in one project and collapse that project group.
+ 2. Inspect the collapsed header, then expand it again.
+ 3. Start a second concurrent turn in a different project and a turn in the
+ remote host's project.
+ 4. Open Settings → General → Sidebar and turn off **Show running activity
+ on projects**, then re-check the sidebar.
+ 5. Turn the master switch back on, turn off **Count badge** only, and
+ re-check. Repeat with **Activity rail** only.
+ 6. Enable the OS "reduce motion" setting and re-check the rail.
+- **Expected**: A project with live work marks its header — the collapsed
+ header keeps showing the count badge and the activity rail, so the project
+ is identifiable without expanding it. Running and permission-waiting counts
+ are separate figures and never merge into one number. The remote host group
+ shows the same pair. The master switch removes both affordances at once and
+ leaves the two sub-switches disabled but retaining their stored value, so
+ re-enabling the master restores the previous choice. Each sub-switch hides
+ only its own affordance. Under reduced motion both affordances stay visible
+ with their animation removed. Settings persist across a renderer reload.
+- **Specs linked**: `04-ux/01-ui-ia.md` §3.2, `04-ux/06-settings-ia.md`
+ (General → Sidebar card).
+- **Acceptance**: The "is anything running under here?" answer is available
+ from a collapsed project group, and each affordance can be switched off
+ independently through a persisted setting.
+- **Status**: Draft. Unit coverage in
+ `apps/desktop/test/sidebar-project-runs.test.mjs` covers the count
+ classification, the master/sub-switch gating, both render call sites, and
+ the theme-token and reduced-motion guarantees; the interactive sidebar
+ scenario remains a manual validation scenario run in a capable
+ environment.
diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.ts
index 5e2f21960..947c2fa00 100644
--- a/packages/i18n/src/locales/de/index.ts
+++ b/packages/i18n/src/locales/de/index.ts
@@ -244,6 +244,8 @@ export const de = {
"sessionSelected": "Ausgewählt",
"sessionCompleted": "Fertig",
"sessionFailed": "Benötigt Aufmerksamkeit",
+ "projectRunningCount": "{{count}} laufen in diesem Projekt",
+ "projectWaitingCount": "{{count}} warten auf Freigabe",
"sortSessions": "Projekte und Chats sortieren",
"sortRecent": "Kürzlich aktualisiert",
"sortOldest": "Älteste zuerst",
@@ -783,6 +785,11 @@ export const de = {
operationError: "Der Speichervorgang konnte nicht gestartet werden. {{error}}",
},
"power": "Energie",
+ "sidebar": "Seitenleiste",
+ "sidebarRunningIndicators": "Laufende Aktivität an Projekten zeigen",
+ "sidebarRunningIndicatorsDesc": "Markiert Projekte mit laufender Arbeit in der Seitenleiste, auch wenn das Projekt eingeklappt ist. Ausschalten blendet beide Markierungen unten aus.",
+ "sidebarRunningBadge": "Anzahl-Badge",
+ "sidebarRunningRail": "Aktivitätsschiene",
"keepAwakeWhileRunning": "Computer wach halten",
"keepAwakeWhileRunningDesc": "Verhindert den Ruhezustand bei Inaktivität, solange PI-Desktop läuft. Der Bildschirm kann sich ausschalten; manuelles Schlafen und Zuklappen bleiben möglich.",
"imageModel": "Bildgenerierungsmodell",
diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.ts
index bbc3c348b..760ac5ce8 100644
--- a/packages/i18n/src/locales/en/index.ts
+++ b/packages/i18n/src/locales/en/index.ts
@@ -251,6 +251,8 @@ export const en = {
sessionSelected: "Selected",
sessionCompleted: "Done",
sessionFailed: "Needs attention",
+ projectRunningCount: "{{count}} running in this project",
+ projectWaitingCount: "{{count}} waiting for approval",
sortSessions: "Sort projects and chats",
sortRecent: "Recently updated",
sortOldest: "Oldest first",
@@ -795,6 +797,11 @@ export const en = {
operationError: "Could not start the storage operation. {{error}}",
},
power: "Power",
+ sidebar: "Sidebar",
+ sidebarRunningIndicators: "Show running activity on projects",
+ sidebarRunningIndicatorsDesc: "Mark projects that have work in progress in the sidebar, including when the project is collapsed. Turning this off hides both markers below.",
+ sidebarRunningBadge: "Count badge",
+ sidebarRunningRail: "Activity rail",
keepAwakeWhileRunning: "Keep computer awake",
keepAwakeWhileRunningDesc: "Prevent idle system sleep while PI-Desktop is running. The display may turn off; manual sleep and closing the lid still work.",
imageModel: "Image generation model",
diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.ts
index 2889f9e33..c814fee0e 100644
--- a/packages/i18n/src/locales/es/index.ts
+++ b/packages/i18n/src/locales/es/index.ts
@@ -244,6 +244,8 @@ export const es = {
"sessionSelected": "Seleccionado",
"sessionCompleted": "Listo",
"sessionFailed": "Necesita atención",
+ "projectRunningCount": "{{count}} en ejecución en este proyecto",
+ "projectWaitingCount": "{{count}} esperando aprobación",
"sortSessions": "Ordenar proyectos y chats",
"sortRecent": "Actualizado recientemente",
"sortOldest": "Más antiguo primero",
@@ -783,6 +785,11 @@ export const es = {
operationError: "No se pudo iniciar la operación de almacenamiento. {{error}}",
},
"power": "Energía",
+ "sidebar": "Barra lateral",
+ "sidebarRunningIndicators": "Mostrar actividad en ejecución en los proyectos",
+ "sidebarRunningIndicatorsDesc": "Marca en la barra lateral los proyectos con trabajo en curso, incluso cuando el proyecto está contraído. Al desactivarlo se ocultan ambos indicadores.",
+ "sidebarRunningBadge": "Insignia de recuento",
+ "sidebarRunningRail": "Carril de actividad",
"keepAwakeWhileRunning": "Mantener el equipo activo",
"keepAwakeWhileRunningDesc": "Evita la suspensión por inactividad mientras PI-Desktop esté abierto. La pantalla puede apagarse; la suspensión manual y al cerrar la tapa siguen funcionando.",
"imageModel": "Modelo de imágenes",
diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.ts
index 7448a0d3e..29686ae48 100644
--- a/packages/i18n/src/locales/fr/index.ts
+++ b/packages/i18n/src/locales/fr/index.ts
@@ -244,6 +244,8 @@ export const fr = {
"sessionSelected": "Sélectionné",
"sessionCompleted": "Terminé",
"sessionFailed": "Nécessite une attention particulière",
+ "projectRunningCount": "{{count}} en cours dans ce projet",
+ "projectWaitingCount": "{{count}} en attente d'approbation",
"sortSessions": "Trier les projets et les discussions",
"sortRecent": "Récemment mis à jour",
"sortOldest": "Le plus ancien en premier",
@@ -783,6 +785,11 @@ export const fr = {
operationError: "Impossible de lancer l’opération de stockage. {{error}}",
},
"power": "Alimentation",
+ "sidebar": "Barre latérale",
+ "sidebarRunningIndicators": "Afficher l'activité en cours sur les projets",
+ "sidebarRunningIndicatorsDesc": "Signale dans la barre latérale les projets ayant du travail en cours, même lorsque le projet est replié. Désactiver cette option masque les deux repères ci-dessous.",
+ "sidebarRunningBadge": "Pastille de nombre",
+ "sidebarRunningRail": "Rail d'activité",
"keepAwakeWhileRunning": "Garder l'ordinateur éveillé",
"keepAwakeWhileRunningDesc": "Empêche la veille due à l'inactivité pendant l'exécution de PI-Desktop. L'écran peut s'éteindre ; la veille manuelle et la fermeture du capot restent possibles.",
"imageModel": "Modèle de génération d’images",
diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.ts
index 317764fd6..7c8b54f01 100644
--- a/packages/i18n/src/locales/ko/index.ts
+++ b/packages/i18n/src/locales/ko/index.ts
@@ -253,6 +253,8 @@ export const ko = {
sessionSelected: "선택됨",
sessionCompleted: "완료",
sessionFailed: "확인 필요",
+ projectRunningCount: "이 프로젝트에서 {{count}}개 실행 중",
+ projectWaitingCount: "{{count}}개 승인 대기 중",
sortSessions: "프로젝트와 채팅 정렬",
sortRecent: "최근 업데이트순",
sortOldest: "오래된 순",
@@ -792,6 +794,11 @@ export const ko = {
operationError: "저장 작업을 시작할 수 없습니다. {{error}}",
},
power: "전원",
+ sidebar: "사이드바",
+ sidebarRunningIndicators: "프로젝트에 실행 상태 표시",
+ sidebarRunningIndicatorsDesc: "작업이 진행 중인 프로젝트를 사이드바에 표시하며, 프로젝트를 접었을 때도 보입니다. 끄면 아래 두 표시가 함께 숨겨집니다.",
+ sidebarRunningBadge: "개수 배지",
+ sidebarRunningRail: "활동 레일",
keepAwakeWhileRunning: "컴퓨터 절전 방지",
keepAwakeWhileRunningDesc: "PI-Desktop 실행 중 유휴 상태로 인한 시스템 절전을 방지합니다. 화면은 꺼질 수 있으며 수동 절전과 덮개 닫기는 그대로 작동합니다.",
"imageModel": "이미지 생성 모델",
diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.ts
index 27c9de901..98e95488d 100644
--- a/packages/i18n/src/locales/pt-BR/index.ts
+++ b/packages/i18n/src/locales/pt-BR/index.ts
@@ -243,6 +243,8 @@ export const ptBR = {
sessionSelected: "Selecionada",
sessionCompleted: "Concluída",
sessionFailed: "Requer atenção",
+ projectRunningCount: "{{count}} em execução neste projeto",
+ projectWaitingCount: "{{count}} aguardando aprovação",
sortSessions: "Ordenar projetos e conversas",
sortRecent: "Atualizados recentemente",
sortOldest: "Mais antigos primeiro",
@@ -782,6 +784,11 @@ export const ptBR = {
operationError: "Não foi possível iniciar a operação de armazenamento. {{error}}",
},
power: "Energia",
+ sidebar: "Barra lateral",
+ sidebarRunningIndicators: "Mostrar atividade em execução nos projetos",
+ sidebarRunningIndicatorsDesc: "Marca na barra lateral os projetos com trabalho em andamento, inclusive quando o projeto está recolhido. Desativar oculta os dois indicadores abaixo.",
+ sidebarRunningBadge: "Selo de contagem",
+ sidebarRunningRail: "Trilho de atividade",
keepAwakeWhileRunning: "Manter o computador ativo",
keepAwakeWhileRunningDesc: "Impede a suspensão por inatividade enquanto o PI-Desktop estiver aberto. A tela pode apagar; a suspensão manual e ao fechar a tampa continuam funcionando.",
imageModel: "Modelo de imagens",
diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.ts
index 27c3d543e..93f562e5a 100644
--- a/packages/i18n/src/locales/tr/index.ts
+++ b/packages/i18n/src/locales/tr/index.ts
@@ -253,6 +253,8 @@ export const tr = {
sessionSelected: "Seçili",
sessionCompleted: "Bitti",
sessionFailed: "İlgi gerekiyor",
+ projectRunningCount: "Bu projede {{count}} çalışıyor",
+ projectWaitingCount: "{{count}} onay bekliyor",
sortSessions: "Projeleri ve sohbetleri sırala",
sortRecent: "Son güncellenenler",
sortOldest: "Eskiden yeniye",
@@ -792,6 +794,11 @@ export const tr = {
operationError: "Depolama işlemi başlatılamadı. {{error}}",
},
power: "Güç",
+ sidebar: "Kenar çubuğu",
+ sidebarRunningIndicators: "Projelerde çalışan etkinliği göster",
+ sidebarRunningIndicatorsDesc: "Çalışması süren projeleri kenar çubuğunda işaretler; proje daraltılmışken de görünür. Kapatmak aşağıdaki iki işareti birlikte gizler.",
+ sidebarRunningBadge: "Sayı rozeti",
+ sidebarRunningRail: "Etkinlik şeridi",
keepAwakeWhileRunning: "Bilgisayarı uyanık tut",
keepAwakeWhileRunningDesc: "PI-Desktop çalışırken boşta kalma nedeniyle uykuya geçmeyi önler. Ekran kapanabilir; elle uyutma ve kapağı kapatma etkilenmez.",
"imageModel": "Görsel oluşturma modeli",
diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.ts
index 94f013c78..c85db57a8 100644
--- a/packages/i18n/src/locales/zh-CN/index.ts
+++ b/packages/i18n/src/locales/zh-CN/index.ts
@@ -246,6 +246,8 @@ export const zhCN = {
sessionSelected: "已选中",
sessionCompleted: "已完成",
sessionFailed: "未完成",
+ projectRunningCount: "该项目有 {{count}} 个任务运行中",
+ projectWaitingCount: "{{count}} 个等待授权",
sortSessions: "项目与对话排序",
sortRecent: "最近更新",
sortOldest: "最早创建",
@@ -788,6 +790,11 @@ export const zhCN = {
operationError: "无法启动存储操作。{{error}}",
},
power: "电源",
+ sidebar: "侧边栏",
+ sidebarRunningIndicators: "在项目上显示运行状态",
+ sidebarRunningIndicatorsDesc: "在侧边栏标记有任务正在运行的项目,折叠项目时同样可见。关闭后将同时隐藏下面两个标识。",
+ sidebarRunningBadge: "数量徽标",
+ sidebarRunningRail: "活动流光",
keepAwakeWhileRunning: "保持电脑唤醒",
keepAwakeWhileRunningDesc: "PI-Desktop 运行期间阻止电脑因空闲自动休眠。屏幕仍可能关闭;手动睡眠和合盖休眠不受影响。",
imageModel: "生图模型",
diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.ts
index d4ee28e03..92f345649 100644
--- a/packages/i18n/src/locales/zh-TW/index.ts
+++ b/packages/i18n/src/locales/zh-TW/index.ts
@@ -246,6 +246,8 @@ export const zhTW = {
sessionSelected: "已選中",
sessionCompleted: "已完成",
sessionFailed: "未完成",
+ projectRunningCount: "該專案有 {{count}} 個任務執行中",
+ projectWaitingCount: "{{count}} 個等待授權",
sortSessions: "專案與對話排序",
sortRecent: "最近更新",
sortOldest: "最早建立",
@@ -788,6 +790,11 @@ export const zhTW = {
operationError: "無法啟動儲存操作。{{error}}",
},
power: "電源",
+ sidebar: "側邊欄",
+ sidebarRunningIndicators: "在專案上顯示執行狀態",
+ sidebarRunningIndicatorsDesc: "在側邊欄標記有任務正在執行的專案,專案收合時同樣可見。關閉後會同時隱藏下面兩個標識。",
+ sidebarRunningBadge: "數量徽標",
+ sidebarRunningRail: "活動流光",
keepAwakeWhileRunning: "保持電腦喚醒",
keepAwakeWhileRunningDesc: "PI-Desktop 執行期間阻止電腦因閒置自動休眠。螢幕仍可能關閉;手動睡眠和闔蓋休眠不受影響。",
imageModel: "生圖模型",
diff --git a/packages/shared/src/types/settings.ts b/packages/shared/src/types/settings.ts
index b233aeb17..773492c94 100644
--- a/packages/shared/src/types/settings.ts
+++ b/packages/shared/src/types/settings.ts
@@ -170,6 +170,16 @@ export type AppSettings = {
* platforms. Absent and false mean the system manages sleep normally.
*/
preventScreenSleep?: boolean;
+ /**
+ * Sidebar project "running" affordances. The master switch gates both
+ * sub-switches; absent means enabled, so existing installs keep the
+ * badges and the activity rail without a migration.
+ */
+ sidebarRunningIndicators?: boolean;
+ /** Count badge beside a project name. Absent means enabled. */
+ sidebarRunningBadge?: boolean;
+ /** Activity rail down the project group. Absent means enabled. */
+ sidebarRunningRail?: boolean;
/** Voice input settings (D-voice-runtime). */
voice?: VoiceInputSettings;
onboardingDismissed: boolean;