Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
Merge upstream/main into cindy/inspiring-kalam(解冲突:最近视图与远程/分享收藏并存,配置浮层闸门统一为 customizable)
Zhang Yunjin54d9ff0235a6
diff --cc apps/desktop/src/renderer/__tests__/authContextRace.contract.test.tsindex 0000000000,322542f7fc..4e6d111fa1mode 000000,100644..100644--- a/apps/desktop/src/renderer/__tests__/authContextRace.contract.test.ts+++ b/apps/desktop/src/renderer/__tests__/authContextRace.contract.test.ts@@@ -1,0 -1,126 +1,127 @@@+ // Guard tier: engineering-conventions section 3.2. Existing cross-file+ // credential, permission, protocol, race, and design contracts are isolated+ // from runtime unit tests. No new input or assertion is introduced here.+ import { readFileSync } from 'node:fs';+ import { resolve } from 'node:path';+ import { describe, expect, it } from 'vitest';++ /**+ * Guards renderer auth state transitions. 产品 role 二段式水合已随 /api/me+ * 退役(2026-07):身份即 auth-server membership,不再有"迟到 role 响应"竞态,+ * 这里守住剩余的账号边界语义(切号清会话快照、迟到 initialize 丢弃)。+ */+ describe('AuthContext auth-state races', () => {+ const source = readFileSync(+ resolve(process.cwd(), 'src/renderer/contexts/AuthContext.tsx'),+ 'utf8',+ );+ const appSource = readFileSync(resolve(process.cwd(), 'src/renderer/App.tsx'), 'utf8');++ it('applies identity synchronously and resets session snapshot on account switch', () => {+ expect(source).toContain('activeDataOwnerIdRef.current !== state.dataOwnerId');+ expect(source).toContain('sessionsStore.reset();');+ expect(source).toContain('setUser(incoming);');+ // 防复活:renderer 不得再对业务 server 发起 role/资料水合请求。+ expect(source).not.toContain('meService');+ expect(source).not.toContain('apiRequest<');+ expect(source).not.toContain('getMe(');+ });++ it('repartitions every owner-scoped renderer store at the same boundary', () => {+ // 模型选择器持久轴(模型预设 / 引擎 override / 收藏副本)与 newMakerDraft 同待遇:+ // 同一处、同一个 state.dataOwnerId(登出快照里就是 null)。漏接任一个 = 多账号串号 ——+ // 这正是 providerModelMemory 不分账号踩过的坑,不能在新 store 上重演。+ const applyStart = source.indexOf('const applyIncomingState = useCallback');+ expect(applyStart).toBeGreaterThan(-1);+ const applyBlock = source.slice(applyStart, source.indexOf('[applyIncomingUser]', applyStart));+ for (const call of [+ 'setNewMakerDraftOwner(state.dataOwnerId);',+ 'setProviderModelMemoryOwner(state.dataOwnerId);',+ 'setModelEnginePrefsOwner(state.dataOwnerId);',+ 'setModelFavoritesOwner(state.dataOwnerId);',++ 'setRecentModelsOwner(state.dataOwnerId);',+ ]) {+ expect(applyBlock).toContain(call);+ }+ });++ it('applies the complete owner transition on local-mode boundaries', () => {+ // 本地模式进出同样是一次 dataOwnerId 切换。自己拼半套 setter 会漏草稿 /+ // prompt / 模型可见性 / 记忆分区(2026-08-21 #3201 Codex P1)。行为断言在+ // authContextSessionBoundary.test.tsx。+ for (const entry of ['const enterLocalMode = useCallback', 'const exitLocalMode = useCallback']) {+ const start = source.indexOf(entry);+ expect(start).toBeGreaterThan(-1);+ const block = source.slice(start, source.indexOf('[applyIncomingState, runDataOwnerBoundary]', start));+ expect(block).toContain('applyIncomingState(state);');+ expect(block).not.toContain('setModelEnginePrefsOwner(state.dataOwnerId);');+ }+ });++ it('ignores initialize results after a newer pushed auth event', () => {+ expect(source).toContain('authStateVersionRef.current += 1;');+ expect(source).toContain('authStateVersionRef.current !== initializeVersion');+ });++ it('clears login progress at auth boundaries', () => {+ expect(source).toContain('setLoginState(null);');+ expect(source).toContain('clearWorkersCache();');+ });++ it('publishes a data-owner generation at every auth boundary', () => {+ expect(source).toContain('cancelRemoteOptimisticSendsForDataOwnerBoundary();');+ expect(source).toContain('setDataOwnerGeneration(dataOwnerId, ownerGeneration);');+ expect(source).toContain('recentWorkdirsStore.setDataOwner(getDataOwnerGeneration());');+ expect(source).toContain('invalidateProvidersSnapshot();');+ expect(source).toContain('publishDataOwnerGeneration(');+ expect(source).toContain('{ finalizeSessions: ownerBoundaryCommitted && !initialOwnerHydration }');+ expect(source).toContain(+ '// Invalidate in-flight remote sends before the confirmation dialog resolves.',+ );+ expect(source.match(/publishDataOwnerGeneration\(null\);/g)?.length).toBeGreaterThanOrEqual(2);+ expect(source.indexOf('cancelRemoteOptimisticSendsForDataOwnerBoundary();')).toBeLessThan(+ source.indexOf('setDataOwnerGeneration(dataOwnerId, ownerGeneration);'),+ );+ const enterLocal = source.indexOf('const enterLocalMode = useCallback');+ const exitLocal = source.indexOf('const exitLocalMode = useCallback');+ expect(source.indexOf('applyIncomingState(state);', enterLocal)).toBeLessThan(exitLocal);+ expect(source.indexOf('applyIncomingState(state);', exitLocal)).toBeGreaterThan(exitLocal);+ expect(source).toContain('activeDataOwnerGenerationRef.current');+ expect(source).toContain('setDataOwnerRecoveryEpoch((epoch) => epoch + 1);');+ expect(appSource).toContain("`${dataOwnerId ?? 'signed-out'}:${dataOwnerRecoveryEpoch}`");+ expect(appSource).toContain('<RouterProvider key={ownerKey} router={router} />');+ });++ it('projects browser waiting state before the main-process loopback request settles', () => {+ expect(source).toContain("if (action.type === 'start-browser')");+ expect(source).toContain("setLoginState({ step: 'browser-redirect', label: action.label });");+ });++ it('auto-continues a sole method-choice so fake pickers never paint', () => {+ expect(source).toContain('soleLoginMethod(result.state.methods)');+ expect(source).toContain("type: 'start-browser'");+ expect(source).toContain('providerOrConnectionId: sole.connectionId');+ expect(source).toContain("type: 'request-code'");+ expect(source).toContain("kind: 'email'");+ expect(source).toContain('identifier: result.state.email');+ const projectWaiting = source.indexOf(+ "setLoginState({ step: 'browser-redirect', label: action.label });",+ );+ const autoStart = source.indexOf('soleLoginMethod(result.state.methods)');+ expect(projectWaiting).toBeGreaterThan(-1);+ expect(autoStart).toBeGreaterThan(projectWaiting);+ });++ it('gates the sole-email auto request-code behind the login captcha gate', () => {+ // 唯一邮箱自动发码链不经过 LoginPage 的 dispatchRequestCode 闸;这里必须+ // 先问 loginCaptchaGate(global 开启 captcha 后,不过闸会不带 token 发码+ // 直接吃 400),取消(null)则停在 method-choice 不发码。+ expect(source).toContain("from '@/lib/loginCaptchaGate'");+ const gateAt = source.indexOf('getLoginEmailCaptchaGate()');+ const autoRequestAt = source.indexOf("type: 'request-code'");+ expect(gateAt).toBeGreaterThan(-1);+ expect(gateAt).toBeLessThan(autoRequestAt);+ expect(source).toContain('if (captchaToken === null)');+ expect(source).toContain('captchaToken,');+ });+ });diff --cc apps/desktop/src/renderer/__tests__/unifiedModelPanelRendering.test.tsxindex 1bb68e0f4a,89200ccfdb..1e0c677cc4--- a/apps/desktop/src/renderer/__tests__/unifiedModelPanelRendering.test.tsx+++ b/apps/desktop/src/renderer/__tests__/unifiedModelPanelRendering.test.tsx@@@ -221,13 -219,11 +223,17 @@@ importaddModelFavorite,listModelFavorites,updateModelFavorite,+ setModelFavoritesOwner,} from '@/state/modelFavorites';+import {+ __resetForTest as resetRecentModels,+ listRecentModels,+ recordRecentModel,+ setRecentModelsOwner,+} from '@/state/recentModels';+ import { setDataOwnerGeneration } from '@/contexts/dataOwnerGeneration';+ import { providerShareFavoriteSource, reconcileProviderShareFavorites } from '@/state/providerShareFavorites';+ import { toast } from '@/lib/toast';import { setModelEngineOverride } from '@/state/modelEnginePrefs';const onProviderChange = vi.fn();@@@ -273,9 -269,65 +279,66 @@@ beforeEach(() =>onProviderChange.mockClear();resetEnginePrefs();resetFavorites();+ resetRecentModels();});+ describe('分享模型收藏', () => {+ const received = {+ shareId: 's1', memberId: 'm1', providerId: 'anthropic', providerLabel: 'Anthropic',+ hostDeviceId: 'host', deviceName: 'Host', status: 'active' as const, hostOnline: true, hostCapable: true,+ owner: { displayName: 'Owner', avatarUrl: null, region: 'global' as const },+ };+ beforeEach(() => {+ setDataOwnerGeneration('recipient', 1);+ setModelFavoritesOwner('recipient');+ reconcileProviderShareFavorites({ ownerStamp: { dataOwnerId: 'recipient', ownerGeneration: 1 }, confirmedRegions: ['global'], received: [received] });+ remoteProvidersRef.providers = providersRef.providers.map((provider) => ({ ...provider as object, remoteInvocationEnabled: true }));+ });+ afterEach(() => {+ remoteProvidersRef.providers = [];+ setDataOwnerGeneration(null, 0);+ vi.restoreAllMocks();+ });++ it('点击收藏后可见、可重新选择,完整配置保存在受邀者账号', async () => {+ const onUnifiedSelect = vi.fn();+ renderPanel({ deviceId: 'share:s1', onUnifiedSelect });+ await act(async () => fireEvent.click(within(rowFor('Opus 5')).getByRole('button', { name: '存为收藏' })));+ expect(listModelFavorites()).toEqual([expect.objectContaining({+ providerId: providerShareFavoriteSource(received), modelId: 'claude-opus-5', agent: 'cc', effort: 'medium',+ })]);+ fireEvent.click(document.querySelector('[data-rail-item="favorites"]')!);+ expect(within(screen.getByRole('listbox')).getAllByText('Opus 5')).toHaveLength(1);+ await act(async () => fireEvent.click(rowFor('Opus 5')));+ expect(onUnifiedSelect).toHaveBeenCalledWith(expect.objectContaining({ providerId: 'anthropic', modelId: 'claude-opus-5', engine: 'cc', effort: 'medium', fast: false }));+ });++ it('存储写失败显示提示,收藏区不会出现未保存的条目', async () => {+ const failed = vi.spyOn(toast, 'error').mockImplementation(() => 'test');+ renderPanel({ deviceId: 'share:s1' });+ vi.spyOn(Storage.prototype, 'setItem').mockImplementation(() => { throw new Error('quota'); });+ await act(async () => fireEvent.click(within(rowFor('Opus 5')).getByRole('button', { name: '存为收藏' })));+ expect(failed).toHaveBeenCalledWith('newChat.modelSelector.unified.favoritesSaveFailed');+ expect(listModelFavorites()).toEqual([]);+ });++ it('从分享供应商切到收藏侧栏仍保留分享来源,选择回传完整路由', async () => {+ const onUnifiedSelect = vi.fn();+ renderPanel({+ remoteAgent: { devices: [{ deviceId: 'share:s1', name: '来自 Owner 的分享' }], selectedDeviceId: 'share:s1' },+ onUnifiedSelect,+ });+ await act(async () => fireEvent.click(within(rowFor('Opus 5')).getByRole('button', { name: '存为收藏' })));+ fireEvent.click(document.querySelector('[data-rail-item="favorites"]')!);+ expect(within(screen.getByRole('listbox')).getAllByText('Opus 5')).toHaveLength(1);+ await act(async () => fireEvent.click(rowFor('Opus 5')));+ expect(onUnifiedSelect).toHaveBeenCalledWith(expect.objectContaining({+ providerId: 'anthropic', modelId: 'claude-opus-5', engine: 'cc', effort: 'medium', fast: false,+ agentDevice: expect.objectContaining({ deviceId: 'share:s1' }),+ }));+ });+ });+describe('统一面板 · 打折 GPT-5.6 与 GPT-6 包月互切', () => {const originalProviders = providersRef.providers;const routes = [diff --cc apps/desktop/src/renderer/components/new-chat/UnifiedModelPanel.tsxindex 45c6979f0f,9a9bbbd371..71b4402a5a--- a/apps/desktop/src/renderer/components/new-chat/UnifiedModelPanel.tsx+++ b/apps/desktop/src/renderer/components/new-chat/UnifiedModelPanel.tsx@@@ -77,7 -95,7 +97,8 @@@ const RAIL_ALL: UnifiedRailFilter = { k/** 定宽 sizer 的行不接交互。 */const noop = (): void => {};const NO_FAVORITES: readonly ModelFavoriteItem[] = [];+const NO_RECENT: readonly RecentModelItem[] = [];+ const NO_PROVIDERS: readonly ProviderView[] = [];export interface UnifiedSelectedRow {/** 该行**生效**引擎(推荐 ⊕ override ⊕ 会话内 pinnedEngine ⊕ 收藏副本)。 */@@@ -363,13 -407,40 +419,44 @@@ export function UnifiedModelPanel(}: UnifiedModelPanelProps) {const { t } = useTranslation();const storedFavorites = useModelFavorites();- // 分享来的供应商(`share:<id>`)不是同账号的电脑,没有可同步的收藏:不去读,也不报同步失败。- const remoteFavorites = useRemoteModelFavorites(isProviderShareAgentDeviceId(deviceId) ? undefined : deviceId);- const favorites = selectionPolicy === 'official' ? NO_FAVORITES : deviceId ? remoteFavorites.items : storedFavorites;+ const isSharedProvider = isProviderShareAgentDeviceId(deviceId);+ // 远程 Agent:收藏一律读写任务所在电脑那一份(§1.5),浏览其他电脑的目录时也不读那台自己的收藏;+ // 其余入口照旧 —— 远程控制读被控电脑的列表,本机读本机。+ const favoritesListDeviceId = remoteSources+ ? remoteSources.favoritesDeviceId+ : isSharedProvider ? undefined : deviceId;+ const remoteFavorites = useRemoteModelFavorites(favoritesListDeviceId);+ const sharedFavorites = useProviderShareFavorites(+ deviceId,+ storedFavorites,+ remoteSources?.favoritesDeviceId ? remoteFavorites : undefined,+ );+ const sharedFavoriteSources = useProviderShareFavoriteSources();+ const hasRemoteSources = !!remoteSources;+ const favoritesHomeDeviceId = remoteSources?.homeDeviceId ?? null;+ const agentDeviceFavorites = useAgentDeviceFavorites({+ deviceId: remoteSources?.active && !isSharedProvider ? deviceId : undefined,+ homeDeviceId: favoritesHomeDeviceId,+ home: remoteSources?.favoritesDeviceId+ ? remoteFavorites+ : { items: storedFavorites, store: LOCAL_MODEL_FAVORITE_STORE },+ });+ useEffect(() => {+ if (isSharedProvider || hasRemoteSources) ensureProviderShareReceivedStarted();+ }, [isSharedProvider, hasRemoteSources]);+ // 任务所在电脑收藏的跨区分享,本机可能从没加载过那个区域的名单:按它的区域补一次恢复。+ const homeFavoriteItems = remoteSources?.favoritesDeviceId ? remoteFavorites.items : null;+ useEffect(() => {+ if (homeFavoriteItems) requestProviderShareFavoriteRegions(providerShareFavoriteRegionsOf(homeFavoriteItems));+ }, [homeFavoriteItems]);+ const favorites = selectionPolicy === 'official' ? NO_FAVORITES+ : isSharedProvider ? sharedFavorites.items+ : remoteSources ? agentDeviceFavorites.items+ : deviceId ? remoteFavorites.items : storedFavorites;+ const storedRecentModels = useRecentModels();+ // official 入口(设置页 / create-agent)刻意不展示「最近」:那里的选择动作不记录(见+ // `recordRecentUsage`)也不该被个人流水影响 —— 与收藏区同一条策略门。+ const recentModels = selectionPolicy === 'official' ? NO_RECENT : storedRecentModels;// 引擎 override / 深度 / Fast 三份 store 的版本号:任一变化都要重算行三元组与浮层// (其它窗口的 storage 事件、device-link 推送同样经这两个版本号进来)。远程 Agent 的档位记忆// 是另一份 store,版本号并进 memoryVersion。@@@ -703,7 -813,7 +830,8 @@@buildUnifiedListSections({entries,favorites,+ recentModels,+ ...(resolveDeviceFavorite ? { resolveForeignFavorite: resolveDeviceFavorite } : {}),query,matchesQuery: (entry, q) => matchesModelName({id: entry.modelId, displayName: entry.displayName, description: entry.description,@@@ -715,7 -825,7 +843,7 @@@? { recommendation: { agent: liveEngineAgent, ...selected } }: {}),}),- [entries, favorites, recentModels, query, effectiveRail, effectiveEngineOf, providerOrder, t, scope, liveEngineAgent, selected.modelId, selected.providerId],- [entries, favorites, resolveDeviceFavorite, query, effectiveRail, effectiveEngineOf, providerOrder, t, scope, liveEngineAgent, selected.modelId, selected.providerId],++ [entries, favorites, recentModels, resolveDeviceFavorite, query, effectiveRail, effectiveEngineOf, providerOrder, t, scope, liveEngineAgent, selected.modelId, selected.providerId],);// 打开或切视图时,把模型本体的当前行对齐到可视高度 35% 处;收藏可以滚出顶部。@@@ -909,9 -992,11 +1037,12 @@@optimistic: optimisticConfig,runExternal,} = useUnifiedRowActions({- favoriteStore: deviceId ? remoteFavorites.store : undefined,+ favoriteStore: isSharedProvider+ ? sharedFavorites.store+ : remoteSources ? agentDeviceFavorites.store : deviceId ? remoteFavorites.store : undefined,+ onFavoriteError: () => toast.error(t('newChat.modelSelector.unified.favoritesSaveFailed')),interactionDisabled,+ recordRecentUsage,isLiveRow,// 两笔实时写入(深度 + Fast)里第二笔失败时回滚第一笔用的原值,以及收藏 live 判定// 要比的实时深度 / Fast —— 与 configOf 里「选中行读 live 值」取的是同一个格子。@@@ -1100,14 -1272,14 +1330,15 @@@? buildUnifiedListSections({entries,favorites,+ recentModels,+ ...(resolveDeviceFavorite ? { resolveForeignFavorite: resolveDeviceFavorite } : {}),query: '',rail: RAIL_ALL,effectiveEngineOf,providerOrder,}): [],- [widthSizerActive, entries, favorites, recentModels, effectiveEngineOf, providerOrder],- [widthSizerActive, entries, favorites, resolveDeviceFavorite, effectiveEngineOf, providerOrder],++ [widthSizerActive, entries, favorites, recentModels, resolveDeviceFavorite, effectiveEngineOf, providerOrder],);const panelContent = (@@@ -1228,14 -1402,14 +1461,16 @@@{t('newChat.modelSelector.unified.remoteLoading')}</div>)+ ) : catalogNotice ? (+ catalogNotice) : !hasRows ? (<div className="px-3 py-6 text-center text-13 text-[var(--text-tertiary)]">- {/* ★ 视图的空态是引导语,不是「没有匹配」(设计稿 favEmpty;★ 常驻后必经)。 */}- {effectiveRail.kind === 'favorites' && !query.trim()+ {/* 最近 / ★ 视图的空态是引导语,不是「没有匹配」(设计稿 favEmpty;两格常驻后必经)。 */}+ {!query.trim() && effectiveRail.kind === 'favorites'? t('newChat.modelSelector.unified.favoritesEmpty')- : t('newChat.modelSelector.search.noResults')}+ : !query.trim() && effectiveRail.kind === 'recent'+ ? t('newChat.modelSelector.unified.recentEmpty')+ : t('newChat.modelSelector.search.noResults')}</div>) : (sections.map((section) => (@@@ -1254,9 -1428,10 +1489,10 @@@<span className="truncate">{sectionLabel(section)}</span></div>{section.rows.map((row) => {+ if (row.agentDeviceId) return renderDeviceFavoriteRow(row, false);const config = withOptimisticConfig(row.anchor,- configOf(row.entry, row.favorite),+ configOf(row.entry, row.favorite ?? row.recent),optimisticConfig,);const key = anchorKey(row.anchor);@@@ -1296,8 -1442,8 +1532,8 @@@entry={row.entry}anchor={row.anchor}config={config}- {...(effectiveRail.kind === 'all' || effectiveRail.kind === 'favorites'+ {...(showsSourceRow- ? { sourceLabel: providerLabel(row.entry.providerId) }+ ? { sourceLabel: aggregateSourceLabel(row.entry.providerId) }: {})}selected={isSelectedRow(row.anchor, row.entry)}active={sameAnchor(flyAnchor, row.anchor)}@@@ -1306,9 -1452,6 +1542,11 @@@{...(priceDisplay ? { priceDisplay } : {})}configurationEnabled={configurationEnabled}+ // 最近行是只读的配置副本(流水账):不在这一页改配置,也没有配置浮层+ // (引擎 / 深度 / Fast 由记录时的选择决定,改配置走模型行或收藏)。- customizeEnabled={!recentRow}++ // 不出配置浮层的行(最近行只读副本、设置类入口)一律 customizable=false:++ // 按钮、← 快捷键与右键浮层都由这一个闸门收掉,不宣告存在却无响应。++ customizable={configurationEnabled && !recentRow}interactionDisabled={interactionDisabled ||actionPending ||@@@ -1380,7 -1507,8 +1618,8 @@@<span className="truncate">{sectionLabel(section)}</span></div>{section.rows.map((row) => {+ if (row.agentDeviceId) return renderDeviceFavoriteRow(row, true);- const config = configOf(row.entry, row.favorite, RAIL_ALL);+ const config = configOf(row.entry, row.favorite ?? row.recent, RAIL_ALL);const priceDisplay = priceDisplayOf(row.entry, config);return (<UnifiedModelRowdiff --cc apps/desktop/src/renderer/components/new-chat/UnifiedModelRail.tsxindex 57a26e571f,3c4649eff8..a172b31b15--- a/apps/desktop/src/renderer/components/new-chat/UnifiedModelRail.tsx+++ b/apps/desktop/src/renderer/components/new-chat/UnifiedModelRail.tsx@@@ -91,25 -100,46 +100,48 @@@ export function UnifiedModelRail(item.kind === 'remote-provider'? item.deviceId: remoteSources- ? null+ ? (remoteSources.localUsageDeviceId ?? null): (providerUsage?.deviceId ?? null);+ // 供应商组那一格代表组里的几台电脑:任务正经组在某台运行时读那台的账号(与输入框下方的用量+ // 一致),还没分到电脑时不显示某一台的配额;悬停多写一句说明是哪台。+ const groupUsage =+ provider && (item.kind === 'provider' || item.kind === 'remote-provider')+ ? (providerGroupUsage?.(+ item.kind === 'remote-provider' ? item.deviceId : null,+ item.providerId,+ ) ?? null)+ : null;+ const usageProvider = groupUsage+ ? groupUsage.kind === 'running'+ ? groupUsage.usage?.provider+ : undefined+ : provider;const accountIdentity =- provider?.openAiAccount?.identity?.trim() ||- provider?.subscriptionAccount?.identity?.trim();+ usageProvider?.openAiAccount?.identity?.trim() ||+ usageProvider?.subscriptionAccount?.identity?.trim();+ const groupNote = groupUsage+ ? groupUsage.kind !== 'running'+ ? t('newChat.modelSelector.unified.providerGroupUnassigned')+ : groupUsage.deviceName === null+ ? t('newChat.modelSelector.unified.providerGroupRunningHere')+ : t('newChat.modelSelector.unified.providerGroupRunningOn', {+ device: groupUsage.deviceName,+ })+ : undefined;const label =- item.kind === 'favorites'- ? t('newChat.modelSelector.unified.railFavorites')- : item.kind === 'engine'- ? t('newChat.modelSelector.unified.railSameEngine', {- agent: engineOption?.label ?? '',- })- : item.kind === 'all'- ? t('newChat.modelSelector.unified.railAll')- : item.kind === 'remote-provider'- ? (remoteSources?.labelOf(item.deviceId, item.providerId) ?? item.providerId)- : (remoteSources?.localProviderLabel ?? providerLabel)(item.providerId);+ item.kind === 'recent'+ ? t('newChat.modelSelector.unified.railRecent')+ : item.kind === 'favorites'+ ? t('newChat.modelSelector.unified.railFavorites')+ : item.kind === 'engine'+ ? t('newChat.modelSelector.unified.railSameEngine', {+ agent: engineOption?.label ?? '',+ })+ : item.kind === 'all'+ ? t('newChat.modelSelector.unified.railAll')+ : item.kind === 'remote-provider'+ ? (remoteSources?.labelOf(item.deviceId, item.providerId) ?? item.providerId)+ : (remoteSources?.localProviderLabel ?? providerLabel)(item.providerId);return (<div key={key} className="contents">{separatorBefore && (@@@ -125,14 -156,14 +158,18 @@@itemKey={key}onClick={() => onSelect(item)}disabled={interactionDisabled}- provider={providerUsage ? provider : undefined}- usageDeviceId={usageDeviceId}+ provider={providerUsage ? usageProvider : undefined}+ usageDeviceId={+ groupUsage?.kind === 'running' && groupUsage.usage+ ? groupUsage.usage.scope.deviceId+ : usageDeviceId+ }>- {item.kind === 'favorites' ? (+ {item.kind === 'recent' ? (+ // 最近格用 History(时钟 + 回拨箭头)表达「用过的时间序」,与 ★ 的「钉住」+ // 语义区分;与其它非激活格同灰,hover 提亮,不抢视线。+ <History size={16} />+ ) : item.kind === 'favorites' ? (// ☆ 未激活与其它格同灰(hover 提亮)—— 常亮金色会在没进收藏视图时也// 抢视线(2026-08-14 实机自查);激活时整格反色 + 实心星跟随 currentColor。<Star size={16} fill={isActive ? 'currentColor' : 'none'} />diff --cc apps/desktop/src/renderer/components/new-chat/UnifiedModelRow.tsxindex 66eba24aa2,12b130edc0..fcbc7abddd--- a/apps/desktop/src/renderer/components/new-chat/UnifiedModelRow.tsx+++ b/apps/desktop/src/renderer/components/new-chat/UnifiedModelRow.tsx@@@ -128,9 -125,7 +125,8 @@@ export function UnifiedModelRow('data-state': active ? 'open' : selected ? 'checked' : undefined,'data-unified-anchor': anchorKey(anchor),onContextMenu: (event: ReactMouseEvent<HTMLDivElement>) => {- // 没有配置入口的行(付费行 / 最近行 / 设置类入口)**不抢**右键:不 preventDefault,- // 把原生菜单留给用户,否则右键变成「什么都不发生、原生菜单也被吃掉」(2026-09-16 review P1)。- if (!customizeEnabled || !configurationEnabled || interactionDisabled || paymentRequired) return;- if (interactionDisabled || paymentRequired) return;++ // 不出配置浮层的行(远程收藏 / 最近行 / 设置类入口)不抢原生右键菜单。++ if (interactionDisabled || paymentRequired || !customizable) return;event.preventDefault();openConfig(event.currentTarget);},diff --cc apps/desktop/src/renderer/components/new-chat/unifiedModelSelection.tsindex ee3094dc87,d3b49cf45b..b2aef724ff--- a/apps/desktop/src/renderer/components/new-chat/unifiedModelSelection.ts+++ b/apps/desktop/src/renderer/components/new-chat/unifiedModelSelection.ts@@@ -393,10 -379,40 +393,42 @@@ export function buildUnifiedRailexport interface UnifiedListRow {anchor: UnifiedAnchor;entry: UnifiedModelEntry;- /** 收藏区行才有;模型行为 undefined。 */+ /** 收藏区行才有;模型行 / 最近行没有。 */favorite?: ModelFavoriteItem;+ /** 最近视图行才有(配置副本 + usedAt);其余行没有。 */+ recent?: RecentModelItem;+ /**+ * 收藏区里「在另一台电脑上运行」的收藏(远程 Agent):entry 来自那台电脑的目录,favorite 的+ * providerId 已还原成那台的真实 id。没有这个字段 = 本目录的行。+ */+ agentDeviceId?: string;+ /** 那台电脑的目录此刻读不到:行照常列出但不可选(entry 只是按收藏拼出的占位)。 */+ unavailable?: true;+ }++ /** 收藏区里本目录之外的那一条:由调用方按那台电脑的目录解析(见 buildUnifiedListSections)。 */+ export interface ForeignFavoriteRow {+ entry: UnifiedModelEntry;+ favorite: ModelFavoriteItem;+ agentDeviceId: string;+ unavailable?: true;+ }++ /**+ * 另一台电脑的目录还没读到时,按收藏条目拼一个只用来展示的行(名字 = 模型 id,引擎 = 收藏存的那个,+ * 没有任何能力):行不可选,目录到了自然换成真条目。+ */+ export function unavailableFavoriteEntry(item: ModelFavoriteItem): UnifiedModelEntry {+ const agent = agentKindOfEngine(item.agent);+ return {+ providerId: item.providerId,+ modelId: item.modelId,+ displayName: item.modelId,+ candidates: [agent],+ recommended: agent,+ nativeAgent: null,+ capabilities: {},+ };}export interface UnifiedListSection {@@@ -575,8 -565,41 +613,37 @@@ export function buildUnifiedListSection// ── 收藏区 ── 恒置顶,在任何 rail 视图下都显示;按供应商筛选时只留该来源的收藏。const favRows: UnifiedListRow[] = [];for (const item of favorites) {+ const foreign = args.resolveForeignFavorite?.(item);+ if (foreign) {+ if (railProviderFilterId(rail) !== null) continue;+ if (+ rail.kind === 'engine' &&+ (effectiveEngineOf+ ? effectiveEngineOf(foreign.entry, foreign.favorite)+ : foreign.favorite.agent) !== engineOfAgentKind(rail.agent)+ )+ continue;+ if (!matches(foreign.entry, q)) continue;+ favRows.push({+ anchor: {+ kind: 'fav',+ uid: item.uid,+ providerId: foreign.favorite.providerId,+ modelId: foreign.favorite.modelId,+ },+ entry: foreign.entry,+ favorite: foreign.favorite,+ agentDeviceId: foreign.agentDeviceId,+ ...(foreign.unavailable ? { unavailable: true as const } : {}),+ });+ continue;+ }- // 老收藏可能存的是某个引擎的 wire id(合并行之前的行身份就是 wire id):先按归一化 id- // 精确命中,失配再按「任一引擎的 wire id」扫一遍 —— 否则升级后老收藏会整条消失。- const entry =- byKey.get(entryKeyOf(item.providerId, item.modelId)) ??- entries.find(- (candidate) =>- candidate.providerId === item.providerId && entryMatchesModelId(candidate, item.modelId),- );++ // 老收藏可能存的是某个引擎的 wire id(合并行之前的行身份就是 wire id):解析口径与最近视图++ // 共用 resolveStoredEntry(先按归一化 id 精确命中,失配再按「任一引擎的 wire id」扫一遍)——++ // 否则升级后老收藏会整条消失。+ const entry = resolveStoredEntry(item.providerId, item.modelId);- // 收藏指向的模型已不可路由(来源断开 / 目录下架)→ 本轮不显示。+ // 收藏指向的模型已不可路由(来源断开 / 目录下架)→ 本轮不显示;**不删条目**:+ // 连回来就该回来,静默删掉用户存过的配置是不可逆的。if (!entry) continue;const railProviderId = railProviderFilterId(rail);if (railProviderId !== null && entry.providerId !== railProviderId) continue;diff --cc apps/desktop/src/renderer/components/new-chat/useUnifiedRowActions.tsindex 5e7553c655,44796f4ea1..66828c0d60--- a/apps/desktop/src/renderer/components/new-chat/useUnifiedRowActions.ts+++ b/apps/desktop/src/renderer/components/new-chat/useUnifiedRowActions.ts@@@ -401,44 -391,25 +402,62 @@@ export function useUnifiedRowActions(opupdate: updateModelFavorite,remove: removeModelFavorite,};+ const favoriteWrite = (write: () => void | Promise<void>): void | Promise<void> => {+ try {+ const result = write();+ if (result) return result.catch((error: unknown) => {+ options.onFavoriteError?.();+ throw error;+ });+ } catch (error) {+ options.onFavoriteError?.();+ throw error;+ }+ };+ const favorites: FavoriteStore = {+ get: favoriteStore.get,+ add: (config) => favoriteWrite(() => favoriteStore.add(config)),+ update: (uid, patch) => favoriteWrite(() => favoriteStore.update(uid, patch)),+ remove: (uid) => favoriteWrite(() => favoriteStore.remove(uid)),+ };+ /**+ * 「最近使用」的唯一记录点:选择**真的应用成功**之后才记 —— 取消确认 / 写入失败 / 抛错都+ * 不记(与收藏锚点「成功才落」同一条规则)。void 视为成功(调用方既有约定);同步 / 异步+ * 结果都接住,并把原结果原样传回去(调用方还要靠 false 决定留不留面板)。+ *+ * 记的是**归一化行身份 + 那一刻生效的整份配置**(引擎 / 深度 / Fast):最近 = 配置副本,+ * 与收藏同一套语义(见 recentModels 文件头),星标也按这份副本与收藏做完全匹配。+ * 缺省字段不落快照(effort 无所谓「跟随推荐」/ fast 关闭)。+ */+ const rememberRecentModel = (+ result: ActionResult,+ entry: UnifiedModelEntry | undefined,+ config: UnifiedRowConfig,+ ): ActionResult => {+ if (!recordRecentUsage || !entry) return result;+ // 归属代次在**发起选择时**捕获:选择可能是异步的(跨引擎事务、远程写),回调落地时用户+ // 可能已经登出 / 切到本地模式。那种情况下绝不能把 A 的一条模型记录写进 B 的分区+ // (2026-09-16 review P1:跨账号串写)。归属变了就整条丢弃 —— 少一条快捷方式远好于串号。+ const ownerAtSelect = getRecentModelsOwner();+ const commit = (applied: void | boolean): void | boolean => {+ if (applied !== false && getRecentModelsOwner() === ownerAtSelect) {+ recordRecentModel({+ providerId: entry.providerId,+ modelId: entry.modelId,+ agent: config.engine,+ ...(config.effort ? { effort: config.effort } : {}),+ ...(config.fast ? { fast: true as const } : {}),+ });+ }+ return applied;+ };+ if (result && typeof result === 'object' && 'then' in result) {+ return Promise.resolve(result).then(commit);+ }+ return commit(result);+ };+// ── 「把一份配置真的应用到正在跑的那一份上」的三条链路 ─────────────────────// 恢复推荐(§1.4)与「删除当前选中的收藏」(§1.5)是同一件事的两个入口:都要把行回落到// 默认 / 推荐配置。三条链路抽在这里,两个入口共用 —— 各写一遍必然漂移成「恢复推荐会diff --cc apps/desktop/src/renderer/i18n/locales/en/common.jsonindex 58ad4731b1,ad41f5aa96..164d41da12--- a/apps/desktop/src/renderer/i18n/locales/en/common.json+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json@@@ -9432,9 -10516,10 +10517,12 @@@"railAll": "All","railRemoteProvider": "{{provider}} · {{device}}","remoteLoading": "Loading models from that computer…",+ "remoteFavoriteUnavailable": "{{source}} · Can't read that computer's models right now","favoritesGroup": "Favorites",+ "recentGroup": "Recent",+ "recentEmpty": "No recent models yet — pick a model and it will show up here",+ "favoritesSaveFailed": "Could not save favorite changes",+ "favoritesCleanupFailed": "Could not remove favorites for revoked provider shares","favoritesEmpty": "No favorites yet — hover a model and hit ☆ to pin it here","addFavorite": "Save to favorites","customize": "Customize",diff --cc apps/desktop/src/renderer/i18n/locales/ja/common.jsonindex 71e295adb5,1d9698633f..46a249a2ec--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json@@@ -9412,9 -10469,10 +10470,12 @@@"railAll": "すべて","railRemoteProvider": "{{provider}} · {{device}}","remoteLoading": "そのパソコンのモデルを読み込み中…",+ "remoteFavoriteUnavailable": "{{source}} · そのパソコンのモデルを読み込めません","favoritesGroup": "お気に入り",+ "recentGroup": "最近",+ "recentEmpty": "最近使ったモデルはまだありません——モデルを選ぶとここに表示されます",+ "favoritesSaveFailed": "お気に入りの変更を保存できませんでした",+ "favoritesCleanupFailed": "共有が解除されたモデルのお気に入りを削除できませんでした","favoritesEmpty": "お気に入りはまだありません——モデルの行にカーソルを合わせて ☆ で保存できます","addFavorite": "お気に入りに保存","customize": "カスタマイズ",diff --cc apps/desktop/src/renderer/i18n/locales/ko/common.jsonindex 7cbccdeb2d,f53245a63b..12b14aa777--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json@@@ -9412,9 -10469,10 +10470,12 @@@"railAll": "전체","railRemoteProvider": "{{provider}} · {{device}}","remoteLoading": "그 컴퓨터의 모델을 불러오는 중…",+ "remoteFavoriteUnavailable": "{{source}} · 그 컴퓨터의 모델을 불러올 수 없음","favoritesGroup": "즐겨찾기",+ "recentGroup": "최근",+ "recentEmpty": "최근 사용한 모델이 없습니다 — 모델을 선택하면 여기에 표시됩니다",+ "favoritesSaveFailed": "즐겨찾기 변경 사항을 저장하지 못했습니다",+ "favoritesCleanupFailed": "공유가 해제된 모델의 즐겨찾기를 삭제하지 못했습니다","favoritesEmpty": "즐겨찾기가 없습니다 — 모델 행에 마우스를 올리고 ☆를 눌러 저장하세요","addFavorite": "즐겨찾기에 저장","customize": "사용자 지정",diff --cc apps/desktop/src/renderer/i18n/locales/zh-CN/common.jsonindex cd6ff8d83b,8a639c6b87..e1c7eb5257--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json@@@ -9412,9 -10469,10 +10470,12 @@@"railAll": "全部","railRemoteProvider": "{{provider}} · {{device}}","remoteLoading": "正在读取那台电脑的模型…",+ "remoteFavoriteUnavailable": "{{source}} · 暂时读不到那台电脑的模型","favoritesGroup": "收藏",+ "recentGroup": "最近",+ "recentEmpty": "还没有最近使用——选一个模型后,它会出现在这里",+ "favoritesSaveFailed": "未能保存收藏更改",+ "favoritesCleanupFailed": "未能清理已失效的分享模型收藏","favoritesEmpty": "还没有收藏——把鼠标停到模型行上,点 ☆ 存到这里","addFavorite": "存为收藏","customize": "自定义",diff --cc apps/desktop/src/renderer/i18n/locales/zh-TW/common.jsonindex 2daa3d3f3b,00bffc8295..7231e1ebe1--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json@@@ -9411,9 -10468,10 +10469,12 @@@"railAll": "全部","railRemoteProvider": "{{provider}} · {{device}}","remoteLoading": "正在讀取那臺電腦的模型…",+ "remoteFavoriteUnavailable": "{{source}} · 暫時讀不到那臺電腦的模型","favoritesGroup": "收藏",+ "recentGroup": "最近",+ "recentEmpty": "還沒有最近使用——選一個模型後,它會出現在這裡",+ "favoritesSaveFailed": "未能儲存收藏變更",+ "favoritesCleanupFailed": "未能清理已失效的分享模型收藏","favoritesEmpty": "還沒有收藏——把滑鼠停到模型列上,點 ☆ 存到這裡","addFavorite": "存為收藏","customize": "自訂",diff --cc apps/desktop/src/renderer/state/modelFavorites.tsindex 940b977dfd,0932d761a0..bf43211892--- a/apps/desktop/src/renderer/state/modelFavorites.ts+++ b/apps/desktop/src/renderer/state/modelFavorites.ts@@@ -81,9 -78,20 +81,12 @@@ import { createStorageReconciler } frolet requireDurableWrite = false;const STORAGE_KEY = 'xdt:modelFavorites:v1';+ // Shared sources contain two 128-character IDs and a 256-character provider ID.+ // JSON may expand each provider code unit to six characters (unpaired surrogates).+ export const LOCAL_FAVORITE_PROVIDER_ID_MAX_LENGTH = 2048;-/** 一条收藏所描述的完整配置(不含锚点)。 */-export interface ModelFavoriteConfig {- providerId: string;- modelId: string;- agent: ModelEngine;- /** 思考深度**档位 key**('low' | 'high' | …);缺省 = 跟随该 (模型, 引擎) 的推荐档。 */- effort?: Effort;- /** Fast(插队加速)。**只在开启时存 true**,关闭即缺省 —— 不落「等于默认」的快照。 */- fast?: true;-}+/** 一条收藏所描述的完整配置(不含锚点)。归一化 / 身份规则与最近使用共用(见 modelConfigCopy)。 */+export type ModelFavoriteConfig = ModelConfigCopy;/** 落盘 / 消费的收藏条目:配置 + 独立锚点 uid。 */export interface ModelFavoriteItem extends ModelFavoriteConfig {diff --cc docs/product-rules/model-selector-unified.mdindex c58398404b,f3554b9848..8c04c4cbb2--- a/docs/product-rules/model-selector-unified.md+++ b/docs/product-rules/model-selector-unified.md@@@ -23,9 -23,9 +23,10 @@@- **A 版是新旧用户唯一的模型选择面板**(2026-09-05)。删除 B 版与样式切换入口,不再读取历史 `xdt:modelPickerLayout:v1` 偏好,升级无需手动切换。仅在老被控端 capabilities-only 时保留兼容列表。固定引擎表单同样使用 A,候选锁定在该表单实际能保存的引擎。- 全局入口:聊天、新任务、定时任务、IM 默认、Hook 工作目录、Worker、Subagent、视觉桥、辅助模型与插件快问快答复用同一面板。只存模型的入口不开放深度 / Fast 配置;仅存单引擎配置的入口不能选择其他引擎。专用模型白名单不得因界面统一而扩大,远程模型与来源来自被控端目录,不能写入本机记忆。+ - 协同 Worker 的面板与新任务一样列出远程供应商(2026-10-10):任务所在电脑的供应商之后接其他电脑与分享来的供应商,选中哪一行,Worker 的 Agent 就在哪台运行,默认选中 Lead 的位置。Desktop、Desktop 远程控制与 Mobile 同口径;远程那几行的档位记在本机为那台单独记的一份,不进本机 Worker 偏好。- 模型选择、配置编辑与“跟随默认”均等待保存结果;失败保留面板与原配置。选模型或跟随默认成功才收起,配置编辑保持浮层打开。无模型记忆表的设置入口编辑非当前模型时,直接应用其完整配置。已有待生效配置时再次远程选模,先展示最新用户选择;运行时当前配置的来源、模型、引擎、深度与 Fast 始终来自同一快照。-- 结构:搜索框贴顶 → 左侧 rail(★收藏 / 全部 / 各供应商图标) → 右侧列表 → 底部「+配置模型」。+- 结构:搜索框贴顶 → 左侧 rail(最近 / ★收藏 / 全部 / 各供应商图标) → 右侧列表 → 底部「+配置模型」。+ 「最近」格在 ★ 之上(2026-09-16 裁决),与 ★ 一样常驻,图标用时钟回弹箭头(History),点击进入**独立的最近视图**;空列表时显示引导空态。常规视图(全部 / 各供应商 / 同引擎)**不**陈列最近区(与收藏上下叠放会产生视觉歧义)。- 列表主体固定高 428px(指定可见行数的入口按其既有高度配置),不随供应商筛选、收藏、搜索或空结果改变高度;窗口空间不足时按可用高度收缩。模型列表与供应商侧栏分别内部滚动,搜索与底部操作保持可见。- Mobile 从模型详情或来源子页返回时,保留进入前的列表滚动位置、搜索词与来源筛选,不重新初始化列表。iOS 保留原生 Form,Android 保留原列表 SheetSurface;详情使用独立滚动容器,隐藏列表禁止交互与读屏访问,不叠加第二个 Modal。完整关闭后重新打开仍沿用原有初始化规则。- 宽度自适应:`max-content`,min 300px / max min(460px, 100vw-48px);优先保持紧凑,超出可用宽度的模型名显示省略号,hover title 保留全名,不为显示完整名称继续加宽(2026-09-17 截断原则;2026-09-21 将上限从 420px 调整为 460px,以完整显示「Codex GPT-6 Astra」量级的名称)。字段形态仍绑定字段宽度;视口和锚点可用空间不足时继续收缩。@@@ -67,8 -66,10 +68,11 @@@### 1.5 收藏 = 配置副本- **远程收藏按被控电脑共享**:Desktop 与 Mobile 连接同一台电脑时读取和修改该电脑当前账号的既有收藏。各被控电脑独立,不将控制端的本机收藏套用或自动合并到远端。收藏以单条新增、条件编辑、条件删除同步,等持久化确认后反馈成功;并发修改同一副本时拒绝旧快照覆盖,重读后再编辑。断线、账号切换、旧版不支持时不得声称已同步;不自动重试写操作,也不影响会话和连接恢复。+ - **其他电脑上的模型照样收藏**(2026-10-13):同账号另一台电脑开放了远程调用的模型,收藏、编辑、取消收藏与本机模型完全一样,用户不用关心模型在哪台电脑上运行。收藏仍存在被控电脑上,运行位置编进来源(`agent-device-favorite:["<电脑>","<供应商>"]`,见 `packages/device-link/src/modelFavorites.ts`),不另加字段——旧版解析会丢掉不认识的字段,把那台电脑的供应商当成被控电脑的同名供应商而派错地方;编进来源后旧版只把这条当作不认识的供应商藏起来。它与本机收藏排在同一个收藏区,说明行带电脑名以区分本机同名模型;选中即在那台电脑运行。同一模型在本机与那台电脑上的收藏互不匹配。那台电脑离线(包括只因任务的 Agent 在那台、靠缓存目录留在列表里)、关闭远程调用、供应商被收进供应商组,或那台电脑上已没有这个模型时先不显示,收藏本身保留;Desktop 在那台电脑仍在列表里、目录还在读取或读取失败时置灰显示,Mobile 等目录读到后再显示。Desktop 收藏区里这类条目不弹参数浮层,参数在那台电脑的视图里调;已建任务的 Agent 已在那台电脑上时,点它先切到那台电脑的视图,再点一次应用。Mobile 暂不支持收藏分享来的模型。+ - **Desktop 收藏视图不随浏览来源切换**(2026-10-13):★ / 全部统一展示任务所在电脑收藏的本机、同账号远程与分享模型,保持收藏顺序;点任何供应商图标时,收藏区与模型区都只显示该连接的条目,同品牌不同电脑、不同分享互不混用。分享收藏沿用带分享与成员身份的既有存储键,仅在原授权可用且对应目录包含模型时解析;浏览分享时点 ★ 同样返回聚合收藏。远控任务的分享收藏也读写被控电脑,不能写入控制端收藏。侧栏仍为供应商图标,不增加设备标题;配置与选择交互沿用既有路径。实现及回归见 `UnifiedModelPanel.tsx`、`providerShareFavorites.ts` 与 `remoteAgentDeviceFavoritesPanel.test.tsx`。+ - Desktop 行/浮层的 ☆ 是**单向「添加副本」动作**:把当前生效配置(模型+引擎+深度+Fast)拷进收藏区,点亮 0.7s 反馈后恢复;源头行不持有收藏态。重复添加去重。+- Desktop 行/浮层的 ☆ 是**单向「添加副本」动作**:把当前生效配置(模型+引擎+深度+Fast)拷进收藏区,点亮 0.7s 反馈后恢复;源头行不持有收藏态。重复添加去重。**例外**:最近视图的行(§1.2)是配置副本的流水,星标按同一条目已匹配到的收藏亮/灭并可点星取消(点星=删那条收藏,删除口径与收藏视图一致);普通模型行与收藏行的上述契约不变。- **Mobile 收藏与参数调整分开**(用户确认交互原型,2026-10-02):按来源、模型、引擎、推理强度与 Fast 完整匹配已保存副本,展示当前配置摘要。空心星标对应「收藏此配置」,保存确认后保持实心星标并显示「已收藏 · 点击取消」;再次点击只删除匹配的副本,所有入口都保持当前配置与详情页,不触发恢复推荐。模型目录 ID 与同一条目的 wire ID 视为同一模型,不把已失效档位或不可用 Fast 自动降级后当成匹配。状态跟随被控端收藏快照,失败保留原状态并允许重试。- Mobile 从普通模型或收藏进入详情,普通参数调整均保存模型偏好;当前选中模型继续走完整配置应用与取消/失败回滚规则。原收藏不变,配置不再匹配时星标回到空心,并提示「参数已调整,原收藏保留」。再次收藏新增独立副本。从收藏打开时提供「编辑原收藏」,参数先留在编辑草稿,点击「保存收藏」才更新原条目,且不改变正在使用的配置。取消编辑不落库;保存失败保留编辑内容;原收藏被远端修改或删除时拒绝旧编辑覆盖,相同配置去重。实现与回归见 `UnifiedModelPickerSheet.tsx`、`unifiedMobilePicker.test.tsx`、`unifiedMobilePickerView.test.tsx`。- 每条收藏有**独立锚点 uid**,浮层绑定与删除按 uid 区分;收藏不显示选中底色或勾;选中态只出现在模型本体上。配置编辑仍核对来源、模型、引擎、深度、Fast 与实际配置。同模型多条目互不牵连。