Repository navigation
fix(WikiPage): send fetch time as starttimestamp instead of touched - #69
Merged
Merged
Conversation
starttimestamp came from pageInfo.touched, which for a missing page falls back to the client clock at IPE load. Recreating a page deleted after that, or saving a blank page, was rejected as pagedeleted. Record curtimestamp of every fetch and send it; blank pages send neither timestamp.
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.
问题
WikiPage.edit()用pageInfo.touched作为starttimestamp。touched是页面最后一次被触碰的时间;页面不存在时,它会退回到DEFAULT_PAGE_INFO.touched,也就是 IPE 加载时的客户端时间。MediaWiki 会把starttimestamp之后发生的删除判定为pagedeleted,所以:recreate”绕过去的)newBlankPage().edit()(快速重定向、偏好导出到用户页)在页面开着期间目标被删过,也会被拒绝改动
curtimestamp,实例新增fetchedAt字段记录本次取页的服务器时间(newFromApi/newBatchFromApi/reloadSelfInfo)edit()用fetchedAt作为starttimestamp;没取过页的空白页不发送starttimestamp,也不发送basetimestampSpec:
docs/specs/2026-12-03-edit-conflict-timestamps.md。快速编辑的冲突处理(spec 决策 2–4)在后续的 PR 里做。验证
vitest run src/models:58 条全部通过typecheck:本次改动没有新增错误;preferences-ui里原有的 4 条 Vue 组件类型错误与本次改动无关newBlankPage().edit()不带时间戳也能正常写入