desktop: app-version.v1 in drafts.sqlite is never refreshed — reports 1.19.4 while running 2.3.2
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 66/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- sqlite, typescript
- 领域
- backend, desktop-dev
调研方向
在桌面工作区中搜索字面量键 app-version.v1(以及 drafts.sqlite),以找到首次运行时写入状态行的位置;那个写入位置就是要修改的地方。然后查看打包构建版本在其他地方是如何读取的——issue 指向 resources/opencode-cli.version 和 exe 的 ProductVersion——并在启动时将其作为唯一可信来源,而不是持久化的值。完成意味着升级后的全新启动会使 default.dat / app-version.v1 等于正在运行的版本;通过在前后查询 state 表(在 drafts.sqlite 中)来验证。
由索引模型根据 Issue 内容生成。
描述
Description
Summary
default.dat / app-version.v1 in the desktop state store is written once and never updated on upgrade, so it reports a version far behind the running app. I hit this while filing another issue: I stated "Desktop 1.19.4" while actually running 2.3.2, and triage had to correct me.
Environment
- OpenCode Desktop 2.3.2 (
OpenCode.exe→ ProductVersion 2.3.2, bundledresources/opencode-cli.version= 2.3.2) - Windows 10 Pro
- Store:
%APPDATA%\ai.opencode.desktop\drafts.sqlite, tablestate
Evidence
name = default.dat
key = app-version.v1
value = {"version":"1.19.4"}
updated_at = 1792734461668 (2026-10-23 10:47:41)
Neighbouring rows in the same store are current, so this is not a stale database:
default.dat / settings.v3 updated 2026-11-24 15:56 (today)
opencode.global.dat / server updated 2026-11-24 16:32 (today)
default.dat / app-version.v1 updated 2026-10-23 10:47
Expected
Version metadata should reflect the running build, or not be persisted at all.
Actual
Frozen at 1.19.4 across at least one upgrade to 2.3.2.
Impact
- Bug reports and diagnostics that read this key carry a wrong version, which misroutes triage (mine was initially treated as a V1/V2 mismatch).
- Anything gated on "version changed since last run" (release notes, update prompts, one-time migrations) can behave incorrectly if it reads the same key.
Suggested fix
Read the version from the packaged manifest at startup (or compare it with the key and rewrite it on boot); do not rely on a value written once at first run.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot
No response
Operating System
No response
Terminal
No response
- 主要语言
- TypeScript
- 星标
- 228k
- 派生
- 31k
- 平均合并
- 3 小时 22 分钟
- 30 天内合并 PR
- 476
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
area/mcp platform/windows status/repro-simulated type/bug version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#66073 · 1 条评论 ·
维护者通常 1 天内回复
-
area/providers platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 74/100
anomalyco/opencode#66001 · 1 条评论 ·
维护者通常 1 天内回复
-
area/mcp platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#65997 · 1 条评论 ·
维护者通常 1 天内回复
-
@opencode/ui: v2-text-text-faint and light v2-state-fg-warning fall below WCAG AA 4.5:1 contrast可能已有人在做 @KhadeerBasha1232 今天认领。 未关闭status/repro-plausible
难度 2/5 1-3 小时 新手友好度 75/100
anomalyco/opencode#65923 · 2 条评论 ·
维护者通常 1 天内回复
-
area/core platform/windows type/bug version/v2
难度 2/5 1-3 小时 新手友好度 80/100
anomalyco/opencode#65880 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
lidofinance/validator-ejector#233 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
ai-driven-qa bug claude Major
难度 2/5 1-3 小时 新手友好度 78/100
linagora/twake-mail-admin#742 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
OpenSlides/openslides-client#6728 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 66/100