Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

feat(cindy-make): 整理版本概览与源码差距

Liziaeb59115a41c
diff --git a/apps/desktop/src/main/cindy-make/__tests__/runtimeVersion.git-integration.test.ts b/apps/desktop/src/main/cindy-make/__tests__/runtimeVersion.git-integration.test.ts
index 594bf291ec..45b6f1f5ae 100644
--- a/apps/desktop/src/main/cindy-make/__tests__/runtimeVersion.git-integration.test.ts
+++ b/apps/desktop/src/main/cindy-make/__tests__/runtimeVersion.git-integration.test.ts
@@ -14,7 +14,7 @@ it('uses real ancestry for a running Dev build, including unmerged heads, branch
HOME: root,
USERPROFILE: root,
XDG_CONFIG_HOME: root,
- GIT_CONFIG_GLOBAL: os.devNull,
+ GIT_CONFIG_GLOBAL: path.join(root, '.git', 'empty.gitconfig'),
GIT_CONFIG_NOSYSTEM: '1',
GIT_AUTHOR_NAME: 'Runtime Test',
GIT_AUTHOR_EMAIL: '[email protected]',
@@ -46,6 +46,7 @@ it('uses real ancestry for a running Dev build, including unmerged heads, branch
);
try {
await run(['init', '--initial-branch=main']);
+ await writeFile(environment.GIT_CONFIG_GLOBAL, '');
await run(['commit', '--allow-empty', '--no-gpg-sign', '-m', 'base']);
const base = await run(['rev-parse', 'HEAD']);
await run(['checkout', '-b', 'feature']);
diff --git a/apps/desktop/src/main/cindy-make/__tests__/sourcePreparation.test.ts b/apps/desktop/src/main/cindy-make/__tests__/sourcePreparation.test.ts
index 95cc0d6735..abb11f6230 100644
--- a/apps/desktop/src/main/cindy-make/__tests__/sourcePreparation.test.ts
+++ b/apps/desktop/src/main/cindy-make/__tests__/sourcePreparation.test.ts
@@ -568,6 +568,7 @@ describe('Source and dependency preparation', () => {
await expect(readCurrentCindySourceStatus(root, env)).resolves.toMatchObject({
status: 'ready',
branch: 'cindy-personal',
+ commit: 'a'.repeat(40),
baseCommit: undefined,
mainCommit: 'b'.repeat(40),
currentBranch: 'cindy-personal',
diff --git a/apps/desktop/src/main/cindy-make/__tests__/sourceRevisions.git-integration.test.ts b/apps/desktop/src/main/cindy-make/__tests__/sourceRevisions.git-integration.test.ts
index d13d06d64e..1eb2345c35 100644
--- a/apps/desktop/src/main/cindy-make/__tests__/sourceRevisions.git-integration.test.ts
+++ b/apps/desktop/src/main/cindy-make/__tests__/sourceRevisions.git-integration.test.ts
@@ -1,4 +1,4 @@
-import { mkdtemp, rm } from 'node:fs/promises';
+import { mkdtemp, rm, writeFile } from 'node:fs/promises';
import os from 'node:os';
import path from 'node:path';
import { expect, it } from 'vitest';
@@ -14,7 +14,7 @@ it('reads real Git ancestry and divergence without moving personal or main branc
HOME: root,
USERPROFILE: root,
XDG_CONFIG_HOME: root,
- GIT_CONFIG_GLOBAL: os.devNull,
+ GIT_CONFIG_GLOBAL: path.join(root, '.git', 'empty.gitconfig'),
GIT_CONFIG_NOSYSTEM: '1',
GIT_AUTHOR_NAME: 'Source Test',
GIT_AUTHOR_EMAIL: '[email protected]',
@@ -30,6 +30,7 @@ it('reads real Git ancestry and divergence without moving personal or main branc
};
try {
await git(['init', '--initial-branch=main']);
+ await writeFile(processEnvironment.GIT_CONFIG_GLOBAL!, '');
const base = await commit('base');
await git(['checkout', '-b', 'cindy-personal']);
const personal = await commit('personal');
@@ -47,6 +48,8 @@ it('reads real Git ancestry and divergence without moving personal or main branc
mainRemoteCommit: remote,
mainAhead: 0,
mainBehind: 2,
+ personalAhead: 1,
+ personalBehind: 0,
});
await git(['checkout', 'main']);
const local = await commit('local main only');
@@ -58,6 +61,8 @@ it('reads real Git ancestry and divergence without moving personal or main branc
mainRemoteCommit: remote,
mainAhead: 1,
mainBehind: 2,
+ personalAhead: 1,
+ personalBehind: 1,
});
expect(await git(['rev-parse', 'HEAD'])).toBe(personal);
expect(await git(['rev-parse', 'main'])).toBe(local);
diff --git a/apps/desktop/src/main/cindy-make/__tests__/sourceRevisions.test.ts b/apps/desktop/src/main/cindy-make/__tests__/sourceRevisions.test.ts
index 7c98f01f9d..e070cccce6 100644
--- a/apps/desktop/src/main/cindy-make/__tests__/sourceRevisions.test.ts
+++ b/apps/desktop/src/main/cindy-make/__tests__/sourceRevisions.test.ts
@@ -19,6 +19,7 @@ beforeEach(() => {
'rev-parse --verify refs/remotes/origin/main^{commit}': remoteMain,
'rev-parse --abbrev-ref HEAD': 'main',
['rev-list --left-right --count ' + localMain + '...' + remoteMain]: '0 4',
+ ['rev-list --left-right --count ' + personal + '...' + localMain]: '1 2',
};
vi.mocked(runSourceGit)
.mockReset()
@@ -42,8 +43,10 @@ describe('source revision snapshot', () => {
mainRemoteCommit: remoteMain,
mainBehind: 4,
mainAhead: 0,
+ personalAhead: 1,
+ personalBehind: 2,
});
- expect(runSourceGit).toHaveBeenCalledTimes(6);
+ expect(runSourceGit).toHaveBeenCalledTimes(7);
expect(vi.mocked(runSourceGit).mock.calls.every(([, , cwd]) => cwd === 'managed-source')).toBe(
true,
);
@@ -68,7 +71,7 @@ describe('source revision snapshot', () => {
expect(result.mainBehind).toBeUndefined();
expect(result.mainAhead).toBeUndefined();
expect(result[ref === 'refs/heads/main' ? 'mainCommit' : 'mainRemoteCommit']).toBeUndefined();
- expect(runSourceGit).toHaveBeenCalledTimes(5);
+ expect(runSourceGit).toHaveBeenCalledTimes(ref === 'refs/heads/main' ? 5 : 6);
},
);
diff --git a/apps/desktop/src/main/cindy-make/__tests__/versionService.test.ts b/apps/desktop/src/main/cindy-make/__tests__/versionService.test.ts
index 15ccf2ab2d..702b07bf13 100644
--- a/apps/desktop/src/main/cindy-make/__tests__/versionService.test.ts
+++ b/apps/desktop/src/main/cindy-make/__tests__/versionService.test.ts
@@ -32,6 +32,7 @@ vi.mock('../versionStartup.js', () => ({
}));
import { actCindyVersion, configureCindyVersions, getCindyVersions } from '../versionService';
import { versionsRoot, versionDirectory, writeVersionJson } from '../versionStore';
+import { CindyMakeManager } from '../manager';
const id = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa';
beforeEach(async () => {
vi.clearAllMocks();
@@ -61,6 +62,41 @@ afterEach(async () => {
await rm(h.profile, { recursive: true, force: true });
});
describe('version management main boundary', () => {
+ it('allows switching and returning to original after preparation settles in the real manager', async () => {
+ const manager = new CindyMakeManager();
+ configureCindyVersions(() => manager.hasActiveWork());
+ let release!: () => void;
+ await manager.startTask(
+ { runId: 'version-prepare', request: 'fix', title: 'fix' },
+ {
+ create: async () => ({
+ runId: 'version-prepare',
+ platform: 'win32',
+ arch: 'x64',
+ checks: [],
+ status: 'running',
+ task: { sessionId: 'version-session', phase: 'waiting' },
+ }),
+ persist: async () => {},
+ prepare: () =>
+ new Promise<void>((resolve) => {
+ release = resolve;
+ }),
+ start: async () => {},
+ isCurrent: () => true,
+ onError: () => {},
+ },
+ );
+ await expect(actCindyVersion('switch', id)).rejects.toThrow('busy');
+ release();
+ await manager.waitForTask('version-prepare');
+ expect(manager.taskReport('version-prepare')?.status).toBe('completed');
+ await actCindyVersion('switch', id);
+ expect(h.handoff).toHaveBeenCalledWith(id, expect.any(Function));
+ h.currentId = id;
+ await actCindyVersion('switch', 'original');
+ expect(h.handoff).toHaveBeenLastCalledWith('original', expect.any(Function));
+ });
it('projects Dev as the original without creating a registry on a read', async () => {
expect(await getCindyVersions()).toMatchObject({
currentId: 'original',
diff --git a/apps/desktop/src/main/cindy-make/__tests__/versionStore.test.ts b/apps/desktop/src/main/cindy-make/__tests__/versionStore.test.ts
index 81d26655d0..10f1412e4a 100644
--- a/apps/desktop/src/main/cindy-make/__tests__/versionStore.test.ts
+++ b/apps/desktop/src/main/cindy-make/__tests__/versionStore.test.ts
@@ -108,6 +108,10 @@ describe('local Cindy version snapshots', () => {
publishPersonalVersion(h.userData, first);
const a = await verifyPersonalVersion(h.userData, first, h.original);
expect(a.builtAt).toBe(h.builtAt);
+ expect(a.version).toBe(`Cindy Make ${first.slice(0, 8)}`);
+ expect(
+ listPersonalVersions(h.userData, h.original).find((item) => item.id === first)?.version,
+ ).toBe(`Cindy Make ${first.slice(0, 8)}`);
await writeFile(path.join(h.resources, 'app.asar'), 'application B');
const second = (await h.retain())!;
expect(second).not.toBe(first);
diff --git a/apps/desktop/src/main/cindy-make/sourcePreparation.ts b/apps/desktop/src/main/cindy-make/sourcePreparation.ts
index 1cfac53ad6..3a493e6567 100644
--- a/apps/desktop/src/main/cindy-make/sourcePreparation.ts
+++ b/apps/desktop/src/main/cindy-make/sourcePreparation.ts
@@ -133,6 +133,9 @@ export async function readCurrentCindySourceStatus(
return {
...status,
...revisions,
+ ...(personalCommit && /^[0-9a-f]{7,64}$/i.test(personalCommit)
+ ? { commit: personalCommit }
+ : {}),
branch: CINDY_PERSONAL_BRANCH,
};
}
@@ -169,6 +172,8 @@ function toSourceStatus(progress: SourcePreparationProgress): MakeSourceStatus {
mainRemoteCommit: progress.mainRemoteCommit,
mainBehind: progress.mainBehind,
mainAhead: progress.mainAhead,
+ personalBehind: progress.personalBehind,
+ personalAhead: progress.personalAhead,
...(progress.error ? { error: progress.error } : {}),
...(progress.phase ? { phase: progress.phase } : {}),
...(progress.progress ? { progress: progress.progress } : {}),
diff --git a/apps/desktop/src/main/cindy-make/sourceRevisions.ts b/apps/desktop/src/main/cindy-make/sourceRevisions.ts
index 411e92facf..0cfd625ced 100644
--- a/apps/desktop/src/main/cindy-make/sourceRevisions.ts
+++ b/apps/desktop/src/main/cindy-make/sourceRevisions.ts
@@ -4,7 +4,14 @@ import { runSourceGit } from './sourceGit.js';
export type SourceRevisions = Pick<
MakeSourceStatus,
- 'baseCommit' | 'currentBranch' | 'mainCommit' | 'mainRemoteCommit' | 'mainBehind' | 'mainAhead'
+ | 'baseCommit'
+ | 'currentBranch'
+ | 'mainCommit'
+ | 'mainRemoteCommit'
+ | 'mainBehind'
+ | 'mainAhead'
+ | 'personalBehind'
+ | 'personalAhead'
>;
export function isSourceBranchName(value: unknown): value is string {
@@ -70,5 +77,20 @@ export async function readSourceRevisions(
}
}
}
+ if (mainCommit && personalCommit) {
+ const counts = await query([
+ 'rev-list',
+ '--left-right',
+ '--count',
+ `${personalCommit}...${mainCommit}`,
+ ]);
+ if (counts && /^\d+\s+\d+$/.test(counts)) {
+ const [personalAhead, personalBehind] = counts.split(/\s+/).map(Number);
+ if (Number.isSafeInteger(personalAhead) && Number.isSafeInteger(personalBehind)) {
+ revisions.personalAhead = personalAhead;
+ revisions.personalBehind = personalBehind;
+ }
+ }
+ }
return revisions;
}
diff --git a/apps/desktop/src/main/cindy-make/versionStore.ts b/apps/desktop/src/main/cindy-make/versionStore.ts
index d6622d7c6c..ddbe7cc72d 100644
--- a/apps/desktop/src/main/cindy-make/versionStore.ts
+++ b/apps/desktop/src/main/cindy-make/versionStore.ts
@@ -51,6 +51,8 @@ export interface PersonalVersion {
protocol: 1;
id: string;
profile: VersionProfile;
+ /** User-facing Cindy Make label. Older snapshots may not have this field. */
+ version?: string;
title: string;
commit: string;
tree?: string;
@@ -143,6 +145,11 @@ export function readPersonalVersion(profile: string, id: string): PersonalVersio
if (
typeof item.title !== 'string' ||
item.title.length > 4096 ||
+ (item.version !== undefined &&
+ (typeof item.version !== 'string' ||
+ item.version.length < 1 ||
+ item.version.length > 128 ||
+ !/^Cindy Make [A-Za-z0-9-]{8}$/.test(item.version))) ||
typeof item.builtAt !== 'string' ||
!Number.isFinite(Date.parse(item.builtAt)) ||
typeof item.commit !== 'string' ||
@@ -289,6 +296,7 @@ export function listPersonalVersions(
{
id,
kind: 'personal' as const,
+ ...(item.version ? { version: item.version } : {}),
title: item.title,
commit: item.commit,
builtAt: item.builtAt,
@@ -348,6 +356,7 @@ export async function retainPersonalVersion(input: {
protocol: 1,
id,
profile: input.profile,
+ version: `Cindy Make ${id.slice(0, 8)}`,
title: input.title,
commit: input.commit,
...(input.tree ? { tree: input.tree } : {}),
diff --git a/apps/desktop/src/renderer/components/cindy-make/CindyMakeSourceDetails.tsx b/apps/desktop/src/renderer/components/cindy-make/CindyMakeSourceDetails.tsx
index 3467139f6d..88d23b3e4f 100644
--- a/apps/desktop/src/renderer/components/cindy-make/CindyMakeSourceDetails.tsx
+++ b/apps/desktop/src/renderer/components/cindy-make/CindyMakeSourceDetails.tsx
@@ -1,6 +1,5 @@
import { useTranslation } from 'react-i18next';
import { ArrowRight } from 'lucide-react';
-import type { ReactNode } from 'react';
import type {
MakeSourceLatestVersion,
MakeSourcePreparation,
@@ -9,22 +8,31 @@ import type {
export function CindyMakeSourceDetails({
source,
latestVersion,
- updateAction,
}: {
source: MakeSourcePreparation;
latestVersion?: MakeSourceLatestVersion;
- updateAction?: ReactNode;
}) {
const { t } = useTranslation();
const unknown = t('cindyMake.source.details.unknown');
- let difference: string | undefined;
+ const { personalAhead: ahead, personalBehind: behind } = source;
+ const comparison =
+ ahead === undefined || behind === undefined
+ ? 'unknown'
+ : ahead === 0 && behind === 0
+ ? 'same'
+ : behind === 0
+ ? 'personalAhead'
+ : ahead === 0
+ ? 'mainAhead'
+ : 'diverged';
+ let upstreamDifference: string | undefined;
if (
latestVersion?.status === 'ready' &&
latestVersion.ahead !== undefined &&
latestVersion.behind !== undefined
) {
const { ahead, behind } = latestVersion;
- difference =
+ upstreamDifference =
ahead === 0 && behind === 0
? t('cindyMake.source.details.latest.same')
: ahead === 0
@@ -33,78 +41,53 @@ export function CindyMakeSourceDetails({
? t('cindyMake.source.details.latest.ahead', { count: ahead })
: t('cindyMake.source.details.latest.difference', { ahead, behind });
}
+
return (
- <div className="min-w-0 space-y-2 text-12 text-[var(--text-secondary)]">
- <dl className="grid gap-3">
- <div className="min-w-0">
- <dt className="font-medium">{t('cindyMake.source.details.branch')}</dt>
- <dd className="space-y-1">
- <div className="break-all font-mono">{source.branch ?? unknown}</div>
- <div className="text-[var(--text-tertiary)]">
- {source.ref
- ? t('cindyMake.source.details.baseRef', { ref: source.ref })
- : t('cindyMake.source.details.baseCommit')}{' '}
- <span className="break-all font-mono" title={source.baseCommit}>
- {source.baseCommit?.slice(0, 12) ?? unknown}
- </span>
- </div>
+ <div className="space-y-2 text-13 text-[var(--text-secondary)]">
+ <div className="flex flex-wrap items-center gap-x-3 gap-y-2">
+ <dl className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1">
+ <dt>{t('cindyMake.versions.personal')}</dt>
+ <dd className="font-mono" title={source.commit}>
+ {source.commit?.slice(0, 12) ?? unknown}
</dd>
- </div>
- <div className="flex min-w-0 items-center gap-2">
- <dt className="shrink-0 font-medium">{t('cindyMake.source.details.mainCommit')}</dt>
- <dd className="flex min-w-0 flex-1 items-center gap-2 overflow-x-auto whitespace-nowrap">
- <span
- className="shrink-0 font-mono text-[var(--text-secondary)]"
- title={source.mainCommit}
- >
+ </dl>
+ <div className="flex min-w-0 items-center gap-3">
+ <ArrowRight size={14} className="shrink-0 text-[var(--text-tertiary)]" aria-hidden />
+ <dl className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1">
+ <dt>{t('cindyMake.overview.localMain')}</dt>
+ <dd className="font-mono" title={source.mainCommit}>
{source.mainCommit?.slice(0, 12) ?? unknown}
- </span>
- {latestVersion && (
+ </dd>
+ </dl>
+ </div>
+ </div>
+ <p role="status" className="text-12">
+ {t('cindyMake.overview.comparison.' + comparison, { ahead, behind })}
+ </p>
+ {latestVersion && (
+ <dl className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1 text-12">
+ <dt>{t('cindyMake.source.details.latest.' + latestVersion.channel)}</dt>
+ <dd className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1">
+ {latestVersion.status === 'ready' ? (
<>
- <ArrowRight
- size={14}
- className="shrink-0 text-[var(--text-tertiary)]"
- aria-hidden="true"
- />
<span
- className={
- latestVersion.status === 'ready'
- ? 'shrink-0 text-[var(--status-success)]'
- : 'shrink-0 text-[var(--text-tertiary)]'
- }
+ className="font-mono text-[var(--status-success)]"
+ title={latestVersion.commit}
>
- <span>{t(`cindyMake.source.details.latest.${latestVersion.channel}`)}</span>{' '}
- {latestVersion.status === 'ready' ? (
- <>
- {latestVersion.ref !== 'main' && <span>{latestVersion.ref} </span>}
- <span className="font-mono" title={latestVersion.commit}>
- {latestVersion.commit.slice(0, 12)}
- </span>
- {difference && (
- <>
- {' '}
- <span>{difference}</span>
- </>
- )}
- </>
- ) : (
- t('cindyMake.source.details.latest.unavailable')
- )}
+ {latestVersion.commit.slice(0, 12)}
+ </span>
+ {latestVersion.ref !== 'main' && <span>{latestVersion.ref}</span>}
+ <span className={upstreamDifference ? 'text-[var(--status-success)]' : undefined}>
+ {t('cindyMake.overview.localMain')}{' '}
+ {upstreamDifference ?? t('cindyMake.overview.comparisonUnavailable')}
</span>
</>
+ ) : (
+ t('cindyMake.overview.lookupUnavailable')
)}
</dd>
- {updateAction && <dd className="ml-auto shrink-0">{updateAction}</dd>}
- </div>
- <div className="min-w-0">
- <dt className="font-medium">{t('cindyMake.source.details.currentBranch')}</dt>
- <dd className="break-all font-mono">
- {source.currentBranch === null
- ? t('cindyMake.source.details.detached')
- : (source.currentBranch ?? unknown)}
- </dd>
- </div>
- </dl>
+ </dl>
+ )}
</div>
);
}
diff --git a/apps/desktop/src/renderer/components/cindy-make/CindyMakeVersionsPanel.tsx b/apps/desktop/src/renderer/components/cindy-make/CindyMakeVersionsPanel.tsx
index e48dd9f5f6..c006acb69e 100644
--- a/apps/desktop/src/renderer/components/cindy-make/CindyMakeVersionsPanel.tsx
+++ b/apps/desktop/src/renderer/components/cindy-make/CindyMakeVersionsPanel.tsx
@@ -1,117 +1,178 @@
+import { useId, useState, type ReactNode } from 'react';
+import { ChevronDown, ChevronUp } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { Button } from '@/components/ui/button';
import { useConfirmDialog } from '@/components/ui/confirm-dialog-provider';
import { useCindyVersions } from '@/lib/useCindyVersions';
+import type { CindyVersionInfo } from '../../../shared/cindyVersions';
+/** One overview: the running app first, followed by its personal source. */
export function CindyMakeVersionsPanel({
active = true,
busy = false,
refreshKey,
+ children,
}: {
active?: boolean;
busy?: boolean;
refreshKey?: string;
+ children?: ReactNode;
}) {
const { t, i18n } = useTranslation();
const versions = useCindyVersions(active, refreshKey);
const { confirm } = useConfirmDialog();
+ const [expanded, setExpanded] = useState(false);
+ const listId = useId();
const disabled = busy || !!versions.pending || versions.state?.switching;
- if (typeof window.electronAPI.getCindyVersions !== 'function') return null;
+ const supported = typeof window.electronAPI.getCindyVersions === 'function';
+ const current = versions.state?.versions.find(
+ (version) => version.id === versions.state?.currentId,
+ );
+ const alternatives =
+ versions.state?.versions.filter((version) => version.id !== versions.state?.currentId) ?? [];
+ const title = (version: CindyVersionInfo) =>
+ version.kind === 'original'
+ ? t('cindyMake.versions.original')
+ : version.title || t('cindyMake.versions.personal');
+ const metadata = (version: CindyVersionInfo, includeDate = false) =>
+ [
+ version.development ? t('cindyMake.versions.development') : null,
+ version.version,
+ version.commit?.slice(0, 12),
+ version.dirty ? t('cindyMake.versions.localChanges') : null,
+ includeDate && version.builtAt && Number.isFinite(Date.parse(version.builtAt))
+ ? new Date(version.builtAt).toLocaleString(i18n.language)
+ : null,
+ ]
+ .filter(Boolean)
+ .join(' · ');
return (
- <section className="rounded-xl border border-[var(--settings-theme-card-border)] bg-[var(--settings-theme-card-bg)] p-5">
- <h3 className="text-14 font-medium text-[var(--text-primary)]">
- {t('cindyMake.versions.title')}
- </h3>
- <p className="mt-1 text-12 text-[var(--text-secondary)]">
- {t('cindyMake.versions.description')}
- </p>
- {versions.error && (
- <p role="alert" className="mt-2 text-12 text-[var(--status-danger)]">
- {t('cindyMake.versions.errors.' + versions.error)}
- </p>
- )}
- <div className="mt-3 divide-y divide-[var(--border-default)]">
- {versions.state?.versions.map((version) => {
- const current = versions.state?.currentId === version.id;
- const title =
- version.kind === 'original'
- ? t('cindyMake.versions.original')
- : version.title || t('cindyMake.versions.personal');
- const date =
- version.builtAt && Number.isFinite(Date.parse(version.builtAt))
- ? new Date(version.builtAt).toLocaleString(i18n.language)
- : '';
- return (
- <div
- key={version.id}
- className="flex flex-wrap items-center justify-between gap-3 py-3"
- >
- <div className="min-w-0 flex-1">
- <p className="break-words text-13 font-medium text-[var(--text-primary)]">
- {title}
- {current && (
- <span className="ml-2 text-12 text-[var(--text-secondary)]">
- {t('cindyMake.versions.current')}
- </span>
- )}
+ <section
+ aria-label={t('cindyMake.overview.title')}
+ className="overflow-hidden rounded-xl border border-[var(--border-default)] bg-[var(--surface-elevated)] text-[var(--text-primary)]"
+ >
+ {supported && (
+ <div className="space-y-3 p-4">
+ <div className="flex flex-wrap items-center justify-between gap-3">
+ <div className="min-w-0 flex-[1_1_280px]">
+ <h3 className="flex flex-wrap items-baseline gap-2 text-13 font-normal">
+ <span className="text-[var(--text-secondary)]">
+ {t('cindyMake.versions.current')}
+ </span>
+ {current && (
+ <span className="break-words">
+ {current.kind === 'personal'
+ ? t('cindyMake.versions.personal')
+ : title(current)}
+ </span>
+ )}
+ {current?.kind === 'personal' && current.title && (
+ <span className="break-words text-12 text-[var(--text-secondary)]">
+ {current.title}
+ </span>
+ )}
+ </h3>
+ {current ? (
+ <p className="mt-1 break-words text-12 text-[var(--text-secondary)]">
+ {metadata(current)}
</p>
- <p className="mt-1 text-12 text-[var(--text-secondary)]">
- {[
- version.development ? t('cindyMake.versions.development') : null,
- version.version,
- date,
- version.commit?.slice(0, 12),
- version.dirty ? t('cindyMake.versions.localChanges') : null,
- ]
- .filter(Boolean)
- .join(' · ')}
+ ) : (
+ <p className="mt-1 text-13 text-[var(--text-secondary)]">
+ {t('settings.cindyMake.checking')}
</p>
- {(!version.available || !version.compatible) && (
- <p className="mt-1 text-12 text-[var(--text-secondary)]">
- {t(
- !version.available
- ? 'cindyMake.versions.unavailable'
- : 'cindyMake.versions.incompatible',
- )}
- </p>
+ )}
+ </div>
+ {!!alternatives.length && (
+ <Button
+ variant="secondary"
+ className="gap-2"
+ aria-expanded={expanded}
+ aria-controls={listId}
+ onClick={() => setExpanded(!expanded)}
+ >
+ {t('cindyMake.overview.switchVersion')}
+ {expanded ? (
+ <ChevronUp size={14} aria-hidden />
+ ) : (
+ <ChevronDown size={14} aria-hidden />
)}
- </div>
- <div className="flex flex-wrap gap-2">
- <Button
- variant="secondary"
- disabled={disabled || current || !version.available || !version.compatible}
- loading={versions.pending === version.id}
- onClick={() => void versions.act('switch', version.id)}
- >
- {t(current ? 'cindyMake.versions.using' : 'cindyMake.versions.switch')}
- </Button>
- {version.kind === 'personal' && (
- <Button
- variant="secondary"
- disabled={disabled || current || versions.state?.selectedId === version.id}
- onClick={async () => {
- if (
- await confirm({
- title: t('cindyMake.versions.removeTitle'),
- description: t('cindyMake.versions.removeDescription'),
- confirmText: t('cindyMake.versions.remove'),
- confirmVariant: 'destructive',
- })
- )
- await versions.act('remove', version.id);
- }}
+ </Button>
+ )}
+ {versions.state &&
+ !versions.state.versions.some((version) => version.kind === 'personal') && (
+ <p className="text-12 text-[var(--text-tertiary)]">
+ {t('cindyMake.versions.empty')}
+ </p>
+ )}
+ </div>
+ {versions.error && (
+ <p role="alert" className="text-12 text-[var(--status-danger)]">
+ {t('cindyMake.versions.errors.' + versions.error)}
+ </p>
+ )}
+ {expanded && !!alternatives.length && (
+ <div id={listId} className="space-y-2 border-t border-[var(--border-default)] pt-3">
+ <p className="text-12 text-[var(--text-secondary)]">
+ {t('cindyMake.versions.description')}
+ </p>
+ <ul className="max-h-60 divide-y divide-[var(--border-default)] overflow-y-auto overscroll-contain">
+ {alternatives.map((version) => (
+ <li
+ key={version.id}
+ className="flex flex-wrap items-center justify-between gap-3 py-3"
>
- {t('cindyMake.versions.remove')}
- </Button>
- )}
- </div>
+ <div className="min-w-0 flex-1">
+ <p className="break-words text-13 font-medium">{title(version)}</p>
+ <p className="mt-1 break-words text-12 text-[var(--text-secondary)]">
+ {metadata(version, true)}
+ </p>
+ {(!version.available || !version.compatible) && (
+ <p className="mt-1 text-12 text-[var(--text-secondary)]">
+ {t(
+ !version.available
+ ? 'cindyMake.versions.unavailable'
+ : 'cindyMake.versions.incompatible',
+ )}
+ </p>
+ )}
+ </div>
+ <div className="flex flex-wrap gap-2">
+ <Button
+ variant="secondary"
+ disabled={disabled || !version.available || !version.compatible}
+ loading={versions.pending === version.id}
+ onClick={() => void versions.act('switch', version.id)}
+ >
+ {t('cindyMake.versions.switch')}
+ </Button>
+ {version.kind === 'personal' && (
+ <Button
+ variant="secondary"
+ disabled={disabled || versions.state?.selectedId === version.id}
+ onClick={async () => {
+ if (
+ await confirm({
+ title: t('cindyMake.versions.removeTitle'),
+ description: t('cindyMake.versions.removeDescription'),
+ confirmText: t('cindyMake.versions.remove'),
+ confirmVariant: 'destructive',
+ })
+ )
+ await versions.act('remove', version.id);
+ }}
+ >
+ {t('cindyMake.versions.remove')}
+ </Button>
+ )}
+ </div>
+ </li>
+ ))}
+ </ul>
</div>
- );
- })}
- </div>
- {versions.state?.versions.length === 1 && (
- <p className="text-12 text-[var(--text-secondary)]">{t('cindyMake.versions.empty')}</p>
+ )}
+ </div>
)}
+ {children}
</section>
);
}
diff --git a/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeSourceDetails.test.tsx b/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeSourceDetails.test.tsx
index ce3c33b785..3666bae060 100644
--- a/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeSourceDetails.test.tsx
+++ b/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeSourceDetails.test.tsx
@@ -1,5 +1,5 @@
// @vitest-environment jsdom
-import { cleanup, render, screen } from '@testing-library/react';
+import { cleanup, render, screen, within } from '@testing-library/react';
import { afterEach, describe, expect, it } from 'vitest';
import { createInstance } from 'i18next';
import { I18nextProvider } from 'react-i18next';
@@ -46,6 +46,28 @@ async function show(
afterEach(cleanup);
describe('Cindy Make source summary', () => {
+ it.each([
+ [0, 0, '个人版与本地 main 提交一致'],
+ [0, 6, '本地 main 领先 6 个提交'],
+ [2, 0, '已包含本地 main,另有 2 个个人提交'],
+ [2, 6, '本地 main 领先 6 个提交,个人版另有 2 个提交'],
+ [undefined, undefined, '暂时无法比较提交,请同步最新源码重试。'],
+ ] as const)(
+ 'summarizes the verified local comparison (%s ahead, %s behind)',
+ async (personalAhead, personalBehind, expected) => {
+ await show({ personalAhead, personalBehind }, 'zh-CN', {
+ status: 'unavailable',
+ channel: 'dev',
+ });
+ expect(screen.getByRole('status').textContent).toBe(expected);
+ expect(screen.getByText(source.commit!.slice(0, 12))).toBeTruthy();
+ expect(screen.getByText(source.mainCommit!.slice(0, 12))).toBeTruthy();
+ expect(screen.queryByText(source.baseCommit!.slice(0, 12))).toBeNull();
+ expect(screen.queryByText(source.currentBranch!)).toBeNull();
+ expect(screen.queryByText(source.mainRemoteCommit!.slice(0, 12))).toBeNull();
+ expect(screen.getByText(/暂未查到/)).toBeTruthy();
+ },
+ );
it.each(Object.keys(locales) as (keyof typeof locales)[])(
'shows live latest main and verified comparison counts in %s',
async (locale) => {
@@ -61,7 +83,9 @@ describe('Cindy Make source summary', () => {
expect(screen.getByText(locales[locale].cindyMake.source.details.latest.dev)).toBeTruthy();
expect(
screen.getByText(
- locales[locale].cindyMake.source.details.latest.behind_other.replace('{{count}}', '9'),
+ locales[locale].cindyMake.overview.localMain +
+ ' ' +
+ locales[locale].cindyMake.source.details.latest.behind_other.replace('{{count}}', '9'),
),
).toBeTruthy();
expect(container.textContent).not.toMatch(/cindyMake\.source|\{\{/);
@@ -76,7 +100,7 @@ describe('Cindy Make source summary', () => {
expect(screen.getByText(zhCN.cindyMake.source.details.latest[channel])).toBeTruthy();
expect(screen.getByText(ref)).toBeTruthy();
expect(screen.getByText(source.mainCommit!.slice(0, 12))).toBeTruthy();
- expect(screen.queryByText(/main 落后/)).toBeNull();
+ expect(screen.queryByText(/main (落后/)).toBeNull();
},
);
@@ -89,13 +113,13 @@ describe('Cindy Make source summary', () => {
ahead: 0,
behind: 0,
});
- expect(screen.getByText('(已同步)')).toBeTruthy();
+ expect(screen.getByText('本地 main (已同步)')).toBeTruthy();
expect(screen.queryByText(/main 落后/)).toBeNull();
});
it('shows a lookup failure rather than treating cached origin/main as latest', async () => {
const { container } = await show({}, 'zh-CN', { status: 'unavailable', channel: 'dev' });
- expect(container.textContent).toContain('未能查询');
+ expect(container.textContent).toContain('暂未查到');
expect(container.textContent).not.toContain(source.mainRemoteCommit!.slice(0, 12));
expect(screen.getByText(source.mainCommit!.slice(0, 12))).toBeTruthy();
});
@@ -115,7 +139,7 @@ describe('Cindy Make source summary', () => {
ahead,
behind,
});
- expect(screen.getByText(expected)).toBeTruthy();
+ expect(screen.getByText('本地 main ' + expected)).toBeTruthy();
expect(screen.queryByText(/(?:落后|领先) 0/)).toBeNull();
},
);
@@ -129,66 +153,68 @@ describe('Cindy Make source summary', () => {
ahead: 0,
behind: 1,
});
- expect(screen.getByText('(1 commit behind)')).toBeTruthy();
+ expect(screen.getByText('Local main (1 commit behind)')).toBeTruthy();
});
it.each(Object.keys(locales) as (keyof typeof locales)[])(
- 'shows exactly three Git entries with short hashes in %s',
+ 'shows personal and local main hashes without branch internals in %s',
async (locale) => {
const { container } = await show({}, locale);
- const terms = locales[locale].cindyMake.source.details;
expect(
Array.from(container.querySelectorAll('dt')).map((label) => label.textContent),
- ).toEqual([terms.branch, terms.mainCommit, terms.currentBranch]);
- expect(screen.getByText('cindy-personal')).toBeTruthy();
- expect(screen.getByText('feature/active')).toBeTruthy();
- expect(screen.getByText(terms.baseRef.replace('{{ref}}', 'main'))).toBeTruthy();
- for (const commit of [source.baseCommit!, source.mainCommit!]) {
- const hash = screen.getByText(commit.slice(0, 12));
- expect(hash.className).toContain('font-mono');
- expect(hash.title).toBe(commit);
+ ).toEqual([
+ locales[locale].cindyMake.versions.personal,
+ locales[locale].cindyMake.overview.localMain,
+ ]);
+ for (const commit of [source.commit!, source.mainCommit!]) {
+ expect(screen.getByText(commit.slice(0, 12)).title).toBe(commit);
}
- for (const hidden of [source.commit!, source.mainRemoteCommit!]) {
- expect(container.textContent).not.toContain(hidden.slice(0, 12));
+ for (const hidden of [
+ source.branch!,
+ source.currentBranch!,
+ source.baseCommit!.slice(0, 12),
+ source.mainRemoteCommit!.slice(0, 12),
+ ]) {
+ expect(container.textContent).not.toContain(hidden);
}
expect(container.textContent).not.toMatch(/cindyMake\.source|\{\{/);
},
);
- it('shows main without requiring a local main branch or comparison counts', async () => {
- await show({ mainRemoteCommit: undefined, mainBehind: undefined, mainAhead: undefined });
- expect(screen.getByText(source.mainCommit!.slice(0, 12))).toBeTruthy();
- expect(screen.queryByText('更新源码后查看')).toBeNull();
- });
-
- it('does not substitute stale local main for an unknown fetched main version', async () => {
- await show({ mainCommit: undefined });
- expect(screen.getByText('main 版本').nextElementSibling?.textContent).toBe('更新源码后查看');
- expect(screen.queryByText(source.mainCommit!.slice(0, 12))).toBeNull();
- });
-
- it('does not use the personal branch or source ref as an unknown current branch', async () => {
- await show({ currentBranch: undefined });
- expect(screen.getByText('当前项目分支').nextElementSibling?.textContent).toBe('更新源码后查看');
- expect(screen.getAllByText('cindy-personal')).toHaveLength(1);
- });
-
- it('shows detached HEAD as a fixed commit rather than a branch named HEAD', async () => {
- await show({ currentBranch: null });
- expect(screen.getByText('未在分支上(固定提交)')).toBeTruthy();
- expect(screen.queryByText('HEAD')).toBeNull();
+ it('keeps personal and upstream comparison counts separate', async () => {
+ await show({ personalAhead: 3, personalBehind: 2 }, 'zh-CN', {
+ status: 'ready',
+ channel: 'dev',
+ ref: 'main',
+ commit: 'e'.repeat(40),
+ ahead: 0,
+ behind: 23,
+ });
+ expect(screen.getByRole('status').textContent).toBe(
+ '本地 main 领先 2 个提交,个人版另有 3 个提交',
+ );
+ const online = screen.getByText('e'.repeat(12)).parentElement!;
+ expect(online.textContent).toContain('本地 main (落后 23 个提交)');
+ expect(within(online).queryByText(/领先 2/)).toBeNull();
});
- it('supports old snapshots while keeping the available personal baseline', async () => {
- await show({ mainCommit: undefined, mainRemoteCommit: undefined, currentBranch: undefined });
- expect(screen.getByText('cindy-personal')).toBeTruthy();
- expect(screen.getByText(source.baseCommit!.slice(0, 12))).toBeTruthy();
- expect(screen.getAllByText('更新源码后查看')).toHaveLength(2);
+ it('shows unknown counts even when the online hash is available', async () => {
+ await show({}, 'zh-CN', {
+ status: 'ready',
+ channel: 'dev',
+ ref: 'main',
+ commit: 'e'.repeat(40),
+ });
+ expect(screen.getByText('本地 main (暂时无法比较提交)')).toBeTruthy();
+ expect(screen.queryByText(/已同步/)).toBeNull();
});
- it('keeps a release-tag baseline distinct from main', async () => {
- await show({ ref: 'v1.2.3' });
- expect(screen.getByText('基于 v1.2.3')).toBeTruthy();
- expect(screen.queryByText('基于 main')).toBeNull();
+ it('keeps missing local hashes unknown for old snapshots', async () => {
+ await show({ mainCommit: undefined, currentBranch: undefined, ref: 'v1.2.3' });
+ expect(screen.getByText('本地 main').nextElementSibling?.textContent).toBe('更新源码后查看');
+ expect(screen.getByText(source.commit!.slice(0, 12))).toBeTruthy();
+ expect(screen.queryByText(source.baseCommit!.slice(0, 12))).toBeNull();
+ expect(screen.queryByText(source.mainRemoteCommit!.slice(0, 12))).toBeNull();
+ expect(screen.queryByText(/已同步/)).toBeNull();
});
});
diff --git a/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeVersionsPanel.i18n.test.tsx b/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeVersionsPanel.i18n.test.tsx
index 4198879aa5..82658d49fa 100644
--- a/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeVersionsPanel.i18n.test.tsx
+++ b/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeVersionsPanel.i18n.test.tsx
@@ -1,5 +1,5 @@
// @vitest-environment jsdom
-import { cleanup, render, screen } from '@testing-library/react';
+import { cleanup, fireEvent, render, screen } from '@testing-library/react';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { createInstance } from 'i18next';
import { I18nextProvider, initReactI18next } from 'react-i18next';
@@ -79,7 +79,7 @@ afterEach(() => {
describe('Cindy Make versions with real translations', () => {
it.each(cases)(
'renders $locale labels without missing translations or damaged characters',
- async ({ locale, resource, title, switchLabel, remove }) => {
+ async ({ locale, resource, switchLabel, remove }) => {
const i18n = createInstance();
await i18n.use(initReactI18next).init({
lng: locale,
@@ -93,8 +93,11 @@ describe('Cindy Make versions with real translations', () => {
<CindyMakeVersionsPanel />
</I18nextProvider>,
);
+ fireEvent.click(
+ await screen.findByRole('button', { name: resource.cindyMake.overview.switchVersion }),
+ );
expect(await screen.findByRole('button', { name: switchLabel })).toBeTruthy();
- expect(screen.getByRole('heading', { name: title })).toBeTruthy();
+ expect(screen.getByRole('region', { name: resource.cindyMake.overview.title })).toBeTruthy();
expect(screen.getByRole('button', { name: remove })).toBeTruthy();
expect(screen.getByText(resource.cindyMake.versions.personal)).toBeTruthy();
expect(container.textContent).not.toMatch(/cindyMake\.|\{\{|\?{2,}|\uFFFD/);
diff --git a/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeVersionsPanel.test.tsx b/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeVersionsPanel.test.tsx
index 6f6afe3716..c536fae53c 100644
--- a/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeVersionsPanel.test.tsx
+++ b/apps/desktop/src/renderer/components/cindy-make/__tests__/CindyMakeVersionsPanel.test.tsx
@@ -44,8 +44,24 @@ afterEach(() => {
vi.unstubAllGlobals();
});
describe('Cindy Make local versions', () => {
+ it('leads with the running version and reveals alternatives only on request', async () => {
+ h.get.mockResolvedValue({ ...versions, currentId: 'personal', selectedId: 'personal' });
+ render(<CindyMakeVersionsPanel />);
+ expect(await screen.findByText('Blue background')).toBeTruthy();
+ expect(screen.queryByText('cindyMake.versions.original')).toBeNull();
+ expect(screen.queryByRole('button', { name: 'cindyMake.versions.using' })).toBeNull();
+ const toggle = screen.getByRole('button', { name: 'cindyMake.overview.switchVersion' });
+ fireEvent.click(toggle);
+ expect(screen.getByText('cindyMake.versions.original')).toBeTruthy();
+ expect(screen.queryByRole('button', { name: 'cindyMake.versions.remove' })).toBeNull();
+ fireEvent.click(screen.getByRole('button', { name: 'cindyMake.versions.switch' }));
+ await waitFor(() => expect(h.act).toHaveBeenCalledWith('switch', 'original'));
+ });
it('shows Dev inside the original row and switches through the shared native operation', async () => {
render(<CindyMakeVersionsPanel />);
+ fireEvent.click(
+ await screen.findByRole('button', { name: 'cindyMake.overview.switchVersion' }),
+ );
await screen.findByText('Blue background');
expect(screen.getByText('cindyMake.versions.original')).toBeDefined();
expect(
@@ -56,6 +72,9 @@ describe('Cindy Make local versions', () => {
});
it('requires explicit deletion confirmation and never offers deleting the running version', async () => {
render(<CindyMakeVersionsPanel />);
+ fireEvent.click(
+ await screen.findByRole('button', { name: 'cindyMake.overview.switchVersion' }),
+ );
const remove = await screen.findByRole('button', { name: 'cindyMake.versions.remove' });
fireEvent.click(remove);
await waitFor(() => expect(h.confirm).toHaveBeenCalledOnce());
@@ -72,6 +91,9 @@ describe('Cindy Make local versions', () => {
),
});
render(<CindyMakeVersionsPanel />);
+ fireEvent.click(
+ await screen.findByRole('button', { name: 'cindyMake.overview.switchVersion' }),
+ );
await screen.findByText('cindyMake.versions.incompatible');
expect(
(screen.getByRole('button', { name: 'cindyMake.versions.switch' }) as HTMLButtonElement)
diff --git a/apps/desktop/src/renderer/components/settings/CindyMakeSection.tsx b/apps/desktop/src/renderer/components/settings/CindyMakeSection.tsx
index d08f29a027..482d15dcd5 100644
--- a/apps/desktop/src/renderer/components/settings/CindyMakeSection.tsx
+++ b/apps/desktop/src/renderer/components/settings/CindyMakeSection.tsx
@@ -1,14 +1,5 @@
import { useEffect, useId, useRef, useState } from 'react';
-import {
- ChevronDown,
- ChevronRight,
- FolderOpen,
- GitBranch,
- Download,
- Plus,
- Trash2,
- Wrench,
-} from 'lucide-react';
+import { FolderOpen, Download, Trash2, Wrench } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { Switch } from '@/components/ui/switch';
@@ -18,7 +9,6 @@ import { Spinner } from '@/components/ui/spinner';
import { Tip } from '@/components/ui/tooltip';
import { MakeDoctorReportCard } from '@/components/chat/CindyMakeDoctorCard';
import { CindyMakeSourceDetails } from '@/components/cindy-make/CindyMakeSourceDetails';
-import { CindyMakeCreateDialog } from '@/components/cindy-make/CindyMakeCreateDialog';
import { CindyMakeDependencyProgress } from '@/components/cindy-make/CindyMakeDependencyProgress';
import { CindyMakeHistoryPanel } from '@/components/cindy-make/CindyMakeHistoryPanel';
import { CindyMakeVersionsPanel } from '@/components/cindy-make/CindyMakeVersionsPanel';
@@ -46,7 +36,6 @@ export function CindyMakeSection() {
const tabId = useId();
const tabButtons = useRef<Array<HTMLButtonElement | null>>([]);
const { forceManagedTools, setForceManagedTools } = useCindyMakeSettings();
- const [createOpen, setCreateOpen] = useState(false);
const [report, setReport] = useState<MakeDoctorReport>();
const makeState = useCindyMakeState();
const [historyState, setHistoryState] = useState<CindyMakeHistoryState>();
@@ -63,6 +52,7 @@ export function CindyMakeSection() {
const [sourceRunPending, setSourceRunPending] = useState(false);
const { confirm } = useConfirmDialog();
const mergeSubmitting = useRef(false);
+ const previousMergeId = useRef<string | undefined>(undefined);
const [mergePending, setMergePending] = useState(false);
const operation = makeState.upstreamMerge;
const merge = operation?.feature ? undefined : operation;
@@ -81,11 +71,12 @@ export function CindyMakeSection() {
cancelText: t('settings.cindyMake.source.resetConfirm.cancel'),
});
if (!confirmed || !isDataOwnerGenerationCurrent(owner)) return;
+ previousMergeId.current = operation?.id;
setMergePending(true);
const draft = getDraft();
const vendor = isSelectableVendor(draft.vendor) ? draft.vendor : 'cc';
const prefs = draft.lastByVendor[vendor];
- await window.electronAPI.cindyMakeMerge({
+ const result = await window.electronAPI.cindyMakeMerge({
action: 'update',
createOptions: {
agentKind: vendor,
@@ -97,7 +88,18 @@ export function CindyMakeSection() {
planModeEnabled: false,
},
});
- if (isDataOwnerGenerationCurrent(owner)) await window.electronAPI.getCindyMakeSourceStatus();
+ if (!isDataOwnerGenerationCurrent(owner)) return;
+ if (result?.status === 'merged') toast.success(t('cindyMake.merge.status.merged'));
+ else if (result?.status === 'failed')
+ toast.error(
+ t(
+ result.error
+ ? `cindyMake.merge.errors.${result.error}`
+ : 'cindyMake.merge.status.failed',
+ ),
+ );
+ // Refresh failure must not turn a completed update into a second, failure toast.
+ await window.electronAPI.getCindyMakeSourceStatus().catch(() => undefined);
} catch {
if (isDataOwnerGenerationCurrent(owner)) toast.error(t('cindyMake.merge.errors.unavailable'));
} finally {
@@ -184,10 +186,13 @@ export function CindyMakeSection() {
{t('settings.cindyMake.title')}
</h2>
<p className="mt-2 text-13 leading-[1.45] text-[var(--settings-section-desc)]">
- {t('settings.cindyMake.description')}
+ {t(
+ activeTab === 'versions'
+ ? 'cindyMake.overview.description'
+ : 'settings.cindyMake.description',
+ )}
</p>
</div>
- {createOpen && <CindyMakeCreateDialog onOpenChange={setCreateOpen} />}
<div
role="tablist"
aria-label={t('settings.cindyMake.title')}
@@ -318,41 +323,6 @@ export function CindyMakeSection() {
{t('settings.cindyMake.checking')}
</div>
)}
- <CindyMakeSourceStatusCard
- status={sourceStatus}
- preparing={sourceBusy}
- merge={merge}
- mergeBlocked={mergeBlocked}
- onPrepare={() => {
- if (!sourceStatus || sourceBusy) return;
- if (sourceStatus.status === 'ready') {
- void updateSource();
- return;
- }
- setSourceRunPending(true);
- setSourceRun({ makeAction: 'prepare-source', forceManagedTools });
- }}
- onStop={() => {
- void Promise.resolve(window.electronAPI.cancelCindyMakeSource?.())
- .then((result) => {
- if (result && !result.success) setSourceRunPending(false);
- })
- .catch(() => toast.error(t('cindyMakeDoctor.failed')));
- }}
- onClear={async () => {
- if (!sourceStatus || sourceBusy || mergeBlocked) return;
- const confirmed = await confirm({
- title: t('settings.cindyMake.source.resetConfirm.title'),
- description: t('settings.cindyMake.source.resetConfirm.description'),
- confirmText: t('settings.cindyMake.source.resetConfirm.confirm'),
- cancelText: t('settings.cindyMake.source.resetConfirm.cancel'),
- confirmVariant: 'destructive',
- });
- if (!confirmed) return;
- setSourceRunPending(true);
- setSourceRun({ makeAction: 'clear-source', forceManagedTools });
- }}
- />
</div>
</div>
<div
@@ -362,10 +332,6 @@ export function CindyMakeSection() {
hidden={activeTab !== 'versions'}
>
<div className="flex flex-col gap-[18px]">
- <Button className="self-start" onClick={() => setCreateOpen(true)}>
- <Plus size={14} aria-hidden="true" />
- {t('settings.cindyMake.create.title')}
- </Button>
<CindyMakeVersionsPanel
active={activeTab === 'versions'}
busy={historyState?.busy}
@@ -378,7 +344,44 @@ export function CindyMakeSection() {
)
: undefined
}
- />
+ >
+ <CindyMakeSourceStatusCard
+ status={sourceStatus}
+ preparing={sourceBusy}
+ merge={mergePending && merge?.id === previousMergeId.current ? undefined : merge}
+ mergeBlocked={mergeBlocked}
+ updating={mergePending || (mergeActive && !!merge)}
+ onPrepare={() => {
+ if (!sourceStatus || sourceBusy) return;
+ if (sourceStatus.status === 'ready') {
+ void updateSource();
+ return;
+ }
+ setSourceRunPending(true);
+ setSourceRun({ makeAction: 'prepare-source', forceManagedTools });
+ }}
+ onStop={() => {
+ void Promise.resolve(window.electronAPI.cancelCindyMakeSource?.())
+ .then((result) => {
+ if (result && !result.success) setSourceRunPending(false);
+ })
+ .catch(() => toast.error(t('cindyMakeDoctor.failed')));
+ }}
+ onClear={async () => {
+ if (!sourceStatus || sourceBusy || mergeBlocked) return;
+ const confirmed = await confirm({
+ title: t('settings.cindyMake.source.resetConfirm.title'),
+ description: t('settings.cindyMake.source.resetConfirm.description'),
+ confirmText: t('settings.cindyMake.source.resetConfirm.confirm'),
+ cancelText: t('settings.cindyMake.source.resetConfirm.cancel'),
+ confirmVariant: 'destructive',
+ });
+ if (!confirmed) return;
+ setSourceRunPending(true);
+ setSourceRun({ makeAction: 'clear-source', forceManagedTools });
+ }}
+ />
+ </CindyMakeVersionsPanel>
<CindyMakeHistoryPanel active={activeTab === 'versions'} onState={setHistoryState} />
</div>
</div>
@@ -394,6 +397,7 @@ function CindyMakeSourceStatusCard({
onClear,
merge,
mergeBlocked = false,
+ updating = false,
}: {
status?: MakeSourceStatus;
preparing?: boolean;
@@ -402,15 +406,22 @@ function CindyMakeSourceStatusCard({
onClear?: () => void | Promise<void>;
merge?: CindyMakeMergeState;
mergeBlocked?: boolean;
+ updating?: boolean;
}) {
const { t } = useTranslation();
- const [expanded, setExpanded] = useState(true);
const displayStatus = preparing ? 'preparing' : status?.status;
// A click is pending before Main publishes the new run. Never reuse the last
// run's phase, counters or error in that window.
const activeStatus = preparing && status?.status === 'preparing' ? status : undefined;
- const statusClass =
- displayStatus === 'ready'
+ const displayMerge =
+ !preparing && (updating || !status || status.status === 'ready' || merge?.hasWorkspace)
+ ? merge?.status === 'merged'
+ ? undefined
+ : merge
+ : undefined;
+ const statusClass = updating
+ ? 'text-[var(--text-secondary)]'
+ : displayStatus === 'ready'
? 'text-[var(--status-success)]'
: displayStatus === 'failed'
? 'text-[var(--status-danger)]'
@@ -425,99 +436,93 @@ function CindyMakeSourceStatusCard({
};
return (
<section
- className="rounded-[12px] border border-[var(--border-default)] bg-[var(--surface-elevated)] text-14 text-[var(--text-primary)]"
+ className="min-w-0 text-14 text-[var(--text-primary)]"
aria-label={t('settings.cindyMake.source.title')}
>
- <div className="flex items-center gap-2 px-4 py-3">
- <GitBranch size={16} className="shrink-0 text-[var(--text-secondary)]" aria-hidden />
- <button
- type="button"
- className="flex min-w-0 flex-1 items-center gap-2 text-left"
- onClick={() => setExpanded((value) => !value)}
- aria-expanded={expanded}
- >
- <span className="flex-1 font-medium">{t('settings.cindyMake.source.title')}</span>
- {preparing && <Spinner size={14} />}
- {expanded ? <ChevronDown size={16} /> : <ChevronRight size={16} />}
- </button>
- </div>
- {expanded && (
- <div className="space-y-3 border-t border-[var(--border-default)] px-4 py-3">
- <p className="text-13 text-[var(--text-secondary)]">
- {t('settings.cindyMake.source.description')}
- </p>
- {status && (
- <>
- {(status.branch || status.commit || status.status === 'ready') && (
- <CindyMakeSourceDetails
- source={status}
- latestVersion={status.latestVersion}
- updateAction={
- status.status === 'ready' && onPrepare ? (
- <Tip text={t('cindyMake.merge.updateHint')}>
- <button
- type="button"
- aria-label={t('cindyMake.merge.getLatest')}
- disabled={preparing || mergeBlocked}
- onClick={onPrepare}
- className="inline-flex h-6 w-6 items-center justify-center rounded-full text-[var(--text-secondary)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)] active:bg-[var(--surface-chip)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)] disabled:cursor-not-allowed disabled:opacity-50"
- >
- <Download size={14} aria-hidden />
- </button>
- </Tip>
- ) : undefined
- }
- />
- )}
- <dl className="grid gap-1 text-12 text-[var(--text-tertiary)]">
- <div className="flex min-w-0 items-center gap-1">
- <dt className="shrink-0 font-medium">{t('settings.cindyMake.source.path')}:</dt>
- <dd className="flex min-w-0 flex-1 items-center gap-3">
- <span className="min-w-0 flex-1 break-all font-mono">{status.path}</span>
- <span className="inline-flex shrink-0 items-center gap-1">
- <Tip text={t('settings.cindyMake.source.openDir')}>
- <button
- type="button"
- onClick={openSourceDir}
- aria-label={t('settings.cindyMake.source.openDir')}
- className="inline-flex h-6 w-6 items-center justify-center rounded-full text-[var(--text-secondary)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)] active:bg-[var(--surface-chip)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]"
- >
- <FolderOpen size={14} aria-hidden />
- </button>
- </Tip>
- {/* Failed or cancelled preparation can leave a checkout to clear. */}
- {onClear && !preparing && status.status !== 'missing' && (
- <Tip text={t('settings.cindyMake.source.reset')}>
- <button
- type="button"
- onClick={() => void onClear()}
- disabled={mergeBlocked}
- aria-label={t('settings.cindyMake.source.reset')}
- className="inline-flex h-6 w-6 items-center justify-center rounded-full text-[var(--text-secondary)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)] active:bg-[var(--surface-chip)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]"
- >
- <Trash2 size={14} aria-hidden />
- </button>
- </Tip>
- )}
- </span>
- </dd>
- </div>
- </dl>
- {activeStatus?.progress?.message && (
- <p className="break-all font-mono text-11 text-[var(--text-tertiary)]">
- {activeStatus.progress.message}
- </p>
+ <h4 className="sr-only">{t('cindyMake.overview.personalCode')}</h4>
+ <p className="sr-only">{t('settings.cindyMake.source.description')}</p>
+ <div className="space-y-3 px-4 pb-4 pt-1">
+ <div className="flex flex-wrap items-start gap-3">
+ <div className="min-w-0 flex-[1_1_320px]">
+ {status &&
+ (status.branch || status.commit || status.status === 'ready') &&
+ !preparing &&
+ !updating &&
+ !displayMerge && (
+ <CindyMakeSourceDetails source={status} latestVersion={status.latestVersion} />
)}
- </>
+ </div>
+ {status?.status === 'ready' && onPrepare && (
+ <Tip text={t('cindyMake.merge.updateHint')}>
+ <Button
+ variant="secondary"
+ className="ml-auto gap-2"
+ disabled={preparing || mergeBlocked}
+ loading={updating}
+ onClick={onPrepare}
+ >
+ {!updating && <Download size={14} aria-hidden />}
+ <span className="relative top-px">{t('cindyMake.merge.getLatest')}</span>
+ </Button>
+ </Tip>
)}
</div>
- )}
- {merge && <CindyMakeMergeNotice state={merge} />}
- {status && (
+ {status && (
+ <div className="border-t border-[var(--border-default)] pt-3">
+ <p className="text-12 text-[var(--text-secondary)]">
+ {t('settings.cindyMake.source.path')}
+ </p>
+ <div className="flex items-center gap-3">
+ <p className="min-w-0 flex-1 break-all font-mono text-12 text-[var(--text-secondary)]">
+ {status.path}
+ </p>
+ <div className="ml-auto flex shrink-0 items-center gap-1">
+ {status && status.status !== 'missing' && (
+ <Tip text={t('settings.cindyMake.source.openDir')}>
+ <Button
+ variant="secondary"
+ className="w-8 border-transparent bg-transparent px-0 text-[var(--text-tertiary)]"
+ aria-label={t('settings.cindyMake.source.openDir')}
+ onClick={openSourceDir}
+ >
+ <FolderOpen size={14} aria-hidden />
+ </Button>
+ </Tip>
+ )}
+ {onClear && status && !preparing && status.status !== 'missing' && (
+ <Tip text={t('settings.cindyMake.source.reset')}>
+ <Button
+ variant="secondary"
+ onClick={() => void onClear()}
+ disabled={mergeBlocked}
+ aria-label={t('settings.cindyMake.source.reset')}
+ className="w-8 border-transparent bg-transparent px-0 text-[var(--text-tertiary)]"
+ >
+ <Trash2 size={14} aria-hidden />
+ </Button>
+ </Tip>
+ )}
+ </div>
+ </div>
+ </div>
+ )}
+ {activeStatus?.progress?.message && (
+ <p className="break-all font-mono text-11 text-[var(--text-tertiary)]">
+ {activeStatus.progress.message}
+ </p>
+ )}
+ </div>
+ {displayMerge ? (
+ <CindyMakeMergeNotice state={displayMerge} />
+ ) : status && (preparing || updating || status.status !== 'ready') ? (
<div className="flex flex-wrap items-center justify-between gap-3 border-t border-[var(--border-default)] px-4 py-3">
<div className={`min-w-0 flex-1 space-y-1 text-13 ${statusClass}`} role="status">
<div>
- {t(`settings.cindyMake.source.status.${displayStatus}`)}
+ {t(
+ updating
+ ? 'cindyMake.merge.status.fetching'
+ : `settings.cindyMake.source.status.${displayStatus}`,
+ )}
{activeStatus?.phase ? ` · ${t(`cindyMake.source.phase.${activeStatus.phase}`)}` : ''}
{activeStatus?.progress && (
<>
@@ -529,7 +534,9 @@ function CindyMakeSourceStatusCard({
</>
)}
</div>
- {!preparing && status.error && <p>{t(`cindyMake.source.errors.${status.error}`)}</p>}
+ {!preparing && !updating && status.error && (
+ <p>{t(`cindyMake.source.errors.${status.error}`)}</p>
+ )}
{(activeStatus?.phase === 'installing' || activeStatus?.phase === 'caching') && (
<CindyMakeDependencyProgress
progress={activeStatus.dependencies}
@@ -557,7 +564,7 @@ function CindyMakeSourceStatusCard({
)}
</div>
</div>
- )}
+ ) : null}
</section>
);
}
diff --git a/apps/desktop/src/renderer/components/settings/SettingsSidebarNav.tsx b/apps/desktop/src/renderer/components/settings/SettingsSidebarNav.tsx
index 9de8ad411e..238480d964 100644
--- a/apps/desktop/src/renderer/components/settings/SettingsSidebarNav.tsx
+++ b/apps/desktop/src/renderer/components/settings/SettingsSidebarNav.tsx
@@ -118,6 +118,18 @@ export function SettingsSidebarNav({ tabIds, activeTab, onSelectTab }: SettingsS
)}
/>
<span className="leading-none">{t(TAB_LABEL_KEY[tabId])}</span>
+ {tabId === 'cindy-make' && (
+ <span
+ className={cn(
+ 'relative top-0.5 shrink-0 rounded-full border px-2 py-[1px] text-10 font-medium leading-[1.5]',
+ selected
+ ? 'border-current bg-transparent text-inherit'
+ : 'border-[var(--settings-badge-border)] bg-[var(--settings-badge-bg)] text-[var(--settings-menu-text)]',
+ )}
+ >
+ {t('cindyMake.beta')}
+ </span>
+ )}
</button>
);
})}
diff --git a/apps/desktop/src/renderer/components/settings/SettingsView.tsx b/apps/desktop/src/renderer/components/settings/SettingsView.tsx
index dd90162bee..fdb153570d 100644
--- a/apps/desktop/src/renderer/components/settings/SettingsView.tsx
+++ b/apps/desktop/src/renderer/components/settings/SettingsView.tsx
@@ -56,6 +56,7 @@ import { BotsGlobalSettingsSection } from '@/features/bots/BotsGlobalSettingsSec
import { canAccessBillingSettings } from './billingVisibility';
import { canAccessUsageSettings } from './usageVisibility';
import { canAccessCindyMakeSettings } from './cindyMakeVisibility';
+import { useCindyVersions } from '@/lib/useCindyVersions';
import { UsageHistorySection } from './usage/UsageHistorySection';
const DEFAULT_SETTINGS_MENU_WIDTH = 260;
@@ -87,7 +88,8 @@ export function SettingsView() {
// 用量历史对所有**已登录**身份开放 (local / cloud personal / cloud org),
// 与 billing 的 canAccessBillingSettings 无关 —— #2785 维护者裁决。
const canAccessUsage = canAccessUsageSettings({ mode });
- const canAccessCindyMake = canAccessCindyMakeSettings(import.meta.env.DEV);
+ const versions = useCindyVersions(!import.meta.env.DEV);
+ const canAccessCindyMake = canAccessCindyMakeSettings(import.meta.env.DEV, versions.state);
const activeTab = useMemo<SettingsTab>(() => {
const raw = rawTab;
@@ -365,7 +367,6 @@ export function SettingsView() {
<BotsGlobalSettingsSection />
</section>
-
{/* Section — App Behavior(「应用行为」)
「保持电脑唤醒」跨平台生效,故 section 常驻;其中
「后台窗口首次左键点击仅激活不透传」仅 mac/win 有效,由
diff --git a/apps/desktop/src/renderer/components/settings/__tests__/CindyMakeSection.test.tsx b/apps/desktop/src/renderer/components/settings/__tests__/CindyMakeSection.test.tsx
index 0cb97802fc..5d73090519 100644
--- a/apps/desktop/src/renderer/components/settings/__tests__/CindyMakeSection.test.tsx
+++ b/apps/desktop/src/renderer/components/settings/__tests__/CindyMakeSection.test.tsx
@@ -8,6 +8,7 @@ import type { CindyMakeMergeState, CindyMakeMergeRequest } from '../../../../sha
import { startMakeDoctor } from '@/lib/cindyMakeDoctor';
import { setCindyMakeForceManagedTools } from '@/lib/cindyMakeSettings';
import { setDataOwnerGeneration } from '@/contexts/dataOwnerGeneration';
+import { toast } from '@/lib/toast';
import type {
CindyMakeGlobalState,
MakeDoctorReport,
@@ -23,7 +24,7 @@ vi.mock('react-i18next', () => ({
: key,
}),
}));
-vi.mock('@/lib/toast', () => ({ toast: { error: vi.fn() } }));
+vi.mock('@/lib/toast', () => ({ toast: { error: vi.fn(), success: vi.fn() } }));
vi.mock('@/state/newMakerDraft', () => ({
getDraft: () => ({
vendor: 'codex',
@@ -160,16 +161,22 @@ function harness() {
return { api, starts, complete, listeners, pushSource, pushState, stateListeners };
}
-/** Environment-specific cases explicitly enter the second tab after opening Settings. */
-function renderEnvironment(ui: Parameters<typeof render>[0]) {
- const view = render(
+function renderVersions(ui: Parameters<typeof render>[0]) {
+ return render(
isValidElement(ui) && ui.type === MemoryRouter ? ui : <MemoryRouter>{ui}</MemoryRouter>,
);
+}
+
+/** Environment-specific cases explicitly enter the second tab after opening Settings. */
+function renderEnvironment(ui: Parameters<typeof render>[0]) {
+ const view = renderVersions(ui);
fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.environment' }));
return view;
}
beforeEach(() => {
+ vi.mocked(toast.success).mockClear();
+ vi.mocked(toast.error).mockClear();
setDataOwnerGeneration('settings-make-test-owner');
vi.stubEnv('DEV', true);
setCindyMakeForceManagedTools(false);
@@ -207,15 +214,25 @@ describe('Settings > Cindy Make', () => {
screen.getByRole('tabpanel', { name: 'settings.cindyMake.tabs.versions' }).id,
);
expect(screen.getAllByRole('tabpanel')).toHaveLength(1);
- expect(screen.queryByRole('region', { name: 'settings.cindyMake.source.title' })).toBeNull();
- expect(screen.queryByRole('switch')).toBeNull();
- expect(await screen.findByText('0.1.99')).toBeTruthy();
expect(
within(screen.getByRole('tabpanel', { name: 'settings.cindyMake.tabs.versions' })).getByRole(
- 'button',
- { name: 'settings.cindyMake.create.title' },
+ 'region',
+ { name: 'settings.cindyMake.source.title' },
),
).toBeTruthy();
+ expect(screen.queryByRole('switch')).toBeNull();
+ expect(await screen.findByText('0.1.99')).toBeTruthy();
+ expect(
+ within(
+ screen.getByRole('tabpanel', { name: 'settings.cindyMake.tabs.versions' }),
+ ).queryByRole('button', { name: 'settings.cindyMake.create.title' }),
+ ).toBeNull();
+ const source = screen.getByRole('region', { name: 'settings.cindyMake.source.title' });
+ expect(
+ source.parentElement?.contains(
+ screen.getByRole('heading', { name: /cindyMake.versions.current/ }),
+ ),
+ ).toBe(true);
expect(getVersions).toHaveBeenCalledTimes(1);
versions.focus();
@@ -226,7 +243,7 @@ describe('Settings > Cindy Make', () => {
});
expect(environment.getAttribute('aria-selected')).toBe('true');
expect(environment.getAttribute('aria-controls')).toBe(environmentPanel.id);
- expect(screen.getByRole('region', { name: 'settings.cindyMake.source.title' })).toBeTruthy();
+ expect(screen.queryByRole('region', { name: 'settings.cindyMake.source.title' })).toBeNull();
expect(screen.queryByRole('heading', { name: 'cindyMake.versions.title' })).toBeNull();
expect(screen.queryByRole('button', { name: 'settings.cindyMake.create.title' })).toBeNull();
fireEvent.keyDown(environment, { key: 'ArrowRight' });
@@ -244,7 +261,7 @@ describe('Settings > Cindy Make', () => {
});
it('keeps background preparation, expansion and task search intact while switching tabs', async () => {
const h = harness();
- renderEnvironment(
+ renderVersions(
<MemoryRouter>
<CindyMakeSection />
</MemoryRouter>,
@@ -275,15 +292,15 @@ describe('Settings > Cindy Make', () => {
tasks: { 'personal-run': task },
});
const sourceCard = screen.getByRole('region', { name: 'settings.cindyMake.source.title' });
- const expand = within(sourceCard).getByRole('button', {
- name: 'settings.cindyMake.source.title',
- });
- fireEvent.click(expand);
- expect(expand.getAttribute('aria-expanded')).toBe('false');
- fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.versions' }));
- expect(screen.queryByRole('region', { name: 'settings.cindyMake.source.title' })).toBeNull();
+ expect(within(sourceCard).getByText('/managed/source')).toBeTruthy();
+ expect(
+ within(sourceCard).queryByRole('button', { name: 'cindyMake.overview.details' }),
+ ).toBeNull();
const tasks = screen.getByRole('region', { name: 'cindyMake.history.title' });
fireEvent.change(within(tasks).getByRole('textbox'), { target: { value: 'Blue' } });
+ fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.environment' }));
+ expect(screen.queryByRole('region', { name: 'settings.cindyMake.source.title' })).toBeNull();
+ expect(screen.queryByRole('region', { name: 'cindyMake.history.title' })).toBeNull();
await h.pushSource({
status: 'preparing',
path: '/managed/source',
@@ -291,14 +308,12 @@ describe('Settings > Cindy Make', () => {
phase: 'cloning',
progress: { stage: 'receiving', percent: 75 },
});
- fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.environment' }));
+ fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.versions' }));
expect(screen.getByRole('region', { name: 'settings.cindyMake.source.title' })).toBe(
sourceCard,
);
- expect(expand.getAttribute('aria-expanded')).toBe('false');
+ expect(within(sourceCard).getByText('/managed/source')).toBeTruthy();
expect(within(sourceCard).getByRole('status').textContent).toContain('(75%)');
- expect(screen.queryByRole('region', { name: 'cindyMake.history.title' })).toBeNull();
- fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.versions' }));
expect((within(tasks).getByRole('textbox') as HTMLInputElement).value).toBe('Blue');
expect(h.starts()).toHaveLength(1);
expect(
@@ -317,7 +332,7 @@ describe('Settings > Cindy Make', () => {
commit: 'a'.repeat(40),
};
h.api.getCindyMakeSourceStatus.mockResolvedValue(source);
- renderEnvironment(<CindyMakeSection />);
+ renderVersions(<CindyMakeSection />);
const button = await screen.findByRole('button', { name: 'cindyMake.merge.getLatest' });
expect(screen.getAllByRole('button', { name: 'cindyMake.merge.getLatest' })).toHaveLength(1);
expect(screen.queryByRole('button', { name: 'settings.cindyMake.source.update' })).toBeNull();
@@ -343,6 +358,82 @@ describe('Settings > Cindy Make', () => {
);
expect(h.starts().filter(([, ctx]) => ctx.makeAction === 'prepare-source')).toHaveLength(0);
});
+ it.each(['merged', 'failed'] as const)(
+ 'shows live progress, then a quiet success or actionable %s result on reentry',
+ async (result) => {
+ const h = harness();
+ const source: MakeSourceStatus = { status: 'ready', path: '/managed/source', ref: 'main' };
+ const previous: CindyMakeMergeState = {
+ id: 'previous-update',
+ status: 'merged',
+ ref: 'main',
+ upstreamCommit: 'a'.repeat(40),
+ };
+ h.api.getCindyMakeSourceStatus.mockResolvedValue(source);
+ const view = renderVersions(<CindyMakeSection />);
+ await h.pushState({ source, upstreamMerge: previous });
+ let finish!: (state: CindyMakeMergeState) => void;
+ h.api.cindyMakeMerge.mockImplementationOnce(
+ () =>
+ new Promise((resolve) => {
+ finish = resolve;
+ }),
+ );
+ const card = screen.getByRole('region', { name: 'settings.cindyMake.source.title' });
+ fireEvent.click(within(card).getByRole('button', { name: 'cindyMake.merge.getLatest' }));
+ await waitFor(() => expect(h.api.cindyMakeMerge).toHaveBeenCalledOnce());
+ expect(within(card).getByRole('status').textContent).toBe('cindyMake.merge.status.fetching');
+ expect(within(card).queryByText('cindyMake.merge.status.merged')).toBeNull();
+ const current = { ...previous, id: 'current-update' };
+ for (const status of ['fetching', 'merging', 'checking'] as const) {
+ await h.pushState({ source, upstreamMerge: { ...current, status } });
+ expect(within(card).getAllByRole('status')).toHaveLength(1);
+ expect(within(card).getByRole('status').textContent).toBe(
+ 'cindyMake.merge.status.' + status,
+ );
+ expect(within(card).queryByText('settings.cindyMake.source.status.ready')).toBeNull();
+ expect(
+ within(card)
+ .getByRole('button', { name: 'cindyMake.merge.getLatest' })
+ .getAttribute('aria-busy'),
+ ).toBe('true');
+ }
+ const finalState: CindyMakeMergeState = {
+ ...current,
+ status: result,
+ ...(result === 'failed' ? { error: 'gitFailed' as const } : {}),
+ };
+ await h.pushState({ source, upstreamMerge: finalState });
+ if (result === 'failed')
+ expect(within(card).getByText('cindyMake.merge.status.failed')).toBeTruthy();
+ if (result === 'merged')
+ h.api.getCindyMakeSourceStatus.mockRejectedValueOnce(new Error('refresh failed'));
+ await act(async () => finish(finalState));
+ const notify = result === 'merged' ? toast.success : toast.error;
+ expect(notify).toHaveBeenCalledExactlyOnceWith(
+ result === 'merged' ? 'cindyMake.merge.status.merged' : 'cindyMake.merge.errors.gitFailed',
+ );
+ expect(result === 'merged' ? toast.error : toast.success).not.toHaveBeenCalled();
+ await h.pushState({ source, upstreamMerge: finalState });
+ view.unmount();
+ renderVersions(<CindyMakeSection />);
+ const reopened = screen.getByRole('region', { name: 'settings.cindyMake.source.title' });
+ await waitFor(() =>
+ expect(
+ within(reopened).getByText(
+ result === 'merged'
+ ? 'cindyMake.overview.comparison.unknown'
+ : 'cindyMake.merge.status.failed',
+ ),
+ ).toBeTruthy(),
+ );
+ expect(within(reopened).getAllByRole('status')).toHaveLength(1);
+ expect(within(reopened).queryByText('settings.cindyMake.source.status.ready')).toBeNull();
+ if (result === 'failed')
+ expect(within(reopened).getByText('cindyMake.merge.errors.gitFailed')).toBeTruthy();
+ expect(notify).toHaveBeenCalledTimes(1);
+ },
+ );
it('shows the source card immediately and keeps local details visible while the latest lookup waits', async () => {
const h = harness();
let finish!: (source: MakeSourceStatus) => void;
@@ -350,7 +441,7 @@ describe('Settings > Cindy Make', () => {
finish = resolve;
});
h.api.getCindyMakeSourceStatus.mockReturnValue(pending);
- renderEnvironment(<CindyMakeSection />);
+ renderVersions(<CindyMakeSection />);
const card = screen.getByRole('region', { name: 'settings.cindyMake.source.title' });
expect(within(card).getByText('settings.cindyMake.source.description')).toBeTruthy();
expect(within(card).queryByRole('status')).toBeNull();
@@ -377,7 +468,7 @@ describe('Settings > Cindy Make', () => {
);
expect(screen.getByRole('region', { name: 'settings.cindyMake.source.title' })).toBe(card);
expect(within(card).getByText('a'.repeat(12))).toBeTruthy();
- expect(within(card).getByText('cindyMake.source.details.latest.unavailable')).toBeTruthy();
+ expect(within(card).getByText(/cindyMake.overview.lookupUnavailable/)).toBeTruthy();
});
it('offers conflict resolution only after a conflict and creates a task only on click', async () => {
const h = harness();
@@ -389,7 +480,7 @@ describe('Settings > Cindy Make', () => {
upstreamCommit: 'a'.repeat(40),
hasWorkspace: true,
};
- renderEnvironment(
+ renderVersions(
<MemoryRouter>
<CindyMakeSection />
</MemoryRouter>,
@@ -425,7 +516,7 @@ describe('Settings > Cindy Make', () => {
sessionId: 'merge-task',
};
h.api.getCindyMakeState.mockResolvedValue({ upstreamMerge: merge });
- renderEnvironment(
+ renderVersions(
<MemoryRouter>
<CindyMakeSection />
</MemoryRouter>,
@@ -670,22 +761,18 @@ describe('Settings > Cindy Make', () => {
expect(screen.queryByText('cindyMake.prepare.retry')).toBeNull();
});
- it('offers an explicit creation form without starting preparation on open or cancel', async () => {
+ it('keeps the versions tab focused on existing versions without a creation entry', async () => {
const environment = harness();
renderEnvironment(
<MemoryRouter>
<CindyMakeSection />
</MemoryRouter>,
);
- fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.versions' }));
- const entry = screen.getByRole('button', { name: 'settings.cindyMake.create.title' });
- entry.focus();
- fireEvent.click(entry);
- expect(screen.getByRole('dialog', { name: 'settings.cindyMake.create.title' })).toBeTruthy();
- expect(screen.getByRole('textbox')).toBeTruthy();
- fireEvent.click(screen.getByRole('button', { name: 'settings.cindyMake.create.cancel' }));
+ await act(async () => {
+ fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.versions' }));
+ });
+ expect(screen.queryByRole('button', { name: 'settings.cindyMake.create.title' })).toBeNull();
expect(screen.queryByRole('dialog')).toBeNull();
- await waitFor(() => expect(document.activeElement).toBe(entry));
expect(environment.starts()).toHaveLength(1);
expect(environment.starts()[0][0]).toBe('cindy-make-doctor');
});
@@ -760,60 +847,31 @@ describe('Settings > Cindy Make', () => {
onCindyMakeSourceStatus: h.api.onCindyMakeSourceStatus,
cancelCindyMakeSource: h.api.cancelCindyMakeSource,
});
- renderEnvironment(<CindyMakeSection />);
+ renderVersions(<CindyMakeSection />);
await waitFor(() => expect(screen.getByText('c'.repeat(12))).toBeTruthy());
const sourceCard = screen.getByRole('region', { name: 'settings.cindyMake.source.title' });
- expect(within(sourceCard).getByText('cindy-personal')).toBeTruthy();
- expect(within(sourceCard).getByText('f'.repeat(12))).toBeTruthy();
- for (const hash of [source.baseCommit, source.mainCommit]) {
- expect(within(sourceCard).getByText(hash!.slice(0, 12))).toBeTruthy();
- }
- expect(within(sourceCard).getByText('main')).toBeTruthy();
- expect(within(sourceCard).queryByText('settings.cindyMake.source.ref')).toBeNull();
- expect(within(sourceCard).queryByText('0123456789abcdef')).toBeNull();
- await h.pushSource({
- ...source,
- currentBranch: 'feature/next',
- mainCommit: 'e'.repeat(40),
- });
- expect(within(sourceCard).getByText('feature/next')).toBeTruthy();
- expect(within(sourceCard).getByText('e'.repeat(12))).toBeTruthy();
- const statusLine = within(sourceCard).getByRole('status');
- const footer = statusLine.parentElement!;
+ expect(within(sourceCard).getByText('0123456789ab')).toBeTruthy();
+ expect(within(sourceCard).getByText(source.path)).toBeTruthy();
+ expect(within(sourceCard).queryByText(source.baseCommit!.slice(0, 12))).toBeNull();
const openButton = within(sourceCard).getByRole('button', {
name: 'settings.cindyMake.source.openDir',
});
- const updateButton = within(sourceCard).getByRole('button', {
- name: 'cindyMake.merge.getLatest',
- });
- const resetButton = within(sourceCard).getByRole('button', {
- name: 'settings.cindyMake.source.reset',
- });
- const pathDetails = within(sourceCard).getByText(source.path).closest('dd')!;
- expect(statusLine.textContent).toBe('settings.cindyMake.source.status.ready');
- expect(pathDetails.contains(openButton)).toBe(true);
- expect(pathDetails.contains(resetButton)).toBe(true);
- expect(footer.contains(openButton)).toBe(false);
- expect(footer.contains(updateButton)).toBe(false);
- expect(footer.contains(resetButton)).toBe(false);
-
fireEvent.click(openButton);
expect(h.api.openCindyMakeSourceDir).toHaveBeenCalledTimes(1);
-
- fireEvent.click(
- within(sourceCard).getByRole('button', { name: 'settings.cindyMake.source.title' }),
- );
- expect(within(sourceCard).queryByText('e'.repeat(12))).toBeNull();
- expect(within(sourceCard).getByRole('status')).toBeTruthy();
expect(
- within(sourceCard).queryByRole('button', { name: 'settings.cindyMake.source.openDir' }),
+ within(sourceCard).queryByRole('button', { name: 'cindyMake.overview.details' }),
).toBeNull();
+ expect(within(sourceCard).queryByText(source.baseCommit!.slice(0, 12))).toBeNull();
+ await h.pushSource({ ...source, currentBranch: 'feature/next', mainCommit: 'e'.repeat(40) });
+ expect(within(sourceCard).getByText(source.path)).toBeTruthy();
+ expect(within(sourceCard).queryByText('feature/next')).toBeNull();
+ expect(within(sourceCard).getByText('e'.repeat(12))).toBeTruthy();
expect(
- within(sourceCard).queryByRole('button', { name: 'settings.cindyMake.source.reset' }),
- ).toBeNull();
+ within(sourceCard).getByRole('button', { name: 'cindyMake.merge.getLatest' }),
+ ).toBeTruthy();
expect(
- within(sourceCard).queryByRole('button', { name: 'cindyMake.merge.getLatest' }),
- ).toBeNull();
+ within(sourceCard).getByRole('button', { name: 'settings.cindyMake.source.reset' }),
+ ).toBeTruthy();
});
it.each(['waiting', 'checkingRemote', 'checkingLocal', 'cloning', 'installing'] as const)(
@@ -826,7 +884,7 @@ describe('Settings > Cindy Make', () => {
ref: 'main',
phase,
});
- renderEnvironment(<CindyMakeSection />);
+ renderVersions(<CindyMakeSection />);
const sourceCard = await screen.findByRole('region', {
name: 'settings.cindyMake.source.title',
});
@@ -864,13 +922,10 @@ describe('Settings > Cindy Make', () => {
dependencies: { resolved: 21, reused: 12, downloaded: 9, added: 0 },
};
h.api.getCindyMakeSourceStatus.mockResolvedValue(source);
- renderEnvironment(<CindyMakeSection />);
+ renderVersions(<CindyMakeSection />);
const sourceCard = await screen.findByRole('region', {
name: 'settings.cindyMake.source.title',
});
- fireEvent.click(
- within(sourceCard).getByRole('button', { name: 'settings.cindyMake.source.title' }),
- );
expect(within(sourceCard).getByRole('status').textContent).toContain(
'settings.cindyMake.source.status.' + status,
);
@@ -890,14 +945,12 @@ describe('Settings > Cindy Make', () => {
await h.pushSource({ status: 'ready', path: source.path });
expect(h.api.getCindyMakeSourceStatus).toHaveBeenCalledTimes(sourceReads + 1);
expect(within(sourceCard).getByRole('status').textContent).toBe(
- 'settings.cindyMake.source.status.ready',
+ 'cindyMake.overview.comparison.unknown',
);
expect(
within(sourceCard).queryByRole('button', { name: 'cindyMake.merge.getLatest' }),
- ).toBeNull();
- fireEvent.click(
- within(sourceCard).getByRole('button', { name: 'settings.cindyMake.source.title' }),
- );
+ ).toBeTruthy();
+ expect(within(sourceCard).getByText(source.path)).toBeTruthy();
expect(
within(sourceCard).getByRole('button', { name: 'cindyMake.merge.getLatest' }),
).toBeTruthy();
@@ -926,7 +979,7 @@ describe('Settings > Cindy Make', () => {
onCindyMakeSourceStatus: h.api.onCindyMakeSourceStatus,
cancelCindyMakeSource: h.api.cancelCindyMakeSource,
});
- renderEnvironment(<CindyMakeSection />);
+ renderVersions(<CindyMakeSection />);
await waitFor(() => expect(screen.getByText('cindyMake.source.errors.dirty')).toBeTruthy());
const sourceCard = screen.getByRole('region', { name: 'settings.cindyMake.source.title' });
expect(
@@ -952,7 +1005,7 @@ describe('Settings > Cindy Make', () => {
onCindyMakeSourceStatus: h.api.onCindyMakeSourceStatus,
cancelCindyMakeSource: h.api.cancelCindyMakeSource,
});
- renderEnvironment(<CindyMakeSection />);
+ renderVersions(<CindyMakeSection />);
await waitFor(() => expect(screen.getByText('settings.cindyMake.source.prepare')).toBeTruthy());
fireEvent.click(screen.getByText('settings.cindyMake.source.prepare'));
expect(screen.getByText('settings.cindyMake.source.stop')).toBeTruthy();
@@ -974,7 +1027,7 @@ describe('Settings > Cindy Make', () => {
onCindyMakeSourceStatus: h.api.onCindyMakeSourceStatus,
cancelCindyMakeSource: h.api.cancelCindyMakeSource,
});
- renderEnvironment(<CindyMakeSection />);
+ renderVersions(<CindyMakeSection />);
await waitFor(() =>
expect(screen.getByRole('button', { name: 'cindyMake.merge.getLatest' })).toBeTruthy(),
);
@@ -1008,7 +1061,7 @@ describe('Settings > Cindy Make', () => {
onCindyMakeSourceStatus: h.api.onCindyMakeSourceStatus,
cancelCindyMakeSource: h.api.cancelCindyMakeSource,
});
- renderEnvironment(<CindyMakeSection />);
+ renderVersions(<CindyMakeSection />);
fireEvent.click(await screen.findByRole('button', { name: 'settings.cindyMake.source.reset' }));
await waitFor(() => expect(h.starts()).toHaveLength(2));
expect(h.starts()[1][0]).toBe('cindy-make');
@@ -1026,12 +1079,10 @@ describe('Settings > Cindy Make', () => {
]);
const environmentCard = screen.getByRole('region', { name: 'cindyMakeDoctor.title' });
const previousEnvironment = environmentCard.textContent;
+ fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.versions' }));
const sourceCard = screen.getByRole('region', { name: 'settings.cindyMake.source.title' });
fireEvent.click(within(sourceCard).getByRole('button', { name: 'cindyMake.merge.getLatest' }));
- fireEvent.click(
- within(sourceCard).getByRole('button', { name: 'settings.cindyMake.source.title' }),
- );
- expect(within(sourceCard).queryByText('settings.cindyMake.source.path')).toBeNull();
+ expect(within(sourceCard).getByText('settings.cindyMake.source.path')).toBeTruthy();
expect(environmentCard.textContent).toBe(previousEnvironment);
await h.pushSource({
...source,
@@ -1081,7 +1132,7 @@ describe('Settings > Cindy Make', () => {
status: 'missing',
path: 'C:\\managed\\source',
});
- renderEnvironment(<CindyMakeSection />);
+ renderVersions(<CindyMakeSection />);
await waitFor(() => expect(screen.getByText('settings.cindyMake.source.prepare')).toBeTruthy());
fireEvent.click(screen.getByText('settings.cindyMake.source.prepare'));
expect(h.starts()).toHaveLength(2);
@@ -1089,14 +1140,17 @@ describe('Settings > Cindy Make', () => {
h.api.executeDesktopCommand.mock.calls.some(([, ctx]) => ctx.doctorAction === 'cancel'),
).toBe(false);
await h.complete(h.starts()[0][1].doctorRunId!, '22.23.2');
+ expect(screen.getByText('settings.cindyMake.source.stop')).toBeTruthy();
+ fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.environment' }));
expect(
within(screen.getByRole('region', { name: 'cindyMakeDoctor.title' })).getByRole('status')
.textContent,
).toContain('cindyMakeDoctor.passed');
- expect(screen.getByText('settings.cindyMake.source.stop')).toBeTruthy();
fireEvent.click(screen.getByText('cindyMakeDoctor.recheck'));
expect(h.starts()).toHaveLength(3);
expect(h.starts()[2][0]).toBe('cindy-make-doctor');
+ fireEvent.click(screen.getByRole('tab', { name: 'settings.cindyMake.tabs.versions' }));
+ expect(screen.getByText('settings.cindyMake.source.stop')).toBeTruthy();
expect(
h.api.executeDesktopCommand.mock.calls.some(([, ctx]) => ctx.doctorAction === 'cancel'),
).toBe(false);
diff --git a/apps/desktop/src/renderer/components/settings/__tests__/cindyMakeVisibility.test.ts b/apps/desktop/src/renderer/components/settings/__tests__/cindyMakeVisibility.test.ts
index 439e9938c1..48f50f600d 100644
--- a/apps/desktop/src/renderer/components/settings/__tests__/cindyMakeVisibility.test.ts
+++ b/apps/desktop/src/renderer/components/settings/__tests__/cindyMakeVisibility.test.ts
@@ -7,4 +7,22 @@ describe('cindyMakeVisibility', () => {
expect(canAccessCindyMakeSettings(true)).toBe(true);
expect(canAccessCindyMakeSettings(false)).toBe(false);
});
+ it('keeps version management accessible in a packaged personal version', () => {
+ const personal = {
+ id: 'personal-1',
+ kind: 'personal' as const,
+ available: true,
+ compatible: true,
+ };
+ const original = { ...personal, id: 'original', kind: 'original' as const };
+ const state = {
+ currentId: personal.id,
+ selectedId: personal.id,
+ switching: false,
+ versions: [original, personal],
+ };
+ expect(canAccessCindyMakeSettings(false, state)).toBe(true);
+ expect(canAccessCindyMakeSettings(false, { ...state, currentId: 'original' })).toBe(false);
+ expect(canAccessCindyMakeSettings(false, { ...state, versions: [original] })).toBe(true);
+ });
});
diff --git a/apps/desktop/src/renderer/components/settings/cindyMakeVisibility.ts b/apps/desktop/src/renderer/components/settings/cindyMakeVisibility.ts
index dee95542d6..c8e9bdd19d 100644
--- a/apps/desktop/src/renderer/components/settings/cindyMakeVisibility.ts
+++ b/apps/desktop/src/renderer/components/settings/cindyMakeVisibility.ts
@@ -1,3 +1,10 @@
-export function canAccessCindyMakeSettings(isDevelopmentBuild: boolean): boolean {
- return isDevelopmentBuild;
+import type { CindyVersionsState } from '../../../shared/cindyVersions';
+
+export function canAccessCindyMakeSettings(
+ isDevelopmentBuild: boolean,
+ versions?: CindyVersionsState,
+): boolean {
+ // Main resolves the current executable identity. A missing/corrupt catalog entry
+ // must not hide the escape route back to the original application.
+ return isDevelopmentBuild || (!!versions?.currentId && versions.currentId !== 'original');
}
diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.json
index e69fce6097..c250281c21 100644
--- a/apps/desktop/src/renderer/i18n/locales/en/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json
@@ -12700,6 +12700,7 @@
}
},
"cindyMake": {
+ "beta": "Beta",
"description": "Check and prepare local tools for a personal Cindy build. Usage: /cindy-make [request]",
"localOnly": "/cindy-make currently supports local desktop sessions only. Switch to this device to use it.",
"usage": "Use /cindy-make or /cindy-make request. Environment checks do not yet accept attachments, references or comments. Your input is preserved.",
@@ -12840,18 +12841,11 @@
},
"missing": "No source is prepared",
"details": {
- "branch": "Personal Branch",
- "baseRef": "Based on {{ref}}",
- "baseCommit": "Based on",
- "mainCommit": "main Version",
- "currentBranch": "Current Project Branch",
- "detached": "No branch (fixed commit)",
"unknown": "Update source to check",
"latest": {
- "dev": "Latest main",
+ "dev": "Online main",
"beta": "Latest Beta",
"release": "Latest Release",
- "unavailable": "Could not check — reopen Settings to retry",
"same": "(up to date)",
"behind_one": "({{count}} commit behind)",
"behind_other": "({{count}} commits behind)",
@@ -12908,6 +12902,22 @@
"commit": "Based on {{commit}}",
"branch": "Committed to {{branch}}"
},
+ "overview": {
+ "description": "View personal source, switch app versions, and manage Make history.",
+ "title": "Version overview",
+ "switchVersion": "Switch version",
+ "personalCode": "Personal source",
+ "localMain": "Local main",
+ "lookupUnavailable": "Could not check the latest version. Sync latest source to check again.",
+ "comparisonUnavailable": "(comparison unavailable)",
+ "comparison": {
+ "same": "Personal source matches local main",
+ "personalAhead": "Includes local main · personal commits: {{ahead}}",
+ "mainAhead": "Commits ahead on local main: {{behind}}",
+ "diverged": "Commits ahead on local main: {{behind}} · personal commits: {{ahead}}",
+ "unknown": "Commit comparison unavailable. Sync latest source to try again."
+ }
+ },
"versions": {
"title": "My Versions",
"description": "Choose the Cindy version to use on this computer. Switching restarts the app and keeps your accounts, settings and tasks.",
@@ -13113,7 +13123,7 @@
"files_other": "{{count}} files changed"
},
"merge": {
- "getLatest": "Get latest source",
+ "getLatest": "Sync latest source",
"updateHint": "Update official source and reapply your personal changes.",
"confirmTitle": "Update to the latest source?",
"confirmDescription": "Your personal changes will be kept. If conflicts occur, a separate task will help resolve them.",
diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.json
index 13570f7ab9..9f5f628966 100644
--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json
@@ -12683,6 +12683,7 @@
}
},
"cindyMake": {
+ "beta": "Beta",
"description": "ローカルのツールを確認・準備して個人版 Cindy を作成します。使い方: /cindy-make [変更内容]",
"localOnly": "/cindy-make は現在、ローカルのデスクトップセッションでのみ使用できます。このデバイスに切り替えてください。",
"usage": "/cindy-make または /cindy-make 要望 を使用してください。環境チェックは添付ファイル、参照、コメントにまだ対応していません。入力内容は保持されます。",
@@ -12823,18 +12824,11 @@
},
"missing": "ソースはまだ準備されていません",
"details": {
- "branch": "個人版ブランチ",
- "baseRef": "{{ref}} を基準",
- "baseCommit": "基準バージョン",
- "mainCommit": "main のバージョン",
- "currentBranch": "プロジェクトの現在のブランチ",
- "detached": "ブランチなし(固定コミット)",
"unknown": "ソースを更新して確認",
"latest": {
- "dev": "最新の main",
+ "dev": "オンラインの main",
"beta": "最新の beta",
"release": "最新の正式版",
- "unavailable": "確認できませんでした。設定を開き直して再試行してください",
"same": "(同期済み)",
"behind_one": "({{count}} コミット遅れ)",
"behind_other": "({{count}} コミット遅れ)",
@@ -12891,6 +12885,22 @@
"commit": "{{commit}} を基準",
"branch": "{{branch}} にコミット済み"
},
+ "overview": {
+ "description": "個人版のソースの確認、使用するバージョンの切り替え、制作履歴の管理ができます。",
+ "title": "バージョン概要",
+ "switchVersion": "バージョンを切り替え",
+ "personalCode": "個人版のソース",
+ "localMain": "ローカル main",
+ "lookupUnavailable": "確認できませんでした。最新ソースを同期すると再確認します。",
+ "comparisonUnavailable": "(コミットを比較できません)",
+ "comparison": {
+ "same": "個人版とローカル main のコミットは一致しています",
+ "personalAhead": "ローカル main を含み、個人版に {{ahead}} 件の追加コミットがあります",
+ "mainAhead": "ローカル main が {{behind}} コミット先行しています",
+ "diverged": "ローカル main が {{behind}} コミット先行し、個人版に {{ahead}} 件の追加コミットがあります",
+ "unknown": "コミットを比較できません。最新ソースを同期して再試行してください。"
+ }
+ },
"versions": {
"title": "マイバージョン",
"description": "このコンピューターで使う Cindy のバージョンを選びます。切り替えると再起動し、アカウント、設定、タスクを引き継ぎます。",
@@ -13094,7 +13104,7 @@
"files_other": "{{count}} ファイルを変更"
},
"merge": {
- "getLatest": "最新ソースを取得",
+ "getLatest": "最新ソースを同期",
"updateHint": "公式ソースを更新し、個人の変更を保持します。",
"confirmTitle": "最新ソースに更新しますか?",
"confirmDescription": "個人の変更は保持されます。競合が発生した場合は、専用タスクで解決を支援します。",
diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.json
index 386eb22864..2477ad08d8 100644
--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json
@@ -12683,6 +12683,7 @@
}
},
"cindyMake": {
+ "beta": "Beta",
"description": "로컬 도구를 확인하고 준비하여 개인 버전 Cindy 제작을 시작합니다. 사용법: /cindy-make [변경 요청]",
"localOnly": "/cindy-make는 현재 로컬 데스크톱 세션에서만 사용할 수 있습니다. 이 기기로 전환해 주세요.",
"usage": "/cindy-make 또는 /cindy-make 요청 을 사용하세요. 환경 검사는 아직 첨부 파일, 참조, 댓글을 지원하지 않습니다. 입력 내용은 유지됩니다.",
@@ -12823,18 +12824,11 @@
},
"missing": "아직 소스가 준비되지 않았습니다",
"details": {
- "branch": "개인 버전 브랜치",
- "baseRef": "{{ref}} 기준",
- "baseCommit": "기준 버전",
- "mainCommit": "main 버전",
- "currentBranch": "프로젝트의 현재 브랜치",
- "detached": "브랜치 없음 (고정 커밋)",
"unknown": "소스를 업데이트해 확인하세요",
"latest": {
- "dev": "최신 main",
+ "dev": "온라인 main",
"beta": "최신 beta",
"release": "최신 정식 버전",
- "unavailable": "확인하지 못했습니다. 설정을 다시 열어 재시도하세요",
"same": "(동기화됨)",
"behind_one": "({{count}}개 커밋 뒤)",
"behind_other": "({{count}}개 커밋 뒤)",
@@ -12891,6 +12885,22 @@
"commit": "{{commit}} 기준",
"branch": "{{branch}}에 커밋됨"
},
+ "overview": {
+ "description": "개인 버전 소스를 확인하고 사용할 버전을 전환하며 제작 기록을 관리합니다.",
+ "title": "버전 개요",
+ "switchVersion": "버전 전환",
+ "personalCode": "개인 버전 소스",
+ "localMain": "로컬 main",
+ "lookupUnavailable": "확인하지 못했습니다. 최신 소스를 동기화할 때 다시 확인합니다.",
+ "comparisonUnavailable": "(커밋 비교 불가)",
+ "comparison": {
+ "same": "개인 버전과 로컬 main의 커밋이 같습니다",
+ "personalAhead": "로컬 main을 포함하며 개인 커밋이 {{ahead}}개 더 있습니다",
+ "mainAhead": "로컬 main이 {{behind}}개 커밋 앞서 있습니다",
+ "diverged": "로컬 main이 {{behind}}개 커밋 앞서 있으며 개인 커밋이 {{ahead}}개 더 있습니다",
+ "unknown": "커밋을 비교할 수 없습니다. 최신 소스를 동기화한 후 다시 시도하세요."
+ }
+ },
"versions": {
"title": "내 버전",
"description": "이 컴퓨터에서 사용할 Cindy 버전을 선택하세요. 전환하면 앱이 다시 시작되며 계정, 설정, 작업은 유지됩니다.",
@@ -13094,7 +13104,7 @@
"files_other": "파일 {{count}}개 변경"
},
"merge": {
- "getLatest": "최신 소스 가져오기",
+ "getLatest": "최신 소스 동기화",
"updateHint": "공식 소스를 업데이트하고 개인 변경 사항을 유지합니다.",
"confirmTitle": "최신 소스로 업데이트할까요?",
"confirmDescription": "개인 변경 사항은 유지됩니다. 충돌이 발생하면 별도 작업에서 해결을 도와드립니다.",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
index 9c364b46d0..df5a491e65 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
@@ -12683,6 +12683,7 @@
}
},
"cindyMake": {
+ "beta": "Beta",
"description": "检查并准备本机工具,开始制作个人版 Cindy。用法:/cindy-make [修改需求]",
"localOnly": "/cindy-make 暂仅支持本机桌面任务。请切回本机后使用。",
"usage": "请在 /cindy-make 后填写要修改的内容,例如 /cindy-make 修复消息流闪烁。空指令不会开始环境检查。环境检查暂不支持附件、引用或批注。",
@@ -12823,18 +12824,11 @@
},
"missing": "尚未准备源码",
"details": {
- "branch": "个人版分支",
- "baseRef": "基于 {{ref}}",
- "baseCommit": "来源版本",
- "mainCommit": "main 版本",
- "currentBranch": "当前项目分支",
- "detached": "未在分支上(固定提交)",
"unknown": "更新源码后查看",
"latest": {
- "dev": "最新 main",
+ "dev": "线上 main",
"beta": "最新 beta",
"release": "最新正式版",
- "unavailable": "未能查询,请重新打开设置重试",
"same": "(已同步)",
"behind_one": "(落后 {{count}} 个提交)",
"behind_other": "(落后 {{count}} 个提交)",
@@ -12891,6 +12885,22 @@
"commit": "基于 {{commit}}",
"branch": "已提交到 {{branch}}"
},
+ "overview": {
+ "description": "查看个人版代码、切换使用版本和管理制作历史。",
+ "title": "版本概览",
+ "switchVersion": "切换版本",
+ "personalCode": "个人版代码",
+ "localMain": "本地 main",
+ "lookupUnavailable": "暂未查到,同步最新源码时会重新检查。",
+ "comparisonUnavailable": "(暂时无法比较提交)",
+ "comparison": {
+ "same": "个人版与本地 main 提交一致",
+ "personalAhead": "已包含本地 main,另有 {{ahead}} 个个人提交",
+ "mainAhead": "本地 main 领先 {{behind}} 个提交",
+ "diverged": "本地 main 领先 {{behind}} 个提交,个人版另有 {{ahead}} 个提交",
+ "unknown": "暂时无法比较提交,请同步最新源码重试。"
+ }
+ },
"versions": {
"title": "我的版本",
"description": "选择本机要使用的 Cindy 版本。切换后会重启,并保留账号、设置与任务。",
@@ -13094,7 +13104,7 @@
"files_other": "改动 {{count}} 个文件"
},
"merge": {
- "getLatest": "获取最新源码",
+ "getLatest": "同步最新源码",
"updateHint": "更新官方源码,并保留个人改动。",
"confirmTitle": "更新到最新源码?",
"confirmDescription": "会保留你的个人改动。如有冲突,将通过独立任务协助处理。",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
index 38bc1e5fbc..ce28d08ed6 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
@@ -12683,6 +12683,7 @@
}
},
"cindyMake": {
+ "beta": "Beta",
"description": "檢查並準備本機工具,開始製作個人版 Cindy。用法:/cindy-make [修改需求]",
"localOnly": "/cindy-make 暫僅支援本機桌面任務。請切回本機後使用。",
"usage": "請使用 /cindy-make 或 /cindy-make 需求。環境檢查暫不支援附件、引用或註解,輸入已保留。",
@@ -12823,18 +12824,11 @@
},
"missing": "尚未準備原始碼",
"details": {
- "branch": "個人版分支",
- "baseRef": "基於 {{ref}}",
- "baseCommit": "來源版本",
- "mainCommit": "main 版本",
- "currentBranch": "目前專案分支",
- "detached": "不在分支上(固定提交)",
"unknown": "更新原始碼後查看",
"latest": {
- "dev": "最新 main",
+ "dev": "線上 main",
"beta": "最新 beta",
"release": "最新正式版",
- "unavailable": "無法查詢,請重新開啟設定重試",
"same": "(已同步)",
"behind_one": "(落後 {{count}} 個提交)",
"behind_other": "(落後 {{count}} 個提交)",
@@ -12891,6 +12885,22 @@
"commit": "基於 {{commit}}",
"branch": "已提交到 {{branch}}"
},
+ "overview": {
+ "description": "查看個人版程式碼、切換使用版本及管理製作歷史。",
+ "title": "版本概覽",
+ "switchVersion": "切換版本",
+ "personalCode": "個人版程式碼",
+ "localMain": "本機 main",
+ "lookupUnavailable": "暫時無法查詢,同步最新原始碼時會重新檢查。",
+ "comparisonUnavailable": "(暫時無法比較提交)",
+ "comparison": {
+ "same": "個人版與本機 main 提交一致",
+ "personalAhead": "已包含本機 main,另有 {{ahead}} 個個人提交",
+ "mainAhead": "本機 main 領先 {{behind}} 個提交",
+ "diverged": "本機 main 領先 {{behind}} 個提交,個人版另有 {{ahead}} 個提交",
+ "unknown": "暫時無法比較提交,請同步最新原始碼後重試。"
+ }
+ },
"versions": {
"title": "我的版本",
"description": "選擇這台電腦要使用的 Cindy 版本。切換後會重新啟動,並保留帳號、設定與任務。",
@@ -13094,7 +13104,7 @@
"files_other": "改動 {{count}} 個檔案"
},
"merge": {
- "getLatest": "取得最新原始碼",
+ "getLatest": "同步最新原始碼",
"updateHint": "更新官方原始碼,並保留個人改動。",
"confirmTitle": "更新到最新原始碼?",
"confirmDescription": "會保留你的個人改動。如有衝突,將透過獨立任務協助處理。",
diff --git a/apps/desktop/src/shared/cindyMakeDoctor.ts b/apps/desktop/src/shared/cindyMakeDoctor.ts
index 415725c98c..f92380090f 100644
--- a/apps/desktop/src/shared/cindyMakeDoctor.ts
+++ b/apps/desktop/src/shared/cindyMakeDoctor.ts
@@ -159,6 +159,9 @@ export interface MakeSourcePreparation {
mainRemoteCommit?: string;
mainBehind?: number;
mainAhead?: number;
+ /** Commits unique to cindy-personal / main, respectively. */
+ personalBehind?: number;
+ personalAhead?: number;
error?:
| 'unsupportedVersion'
| 'tagNotFound'
@@ -224,6 +227,9 @@ export interface MakeSourceStatus {
mainRemoteCommit?: string;
mainBehind?: number;
mainAhead?: number;
+ /** Commits unique to cindy-personal / main, respectively. */
+ personalBehind?: number;
+ personalAhead?: number;
latestVersion?: MakeSourceLatestVersion;
error?: MakeSourcePreparation['error'];
phase?: MakeSourcePreparation['phase'];
diff --git a/docs/cindy-make-upstream.md b/docs/cindy-make-upstream.md
index 253f11990c..62815c5b69 100644
--- a/docs/cindy-make-upstream.md
+++ b/docs/cindy-make-upstream.md
@@ -67,8 +67,8 @@ rebase 到新官方基线(禁止 update-refs 自动改动其他任务分支)
不再由 Settings、消息卡片或创建弹窗各自维护后台作业。发送入场与源码清理互斥,
已进入发送事务或运行中的任务禁止清理源码;清理已开始时拒绝新的发送。
- Settings → Cindy Make 分为“版本控制”和“环境检查”两个页签,版本控制排在首位并默认打开。
- 工具检查、Dev 测试开关和个人版源码准备归环境检查;我的版本和制作历史归版本控制。
- 创建个人版本入口放在版本控制页签内、我的版本上方。切换只改变可见面板,保留检查/准备作业、展开状态与
+ 工具检查和 Dev 测试开关归环境检查;个人版源码、我的版本和制作历史归版本控制。
+ 当前使用版本、切换入口和个人版源码合为一张概览卡,制作历史紧随其后。切换只改变可见面板,保留检查/准备作业、版本列表展开状态与
制作搜索内容;进入版本控制时重新读取版本列表。页签支持方向键、Home/End 及独立面板标识。
- 输入 /cindy-make 需求后,在当前页面弹窗检查环境、准备个人版源码并查询上游;
这段前置流程不创建任务、不创建 worktree;源码准备与 Settings 共用同一流程,
@@ -85,12 +85,15 @@ rebase 到新官方基线(禁止 update-refs 自动改动其他任务分支)
不伪造总进度。Settings 和前置弹窗均显示缓存预热的解析/复用/下载数量;
缓存缺失或版本变化时按需补下载,任务 worktree 再复用缓存独立安装并执行安装脚本。
Settings 源码卡的底部状态常驻:区分等待其他工程操作、Git 检查、上游版本查询和本地源码检查,
- 收起详情后仍显示当前阶段与已有进度。失败或停止时保留结果和原因,按钮为「重试准备」;
+ 源码目录直接显示,打开和删除按钮在路径行最右侧对齐,不提供源码详情折叠入口。
+ 失败或停止时保留结果和原因,按钮为「重试准备」;
卡片进入页面即显示,先发布本机保存的源码摘要,再补 Git 版本与联网查询结果;
不让工具发现或网络查询阻塞整张卡。重新进入保留已有信息,查询失败仍显示本地版本。
各阶段共用同一刷新代次,迟到的查询不能覆盖之后的准备、清理或较新的查询结果。
- Settings 的「main 版本」用一行展示「当前 hash → 最新 hash(差距)」:当前版本为次要文字色,
- 箭头为图标,最新版本与括号内差距使用成功色;省略领先/落后的零值。
+ Settings 用「个人版 hash → 本地 main hash」展示本机关系,紧接着说明两者提交差距;
+ 下一行展示线上目标 hash 和本地 main 相对它的提交差距。不再显示制作分支、当前项目分支或重复的来源 hash。
+ 当前使用标签与原版/个人版名称使用相同字体、字号和字重;hash 使用等宽字体。
+ 线上目标版本与已核实的括号内差距使用成功色;省略领先/落后的零值,未知差距保持中性色。
开发版查询 GitHub 最新 main,
beta 查询最新已发布 beta 的 tag,正式版查询最新非 beta 发布的 tag;渠道之间不回退。
能核实时显示本地 main 相对该版本的领先/落后提交数,查询失败不把缓存的 origin/main
@@ -183,7 +186,8 @@ rebase 到新官方基线(禁止 update-refs 自动改动其他任务分支)
自定义端点按已校验的公共配置保存给个人版,不能把本地登录凭证送往线上;恢复 Dev
时仍使用原开发入口和端点配置。个人版自身启动不依赖原源码目录。
- 设置中的“我的版本”和完成卡共用本机切换操作;Renderer 只传版本 ID,不接受路径或
- 启动命令。原版不存在个人版选择时正常启动;生成过但未切换也不改变默认。启动入口
+ 启动命令。开发构建和当前运行的打包个人版始终保留 Cindy Make 设置入口,以便返回原版;
+ 原版不存在个人版选择时正常启动;生成过但未切换也不改变默认。启动入口
在数据库打开前分流,显式 `--cindy-version-original` 可恢复原版。已运行的实例复用
Electron 单实例激活;使用版本管理后 Dev/安装版共享该 profile 的实例锁。
- 切换先核验完整应用与数据兼容性、检查在途工作,再由独立的无窗口 Electron 交接进程
diff --git a/docs/design-rules/design-inventory.md b/docs/design-rules/design-inventory.md
index 53b099d71b..15ab14839f 100644
--- a/docs/design-rules/design-inventory.md
+++ b/docs/design-rules/design-inventory.md
@@ -9,7 +9,7 @@
本区块由 `scripts/design-inventory.mjs` 生成,请勿手改。
重新生成:`pnpm design:inventory`;校验:`pnpm check:design-inventory`。
-计数快照日期:2026-09-19。生成命令:`pnpm design:inventory`。裸颜色匹配与 `scripts/hardcoded-color-audit.mjs` 共用 `scripts/shared/hardcoded-color-match.mjs`(HEX / RGB / HSL / OKLCH 等字面通道),两者在共享 matcher 内统一排除纯语义包装、注释及 PR 编号;数值颜色函数还需位于样式属性、CSS 声明/函数或任意值语境,普通文案字符串里的颜色函数文本不计入;字面 fallback 仍计入——语义 token 消费与注释引用不是迁移债务;裸圆角为粗粒度(`rounded*` class、`border-radius:` 与 React style 对象的 `borderRadius:`)。Token 计数为样式源里 `var(--token)` / `hsl(var(--token)` 的去重 ID 数;Mobile 的 ThemeColors / typeScale 等 RN 属性不计入此列,不能将 0 解释为未使用 Token。
+计数快照日期:2026-09-20。生成命令:`pnpm design:inventory`。裸颜色匹配与 `scripts/hardcoded-color-audit.mjs` 共用 `scripts/shared/hardcoded-color-match.mjs`(HEX / RGB / HSL / OKLCH 等字面通道),两者在共享 matcher 内统一排除纯语义包装、注释及 PR 编号;数值颜色函数还需位于样式属性、CSS 声明/函数或任意值语境,普通文案字符串里的颜色函数文本不计入;字面 fallback 仍计入——语义 token 消费与注释引用不是迁移债务;裸圆角为粗粒度(`rounded*` class、`border-radius:` 与 React style 对象的 `borderRadius:`)。Token 计数为样式源里 `var(--token)` / `hsl(var(--token)` 的去重 ID 数;Mobile 的 ThemeColors / typeScale 等 RN 属性不计入此列,不能将 0 解释为未使用 Token。
登记 surface 数:50。平台包含 Desktop 与 Mobile;静态入口发现不表示已迁移或已实机验证。
@@ -38,7 +38,7 @@
| `desktop.overlay.toast` | desktop | Toast | App 常驻 ToastContainer(用户可见出口,不展开业务逻辑) | Toast, ToastContainer | apps/desktop/src/renderer/components/ui/toast/Toast.tsx, apps/desktop/src/renderer/components/ui/toast/ToastContainer.tsx, apps/desktop/src/renderer/components/ui/toast/index.ts | 8 | 4 | 4 |
| `desktop.plugins.app-main` | desktop | 插件主视图 | hash `/apps/:ghostId`(GhostMainViewFeatureLayout) | GhostMainViewFeatureLayout, GhostMainViewHost | apps/desktop/src/renderer/features/plugin/GhostMainViewFeatureLayout.tsx, apps/desktop/src/renderer/features/plugin/GhostMainViewHost.tsx | 0 | 0 | 0 |
| `desktop.plugins.installed` | desktop | 已装插件 | hash `/plugins`(GhostPluginPage) | AddMarketplaceDialog, GhostPluginDetailView, GhostPluginPage, MarketPluginDetailView, MyPublishesSection, PluginManagementLayout, PluginScopePicker, UpdateAllDialog | apps/desktop/src/renderer/features/plugin/AddMarketplaceDialog.tsx, apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsx, apps/desktop/src/renderer/features/plugin/GhostPluginPage.tsx, apps/desktop/src/renderer/features/plugin/MarketPluginDetailView.tsx, apps/desktop/src/renderer/features/plugin/MyPublishesSection.tsx, apps/desktop/src/renderer/features/plugin/PluginManagementLayout.tsx, apps/desktop/src/renderer/features/plugin/PluginScopePicker.tsx, apps/desktop/src/renderer/features/plugin/UpdateAllDialog.tsx, apps/desktop/src/renderer/features/plugin/plugin-motion.css | 47 | 0 | 79 |
-| `desktop.settings` | desktop | 设置 | hash `/settings`(SettingsView;tab 含 general / personalization / providers / billing / usage / voice-input / im-bot / shortcuts / agent-island / import / remote-control / ghosts / builtin-tools / computer-use / help / about) | SettingsView | apps/desktop/src/renderer/components/settings/AboutSection.tsx, apps/desktop/src/renderer/components/settings/AccountDeletionSection.tsx, apps/desktop/src/renderer/components/settings/AddProviderWizard.tsx, apps/desktop/src/renderer/components/settings/AgentIslandSection.tsx, apps/desktop/src/renderer/components/settings/AgentResourceSection.tsx, apps/desktop/src/renderer/components/settings/AppearanceSection.tsx, apps/desktop/src/renderer/components/settings/AuxiliaryModelSection.tsx, apps/desktop/src/renderer/components/settings/BetaChannelCell.tsx, apps/desktop/src/renderer/components/settings/BrowserBackendSubsection.tsx, apps/desktop/src/renderer/components/settings/BrowserRealProfileSubsection.tsx, apps/desktop/src/renderer/components/settings/BuiltinToolsSection.tsx, apps/desktop/src/renderer/components/settings/ChatEmbeddingCell.tsx, apps/desktop/src/renderer/components/settings/ChipMetricsSection.tsx, apps/desktop/src/renderer/components/settings/CindyMakeSection.tsx, apps/desktop/src/renderer/components/settings/CollaborationSection.tsx, apps/desktop/src/renderer/components/settings/CompactionSection.tsx, apps/desktop/src/renderer/components/settings/ComposerSendShortcutSection.tsx, apps/desktop/src/renderer/components/settings/ComputerPermissionGuideWindow.tsx, apps/desktop/src/renderer/components/settings/ComputerPermissionRow.tsx, apps/desktop/src/renderer/components/settings/ComputerUseSection.tsx, apps/desktop/src/renderer/components/settings/CustomProviderRuntimeFillOverlay.tsx, apps/desktop/src/renderer/components/settings/DefaultOverrideControls.tsx, apps/desktop/src/renderer/components/settings/DialogueDirectorySection.tsx, apps/desktop/src/renderer/components/settings/DingTalkBotSection.tsx, apps/desktop/src/renderer/components/settings/DiscordBotSection.tsx, apps/desktop/src/renderer/components/settings/DownloadMeter.tsx, apps/desktop/src/renderer/components/settings/ExperimentalSection.tsx, apps/desktop/src/renderer/components/settings/FeishuBotNotificationSection.tsx, apps/desktop/src/renderer/components/settings/FeishuBotSection.tsx, apps/desktop/src/renderer/components/settings/FontFamilyPicker.tsx, apps/desktop/src/renderer/components/settings/GenericGamepadLayout.tsx, apps/desktop/src/renderer/components/settings/GitSafetySection.tsx, apps/desktop/src/renderer/components/settings/HelpAssistantPanel.tsx, apps/desktop/src/renderer/components/settings/HelpSection.tsx, apps/desktop/src/renderer/components/settings/HelpThreadView.tsx, apps/desktop/src/renderer/components/settings/HookConnectionsSection.tsx, apps/desktop/src/renderer/components/settings/HookWorkspacePrefsEditor.tsx, apps/desktop/src/renderer/components/settings/ImBotSection.tsx, apps/desktop/src/renderer/components/settings/ImChannelSettingsCard.tsx, apps/desktop/src/renderer/components/settings/ImDefaultSettingsSection.tsx, apps/desktop/src/renderer/components/settings/ImLifecycleAnnouncementSection.tsx, apps/desktop/src/renderer/components/settings/InputDeviceConnectionStatus.tsx, apps/desktop/src/renderer/components/settings/JoyConGamepadLayout.tsx, apps/desktop/src/renderer/components/settings/KeyboardShortcutsSection.tsx, apps/desktop/src/renderer/components/settings/LanguageSection.tsx, apps/desktop/src/renderer/components/settings/LayoutResetControl.tsx, apps/desktop/src/renderer/components/settings/LinkOpenSection.tsx, apps/desktop/src/renderer/components/settings/LocalOllamaInstall.tsx, apps/desktop/src/renderer/components/settings/LocalPackagingTag.tsx, apps/desktop/src/renderer/components/settings/LogoutSection.tsx, apps/desktop/src/renderer/components/settings/LspBetaCell.tsx, apps/desktop/src/renderer/components/settings/McpServerDialog.tsx, apps/desktop/src/renderer/components/settings/McpServersSection.tsx, apps/desktop/src/renderer/components/settings/MemorySection.tsx, apps/desktop/src/renderer/components/settings/MessageNavRailCell.tsx, apps/desktop/src/renderer/components/settings/ModelAdvancedDrawer.tsx, apps/desktop/src/renderer/components/settings/ModelPriceOverrideDialog.tsx, apps/desktop/src/renderer/components/settings/MyDevicesPanel.tsx, apps/desktop/src/renderer/components/settings/NotificationSection.tsx, apps/desktop/src/renderer/components/settings/OAuthDeviceCodeCard.tsx, apps/desktop/src/renderer/components/settings/OllamaProviderDetail.tsx, apps/desktop/src/renderer/components/settings/PiPackagesSection.tsx, apps/desktop/src/renderer/components/settings/PlayStationGamepadLayout.tsx, apps/desktop/src/renderer/components/settings/ProfileEditDialog.tsx, apps/desktop/src/renderer/components/settings/ProviderConnectionDialog.tsx, apps/desktop/src/renderer/components/settings/ProviderImportDialog.tsx, apps/desktop/src/renderer/components/settings/ProvidersSection.tsx, apps/desktop/src/renderer/components/settings/RemoteControlSection.tsx, apps/desktop/src/renderer/components/settings/RemoteDesktopPermissions.tsx, apps/desktop/src/renderer/components/settings/RemoteDesktopSetting.tsx, apps/desktop/src/renderer/components/settings/RemoteHostDetail.tsx, apps/desktop/src/renderer/components/settings/RemoteSection.tsx, apps/desktop/src/renderer/components/settings/SessionImportSection.tsx, apps/desktop/src/renderer/components/settings/SessionRuntimeFallbackCell.tsx, apps/desktop/src/renderer/components/settings/SessionShareImportWizard.tsx, apps/desktop/src/renderer/components/settings/SettingsCatalogPanel.tsx, apps/desktop/src/renderer/components/settings/SettingsSidebarNav.tsx, apps/desktop/src/renderer/components/settings/SettingsTextInput.tsx, apps/desktop/src/renderer/components/settings/SettingsView.tsx, apps/desktop/src/renderer/components/settings/SilentEncryptedRetryCell.tsx, apps/desktop/src/renderer/components/settings/SshKeySetupDialog.tsx, apps/desktop/src/renderer/components/settings/StorageManagementCard.tsx, apps/desktop/src/renderer/components/settings/StreamFadeSection.tsx, apps/desktop/src/renderer/components/settings/SubagentModelSection.tsx, apps/desktop/src/renderer/components/settings/SwitchProGamepadLayout.tsx, apps/desktop/src/renderer/components/settings/TelegramBehaviorSettings.tsx, apps/desktop/src/renderer/components/settings/TelegramBotSection.tsx, apps/desktop/src/renderer/components/settings/TelegramRemoteDevices.tsx, apps/desktop/src/renderer/components/settings/TerminalShellSection.tsx, apps/desktop/src/renderer/components/settings/TipsSection.tsx, apps/desktop/src/renderer/components/settings/UnifiedModelList.tsx, apps/desktop/src/renderer/components/settings/UserProfileCard.tsx, apps/desktop/src/renderer/components/settings/UserPromptSection.tsx, apps/desktop/src/renderer/components/settings/VisionBridgeSection.tsx, apps/desktop/src/renderer/components/settings/VoiceInputSection.tsx, apps/desktop/src/renderer/components/settings/WechatBotSection.tsx, apps/desktop/src/renderer/components/settings/WecomBotSection.tsx, apps/desktop/src/renderer/components/settings/WindowBehaviorSection.tsx, apps/desktop/src/renderer/components/settings/WorkLouderCodexKeyboardLayout.tsx, apps/desktop/src/renderer/components/settings/WorkLouderCodexKeycapGlyphs.tsx, apps/desktop/src/renderer/components/settings/WorkLouderCodexSettings.tsx, apps/desktop/src/renderer/components/settings/WorktreeRecycleCard.tsx, apps/desktop/src/renderer/components/settings/XUsageGuide.tsx, apps/desktop/src/renderer/components/settings/XboxGamepadLayout.tsx, apps/desktop/src/renderer/components/settings/XboxGamepadSettings.tsx, apps/desktop/src/renderer/components/settings/androidStatusPresentation.ts, apps/desktop/src/renderer/components/settings/billingVisibility.ts, apps/desktop/src/renderer/components/settings/browserOpenForLoginError.ts, apps/desktop/src/renderer/components/settings/cindyMakeVisibility.ts, apps/desktop/src/renderer/components/settings/computerPermissionFlow.ts, apps/desktop/src/renderer/components/settings/contacts/ContactDetailPane.tsx, apps/desktop/src/renderer/components/settings/contacts/ContactsImportDialog.tsx, apps/desktop/src/renderer/components/settings/contacts/ContactsListPane.tsx, apps/desktop/src/renderer/components/settings/contacts/ContactsManagerDialog.tsx, apps/desktop/src/renderer/components/settings/contacts/ContactsSection.tsx, apps/desktop/src/renderer/components/settings/contacts/startContactsAiSession.ts, apps/desktop/src/renderer/components/settings/dialogueDirectoryDisplay.ts, apps/desktop/src/renderer/components/settings/dualSenseSilhouette.ts, apps/desktop/src/renderer/components/settings/feishuBotPresentation.ts, apps/desktop/src/renderer/components/settings/fontFamilyValue.ts, apps/desktop/src/renderer/components/settings/gamepadLayoutPrimitives.tsx, apps/desktop/src/renderer/components/settings/gamepadSilhouetteGeom.ts, apps/desktop/src/renderer/components/settings/hookWorkspacePrefsLogic.ts, apps/desktop/src/renderer/components/settings/imBotVisibility.ts, apps/desktop/src/renderer/components/settings/imDefaultSettingsLogic.ts, apps/desktop/src/renderer/components/settings/joyConSilhouette.ts, apps/desktop/src/renderer/components/settings/modelManagementPresentation.ts, apps/desktop/src/renderer/components/settings/modelManagementState.ts, apps/desktop/src/renderer/components/settings/myDevicesModel.ts, apps/desktop/src/renderer/components/settings/providerAssetModule.ts, apps/desktop/src/renderer/components/settings/realProfilePermissionGuide.ts, apps/desktop/src/renderer/components/settings/switchProSilhouette.ts, apps/desktop/src/renderer/components/settings/ultimateC1Silhouette.ts, apps/desktop/src/renderer/components/settings/usage/UsageBreakdownTables.tsx, apps/desktop/src/renderer/components/settings/usage/UsageHistorySection.tsx, apps/desktop/src/renderer/components/settings/usage/UsageStatRow.tsx, apps/desktop/src/renderer/components/settings/usage/UsageTaskTable.tsx, apps/desktop/src/renderer/components/settings/usage/UsageTokenBars.tsx, apps/desktop/src/renderer/components/settings/usage/formatUsagePercent.ts, apps/desktop/src/renderer/components/settings/usage/usageCharts.css, apps/desktop/src/renderer/components/settings/usage/usageHistoryColors.ts, apps/desktop/src/renderer/components/settings/usage/usageHistoryStats.ts, apps/desktop/src/renderer/components/settings/usageVisibility.ts, apps/desktop/src/renderer/components/settings/useProviderSubscriptionCard.ts, apps/desktop/src/renderer/components/settings/wizardRecommend.ts, apps/desktop/src/renderer/components/settings/workLouderCodexCommandCopy.ts, apps/desktop/src/renderer/components/settings/xboxSeriesSilhouette.ts, apps/desktop/src/renderer/styles/sortable.css | 154 | 109 | 719 |
+| `desktop.settings` | desktop | 设置 | hash `/settings`(SettingsView;tab 含 general / personalization / providers / billing / usage / voice-input / im-bot / shortcuts / agent-island / import / remote-control / ghosts / builtin-tools / computer-use / help / about) | SettingsView | apps/desktop/src/renderer/components/settings/AboutSection.tsx, apps/desktop/src/renderer/components/settings/AccountDeletionSection.tsx, apps/desktop/src/renderer/components/settings/AddProviderWizard.tsx, apps/desktop/src/renderer/components/settings/AgentIslandSection.tsx, apps/desktop/src/renderer/components/settings/AgentResourceSection.tsx, apps/desktop/src/renderer/components/settings/AppearanceSection.tsx, apps/desktop/src/renderer/components/settings/AuxiliaryModelSection.tsx, apps/desktop/src/renderer/components/settings/BetaChannelCell.tsx, apps/desktop/src/renderer/components/settings/BrowserBackendSubsection.tsx, apps/desktop/src/renderer/components/settings/BrowserRealProfileSubsection.tsx, apps/desktop/src/renderer/components/settings/BuiltinToolsSection.tsx, apps/desktop/src/renderer/components/settings/ChatEmbeddingCell.tsx, apps/desktop/src/renderer/components/settings/ChipMetricsSection.tsx, apps/desktop/src/renderer/components/settings/CindyMakeSection.tsx, apps/desktop/src/renderer/components/settings/CollaborationSection.tsx, apps/desktop/src/renderer/components/settings/CompactionSection.tsx, apps/desktop/src/renderer/components/settings/ComposerSendShortcutSection.tsx, apps/desktop/src/renderer/components/settings/ComputerPermissionGuideWindow.tsx, apps/desktop/src/renderer/components/settings/ComputerPermissionRow.tsx, apps/desktop/src/renderer/components/settings/ComputerUseSection.tsx, apps/desktop/src/renderer/components/settings/CustomProviderRuntimeFillOverlay.tsx, apps/desktop/src/renderer/components/settings/DefaultOverrideControls.tsx, apps/desktop/src/renderer/components/settings/DialogueDirectorySection.tsx, apps/desktop/src/renderer/components/settings/DingTalkBotSection.tsx, apps/desktop/src/renderer/components/settings/DiscordBotSection.tsx, apps/desktop/src/renderer/components/settings/DownloadMeter.tsx, apps/desktop/src/renderer/components/settings/ExperimentalSection.tsx, apps/desktop/src/renderer/components/settings/FeishuBotNotificationSection.tsx, apps/desktop/src/renderer/components/settings/FeishuBotSection.tsx, apps/desktop/src/renderer/components/settings/FontFamilyPicker.tsx, apps/desktop/src/renderer/components/settings/GenericGamepadLayout.tsx, apps/desktop/src/renderer/components/settings/GitSafetySection.tsx, apps/desktop/src/renderer/components/settings/HelpAssistantPanel.tsx, apps/desktop/src/renderer/components/settings/HelpSection.tsx, apps/desktop/src/renderer/components/settings/HelpThreadView.tsx, apps/desktop/src/renderer/components/settings/HookConnectionsSection.tsx, apps/desktop/src/renderer/components/settings/HookWorkspacePrefsEditor.tsx, apps/desktop/src/renderer/components/settings/ImBotSection.tsx, apps/desktop/src/renderer/components/settings/ImChannelSettingsCard.tsx, apps/desktop/src/renderer/components/settings/ImDefaultSettingsSection.tsx, apps/desktop/src/renderer/components/settings/ImLifecycleAnnouncementSection.tsx, apps/desktop/src/renderer/components/settings/InputDeviceConnectionStatus.tsx, apps/desktop/src/renderer/components/settings/JoyConGamepadLayout.tsx, apps/desktop/src/renderer/components/settings/KeyboardShortcutsSection.tsx, apps/desktop/src/renderer/components/settings/LanguageSection.tsx, apps/desktop/src/renderer/components/settings/LayoutResetControl.tsx, apps/desktop/src/renderer/components/settings/LinkOpenSection.tsx, apps/desktop/src/renderer/components/settings/LocalOllamaInstall.tsx, apps/desktop/src/renderer/components/settings/LocalPackagingTag.tsx, apps/desktop/src/renderer/components/settings/LogoutSection.tsx, apps/desktop/src/renderer/components/settings/LspBetaCell.tsx, apps/desktop/src/renderer/components/settings/McpServerDialog.tsx, apps/desktop/src/renderer/components/settings/McpServersSection.tsx, apps/desktop/src/renderer/components/settings/MemorySection.tsx, apps/desktop/src/renderer/components/settings/MessageNavRailCell.tsx, apps/desktop/src/renderer/components/settings/ModelAdvancedDrawer.tsx, apps/desktop/src/renderer/components/settings/ModelPriceOverrideDialog.tsx, apps/desktop/src/renderer/components/settings/MyDevicesPanel.tsx, apps/desktop/src/renderer/components/settings/NotificationSection.tsx, apps/desktop/src/renderer/components/settings/OAuthDeviceCodeCard.tsx, apps/desktop/src/renderer/components/settings/OllamaProviderDetail.tsx, apps/desktop/src/renderer/components/settings/PiPackagesSection.tsx, apps/desktop/src/renderer/components/settings/PlayStationGamepadLayout.tsx, apps/desktop/src/renderer/components/settings/ProfileEditDialog.tsx, apps/desktop/src/renderer/components/settings/ProviderConnectionDialog.tsx, apps/desktop/src/renderer/components/settings/ProviderImportDialog.tsx, apps/desktop/src/renderer/components/settings/ProvidersSection.tsx, apps/desktop/src/renderer/components/settings/RemoteControlSection.tsx, apps/desktop/src/renderer/components/settings/RemoteDesktopPermissions.tsx, apps/desktop/src/renderer/components/settings/RemoteDesktopSetting.tsx, apps/desktop/src/renderer/components/settings/RemoteHostDetail.tsx, apps/desktop/src/renderer/components/settings/RemoteSection.tsx, apps/desktop/src/renderer/components/settings/SessionImportSection.tsx, apps/desktop/src/renderer/components/settings/SessionRuntimeFallbackCell.tsx, apps/desktop/src/renderer/components/settings/SessionShareImportWizard.tsx, apps/desktop/src/renderer/components/settings/SettingsCatalogPanel.tsx, apps/desktop/src/renderer/components/settings/SettingsSidebarNav.tsx, apps/desktop/src/renderer/components/settings/SettingsTextInput.tsx, apps/desktop/src/renderer/components/settings/SettingsView.tsx, apps/desktop/src/renderer/components/settings/SilentEncryptedRetryCell.tsx, apps/desktop/src/renderer/components/settings/SshKeySetupDialog.tsx, apps/desktop/src/renderer/components/settings/StorageManagementCard.tsx, apps/desktop/src/renderer/components/settings/StreamFadeSection.tsx, apps/desktop/src/renderer/components/settings/SubagentModelSection.tsx, apps/desktop/src/renderer/components/settings/SwitchProGamepadLayout.tsx, apps/desktop/src/renderer/components/settings/TelegramBehaviorSettings.tsx, apps/desktop/src/renderer/components/settings/TelegramBotSection.tsx, apps/desktop/src/renderer/components/settings/TelegramRemoteDevices.tsx, apps/desktop/src/renderer/components/settings/TerminalShellSection.tsx, apps/desktop/src/renderer/components/settings/TipsSection.tsx, apps/desktop/src/renderer/components/settings/UnifiedModelList.tsx, apps/desktop/src/renderer/components/settings/UserProfileCard.tsx, apps/desktop/src/renderer/components/settings/UserPromptSection.tsx, apps/desktop/src/renderer/components/settings/VisionBridgeSection.tsx, apps/desktop/src/renderer/components/settings/VoiceInputSection.tsx, apps/desktop/src/renderer/components/settings/WechatBotSection.tsx, apps/desktop/src/renderer/components/settings/WecomBotSection.tsx, apps/desktop/src/renderer/components/settings/WindowBehaviorSection.tsx, apps/desktop/src/renderer/components/settings/WorkLouderCodexKeyboardLayout.tsx, apps/desktop/src/renderer/components/settings/WorkLouderCodexKeycapGlyphs.tsx, apps/desktop/src/renderer/components/settings/WorkLouderCodexSettings.tsx, apps/desktop/src/renderer/components/settings/WorktreeRecycleCard.tsx, apps/desktop/src/renderer/components/settings/XUsageGuide.tsx, apps/desktop/src/renderer/components/settings/XboxGamepadLayout.tsx, apps/desktop/src/renderer/components/settings/XboxGamepadSettings.tsx, apps/desktop/src/renderer/components/settings/androidStatusPresentation.ts, apps/desktop/src/renderer/components/settings/billingVisibility.ts, apps/desktop/src/renderer/components/settings/browserOpenForLoginError.ts, apps/desktop/src/renderer/components/settings/cindyMakeVisibility.ts, apps/desktop/src/renderer/components/settings/computerPermissionFlow.ts, apps/desktop/src/renderer/components/settings/contacts/ContactDetailPane.tsx, apps/desktop/src/renderer/components/settings/contacts/ContactsImportDialog.tsx, apps/desktop/src/renderer/components/settings/contacts/ContactsListPane.tsx, apps/desktop/src/renderer/components/settings/contacts/ContactsManagerDialog.tsx, apps/desktop/src/renderer/components/settings/contacts/ContactsSection.tsx, apps/desktop/src/renderer/components/settings/contacts/startContactsAiSession.ts, apps/desktop/src/renderer/components/settings/dialogueDirectoryDisplay.ts, apps/desktop/src/renderer/components/settings/dualSenseSilhouette.ts, apps/desktop/src/renderer/components/settings/feishuBotPresentation.ts, apps/desktop/src/renderer/components/settings/fontFamilyValue.ts, apps/desktop/src/renderer/components/settings/gamepadLayoutPrimitives.tsx, apps/desktop/src/renderer/components/settings/gamepadSilhouetteGeom.ts, apps/desktop/src/renderer/components/settings/hookWorkspacePrefsLogic.ts, apps/desktop/src/renderer/components/settings/imBotVisibility.ts, apps/desktop/src/renderer/components/settings/imDefaultSettingsLogic.ts, apps/desktop/src/renderer/components/settings/joyConSilhouette.ts, apps/desktop/src/renderer/components/settings/modelManagementPresentation.ts, apps/desktop/src/renderer/components/settings/modelManagementState.ts, apps/desktop/src/renderer/components/settings/myDevicesModel.ts, apps/desktop/src/renderer/components/settings/providerAssetModule.ts, apps/desktop/src/renderer/components/settings/realProfilePermissionGuide.ts, apps/desktop/src/renderer/components/settings/switchProSilhouette.ts, apps/desktop/src/renderer/components/settings/ultimateC1Silhouette.ts, apps/desktop/src/renderer/components/settings/usage/UsageBreakdownTables.tsx, apps/desktop/src/renderer/components/settings/usage/UsageHistorySection.tsx, apps/desktop/src/renderer/components/settings/usage/UsageStatRow.tsx, apps/desktop/src/renderer/components/settings/usage/UsageTaskTable.tsx, apps/desktop/src/renderer/components/settings/usage/UsageTokenBars.tsx, apps/desktop/src/renderer/components/settings/usage/formatUsagePercent.ts, apps/desktop/src/renderer/components/settings/usage/usageCharts.css, apps/desktop/src/renderer/components/settings/usage/usageHistoryColors.ts, apps/desktop/src/renderer/components/settings/usage/usageHistoryStats.ts, apps/desktop/src/renderer/components/settings/usageVisibility.ts, apps/desktop/src/renderer/components/settings/useProviderSubscriptionCard.ts, apps/desktop/src/renderer/components/settings/wizardRecommend.ts, apps/desktop/src/renderer/components/settings/workLouderCodexCommandCopy.ts, apps/desktop/src/renderer/components/settings/xboxSeriesSilhouette.ts, apps/desktop/src/renderer/styles/sortable.css | 154 | 109 | 716 |
| `desktop.shell.main-layout` | desktop | 主窗口壳(标题栏 / 左右栏 / 内容区) | main BrowserWindow → renderer/index.tsx → main-entry.tsx → App → MainLayout (`#/` 受保护壳) | ChromeActions, DeviceSectionHeader, FeishuConflictDialogHost, GhostMediaLightboxHost, MainLayout, ProjectsSection, RightSidebar, RightSidebarShell, SessionShareImportWizard, Sidebar, UpdateNoticeDialog, WindowControls | apps/desktop/src/renderer/cindy-brain/GhostMediaLightboxHost.tsx, apps/desktop/src/renderer/components/UpdateNoticeDialog.tsx, apps/desktop/src/renderer/components/feishuBot/FeishuConflictDialog.tsx, apps/desktop/src/renderer/components/feishuBot/FeishuConflictDialogHost.tsx, apps/desktop/src/renderer/components/layout/AppBadgeAttentionSync.tsx, apps/desktop/src/renderer/components/layout/BrowserWebviewPool.tsx, apps/desktop/src/renderer/components/layout/ChromeActions.tsx, apps/desktop/src/renderer/components/layout/ContentHeader.tsx, apps/desktop/src/renderer/components/layout/CredentialStoreBanner.tsx, apps/desktop/src/renderer/components/layout/FadeSwitcher.tsx, apps/desktop/src/renderer/components/layout/GhostPanelWindowLayout.tsx, apps/desktop/src/renderer/components/layout/GlobalDropImportListener.tsx, apps/desktop/src/renderer/components/layout/MainEntryRedirect.tsx, apps/desktop/src/renderer/components/layout/MainLayout.tsx, apps/desktop/src/renderer/components/layout/RightSidebar.tsx, apps/desktop/src/renderer/components/layout/RightSidebarDetach.tsx, apps/desktop/src/renderer/components/layout/RightSidebarMaximize.tsx, apps/desktop/src/renderer/components/layout/RightSidebarToggle.tsx, apps/desktop/src/renderer/components/layout/SidebarWindowLayout.tsx, apps/desktop/src/renderer/components/layout/chromeActionsGeometry.ts, apps/desktop/src/renderer/components/layout/chromeActionsLayout.ts, apps/desktop/src/renderer/components/layout/railChromeActions.ts, apps/desktop/src/renderer/components/layout/windowDrag.tsx, apps/desktop/src/renderer/components/settings/SessionShareImportWizard.tsx, apps/desktop/src/renderer/components/sidebar/AccountSwitcherDialog.tsx, apps/desktop/src/renderer/components/sidebar/AttentionDot.tsx, apps/desktop/src/renderer/components/sidebar/DatabaseSizeWarningBanner.tsx, apps/desktop/src/renderer/components/sidebar/GhostMainViewNavEntries.tsx, apps/desktop/src/renderer/components/sidebar/MobileDownloadDialog.tsx, apps/desktop/src/renderer/components/sidebar/Sidebar.tsx, apps/desktop/src/renderer/components/sidebar/SidebarIconButton.tsx, apps/desktop/src/renderer/components/sidebar/SidebarTopNav.tsx, apps/desktop/src/renderer/components/sidebar/SortableList.tsx, apps/desktop/src/renderer/components/sidebar/UpdateBanner.tsx, apps/desktop/src/renderer/components/sidebar/UserInfoSection.tsx, apps/desktop/src/renderer/components/sidebar/VendorIcon.tsx, apps/desktop/src/renderer/components/sidebar/VendorReadinessBadge.tsx, apps/desktop/src/renderer/components/sidebar/WorktreeBadge.tsx, apps/desktop/src/renderer/components/title-bar/ChromeIconButton.tsx, apps/desktop/src/renderer/components/title-bar/MenuButton.tsx, apps/desktop/src/renderer/components/title-bar/WindowControls.tsx, apps/desktop/src/renderer/features/cc-agent/sidebar/DeviceSectionHeader.tsx, apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectsSection.tsx, apps/desktop/src/renderer/features/right-sidebar/AddTabDropdown.tsx, apps/desktop/src/renderer/features/right-sidebar/EmptyState.tsx, apps/desktop/src/renderer/features/right-sidebar/RightSidebarShell.tsx, apps/desktop/src/renderer/features/right-sidebar/TabBar.tsx, apps/desktop/src/renderer/features/right-sidebar/TabBodyErrorBoundary.tsx, apps/desktop/src/renderer/features/right-sidebar/hooks/useBrowserWebview.ts, apps/desktop/src/renderer/features/right-sidebar/hooks/useNativePopupSurface.ts, apps/desktop/src/renderer/features/right-sidebar/iosSimulatorPluginAvailability.ts, apps/desktop/src/renderer/features/right-sidebar/lib/browserPartition.ts, apps/desktop/src/renderer/features/right-sidebar/lib/browserWebviewPool.ts, apps/desktop/src/renderer/features/right-sidebar/lib/detachedSidebarRouting.ts, apps/desktop/src/renderer/features/right-sidebar/lib/executeSidebarCommand.ts, apps/desktop/src/renderer/features/right-sidebar/lib/iosSimulatorFocusBridge.ts, apps/desktop/src/renderer/features/right-sidebar/lib/lastTurnChangedFiles.ts, apps/desktop/src/renderer/features/right-sidebar/lib/nativePopupTabs.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openBackgroundTasksTab.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openInSidebarBrowser.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openInSidebarFileBrowser.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openRoutinesTab.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openSubagentsTab.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openTerminalShortcut.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openTurnReview.ts, apps/desktop/src/renderer/features/right-sidebar/lib/popupRouter.ts, apps/desktop/src/renderer/features/right-sidebar/lib/popupTabs.ts, apps/desktop/src/renderer/features/right-sidebar/lib/rsbBrowserBridge.ts, apps/desktop/src/renderer/features/right-sidebar/lib/sidebarCommands.ts, apps/desktop/src/renderer/features/right-sidebar/lib/sidebarHostSession.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/BackgroundTasksBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/WorkflowAgentStrip.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/WorkflowProgressTree.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/chatTaskFocusIntent.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/listSessionTasks.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/workflowProgressModel.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/cindy-make/CindyMakeTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/cindy-make/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/FileBrowserBody.css, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/FileBrowserBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/dropExternalFile.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/fileTreeImagePreview.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/useSessionScopedTreeWidth.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/index.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/IOSSimulatorInstanceGrid.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/IOSSimulatorTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/iosSimulatorH264Decoder.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/OrcaWorkersAttentionIcon.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/OrcaWorkersTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/actions.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/closeDecision.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/ResourceUsageBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/resource-usage.css, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/subscription.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/ImageDiffPreview.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/MarkdownDiffPreview.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/PlainUnifiedDiff.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/diffRows.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/highlight.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/inlineDiff.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/useDiffHighlights.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/ReviewTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/diffExpansionPreference.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/fileTree.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/gitApplyCommand.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/markdownPreview.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/useLastTurnFilter.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/useReviewGitState.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/useReviewSource.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/routines/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/ConversationStream.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/DetailView.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/RunList.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/SubagentChrome.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/SubagentToolCard.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/SubagentsBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/subagentChangeFence.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/subagentConversation.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/subagentFormat.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/terminal/TerminalTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/terminal/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/terminal/lib/xtermPool.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserChrome.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserCommentPopover.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/browserCommentEditorDraft.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/lib/parseOmnibox.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/useBrowserComment.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/useLocalHtmlAutoReload.ts, apps/desktop/src/renderer/features/right-sidebar/registry.ts, apps/desktop/src/renderer/features/right-sidebar/store.ts, apps/desktop/src/renderer/features/right-sidebar/types.ts, apps/desktop/src/renderer/layout/LayoutRoot.tsx, apps/desktop/src/renderer/layout/PanelDragController.tsx, apps/desktop/src/renderer/layout/PanelDragPrototype.tsx, apps/desktop/src/renderer/layout/collapsePrefs.ts, apps/desktop/src/renderer/layout/layoutDevTools.ts, apps/desktop/src/renderer/layout/panePlacement.tsx, apps/desktop/src/renderer/layout/paneWidths.tsx, apps/desktop/src/renderer/layout/panelMaximize.tsx, apps/desktop/src/renderer/styles/generated/tokens.css, apps/desktop/src/renderer/styles/globals.css | 153 | 46 | 295 |
| `desktop.skillhub.local` | desktop | SkillHub 本地技能 | hash `/skillhub/local` 及详情 `/skillhub/local/:kind/global/:name`、`/skillhub/local/:kind/project/:projectHash/:name` | InstallTargetPicker, PluginManagementLayout, SkillhubDetailView, SkillhubFeatureLayout, SkillhubHomeView, SkillhubMarketPreviewPanel | apps/desktop/src/renderer/features/plugin/PluginManagementLayout.tsx, apps/desktop/src/renderer/features/skillhub/SkillhubDetailView.tsx, apps/desktop/src/renderer/features/skillhub/SkillhubFeatureLayout.tsx, apps/desktop/src/renderer/features/skillhub/SkillhubHomeView.tsx, apps/desktop/src/renderer/features/skillhub/SkillhubMarketPreviewPanel.tsx, apps/desktop/src/renderer/features/skillhub/components/InstallTargetPicker.tsx | 46 | 0 | 63 |
| `desktop.skillhub.market` | desktop | SkillHub 市场 | hash `/skillhub/market`(SkillhubMarketListView) | InstallTargetPicker, MarketCard, MarketInfoEditDialog, SkillhubMarketListView, SkillhubMarketPreviewPanel, VisibilityEditorDialog | apps/desktop/src/renderer/features/skillhub/SkillhubMarketListView.tsx, apps/desktop/src/renderer/features/skillhub/SkillhubMarketPreviewPanel.tsx, apps/desktop/src/renderer/features/skillhub/components/HomeMarketCard.tsx, apps/desktop/src/renderer/features/skillhub/components/InstallTargetPicker.tsx, apps/desktop/src/renderer/features/skillhub/components/LocalSkillControls.tsx, apps/desktop/src/renderer/features/skillhub/components/MarketCard.tsx, apps/desktop/src/renderer/features/skillhub/components/MarketInfoEditDialog.tsx, apps/desktop/src/renderer/features/skillhub/components/MarketLocalSkills.tsx, apps/desktop/src/renderer/features/skillhub/components/MarketPreviewTree.tsx, apps/desktop/src/renderer/features/skillhub/components/PlatformTagSelector.tsx, apps/desktop/src/renderer/features/skillhub/components/SkillCategoryFilterBar.tsx, apps/desktop/src/renderer/features/skillhub/components/SkillIcon.tsx, apps/desktop/src/renderer/features/skillhub/components/SkillTagList.tsx, apps/desktop/src/renderer/features/skillhub/components/TeamScopePicker.tsx, apps/desktop/src/renderer/features/skillhub/components/VisibilityEditorDialog.tsx | 52 | 0 | 61 |