makecindy / makecindy/cindy

[Bug] 设置-模型供应商:模型行开关与「全部隐藏」点击无响应

Open
#2,814 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

**提交人**: 出发吧揪揪
**客户端版本**: 0.1.50

---

## 现象
在「设置 → 模型供应商」的模型列表里,点击**每行模型右侧的开关**或顶部**「全部隐藏」**按钮,界面没有任何反应(无视觉变化、无错误提示、状态不持久化)。同一列表中,每行 `⋯` 菜单的「停用此模型」功能正常。

## 复现步骤
1. 打开「设置 → 模型供应商」,进入任一已连接供应商的模型列表;
2. 点击任意一行模型右侧的开关,或顶部的「全部隐藏」按钮;
3. 观察:开关不切换,模型仍留在「在模型选择中显示」区域,重启后状态依旧。

## 期望行为
点击开关/「全部隐藏」后,对应模型应从模型选择器中隐藏、移入「已停用」分组,并持久保存。

## 实际行为
点击无任何反馈、无错误提示、无持久化;重启应用后仍为原样。

## 复现频率
稳定复现。重装/升级到当前版本后开始出现;旧版本此功能正常。

## 已尝试
- 彻底重启应用:无效(未创建标记文件前);
- 手动补建 `%APPDATA%\Cindy\model-visibility-renderer-legacy-owner.v1.json`(`{"version":1,"ownerKey":""}`)后重启:恢复可用。

## 脱敏诊断摘要(用户同意公开)
- 两条通道不同:「停用此模型」走 `maker:model-disable:set`(写 `model-disable-prefs.json`),正常;开关/「全部隐藏」走跨设备的 `maker:model-visibility:sync`(可见性表 `xdt:modelVisibilityPrefs:v1`),异常。
- 可见性表写入入口有 `if (!readyForWrites()) return;` 的静默短路:声明不通过时直接返回、无报错。
- 可写性由 `claimLegacyModelVisibilityOwner()` 决定,要求用户数据目录下的 `model-visibility-renderer-legacy-owner.v1.json` 标记存在且 ownerKey 匹配(或独占权限下自动创建)。异常机器上该标记从未被创建(同目录下同构的 `sidebar-renderer-legacy-owner.v1.json` 正常存在),声明持续失败 → 开关静默 no-op。
- 相关启动日志曾出现 `App session is switching` / `owner boundary not durably stable` / `db worker transport closed`,推测首次声明时会话/所有者边界不稳定导致静默失败,且应用未自动重试修复。
- 手动创建标记文件后恢复;应用自身不会自动修复该状态。
---
**版本区域**: CN
**OS**: win32 x64 (10.0.26200)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Trace the row switch and “全部隐藏” handlers into maker:model-visibility:sync, then inspect readyForWrites() and claimLegacyModelVisibilityOwner(), including model-visibility-renderer-legacy-owner.v1.json. Compare this with the working maker:model-disable:set and sidebar-renderer-legacy-owner.v1.json paths, and review the reported startup/session logs. Done means visibility changes work, persist across restart, and recover without manual file creation.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.