Skip to content

fix: 修复短篇人物概览标题未只读及空标题保存报错问题 - #6

Open
zhiwu215 wants to merge 1 commit into
swjybky:mainfrom
zhiwu215:fix/short-workspace-overview-title-readonly
Open

fix: 修复短篇人物概览标题未只读及空标题保存报错问题#6
zhiwu215 wants to merge 1 commit into
swjybky:mainfrom
zhiwu215:fix/short-workspace-overview-title-readonly

Conversation

@zhiwu215

Copy link
Copy Markdown
Contributor

Fixes #5

核心改动

  1. 只读保护:在 RightEditorPane.vue 中完善 isTitleReadOnly 计算属性,将短篇人物概览(characterFileKind === 'overview')及剧情阶段(plotStageOrder)纳入只读保护,禁止用户误点击和编辑。
  2. 防空拦截:在 useCatalogDocumentPersistence.ts 和编辑器手动保存中增加非空标题校验,自动保存检测到空标题时静默跳过,避免骚扰弹窗。
  3. 错误友好化:在 ui-feedback.ts 中增加错误格式化降级,将底层意外冒泡的 Zod JSON 数组自动转译为友好中文提示。

改动文件列表

  • apps/desktop/src/renderer/src/components/RightEditorPane.vue:添加概览只读控制与手动保存非空校验;
  • apps/desktop/src/renderer/src/composables/useCatalogDocumentPersistence.ts:持久化前置拦截空标题;
  • apps/desktop/src/renderer/src/ui-feedback.ts:增加 Zod Issue JSON 转译器;
  • apps/desktop/src/renderer/src/components/RightEditorPane.test.ts:更新只读状态断言测试;
  • apps/desktop/src/renderer/src/ui-feedback.test.ts:新增 UI 错误转译单元测试。

@swjybky

swjybky commented Aug 18, 2026

Copy link
Copy Markdown
Owner

很快检查合并

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

【Bug】短篇人物概览标题可被点击编辑,修改或清空时产生连环校验报错

2 participants