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

Preview annotations replace each other after the preview page reloads

已关闭 适合新手
#14,364 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

已经有一个关联 PR 被合并了。

  • #14360 来自 @not-compromised —— 已合并
  • #16971 来自 @jackroberts236 —— 已关闭,未合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
84/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
desktop

调研方向

从 apps/desktop/src/preview/PickPreload.ts 及其 idSequence 开始,然后阅读 apps/web/src/composerDraftStore.ts 中的 addPreviewAnnotation。在 preview reload、Refresh、Back 或 webview remount 后复现 picks。完成的标准是 annotations 获得不同的 id,并且 draft 保留两个 annotation chips,而不是替换较早的那个。

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

描述

What happened

Several annotations picked in the desktop preview for one prompt overwrite each other: a new one replaces the previous one instead of being added.

Diagnosis

apps/desktop/src/preview/PickPreload.ts numbers ids with a module-level counter (idSequence) that restarts on every page load (refresh, HMR, Back, webview remount). The first pick after any load is annotation_2. The composer draft keeps annotations across reloads, and addPreviewAnnotation (apps/web/src/composerDraftStore.ts) drops an entry with the same id before adding the new one, so the older annotation is replaced and its chip now shows the new one.

Steps to reproduce
  1. Open a page in the desktop preview.
  2. Pick an element, add a comment, attach.
  3. Refresh the preview.
  4. Pick another element, add a comment, attach.
  5. The draft holds one annotation (the second); the first is gone.
Version

v0.0.44 and main @ 0fcd5f906 (first seen on 0.0.42)

Environment

Linux (Arch, Hyprland), T3 Code desktop app

Evidence
Desktop trace, one evening on 0.0.42: 15 picks, most after a
preview refresh, Back, or webview re-registration.
Two simulated page loads through the same counter both yield
"annotation_2".

Fix: #14360

Investigated and filed by Claude Opus 5.5 in Claude Code.

主要语言
TypeScript
星标
24.8k
派生
6.4k
平均合并
8 小时 4 分钟
30 天内合并 PR
199

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

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

pingdotgg/t3code 的其他 Issue

查看 pingdotgg/t3code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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