docs(spec): /translate 页 DeepL 风重设计 V0.11 (#43)#44
Merged
Conversation
PC 优先,左输入/右译文/右 sidebar 三栏布局。覆盖:
- 800ms debounce 自动翻译 + 前端 LRU cache + AbortController
- 译文单词 hover 出本地 IPA,click 调 LLM 解读
- 生词本接入 V0.10 FSRS(POST /vocab/{id}/rate),删除孤立的 MASTERED_KEY
- sidebar 双 tab(生词本 + 历史),移动端降级为 FAB + bottom-sheet
- 反向校验工具栏、单词级收藏(item_type=word)
后端零改动,复用 /vocab、/practice/explain/*。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
修复 4 个 blocker + 7 项重要建议: 1. § 4.5/§11 - 后端 /vocab 无 source_type 查询参数;返回字段是 due/is_due 不是 next_review_at;due=true&limit=1 的 count 不是总到期数 → 改为前端 limit=500 全量拉取后本地过滤 + count 2. § 4.3 - WordCard click 改用 POST /practice/explain (kind='word'); /explain/stream 仅支持句子流式,无 kind 字段 3. § 4.4 - 反向校验加 mode='backcheck' 状态位,期间禁用 source watcher 的 debounce 与主译文写入,避免重复打 LLM 4. § 8 - PR 拆分依赖收口:PR2 不露出 ⭐ 收藏入口(sidebar 未通 FSRS),PR3 同步开放收藏闭环 + 删除 MASTERED_KEY/翻牌 建议项: - § 4.1 并发安全用 requestId + await 后校验防 stale response - § 4.1 cache key 用 canonicalText = source.trim() - § 4.3 分词改 Unicode script + CJK 逐字 + 英文词正则 - § 4.3 WordToken 用 button/tabindex 支持键盘 + 事件委托 - § 4.3 hover sticky 区允许鼠标进入浮层 - § 4.5 rate 后用返回 item 更新条目 - § 4.5 去重坑提示 + 单词收藏稳定 source_ref - § 4.6 bottom-sheet 复用 Practice 模式,抽 BottomSheet.vue Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
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.
Summary
关联
文档要点
/vocab无source_type参数 → 前端 limit=500 + 本地过滤;倒计时字段是due/is_due不是next_review_at;rate 后用返回item替换条目BottomSheet.vue共享组件Test plan
spec 本身无运行时改动。验收依据:
🤖 Generated with Claude Code