team-ljyzipelo

공개

분할 ZIP의 미지원 안내 누락을 수정한다

작성자
호시노 히나타
작성 시각
커밋
859f064c7896342bee4aa309fa21aa18c8ed1c54
부모
8ac2ccf
이 시점의 파일 보기

변경된 파일 4개

+66-14
수정docs/ui-scenario-guide.md+1-1
@@ -177,7 +177,7 @@ Ubuntu 제거 안내는 패키지 관리자 터미널 출력입니다. 이전
177177- split-first-volume: .7z.002 등 선택 시 필요한 .001의 정확한 이름 안내. 자동으로 다른 파일을 열지 않음.
178178- split-missing-volume: 확정된 중간 누락의 파일명과 같은 폴더에 모든 조각을 모은 뒤 .001을 다시 여는 방법 안내.
179179- split-incomplete: 불완전하거나 손상된 묶음 안내. 마지막 누락 파일명을 추측하지 않음.
180삭제: - split-unsupported: 분할 ZIP, RAR과 분할 압축 만들기 미지원 안내.
180추가: - split-unsupported: 실제 분할 ZIP의 UnsupportedFeature 오류로 분할 ZIP, RAR과 분할 압축 만들기 미지원 안내를 표시한다. UnsupportedFormat도 같은 안내를 사용한다.
181181- split-source-changed: 목록 이후 조각 변경 시 다시 열기 안내.
182182
183183운영체제 기본 열기 창에서 같은 폴더의 첫 조각 `.7z.001`을 선택한다. 분할 묶음은 최대 999개이며 목록 열람 성공은 전체 데이터 무결성 검증 완료를 뜻하지 않는다. 실제 분할 파일 처리는 작업자 구현 후 독립 도구 표본으로 확인한다. Windows와 Wayland에서 첫 조각 선택, 누락 이름, .001 재시도 안내와 닫기를 확인하며, 위 디자인 상황은 실제 파일 검증을 대신하지 않는다.
수정experiments/rust-ui-memory-app/src/archive_screen.rs+16-12
@@ -1788,12 +1788,14 @@ impl ArchiveApp {
17881788 && (self.model.volume_problem.is_some()
17891789 || self.model.terminal.as_ref().is_some_and(|terminal| {
17901790 terminal.error == Some(ErrorCode::Limit)
1791삭제: || (terminal.error == Some(ErrorCode::UnsupportedFormat)
1792삭제: && self
1793삭제: .model
1794삭제: .archive
1795삭제: .as_ref()
1796삭제: .is_some_and(|p| present::excluded_split(p)))
1791추가: || (matches!(
1792추가: terminal.error,
1793추가: Some(ErrorCode::UnsupportedFormat | ErrorCode::UnsupportedFeature)
1794추가: ) && self
1795추가: .model
1796추가: .archive
1797추가: .as_ref()
1798추가: .is_some_and(|p| present::excluded_split(p)))
17971799 }))
17981800 }
17991801
@@ -2144,12 +2146,14 @@ impl ArchiveApp {
21442146 ui.add(egui::Label::new(present::volume_problem_text(problem)).wrap());
21452147 } else if let Some(code) = t.as_ref().and_then(|t| t.error) {
21462148 ui.label(
2147삭제: if code == ErrorCode::UnsupportedFormat
2148삭제: && self
2149삭제: .model
2150삭제: .archive
2151삭제: .as_ref()
2152삭제: .is_some_and(|p| present::excluded_split(p))
2149추가: if matches!(
2150추가: code,
2151추가: ErrorCode::UnsupportedFormat | ErrorCode::UnsupportedFeature
2152추가: ) && self
2153추가: .model
2154추가: .archive
2155추가: .as_ref()
2156추가: .is_some_and(|p| present::excluded_split(p))
21532157 {
21542158 present::SPLIT_SUPPORT.to_owned()
21552159 } else if creating && code == ErrorCode::SourceChanged {
수정tests/rust-app-ui/scenario_tests.rs+48-0
@@ -603,3 +603,51 @@ fn split_errors_use_main_modal_without_native_child() {
603603 assert!(labels.contains("작업 결과"), "{name}: {labels}");
604604 }
605605}
606추가:
607추가: #[test]
608추가: fn excluded_split_errors_show_support_guidance_in_main_modal() {
609추가: use zipelo_ui_memory_app::archive_ui::ErrorCode;
610추가:
611추가: for code in [ErrorCode::UnsupportedFeature, ErrorCode::UnsupportedFormat] {
612추가: for archive in ["sample.zip.001", "sample.z01", "sample.rar", "sample.7z"] {
613추가: let scenario = scenarios::parse("split-unsupported").unwrap();
614추가: let mut app = scenario.build();
615추가: let ctx = egui::Context::default();
616추가: ctx.set_embed_viewports(false);
617추가: let input = || egui::RawInput {
618추가: screen_rect: Some(egui::Rect::from_min_size(
619추가: egui::Pos2::ZERO,
620추가: egui::vec2(1060.0, 720.0),
621추가: )),
622추가: ..Default::default()
623추가: };
624추가: for _ in 0..3 {
625추가: let mut output = ctx.run_ui(input(), |ui| scenario.show(&mut app, ui));
626추가: output.textures_delta.clear();
627추가: }
628추가: assert_eq!(
629추가: app.model.terminal.as_ref().unwrap().error,
630추가: Some(ErrorCode::UnsupportedFeature)
631추가: );
632추가: app.model.terminal.as_mut().unwrap().error = Some(code);
633추가: app.model.archive = Some(archive.into());
634추가: let mut output = ctx.run_ui(input(), |ui| scenario.show(&mut app, ui));
635추가: let labels = text(&output.shapes);
636추가: output.textures_delta.clear();
637추가: if archive == "sample.7z" {
638추가: assert!(!labels.contains("분할 ZIP과 RAR"));
639추가: } else {
640추가: assert!(
641추가: labels.contains("분할 ZIP과 RAR"),
642추가: "{code:?} {archive}: {labels}"
643추가: );
644추가: assert!(
645추가: output
646추가: .viewport_output
647추가: .keys()
648추가: .all(|id| *id == egui::ViewportId::ROOT)
649추가: );
650추가: }
651추가: }
652추가: }
653추가: }
수정tests/rust-app-ui/scenarios.rs+1-1
@@ -302,7 +302,7 @@ impl Scenario {
302302 Some(VolumeProblemReason::MissingVolume) => ErrorCode::MissingVolume,
303303 Some(VolumeProblemReason::IncompleteSet) => ErrorCode::Integrity,
304304 None if self.name == "split-source-changed" => ErrorCode::SourceChanged,
305삭제: None => ErrorCode::UnsupportedFormat,
305추가: None => ErrorCode::UnsupportedFeature,
306306 };
307307 if let Some(reason) = reason {
308308 state.frame(Event::VolumeProblem(VolumeProblem {