Conversation draft turns permanently dirty when applied conversions match no piece
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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
- Open a conversation draft and open the converter panel.
- Delete the piece a conversion result refers to, then let the panel emit its apply event.
- 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 天 9 小时
- 30 天内合并 PR
- 422
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/PyRIT 的其他 Issue
-
Conversation drawer shows the previous attack's conversations after switching attacks可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
BUG: case insensitive keyword selection returns a shifted range when lowercasing expands a character未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
相似的 Issue
-
lesson-submission pending-review
难度 2/5 1-3 小时 新手友好度 72/100
Ikalus1988/MisakaNet#3956 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
aws-samples/sample-per-model-bedrock#574 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 70/100
521xueweihan/HelloGitHub#4133 ·
-
plot_components fails for logistic models with minmax scaling and no floor可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 4 天内回复
-
Update migen未关闭
难度 2/5 1-3 小时 新手友好度 70/100
YosysHQ/oss-cad-suite-build#220 ·