fix: embedded page batch operations, jargon re-learn overwrite, and UI polish#214
Closed
YumemiDream wants to merge 5 commits into
Closed
fix: embedded page batch operations, jargon re-learn overwrite, and UI polish#214YumemiDream wants to merge 5 commits into
YumemiDream wants to merge 5 commits into
Conversation
The embedded Plugin Page runs inside a sandboxed iframe without 'allow-modals', so window.confirm() calls are silently blocked by the browser. This caused all batch operations (approve/reject/delete) on the reviews, jargon, and expression-learning pages to appear unresponsive. Replace all window.confirm() calls with a custom showConfirm() function that renders a confirmation dialog using the existing <dialog> element, which works within sandbox restrictions.
…nferred When the v2 learning system encounters a jargon term that already exists and is_complete=True (manually edited or fully inferred), skip the save to prevent overwriting the user's edits. Also preserve the existing count when updating an existing record, instead of resetting it to 1. Fixes: manually edited jargon meanings get overwritten by re-learning.
The jargon list showed confirm and reject buttons for all items regardless of status. For already confirmed jargon, these buttons were no-ops and confusing. Now only unconfirmed items show the approve/reject buttons.
Contributor
There was a problem hiding this comment.
Sorry @YumemiDream, your pull request is larger than the review limit of 150000 diff characters
Collaborator
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.
Fixes #211, Fixes #212, Fixes #213
Summary
修复内嵌 Plugin Page 的三个问题:批量操作在 sandbox iframe 中失效、学习系统覆盖手动编辑的黑话、已确认黑话仍显示确认/驳回按钮。
Changes
1. 批量操作修复 (#211)
showConfirm()函数,基于<dialog>元素实现自定义确认弹窗window.confirm()调用(审查队列、黑话学习、表达方式学习)2. 黑话学习保护 (#212)
v2_learning_integration.py:学习前检查is_complete,跳过已手动编辑的黑话count,不再重置为 13. UI 改进 (#213)
Type of Change
Checklist