{
  "id": "unsaved-document-replacement",
  "scope": "Controlled product reproduction; corrected historical behavior; no customer incident",
  "before": {
    "started": "2026-10-24T13:21:01.465Z",
    "finished": "2026-10-24T13:21:21.652Z",
    "environment": {
      "platform": "win32",
      "release": "10.0.26300",
      "arch": "x64",
      "browser": "Chrome",
      "version": "155.0.8059.80",
      "headless": true,
      "viewport": {
        "width": 1440,
        "height": 1000
      },
      "physicalDevice": false
    },
    "mainSHA256": "b55ed90de177943427f0edd80517636736b83cab9213d3c5a70cb2fb24fad5cd"
  },
  "after": {
    "started": "2026-10-24T13:30:38.188Z",
    "finished": "2026-10-24T13:32:21.589Z",
    "environment": {
      "platform": "win32",
      "release": "10.0.26300",
      "arch": "x64",
      "automation": "Playwright headless actual Chrome/Edge binaries; not physical keyboard or mobile device"
    },
    "mainSHA256": "53d304c1160847dba454477e22abc8c3807c4c991b7c3d32a5a4bb63257cd95d"
  },
  "copied": [
    {
      "file": "before-unsaved.png",
      "source": "evidence/replacement-safety/before/open-pdf-01-unsaved.png",
      "bytes": 123612,
      "sha256": "5b34c8eef18d95387d27b99c9cdcd514c6844a93fcb9204dcfe0032fce5840ae"
    },
    {
      "file": "before-replaced.png",
      "source": "evidence/replacement-safety/before/open-pdf-02-after-replacement.png",
      "bytes": 100147,
      "sha256": "853956e4f156129f4e4ca8b2b587965c6064a51345249685106aa01a55de8c3e"
    },
    {
      "file": "after-confirmation.png",
      "source": "evidence/replacement-safety/after/open-pdf-02-confirmation.png",
      "bytes": 115102,
      "sha256": "55aca92cf0104e302e419c8f79ffb33044a3cfeca19ef8eff725f272e7278059"
    },
    {
      "file": "after-cancel-preserved.png",
      "source": "evidence/replacement-safety/after/open-pdf-03-cancel-preserved.png",
      "bytes": 122878,
      "sha256": "b7bc8746141d41ceb71c6eee7fe1b23fb9ebe7058aab4dcb3c65f63c0f1c9fa0"
    },
    {
      "file": "screenshot-ko.pdf",
      "source": "assets/samples/screenshot-ko.pdf",
      "bytes": 820086,
      "sha256": "cee2b997e257bed5724942c1419277b353b8c0aa1aaa6e8cede0e2573bcab86f"
    },
    {
      "file": "issue-ko.pdfdeskproject",
      "source": "assets/samples/issue-ko.pdfdeskproject",
      "bytes": 52366,
      "sha256": "200b27e2d1b436a8c9069c95f6681f3cf81825a7daf73bc1d3a4c492e0469d6d"
    },
    {
      "file": "screenshot-ko-0.png",
      "source": "assets/samples/screenshot-ko-0.png",
      "bytes": 27349,
      "sha256": "0aad4d5457b0c44481c9fbc00dee653c07b99ba45a44644a96753951de1a165c"
    }
  ],
  "downloads": [
    {
      "file": "screenshot-ko.pdf",
      "ko": "교체 대상으로 사용한 자체 PDF",
      "en": "Original PDF used as the replacement"
    },
    {
      "file": "issue-ko.pdfdeskproject",
      "ko": "교체 대상으로 사용한 자체 프로젝트",
      "en": "Original project used as the replacement"
    },
    {
      "file": "screenshot-ko-0.png",
      "ko": "변경에 사용한 자체 입력 이미지",
      "en": "Original input image used for the edit"
    },
    {
      "file": "before-unsaved.png",
      "ko": "수정 전 시험: 제목·설명·사진을 바꾼 화면",
      "en": "Baseline: edited title, caption and image"
    },
    {
      "file": "before-replaced.png",
      "ko": "수정 전 시험: 경고 없이 다른 PDF가 열린 화면",
      "en": "Baseline: another PDF opened without a warning"
    },
    {
      "file": "after-confirmation.png",
      "ko": "수정 후 시험: 파일 교체 확인 화면",
      "en": "After the fix: document replacement confirmation"
    },
    {
      "file": "after-cancel-preserved.png",
      "ko": "수정 후 시험: 취소한 뒤 보존된 작업",
      "en": "After the fix: draft preserved after cancel"
    },
    {
      "file": "observed-before.json",
      "ko": "수정 전 실제 관찰 기록",
      "en": "Actual baseline observations"
    },
    {
      "file": "observed-after.json",
      "ko": "수정 후 실제 관찰 기록",
      "en": "Actual post-fix observations"
    }
  ],
  "locales": {
    "ko": {
      "title": "수정 사례: 다른 파일을 열 때 작성 중 작업이 사라지던 문제",
      "scope": "PDF Desk 자체를 대상으로 수행한 통제된 재현 시험입니다. 수정된 과거 동작을 설명하며, 실제 고객 신고나 피해 사례가 아닙니다. 아래 가상 Mora 보고서와 구분해 읽어 주세요.",
      "summary": "제목·설명·사진을 바꾼 뒤 프로젝트를 저장하지 않은 상태에서 다른 파일을 열었습니다. 수정 전에는 세 경로 모두 확인창 없이 작업이 교체됐고 실행 취소가 비활성화됐습니다. 수정 후에는 교체 확인에서 취소해 기존 작업을 유지할 수 있었습니다.",
      "environment": "2026-10-24 · Windows 10.0.26300 x64 · Chrome 155.0.8059.80 · Playwright 자동 브라우저(headless), 1440×1000 화면. 수정 전 각 경로 1회 실행. 물리 키보드·실물 휴대전화 시험이 아닙니다. 수정 후 환경과 정확한 UTC 시각은 관찰 기록에 보존했습니다.",
      "tableHeaders": [
        "다른 파일을 여는 경로",
        "수정 전 실제 관찰",
        "수정 후 같은 경로"
      ],
      "results": [
        [
          "PDF 열기",
          "1회: 확인창 없음 / 작업 교체 / 실행 취소 비활성화",
          "확인창에서 취소 → 기존 작업·실행 취소 보존. 명시적 진행 → 새 파일 열림."
        ],
        [
          "프로젝트 열기",
          "1회: 확인창 없음 / 작업 교체 / 실행 취소 비활성화",
          "확인창에서 취소 → 기존 작업·실행 취소 보존. 명시적 진행 → 새 파일 열림."
        ],
        [
          "작업 영역에 PDF 끌어 놓기",
          "1회: 확인창 없음 / 작업 교체 / 실행 취소 비활성화",
          "확인창에서 취소 → 기존 작업·실행 취소 보존. 명시적 진행 → 새 파일 열림."
        ]
      ],
      "figures": [
        {
          "file": "before-filename-focus.png",
          "original": "before-replaced.png",
          "title": "수정 전: 다른 PDF로 바로 바뀜",
          "alt": "수정 전 실제 상단 화면을 자른 그림: 열린 파일 이름이 screenshot-ko.pdf로 바뀜",
          "caption": "제목 “교체 보호 통제시험 open-pdf”를 입력한 작업이 사라지고 screenshot-ko.pdf가 열렸습니다. 위 그림은 실제 상단 화면의 파일명 부분입니다. 경고 부재와 실행 취소 비활성화는 실행 중 대화상자·상태 기록으로 확인했습니다."
        },
        {
          "file": "after-confirmation-focus.png",
          "original": "after-confirmation.png",
          "title": "수정 후: 현재 작업을 어떻게 할지 먼저 선택",
          "alt": "현재 작업을 보존하는 실제 파일 교체 확인창을 자른 그림",
          "caption": "실제 확인창 부분을 잘라 크게 보여줍니다. 프로젝트 저장, 저장하지 않고 계속, 취소를 구분했습니다. 프로젝트 다운로드 요청만으로 현재 작업을 버리지 않습니다. 취소한 뒤 제목·설명·사진과 실행 취소 기록이 유지되는지 같은 시험에서 확인했습니다."
        }
      ],
      "steps": [
        "사진 기록의 자체 예시를 열고 문서 제목·첫 단계 설명·첫 이미지를 변경합니다. 프로젝트를 저장하지 않습니다.",
        "PDF 열기로 제공된 screenshot-ko.pdf를 선택합니다. 다른 두 경로는 새 세션에서 프로젝트 열기 또는 PDF 끌어 놓기로 각각 확인했습니다.",
        "수정 전에는 다른 문서로 교체되고 실행 취소가 비활성화되는지 기록했습니다. 수정 후에는 확인창에서 취소하고 제목·설명·사진·실행 취소가 유지되는지 확인합니다.",
        "계속하려는 경우에만 저장하지 않고 계속을 선택합니다. 편집 내용을 남기려면 프로젝트 저장을 선택하고 다운로드한 파일을 확인한 뒤 교체 여부를 결정합니다."
      ],
      "insights": [
        [
          "확인한 문제",
          "브라우저 탭을 떠날 때의 경고는 앱 안에서 다른 파일을 여는 세 경로에서 나타나지 않았습니다. 저장되지 않은 편집 내용을 실행 취소로 되찾을 수도 없었습니다."
        ],
        [
          "수정한 동작",
          "다른 파일의 검사와 현재 작업의 교체 결정을 분리했습니다. 프로젝트 저장 선택만으로 교체하지 않고, 취소나 읽기 실패 때 현재 작업을 유지하도록 수정했습니다."
        ],
        [
          "보고서에 남길 점",
          "“작업이 사라짐” 대신 변경한 항목, 교체 경로, 경고 여부와 실행 취소 상태를 적습니다. 수정 후에도 같은 조건으로 확인해 결과를 구분합니다."
        ]
      ],
      "limits": "각 경로의 관측 기록이며 모든 브라우저나 모든 파일에 대한 발생률이 아닙니다. 새 자동 저장 기능은 아닙니다. PDF 출력은 읽기용 결과이고, 다시 편집할 원본·이미지·입력은 프로젝트에 따로 보관해야 합니다. 실제 디스크 저장 완료 여부를 웹앱이 다운로드 시작만으로 확인하지는 못합니다.",
      "sourceNote": "소스 기준: apps/workbench/main.jsx SHA-256 b55ed90de177…(수정 전) → 53d304c11608…(수정 후 검사본). 전체 해시와 실제 시각은 JSON에 있습니다. 사진·화면·문서는 개인 정보가 없는 자체 시험 자료입니다."
    },
    "en": {
      "title": "Fix case: opening another file discarded the current draft",
      "scope": "This is a controlled reproduction against PDF Desk itself. It documents corrected historical behavior, not a customer complaint or loss. Keep it separate from the fictional Mora report below.",
      "summary": "After changing the title, caption and image, we opened another file without saving the project. Before the fix, all three paths replaced the draft without confirmation and disabled Undo. After the fix, canceling the replacement confirmation retained the draft.",
      "environment": "2026-10-24 · Windows 10.0.26300 x64 · Chrome 155.0.8059.80 · Playwright automated browser (headless), 1440×1000 viewport. One baseline attempt per path. This is not a physical keyboard or phone test. The post-fix environment and exact UTC times are retained in the observation records.",
      "tableHeaders": [
        "Replacement path",
        "Observed before the fix",
        "Same path after the fix"
      ],
      "results": [
        [
          "Open PDF",
          "1 attempt: no confirmation / draft replaced / Undo disabled",
          "Cancel in confirmation → draft and Undo preserved. Explicit continuation → new file opens."
        ],
        [
          "Open project",
          "1 attempt: no confirmation / draft replaced / Undo disabled",
          "Cancel in confirmation → draft and Undo preserved. Explicit continuation → new file opens."
        ],
        [
          "Drop a PDF onto the work area",
          "1 attempt: no confirmation / draft replaced / Undo disabled",
          "Cancel in confirmation → draft and Undo preserved. Explicit continuation → new file opens."
        ]
      ],
      "figures": [
        {
          "file": "before-filename-focus.png",
          "original": "before-replaced.png",
          "title": "Before: the other PDF opens immediately",
          "alt": "Crop of the actual baseline top bar: the open filename changed to screenshot-ko.pdf",
          "caption": "The draft titled “교체 보호 통제시험 open-pdf” was replaced by screenshot-ko.pdf. This is a crop of the actual filename area. Absence of a warning and disabled Undo were recorded from runtime dialogs and state."
        },
        {
          "file": "after-confirmation-focus.png",
          "original": "after-confirmation.png",
          "title": "After: choose what to do with the current draft",
          "alt": "Crop of the actual replacement confirmation offering to preserve the current work",
          "caption": "This enlarged crop shows the actual confirmation. Save project, continue without saving and cancel are separate choices. Requesting a download does not discard the draft. The same test checked that cancel preserved the title, caption, image and Undo."
        }
      ],
      "steps": [
        "Open the original photo-record example and change its title, first caption and first image. Do not save a project.",
        "Choose Open PDF and select the provided screenshot-ko.pdf. Test Open project and PDF drag-and-drop separately in fresh sessions.",
        "Before the fix, we recorded that the document changed and Undo became disabled. In the current version, cancel the confirmation and check that the title, caption, image and Undo remain.",
        "Choose Continue without saving only when you intend to replace the draft. To keep editable work, choose Save project, check the downloaded file and then decide whether to replace it."
      ],
      "insights": [
        [
          "Observed problem",
          "The leave-page warning did not appear for these three in-app file-opening paths. Undo could not recover the unsaved editing state."
        ],
        [
          "Changed behavior",
          "Validation of the next file is separated from the replacement decision. Choosing Save project alone does not replace the draft; cancel or a read failure retains it."
        ],
        [
          "What to report",
          "Instead of “my work disappeared”, record the fields changed, replacement path, warning and Undo state. Repeat the same conditions after the fix and distinguish the results."
        ]
      ],
      "limits": "These are path-specific observations, not a failure rate for all browsers or files. This is not autosave. A PDF is the reading output; keep a separate project for source images and editable inputs. Starting a download does not let the web app verify that the file has been saved to disk.",
      "sourceNote": "Source: apps/workbench/main.jsx SHA-256 b55ed90de177… (before) → 53d304c11608… (tested after fix). Full hashes and actual times are in the JSON. Images, screens and documents are original test materials without personal records."
    }
  },
  "generated": {
    "time": "2026-10-24T13:34:33.259Z",
    "engine": "packages/pdf-core makeDocument",
    "records": [
      {
        "locale": "ko",
        "pdf": "assets/guides/issue/replacement/replacement-ko.pdf",
        "pdfSHA256": "d146938be4a21b4f817c368f92c841f3d3d03c2fc87cd65256646cc0c1b94f2d",
        "project": "assets/guides/issue/replacement/replacement-ko.pdfdeskproject",
        "projectSHA256": "57251773eeaad6e4526fd0540af3ca7bcefbb4d492198cb322e75399438dcded"
      },
      {
        "locale": "en",
        "pdf": "assets/guides/issue/replacement/replacement-en.pdf",
        "pdfSHA256": "f39e9c1361bd5b42f060e58931e94c6d5ee7b9de7f5e9b426e8e24765922c942",
        "project": "assets/guides/issue/replacement/replacement-en.pdfdeskproject",
        "projectSHA256": "6208aa4e394e1acf6b46db571908d867142d4cb602d3ce1a0046ea65f4f29955"
      }
    ]
  }
}