Repository navigation
fix(quick-edit): reload the latest version on edit conflict - #70
Merged
Merged
Conversation
Resubmitting after editconflict sent the same basetimestamp and failed again. On editconflict/articleexists/pagedeleted, reload the page in place and emit quick-edit/conflict; quick-diff shows latest vs the user's text. The next submit is based on the latest version, so the recreate workaround is gone.
dragon-fish
force-pushed
the
fix/quick-edit-conflict
branch
from
December 3, 2026 13:14
b24c3b5 to
02f0402
Compare
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.
基于 #69,等它合并后再 rebase 到 master。
问题
快速编辑遇到
editconflict后会提示“再次提交即可忽略警告”,但再次提交时仍然带着旧的basetimestamp,只要 MediaWiki 没能自动合并,就会一直冲突。真正生效的只有新建页面那条路径(改用recreate提交),而它本身只是为了绕开 #69 修掉的时间戳问题。改动
editconflict/articleexists/pagedeleted时,按标题和段落重新取最新版本,就地更新当前WikiPage实例(pageInfo与fetchedAt),编辑框内容保持不变。差异按钮、未保存检测和下一次提交拿到的都是最新版本quick-edit/conflict(参数含最新wikiPage、用户文本text和error)dismissWarnings/recreate路径:createonly在提交时根据最新快照判断页面是否存在Spec:
docs/specs/2026-12-03-edit-conflict-timestamps.md(决策 2–4)需要补充的翻译
新增文案:
Edit Conflict、Failed to load the latest version of the page.、The latest version has been loaded. Review the differences; submitting again will save your text over the latest version.;不再使用:You can try to submit again to dismiss the warnings.验证
typecheck:本次改动没有新增错误(preferences-ui里原有的 4 条与本次无关)articleexists并显示差异;再次提交成为普通编辑