From 285ede51fb7567326c968d81d80c35cbde38a0cd Mon Sep 17 00:00:00 2001
From: Lee <5612totoro@gmail.com>
Date: Sun, 8 Nov 2026 11:55:06 +0900
Subject: [PATCH 1/2] fix(migrate): drop the white frame around the completion
video popup
---
src/styles/migrate.css | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/styles/migrate.css b/src/styles/migrate.css
index 51a9d9d..d6cf03a 100644
--- a/src/styles/migrate.css
+++ b/src/styles/migrate.css
@@ -204,7 +204,10 @@
/* the video popup of a finished migration */
.mg-video-bar { display: flex; justify-content: flex-end; }
.mg-pop-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
-.mg-pop { background: var(--canvas); border: 1px solid var(--card-line); border-radius: var(--r-card); width: min(960px, 100%); max-height: 100%; padding: var(--sp-md); display: grid; gap: var(--sp-md); outline: none; }
-.mg-pop header { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-md); }
-.mg-pop h2 { margin: 0; font-size: 18px; }
-.mg-pop video { width: 100%; max-height: calc(100vh - 160px); background: #000; border-radius: var(--r-control); }
+/* the video fills the popup: no white frame around it. The title stays for screen readers, the close button sits on the video. */
+.mg-pop { position: relative; width: min(960px, 100%); max-height: 100%; outline: none; }
+.mg-pop header { position: absolute; top: var(--sp-sm); right: var(--sp-sm); z-index: 1; }
+.mg-pop h2 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
+.mg-pop header .btn { background: rgba(0, 0, 0, 0.55); color: #fff; border-color: rgba(255, 255, 255, 0.45); }
+.mg-pop header .btn:hover { background: rgba(0, 0, 0, 0.75); }
+.mg-pop video { display: block; width: 100%; max-height: calc(100vh - 48px); background: #000; border-radius: var(--r-card); }
From 0ae7c19f274ffe2c6307e023607c3113cafc93cb Mon Sep 17 00:00:00 2001
From: Lee <5612totoro@gmail.com>
Date: Sun, 8 Nov 2026 12:31:38 +0900
Subject: [PATCH 2/2] fix(migrate): say when the completion video fails to
load; visible focus ring on the popup's close button
---
src/components/CompletionVideo.test.tsx | 28 ++++++++++++++++++++++++-
src/components/CompletionVideo.tsx | 9 +++++++-
src/i18n/ja.json | 3 ++-
src/styles/migrate.css | 3 +++
4 files changed, 40 insertions(+), 3 deletions(-)
diff --git a/src/components/CompletionVideo.test.tsx b/src/components/CompletionVideo.test.tsx
index 758e8c7..07370f2 100644
--- a/src/components/CompletionVideo.test.tsx
+++ b/src/components/CompletionVideo.test.tsx
@@ -1,4 +1,4 @@
-import { cleanup, render, screen } from "@testing-library/react";
+import { cleanup, fireEvent, render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { fakeRun } from "../api/fakes";
import type { Run } from "../api/types";
@@ -87,3 +87,29 @@ describe("motion", () => {
expect(v).toHaveAttribute("controls");
});
});
+
+describe("when the video cannot be loaded", () => {
+ const open = () => {
+ const r = render();
+ r.rerender();
+ return r;
+ };
+
+ it("says so instead of leaving a blank box, and keeps the close button", async () => {
+ open();
+ fireEvent.error(screen.getByRole("dialog").querySelector("video")!);
+ expect(screen.getByRole("alert")).toHaveTextContent("영상을 불러오지 못했습니다.");
+ expect(screen.getByRole("dialog").querySelector("video")).toBeNull();
+ await userEvent.click(screen.getByRole("button", { name: "닫기" }));
+ expect(screen.queryByRole("dialog")).toBeNull();
+ });
+
+ it("tries the video again the next time it is opened", async () => {
+ open();
+ fireEvent.error(screen.getByRole("dialog").querySelector("video")!);
+ await userEvent.click(screen.getByRole("button", { name: "닫기" }));
+ await userEvent.click(screen.getByRole("button", { name: /완료 영상 보기/ }));
+ expect(screen.queryByRole("alert")).toBeNull();
+ expect(screen.getByRole("dialog").querySelector("video")).not.toBeNull();
+ });
+});
diff --git a/src/components/CompletionVideo.tsx b/src/components/CompletionVideo.tsx
index b3612a7..47bae4b 100644
--- a/src/components/CompletionVideo.tsx
+++ b/src/components/CompletionVideo.tsx
@@ -15,6 +15,13 @@ export function justSucceeded(prev: { id?: string; status?: string }, run?: Pick
/** The person asked the system to reduce motion: the video then waits for them to press play. */
export const prefersReducedMotion = (): boolean => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
+/** The video, or the reason there is none: the popup has no visible title or frame to show that it failed. Mounted per opening, so a failure does not stick. */
+function PopupVideo() {
+ const [failed, setFailed] = useState(false);
+ if (failed) return
영상을 불러오지 못했습니다.
;
+ return