File view comments disappear from the file after switching threads and coming back
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
apps/web/src/components/files/FilePreviewPanel.tsxの683行目付近を読み、次にapps/web/src/components/diffs/AnnotatableCodeView.tsxがcomposerのドラフトストアからアノテーションを復元する方法と比較してください。ビューのマウント時に、セクションと行範囲を使って現在のファイルのコメントを復元してください。スレッドを切り替えてファイルに戻った後も、送信済みのインラインコメントが表示されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happened
After adding a line comment in the file view, it shows inline under the commented lines. After switching to another thread and back, the inline comments are gone from the file. They still exist as chips in the chat composer, but the file no longer shows which lines were commented, so you can't see what you've already said about the file.
Diagnosis
EditableFileSurface keeps inline comments in local React state that starts empty: useState<FileCommentLineAnnotation[]>([]) (apps/web/src/components/files/FilePreviewPanel.tsx:683 at v0.1.7). Submitting a comment writes it to the composer draft store (addReviewComment) and to that local state, but nothing rebuilds the local state from the store when the view mounts. Switching threads unmounts the view, so the inline comments are lost even though reviewComments in the draft store still has them.
The diff view already handles this: AnnotatableCodeView reads getComposerDraft(target)?.reviewComments and rebuilds the stored annotations (apps/web/src/components/diffs/AnnotatableCodeView.tsx:125-157). The file view could do the same for comments whose sectionId is file:<path>, using startIndex/endIndex for the line range. Current main has the same useState([]) initializer.
Steps to reproduce
- Open a thread in a project and open any file in the right panel's file view.
- Select some lines, type a comment, and submit it. The comment appears inline under those lines, and a chip appears in the composer.
- Switch to another thread.
- Switch back and look at the same file.
- Expected: the inline comment is still shown. Actual: it's gone, and only the composer chip remains.
Version
0.1.7 (T3 Code Desktop)
Environment
macOS 15 (Darwin 24.6.0), arm64. Desktop app against its local server.
Evidence
Source reading at v0.1.7 and `main`, as described above. No logs are involved, since this is client-side UI state.
Related issues
None found.
Fix applied or workaround
The composer chips (<file> L<a> to L<b>) still list every submitted comment, and the comments are still sent with the next message.
Filed by
Diagnosed and written by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, via T3 Code triage
- 主要言語
- TypeScript
- スター
- 24.8k
- フォーク
- 6.4k
- 平均マージ
- 8時間 26分
- マージ済み PR(30日)
- 133
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
pingdotgg/t3code#33044 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
prime-radiant-inc/evener#5901 ·
メンテナーはふだん 1 日以内に返信
-
Bug: Batcher binds the texture that opens a new batch twice (one draw call per element with maxBatchableTextures = 1)対応中かも @darzarzycki が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 2 日以内に返信
-
area:study-data p2-high ready-for-agent type:chore
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fderuiter/deruiter.dev#3706 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
nicobailon/pi-subagents#3242 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
awslabs/visual-asset-management-system#1234 ·
メンテナーはふだん 1 日以内に返信