feat(desktop): TODO 詳細の添付画像を chip 化+プレビュー対応#229
Conversation
AgentManager のタスク詳細画面では「やってほしいこと」「ゴール」 フィールドが whitespace-pre-wrap の素テキストだったため、添付画像が `` という長い マークダウン文字列のまま剥き出しで見えていた。コンポーザ (`ImagePasteTextarea`) のチップ UI と詳細表示の体験を揃える。 - `todoAgent.readAttachment` tRPC procedure を追加。 `userData/todo-agent/attachments/` 配下のパスのみ読み取りを許可し、 base64 + MIME を返す。それ以外のパスは FORBIDDEN で拒否。 - 添付参照を抽出する `extractAttachmentRefs` / `stripAttachmentRefs` ユーティリティを追加(POSIX/Windows 両対応、UUID プリフィックス除去)。 - `AttachmentChips`(読み取り専用 chip 一覧)と `AttachmentPreviewDialog` (ネスト Dialog で画像表示)を追加。 - SessionDetail の description / goal 表示を、本文(strip 済み) + チップ列にレイアウト。チップクリックでプレビューを開く。 AgentManager ダイアログは閉じない(ネスト Dialog として動作)。
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 6 minutes and 58 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- scheduler.ts: supervisor.start は同期 wrap で実際には reject しない ため、'.catch で failed に倒す' という docstring が嘘だった。docstring を実態(不慮の throw を console に出すだけの保護的 catch)に合わせ、 status 書き換え経路は drain 側の責務に一本化。 - supervisor.ts (extractScheduledWakeup): 範囲外の delaySeconds を silent clamp していたが、Claude が想定した再開時刻と実際の再開が ずれて挙動が読めなくなる。コメント通り malformed 扱いで wait に 遷移させない(done の通常終了に倒す)よう修正。 - globals.css (.animate-shine): Stylelint の declaration-empty-line-before と value-keyword-case を解消(currentColor → currentcolor、宣言前空行)。 - CommentBody.tsx: rehype-sanitize の defaultSchema が className を 剥がして remark-github-blockquote-alert の markdown-alert スタイル が当たらない問題を修正。markdown-alert / markdown-alert-title / octicon クラスのみ明示許可するカスタムスキーマを渡す。 - README.md: #229 の追加日 2026-04-17 → 2026-04-16(他行と同じ PR 作成日 UTC 基準)に揃える。
Closes #228
概要
AgentManager(TodoManager)のタスク詳細画面で、「やってほしいこと」「ゴール」フィールドに添付された画像を chip(クリップマーク + ファイル名) として表示し、クリックで 画像プレビューダイアログ を開けるようにした。プレビューを開いても AgentManager ダイアログは閉じない(ネスト Dialog 動作)。
これまでは
` という長いマークダウン文字列として剥き出しになり、クリックしてもプレビューできなかった(要 issue 報告: #228)。
session.description/session.goalをwhitespace-pre-wrapの素テキストでそのまま表示しており、コンポーザで貼り付けた画像は `変更点
main プロセス
apps/desktop/src/main/todo-agent/trpc-router.tstodoAgent.readAttachmentquery を追加。userData/todo-agent/attachments/配下のパスのみ読み取りを許可し、外側のパスはFORBIDDENで拒否(path traversal 対策)。base64 + MIME を返す。renderer プロセス
apps/desktop/src/renderer/features/todo-agent/TodoManager/utils/attachmentRefs/extractAttachmentRefsと、本文側から除去するstripAttachmentRefsを追加。POSIX / Windows 両対応の正規表現、saveAttachmentが付ける UUID プリフィックスを表示用に除去。apps/desktop/src/renderer/features/todo-agent/TodoManager/components/AttachmentChips/ImagePasteTextareaの chip スタイルと統一(クリップ + ファイル名)。apps/desktop/src/renderer/features/todo-agent/TodoManager/components/AttachmentPreviewDialog/Dialogで画像をプレビュー。readAttachmentで base64 取得して `TodoManager.tsxのSessionDetailを改修AttachmentPreviewDialogを開く。previewAttachmentをリセット。スクリーンショット
(動作確認後に追記)
受け入れ条件チェック
bun run lint:fixbun run typecheck補足
/todo-agent/attachments/を含むパスに限定しており、Linear の画像 URL やdata:URL など他の参照には影響しない。Dialogはmodal=false(既存 PresetsDialog と同じ)なので、複数ダイアログのオーバーレイが重なっても既存の挙動と一貫。