Repository navigation
feat: 支持当前章节正文编辑与覆盖确认 - #14
Merged
Merged
Conversation
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解决的问题 / Problem
Fixes #12
当前章节无法手工修正错别字、乱码和段落切分。阅读设置新增正文编辑入口,覆盖前明确确认旧内容无法找回。
改动后的行为 / Resulting behavior
updateBookChapters与 Rust 按 cid 的章节回写,在本书写队列内复核 cid、地址和原文;并发重载、同步正文变化或目录变更时拒绝旧草稿覆盖。保留最新图片下载引用,不覆盖其他章节或元信息。验证 / Validation
pnpm exec tsc --noEmit通过。pnpm run i18n:check通过;中英文 key 一致,无新增硬编码界面文案。现有 42 条提示保留。pnpm build通过。node scripts/chapter-editing-test.mjs通过,覆盖 blocks / paragraphs、分段、空章、原对象隔离、图片引用与锚点、最新图片下载结果、其他章节隔离、正文冲突、cid / 地址变化、章节删除、写失败与重试。node scripts/reader-position-transition-test.mjs通过。node scripts/tts-replacements-test.mjs通过。git diff --check通过。建议验收:分别在 TXT、含插图 EPUB 和已下载在线章节进入编辑,修改/增删段落;取消确认后检查原文不变,重新编辑并确认保存后检查正文与分页、章首位置;退出重进验证持久化。未下载章节应禁用入口,编辑期间同步更新该章应拒绝旧草稿覆盖。补充手机与桌面截图。
数据与兼容性 / Data and compatibility
沿用当前 SQLite 章节增量回写及指纹重算,不新增持久化字段、迁移或旧正文副本。章节 cid、标题、目录和地址不改动;图片引用保留。空正文显式保留 blocks,在线书不会将其视为未下载。书签/注释记录不删除,但其文字锚点可能失效,覆盖确认已说明。
提交前检查 / Checklist