Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Conversation draft turns permanently dirty when applied conversions match no piece

オープン 初心者向け
#3,573 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@ManoharPaturi がすでに取り組んでいます。

2026年10月27日 から。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
83/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

まず、会話エディターのコード内で useConversationDraft.applyConversions と隣接する changePiece を見つけます。issue にはファイルパスやテストは記載されていません。対応する piece ID がない場合の処理を比較し、その後、関連する下書きまたは会話エディターのテストを実行します。欠落している piece に変換を適用しても、クリーンな下書きがクリーンなままで、破棄確認も表示されなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

Description

useConversationDraft.applyConversions rebuilds every message and piece wrapper object even when no piece in the draft matches an entry in the applied map. The draft's dirty flag compares the messages array by reference against the baseline, so one such no match call leaves the draft permanently dirty.

The live copy of this logic in ConversationEditor wires the converter panel's apply event, which fires with results that can reference pieces the user has already deleted, so a converter round that changes nothing can leave the editor showing the discard confirmation, Your unsaved changes will be lost, on every later close or navigation.

The sibling changePiece in the same hook already tracks a changed flag and returns the original array when nothing matched; applyConversions lacks that guard.

Expected Behavior

Applying conversions that match no piece in the draft should leave the draft clean.

Reproduction Steps

  1. Open a conversation draft and open the converter panel.
  2. Delete the piece a conversion result refers to, then let the panel emit its apply event.
  3. Close the draft: the discard confirmation appears even though nothing changed.

Minimal Reproduction

Call applyConversions({ missingPieceId: ... }) on a clean draft and read dirty.

Environment

PyRIT main.

主要言語
Python
スター
4.7k
フォーク
980
平均マージ
2日 7時間
マージ済み PR(30日)
446

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/PyRIT のほかの issue

microsoft/PyRIT の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。