FEAT GUI: Share image, audio, and video previews with datasets
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python, typescript
- Lĩnh vực
- api, backend, frontend, testing-qa
Hướng nghiên cứu
Start with frontend/src/components/Chat/MessageList.tsx, especially ImageWithSpinner and MediaWithFallback, then inspect frontend/src/utils/media.ts, pyrit/backend/routes/media.py, and the URL helpers in pyrit/backend/mappers/attack_mappers.py. Run the relevant frontend and Python tests before changing behavior; done means shared previews work for dataset details and chat, media remains lazy and safe, and mapping and failure cases are covered without cloud credentials.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
The dataset detail view must display images and play audio/video, but the GUI already implements much of this in chat. Duplicating media rendering or treating stored file paths as browser URLs would produce inconsistent behavior.
Work item 5 of 17 in #2744. Technical prerequisite: item 4's detail view and the seed detail API. Keep not ready yet until promoted.
Describe the solution you'd like
Extract shared preview components and narrowly reusable media-URL mapping so chat and dataset details use the same behavior.
- Render supported images and use native audio/video playback controls. Load media lazily/on demand; never autoplay. Stop playback when leaving or dismissing a preview.
- Expose client-fetchable seed asset URLs through the existing media-serving/signing mechanisms. Keep stable source references separate from expiring display URLs.
- Preserve linked text/media in one example. Show useful loading, missing-file, expired/inaccessible-link, and unsupported-format states, with retry/download where supported.
- Keep existing allowed storage roots, inline-media allowlists, authentication, and content-security rules. Do not enable arbitrary local files or active HTML/SVG rendering to make a preview work.
- Keep chat behavior intact while extracting its helpers. Do not refactor unrelated message rendering.
Acceptance criteria:
- Image, audio, and video fixtures work in dataset details and still work in chat.
- Local stored assets and signed blob URLs use the existing backend paths correctly.
- Media is not eagerly downloaded for every dataset/table row and never starts playing automatically.
- Broken assets and unsupported codecs fail visibly without breaking the table.
- Tests cover shared preview behavior and media URL mapping without real cloud credentials.
Describe alternatives you've considered, if relevant
Do not introduce a new media store, video transcoding service, separate chat/dataset players, or broader filesystem access. Unsupported formats can remain downloadable rather than requiring new codecs.
Additional context
Start with frontend\src\components\Chat\MessageList.tsx (ImageWithSpinner and MediaWithFallback), frontend\src\utils\media.ts, pyrit\backend\routes\media.py, and the URL resolution/signing helpers in pyrit\backend\mappers\attack_mappers.py. The media route already recognizes seed-prompt-entries. Follow the frontend, Python, and relevant test instructions.
- Ngôn ngữ chính
- Python
- Star
- 4.5k
- Fork
- 896
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 214
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/PyRIT
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Bug: triage GUI help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
microsoft/PyRIT#2868 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/PyRIT
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
PedestrianDynamics/pyFDS-Evac#343 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
theskumar/python-dotenv#708 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Docs Timedelta
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pandas-dev/pandas#69919 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
API documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
zephyrproject-rtos/west#1009 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày