From 8a5fcf3953c045ae47d960b0db172b08f9c81d66 Mon Sep 17 00:00:00 2001 From: seungwonme Date: Sun, 15 Nov 2026 16:17:09 +0900 Subject: [PATCH 1/2] feat(setup): project folder, media verify step, presets in UI and URL, ChatGPT app label --- README.md | 6 +- src/App.jsx | 111 +++++++++++++++++-- src/builder.js | 242 ++++++++++++++++++++++++++++++++++++++++-- src/styles.css | 7 ++ tests/e2e/app.spec.js | 52 ++++++++- tests/mac.test.js | 52 +++++++++ tests/windows.test.js | 85 +++++++++++++++ 7 files changed, 531 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index c4ab3e4..4356316 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,14 @@ Live site: - Core tools: Git, Node.js, pnpm, Python, uv, Bun, Docker Desktop, Docker Engine (Colima on macOS or Docker CE in WSL2 Ubuntu on Windows), and Windows WSL2. - Editor tools: VS Code and the Claude Code VS Code extension. -- AI tools: Claude Desktop, Claude Code CLI, Codex App, and Codex CLI. +- AI tools: Claude Desktop, Claude Code CLI, ChatGPT desktop app (includes Codex; Store product `9PLM9XGG6VKS`, shown as Codex App on macOS), and Codex CLI. - Media tools: FFmpeg, yt-dlp, and Deno (the JavaScript runtime yt-dlp needs for YouTube). yt-dlp pulls in Deno automatically. On Windows these use WinGet portable packages (`Gyan.FFmpeg.Essentials`, `yt-dlp.yt-dlp`, `DenoLand.Deno`) with `--scope user`; on macOS they use Homebrew formulae. +- Project folder: downloads a zip over HTTPS (GitHub archive or release asset) into `Documents/`, verifies an optional SHA-256, never overwrites an existing folder (uses `-YYYYMMDD` or skips), and never runs downloaded files. Folder names allow only letters, digits, `.`, `_`, `-`. +- Media verify step: when FFmpeg, yt-dlp, or Deno is selected, the script ends with a Korean per-tool summary (installed + version, or failed + what to do), checks that `ffmpeg -filters` contains `drawtext`, and tells the user to fully quit and reopen the ChatGPT app. The Windows `.bat` stays ASCII-only: Korean strings are emitted as `\uXXXX` escapes and decoded by PowerShell. - Source control tools: GitHub CLI, GitHub auth check, GitLab CLI, and Git identity defaults. - Optional deployment tool: Vercel CLI. -The `video-class` preset (`presetSelection("video-class")`) selects Codex App, FFmpeg, yt-dlp, and Deno for non-developer video classes. It does not add WSL2, Git, or Node.js. +The `video-class` preset (`presetSelection("video-class")`) selects Codex App, FFmpeg, yt-dlp, and Deno for non-developer video classes. It does not add WSL2, Git, or Node.js. Presets are also UI buttons and URL parameters: `?os=win&preset=video-class&project=&name=[&sha256=]` preselects the items and fills the project fields, and the copy-link button produces that short form when the selection matches a preset. Advanced observability settings for Claude Code CLI and Codex CLI are opt-in. They stay off by default, and the UI's "select all" action does not enable them. Prompt/body collection toggles are also off by default. diff --git a/src/App.jsx b/src/App.jsx index 733732b..d4de1e8 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -30,6 +30,7 @@ import { autoAdded, buildScript, deselectWithDependents, + presetSelection, fileName, resolveSelection, selectWithDependencies, @@ -60,9 +61,20 @@ const DEFAULT_SETTINGS = { codexLogExporter: "otlp", codexTraceExporter: "none", codexMetricsExporter: "none", - codexLogUserPrompt: false + codexLogUserPrompt: false, + projectUrl: "", + projectName: "", + projectSha256: "" }; +const PRESETS = [ + ["minimal", "기본 개발 환경"], + ["agent", "AI 에이전트 개발"], + ["video-class", "영상 수업"] +]; +const PRESET_NAMES = new Set(PRESETS.map(([name]) => name)); +const URL_PARAM_ALIASES = { projectUrl: "project", projectName: "name", projectSha256: "sha256" }; + const OTEL_PROTOCOL_OPTIONS = [ ["grpc", "gRPC"], ["http/protobuf", "HTTP/protobuf"], @@ -117,6 +129,7 @@ const GROUP_LABELS = { Editor: "에디터", "AI tools": "AI 도구", Media: "미디어 도구", + Project: "프로젝트", "Web deploy": "웹 배포", "Source control": "소스 관리", Advanced: "고급 설정" @@ -146,7 +159,11 @@ const PACKAGE_TEXT = { "claude-code": { note: "Claude Code 명령줄 도구입니다. 공식 설치 순서를 우선 사용합니다." }, "claude-code-telemetry": { label: "Claude Code 관측 로그", note: "Claude Code 실행 로그 설정을 추가합니다." }, "claude-extension": { label: "Claude Code VS Code 확장", note: "VS Code에서 Claude Code를 쓰기 위한 확장입니다." }, - "codex-app": { note: "Codex 데스크톱 앱입니다." }, + "codex-app": { + label: { mac: "Codex App", win: "ChatGPT 데스크톱 앱 (Codex 포함)" }, + note: { mac: "Codex 데스크톱 앱입니다.", win: "OpenAI ChatGPT 데스크톱 앱입니다. Codex가 포함되어 있습니다." } + }, + "project-folder": { label: "프로젝트 폴더", note: "ZIP 주소에서 내려받아 문서 폴더에 풉니다. 기존 폴더를 덮어쓰지 않고, 받은 파일을 실행하지 않습니다." }, codex: { note: "Codex 명령줄 도구입니다. 공식 설치 순서를 우선 사용합니다." }, "codex-telemetry": { label: "Codex 관측 로그", note: "Codex 실행 로그 설정을 추가합니다." }, ffmpeg: { note: "영상과 오디오를 변환하고 자르는 ffmpeg 명령을 설치합니다." }, @@ -233,8 +250,12 @@ const PERMISSION_HELP = { ] }; -function packageLabel(item) { - return PACKAGE_TEXT[item.id]?.label || item.label; +function packageLabel(item, os) { + const label = PACKAGE_TEXT[item.id]?.label; + if (label && typeof label === "object") { + return label[os] || item.label; + } + return label || item.label; } function packageNote(item, os) { @@ -242,7 +263,7 @@ function packageNote(item, os) { const base = typeof note === "object" ? note[os] : note || item.note; const dependencies = (item.deps[os] || []).map((id) => { const dependency = PACKAGE_BY_ID.get(id); - return dependency ? packageLabel(dependency) : SYSTEM_PACKAGE_LABELS[id] || id; + return dependency ? packageLabel(dependency, os) : SYSTEM_PACKAGE_LABELS[id] || id; }); return dependencies.length ? `${base} 필요 항목: ${dependencies.join(", ")} (자동 선택).` : base; } @@ -296,7 +317,7 @@ function SettingTextInput(props) { } function allSelection() { - return new Set(PACKAGES.filter((item) => !ADVANCED_PACKAGE_IDS.has(item.id) && item.id !== "docker").map((item) => item.id)); + return new Set(PACKAGES.filter((item) => !ADVANCED_PACKAGE_IDS.has(item.id) && item.id !== "docker" && item.id !== "project-folder").map((item) => item.id)); } function parseUrlState() { @@ -307,21 +328,29 @@ function parseUrlState() { const params = new URLSearchParams(window.location.search); const targetOs = params.get("os") === "win" ? "win" : "mac"; let selected = allSelection(); + const projectUrl = params.get("project") ?? params.get("projectUrl") ?? ""; + const preset = params.get("preset"); if (params.has("tools")) { selected = new Set(params.get("tools").split(",").filter((id) => PACKAGE_IDS.has(id))); if (selected.has("docker-engine")) { selected.delete("docker"); } + } else if (PRESET_NAMES.has(preset)) { + selected = presetSelection(preset); + } + if (!params.has("tools") && projectUrl) { + selected.add("project-folder"); } selected = selectWithDependencies(selected, targetOs); const settings = { ...DEFAULT_SETTINGS }; for (const key of URL_SETTING_KEYS) { - if (!params.has(key)) { + const paramName = [URL_PARAM_ALIASES[key], key].find((name) => name && params.has(name)); + if (!paramName) { continue; } - const value = params.get(key); + const value = params.get(paramName); settings[key] = typeof DEFAULT_SETTINGS[key] === "boolean" ? value === "1" : value; } @@ -336,15 +365,28 @@ function settingParam(value) { return typeof value === "boolean" ? (value ? "1" : "0") : value; } +function matchingPreset(selected, os, settings) { + const expectedExtra = settings.projectUrl ? ["project-folder"] : []; + return PRESETS.map(([name]) => name).find((name) => { + const expected = selectWithDependencies(new Set([...presetSelection(name), ...expectedExtra]), os); + return expected.size === selected.size && [...expected].every((id) => selected.has(id)); + }); +} + function urlSearch(os, selected, settings) { const params = new URLSearchParams(); params.set("os", os); - params.set("tools", selectedParam(selected, os)); + const preset = matchingPreset(selected, os, settings); + if (preset) { + params.set("preset", preset); + } else { + params.set("tools", selectedParam(selected, os)); + } for (const key of URL_SETTING_KEYS) { const value = settings[key]; if (value !== DEFAULT_SETTINGS[key]) { - params.set(key, settingParam(value)); + params.set(URL_PARAM_ALIASES[key] || key, settingParam(value)); } } @@ -459,6 +501,16 @@ function App() { }); } + function applyPreset(name) { + const base = new Set(presetSelection(name)); + if (settings.projectUrl) { + base.add("project-folder"); + } + setSelected(selectWithDependencies(base, os)); + setStatus(STATUS_TEXT.ready); + setLastAction(""); + } + function updateSetting(key, value) { setSettings((current) => ({ ...current, [key]: value })); } @@ -502,6 +554,38 @@ function App() { ); } + if (item.id === "project-folder") { + return ( + +
+ updateSetting("projectUrl", value)} + placeholder="https://github.com/owner/repo/archive/refs/heads/main.zip" + /> +
+ updateSetting("projectName", value)} + placeholder="my-project" + /> + updateSetting("projectSha256", value)} + placeholder="64자리 16진수" + /> +
+
+
+ ); + } + if (item.id === "claude-code-telemetry") { return ( @@ -664,6 +748,11 @@ function App() {