FEAT GUI: Preserve chat drafts when exploring datasets
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Start with frontend\src\App.tsx, components\Chat\ChatWindow.tsx, ChatInputArea.tsx, ChatInputAreaHandle.restoreDraft/getDraftRevision, hooks\useChatConverters.ts, and the route helpers, following the frontend style and test instructions. Verify the ordinary, unsaved, rapid-navigation, stale-completion, and attachment-cleanup cases described in the acceptance criteria, with a single safe pending handoff on return.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
Chat draft text, attachments, and converter state currently live inside chat components. Navigating to Datasets must not discard that work or lose which attack/conversation the user intended to return to.
Work item 6 of 17 in #2744. This prepares the draft handoff used by items 7-8 and remains not ready yet until promoted after the preceding work item.
Describe the solution you'd like
Add a typed, navigation-safe draft/context handoff using the existing React state/context conventions. Keep state at the narrowest shared owner needed for the chat-to-dataset journey; do not introduce another state-management library.
Preserve the originating attack and active conversation, text, attachments, system-prompt draft, selected target, and converter configuration/applied draft state. Distinguish a new unsaved chat from a persisted attack. Preserve dataset filters/page/selection for returning to the explorer.
Provide an explicit pending-import payload that can be applied once after the destination chat is ready. Guard against stale asynchronous navigation/import results overwriting a newer draft. Avoid timeout-based synchronization and make attachment/blob URL ownership and cleanup explicit.
Acceptance criteria:
- Visiting Datasets and returning preserves the existing draft and originating conversation.
- Text plus media and converter/system-prompt state survive the navigation round trip.
- A pending handoff is applied once, not duplicated by rerenders or Back/Forward navigation.
- Switching context or encountering a missing/locked destination does not overwrite an unrelated draft.
- Focus and dirty-draft replacement can be managed by the import UI.
- Tests cover ordinary return, unsaved chat, rapid navigation, stale completion, and attachment cleanup.
Describe alternatives you've considered, if relevant
Do not persist GUI drafts as conversation history, place prompt/media content or credentials in URLs, add a memory schema, or build a batch draft queue. Full cross-session draft persistence is not required by this issue.
Additional context
Start with frontend\src\App.tsx, components\Chat\ChatWindow.tsx, ChatInputArea.tsx and ChatInputAreaHandle.restoreDraft/getDraftRevision, hooks\useChatConverters.ts, and the route helpers. Preserve existing chat recovery and target-resolution behavior. Follow frontend style/test instructions.
- Lenguaje dominante
- Python
- Estrellas
- 4.5k
- Forks
- 896
- Merge medio
- 3 d 5 h
- PR fusionados (30 d)
- 200
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/PyRIT
-
BUG HarmBench loader drops ContextString, so contextual behaviors are sent without their context Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Todos los issues de microsoft/PyRIT
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
browser-use/browser-use#5905 ·
-
type: enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ynput/ayon-python-api#363 ·
-
bug needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
modelscope/FunASR#3728 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
open-compass/opencompass#2655 ·