Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Tell the user what to do when a record's model version is newer than this build

未关闭
#232 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
typescript
领域
full-stack

调研方向

首先阅读 #222 中的模型版本 guard 及其调用方:listProjects、getDraft、useDraftProject 和 saveDraft。跟踪被拒绝的记录如何到达选择器、编辑器和本地化通知,然后确定现有修订版本的事实来源。完成的标准是:更新且受支持的记录仍然可见,但会显示更新消息并被阻止;而无法处理的修订版本则会收到损坏或故障排查方面的指导。

由索引模型根据 Issue 内容生成。

描述

enhancement

Follow-up to #222, which added modelVersion to every persisted project and draft record and the guard that refuses a record stamped higher than CURRENT_MODEL_VERSION. That guard is deliberately the simple version: assertSupportedModelVersion throws, storage leaves the record untouched on disk, and whatever the caller already does with a failed read is what the user sees. This issue covers making the user's experience of that refusal something other than an unexplained failure.

The scenario is narrow but real:

  • A user has not updated in a while and their build is out of date.
  • They fetch a project a team member has since saved under a newer schema revision.
  • Their build refuses it, correctly — but nothing tells them the fix is to update.

What a user sees today

A newer project disappears from the picker. listProjects logs and skips any record it cannot read, and after #222 a newer record is one of those. The project is simply absent, with the reason only in the log. If it were reached by id instead — the open flow — the refusal surfaces as the generic %interlinearizer_error_load_projects_failed% notification, which says nothing about versions.

A newer draft refusal is silent until the first edit. getDraft throws; useDraftProject logs and falls back to an empty draft, so the editor opens blank with no message. saveDraft then refuses to overwrite the record the read protected, so the first auto-save raises %interlinearizer_error_save_draft_failed% — the right outcome, arrived at confusingly.

Nothing distinguishes "you are out of date" from "this record is damaged." Those two want opposite advice, and the stamp is enough to tell them apart if we know what revisions exist.

Proposed work

  1. Name the case in the UI. A distinct, localized message for a version refusal, separate from the generic load/save failures: this record was written by a newer version of the extension, and updating is what opens it.
  2. Keep a newer project visible in the picker rather than dropping it, marked as needing a newer version and not openable. This is the piece that requires more than a message — listProjects currently has no way to return a record it refused, so it needs a shape that carries "present but unreadable."
  3. Check the stamp against what revisions actually exist. If the stored revision is one a released build understands, prompt to update. If it is higher than any revision that has ever existed, the record is corrupt, not futuristic — point at support or the troubleshooting docs instead. This needs a source of truth for "revisions that exist" that an old build can consult, which is the part worth designing before building.

Priority

Low. Nobody has data written by any build yet, and even once they do this needs a schema bump plus a version skew inside one team to trigger. Filed so the decision is recorded rather than rediscovered when the second revision lands — at which point item 3's data source has to exist before the revision that needs it ships.

主要语言
TypeScript
星标
2
派生
0
平均合并
2 天 5 小时
30 天内合并 PR
46

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sillsdev/interlinearizer-extension 的其他 Issue

查看 sillsdev/interlinearizer-extension 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。